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 6CCBBFFA for ; Mon, 29 Aug 2016 21:35:58 +0200 (CEST) Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Mon, 29 Aug 2016 12:35:45 -0700 Received: from sc2-edge-ivybridge-01.eng.vmware.com (unknown [10.172.139.164]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 86EE3B0611; Mon, 29 Aug 2016 12:35:57 -0700 (PDT) From: Yong Wang To: CC: , , , , Yong Wang Date: Mon, 29 Aug 2016 12:18:50 -0700 Message-ID: <1472498330-18591-7-git-send-email-yongwang@vmware.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472498330-18591-1-git-send-email-yongwang@vmware.com> References: <1471997140-46527-2-git-send-email-yongwang@vmware.com> <1472498330-18591-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 v3 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: Mon, 29 Aug 2016 19:35:58 -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 Acked-by: Stephen Hemminger --- 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 cdbcb78..a41106d 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