net/vmxnet3: enable LRO
authorYong Wang <yongwang@vmware.com>
Mon, 29 Aug 2016 19:18:50 +0000 (12:18 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Fri, 30 Sep 2016 10:27:18 +0000 (12:27 +0200)
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 <yongwang@vmware.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
doc/guides/nics/features/vmxnet3.ini
drivers/net/vmxnet3/vmxnet3_ethdev.c

index c5c75ad..ef95932 100644 (file)
@@ -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
index 3a4c777..51e2d4c 100644 (file)
@@ -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 |