From: Yong Wang Date: Mon, 29 Aug 2016 19:18:50 +0000 (-0700) Subject: net/vmxnet3: enable LRO X-Git-Tag: spdx-start~5888 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a6cebea95c63b08a0fdf28cdacc9a721dce5f9d9;p=dpdk.git net/vmxnet3: enable LRO This change enables device LRO if requested. The current implementation of jumbo frame Rx can be used for LRO directly without changes. Note that since jumbo frame uses both ring0 and ring1, it cannot be enabled in UPT (VMDirectPath) mode. Signed-off-by: Yong Wang Acked-by: Stephen Hemminger --- diff --git a/doc/guides/nics/features/vmxnet3.ini b/doc/guides/nics/features/vmxnet3.ini index c5c75ad927..ef95932ab5 100644 --- a/doc/guides/nics/features/vmxnet3.ini +++ b/doc/guides/nics/features/vmxnet3.ini @@ -9,6 +9,7 @@ Link status event = Y Queue start/stop = Y MTU update = Y Jumbo frame = Y +LRO = Y TSO = Y Promiscuous mode = Y Allmulticast mode = Y diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 3a4c777d1e..51e2d4cf80 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -527,6 +527,11 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev) if (dev->data->dev_conf.rxmode.hw_ip_checksum) devRead->misc.uptFeatures |= VMXNET3_F_RXCSUM; + if (dev->data->dev_conf.rxmode.enable_lro) { + devRead->misc.uptFeatures |= VMXNET3_F_LRO; + devRead->misc.maxNumRxSG = 0; + } + if (port_conf.rxmode.mq_mode == ETH_MQ_RX_RSS) { ret = vmxnet3_rss_configure(dev); if (ret != VMXNET3_SUCCESS) @@ -728,7 +733,8 @@ vmxnet3_dev_info_get(__rte_unused struct rte_eth_dev *dev, dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP | DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM; + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_TCP_LRO; dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |