From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EX13-EDG-OU-002.vmware.com (ex13-edg-ou-002.vmware.com [208.91.0.190]) by dpdk.org (Postfix) with ESMTP id BB7F32956 for ; Wed, 24 Aug 2016 02:22:36 +0200 (CEST) Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Tue, 23 Aug 2016 17:22:28 -0700 Received: from sc2-edge-ivybridge-01.eng.vmware.com (unknown [10.172.139.164]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 1F1D840673; Tue, 23 Aug 2016 17:22:34 -0700 (PDT) From: Yong Wang To: CC: , , , Yong Wang Date: Tue, 23 Aug 2016 17:05:40 -0700 Message-ID: <1471997140-46527-7-git-send-email-yongwang@vmware.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1471997140-46527-1-git-send-email-yongwang@vmware.com> References: <1471049909-18117-5-git-send-email-yongwang@vmware.com> <1471997140-46527-1-git-send-email-yongwang@vmware.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: None (EX13-EDG-OU-002.vmware.com: yongwang@vmware.com does not designate permitted sender hosts) Subject: [dpdk-dev] [PATCH v2 6/6] net/vmxnet3: enable lro X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2016 00:22:37 -0000 The current implementation of jumbo frame rx can be used for LRO directly without changes. This change enables device LRO if requested. Note that since jumbo frame uses both ring0 and ring1, it cannot be enabled in UPT (VMDirectPath) mode. Signed-off-by: Yong Wang --- doc/guides/nics/features/vmxnet3.ini | 1 + drivers/net/vmxnet3/vmxnet3_ethdev.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/guides/nics/features/vmxnet3.ini b/doc/guides/nics/features/vmxnet3.ini index c5c75ad..ef95932 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 6b1e720..0d7732d 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -540,6 +540,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) @@ -741,7 +746,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 | -- 1.9.1