From patchwork Tue Sep 22 01:23:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Yang X-Patchwork-Id: 78221 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6C483A04DE; Tue, 22 Sep 2020 03:43:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E617E1D9BB; Tue, 22 Sep 2020 03:42:56 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A833F1D8F1 for ; Tue, 22 Sep 2020 03:42:53 +0200 (CEST) IronPort-SDR: eLM7E/2NvqnpkM7dZadOGTn25A8P63JC9fsJaRL1GHEhyScWq8TWgPNemNUQbyYm5qtIYGmnpY SnBw3jCA/6SA== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="148265187" X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="148265187" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2020 18:42:52 -0700 IronPort-SDR: hFNZle6G4O1H8J30TXRDTuQA99lwidwNfKEEfs4l6+Vm0dIyRW0tPmdvhauY/113jigSnTMwX7 UxFSKrn5LqiA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="322045701" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136]) by orsmga002.jf.intel.com with ESMTP; 21 Sep 2020 18:42:48 -0700 From: SteveX Yang To: dev@dpdk.org Cc: wei.zhao1@intel.com, jia.guo@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, konstantin.ananyev@intel.com, SteveX Yang Date: Tue, 22 Sep 2020 01:23:34 +0000 Message-Id: <20200922012338.11277-2-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200922012338.11277-1-stevex.yang@intel.com> References: <20200916055212.25019-1-stevex.yang@intel.com> <20200922012338.11277-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH v2 1/5] net/e1000: fix max mtu size packets with vlan tag cannot be received by default X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" testpmd will initialize default max packet length to 1518 which doesn't include vlan tag size in ether overheader. Once, send the max mtu length packet with vlan tag, the max packet length will exceed 1518 that will cause packets dropped directly from NIC hw side. e1000 can support single vlan tags that need more 4 bytes for max packet size, so, configures the correct max packet size in dev_config ops. Fixes: 35b2d13fd6fd ("net: add rte prefix to ether defines") Signed-off-by: SteveX Yang --- drivers/net/e1000/em_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 1dc360713..485a30625 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -441,6 +441,12 @@ eth_em_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); intr->flags |= E1000_FLAG_NEED_LINK_UPDATE; + /** + * Considering vlan tag packet, max frame size should be MTU and + * corresponding ether overhead. + */ + eth_em_mtu_set(dev, dev->data->mtu); + PMD_INIT_FUNC_TRACE(); return 0; From patchwork Tue Sep 22 01:23:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Yang X-Patchwork-Id: 78222 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 139B4A04DE; Tue, 22 Sep 2020 03:43:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 564061DA66; Tue, 22 Sep 2020 03:42:59 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 50A5D1D95A for ; Tue, 22 Sep 2020 03:42:55 +0200 (CEST) IronPort-SDR: dZLgem72O5s+AESUV6rTH7ac2/9BsKJh2WHibUrna6ceos8b5TCGEISybOkExeCIJ0RkxCfAck UsbTzROD24lQ== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="148265189" X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="148265189" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2020 18:42:54 -0700 IronPort-SDR: 7R0UJ6vzp4r8momQvl1klHfIwrOPG2K2hR1OqBIjRXNCl3oIjULzlZ3DkmuIGtZDhcQRrAdoZ5 eSUbhYUtEmcg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="322045718" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136]) by orsmga002.jf.intel.com with ESMTP; 21 Sep 2020 18:42:52 -0700 From: SteveX Yang To: dev@dpdk.org Cc: wei.zhao1@intel.com, jia.guo@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, konstantin.ananyev@intel.com, SteveX Yang Date: Tue, 22 Sep 2020 01:23:35 +0000 Message-Id: <20200922012338.11277-3-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200922012338.11277-1-stevex.yang@intel.com> References: <20200916055212.25019-1-stevex.yang@intel.com> <20200922012338.11277-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH v2 2/5] net/igc: fix max mtu size packets with vlan tag cannot be received by default X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" testpmd will initialize default max packet length to 1518 which doesn't include vlan tag size in ether overheader. Once, send the max mtu length packet with vlan tag, the max packet length will exceed 1518 that will cause packets dropped directly from NIC hw side. igc can support single vlan tag that need more 4 bytes for max packet size, so, configures the correct max packet size in dev_config ops. Fixes: a5aeb2b9e225 ("net/igc: support Rx and Tx") Signed-off-by: SteveX Yang --- drivers/net/igc/igc_ethdev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c index 810568bc5..36ef325a4 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -341,7 +341,12 @@ eth_igc_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - ret = igc_check_mq_mode(dev); + /* Considering vlan tag packet, max frame size should be MTU and + * corresponding ether overhead. + */ + eth_igc_mtu_set(dev, dev->data->mtu); + + ret = igc_check_mq_mode(dev); if (ret != 0) return ret; From patchwork Tue Sep 22 01:23:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Yang X-Patchwork-Id: 78223 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ACF45A04DE; Tue, 22 Sep 2020 03:43:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A06051DA76; Tue, 22 Sep 2020 03:43:00 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 405E21DA60 for ; Tue, 22 Sep 2020 03:42:58 +0200 (CEST) IronPort-SDR: pmSih1+cVMcApPuAGJK4NpElMlPpQyUc6ru1KrtKUOqG1pBpnb/pPjCU5opdrU9pC9WxVx1pCl jLkp2z+A3wlQ== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="148265198" X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="148265198" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2020 18:42:57 -0700 IronPort-SDR: LVpSnULEk5x3Z4d9odGZpXaPVJxuIO4UmYvTHw/QnZdXfGYbvIVmBmkXWjFIWMlgG6kKYMzfAV aTbMlnRE5ofQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="322045728" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136]) by orsmga002.jf.intel.com with ESMTP; 21 Sep 2020 18:42:55 -0700 From: SteveX Yang To: dev@dpdk.org Cc: wei.zhao1@intel.com, jia.guo@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, konstantin.ananyev@intel.com, SteveX Yang Date: Tue, 22 Sep 2020 01:23:36 +0000 Message-Id: <20200922012338.11277-4-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200922012338.11277-1-stevex.yang@intel.com> References: <20200916055212.25019-1-stevex.yang@intel.com> <20200922012338.11277-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH v2 3/5] net/ice: fix max mtu size packets with vlan tag cannot be received by default X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" testpmd will initialize default max packet length to 1518 which doesn't include vlan tag size in ether overheader. Once, send the max mtu length packet with vlan tag, the max packet length will exceed 1518 that will cause packets dropped directly from NIC hw side. ice can support dual vlan tags that need more 8 bytes for max packet size, so, configures the correct max packet size in dev_config ops. Fixes: 50cc9d2a6e9d ("net/ice: fix max frame size") Signed-off-by: SteveX Yang --- drivers/net/ice/ice_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index cfd357b05..0ca6962b1 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3157,6 +3157,11 @@ ice_dev_configure(struct rte_eth_dev *dev) if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; + /* Considering QinQ packet, max frame size should be MTU and + * corresponding ether overhead. + */ + ice_mtu_set(dev, dev->data->mtu); + ret = ice_init_rss(pf); if (ret) { PMD_DRV_LOG(ERR, "Failed to enable rss for PF"); From patchwork Tue Sep 22 01:23:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Yang X-Patchwork-Id: 78224 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CA490A04DE; Tue, 22 Sep 2020 03:43:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 40BC71DA9C; Tue, 22 Sep 2020 03:43:04 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 133B71DA8C for ; Tue, 22 Sep 2020 03:43:00 +0200 (CEST) IronPort-SDR: 8E5S31jiArmYaEnbx662qP9+pxgQECnmErkDBPy51BaW00dGr4WLMPSg0F2agFflDLub3fKx1k L1CyT86qdzsA== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="148265200" X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="148265200" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2020 18:43:00 -0700 IronPort-SDR: O2daw5eGgNjmpFBVkdybmY2aHLau22t4ZlKQd5pFlB989WA+DT35JZEj+TD6RYw99s6UasFZus kNp8RcunCMoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="322045754" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136]) by orsmga002.jf.intel.com with ESMTP; 21 Sep 2020 18:42:58 -0700 From: SteveX Yang To: dev@dpdk.org Cc: wei.zhao1@intel.com, jia.guo@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, konstantin.ananyev@intel.com, SteveX Yang Date: Tue, 22 Sep 2020 01:23:37 +0000 Message-Id: <20200922012338.11277-5-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200922012338.11277-1-stevex.yang@intel.com> References: <20200916055212.25019-1-stevex.yang@intel.com> <20200922012338.11277-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH v2 4/5] net/i40e: fix max mtu size packets with vlan tag cannot be received by default X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" testpmd will initialize default max packet length to 1518 which doesn't include vlan tag size in ether overheader. Once, send the max mtu length packet with vlan tag, the max packet length will exceed 1518 that will cause packets dropped directly from NIC hw side. But for i40e/i40evf, they should support dual vlan tags that need more 8 bytes for max packet size, so, configure the correct max packet size in dev_config ops. Fixes: ff8282f4bbcd ("net/i40e: consider QinQ when setting MTU") Signed-off-by: SteveX Yang --- drivers/net/i40e/i40e_ethdev.c | 5 +++++ drivers/net/i40e/i40e_ethdev_vf.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 563f21d9d..023c86d66 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1930,6 +1930,11 @@ i40e_dev_configure(struct rte_eth_dev *dev) ad->tx_simple_allowed = true; ad->tx_vec_allowed = true; + /* Considering QinQ packet, max frame size should be MTU and + * corresponding ether overhead. + */ + i40e_dev_mtu_set(dev, dev->data->mtu); + if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 8531cf6b1..b268b3d00 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1669,6 +1669,7 @@ i40evf_dev_configure(struct rte_eth_dev *dev) I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); uint16_t num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues, dev->data->nb_tx_queues); + struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode; /* Initialize to TRUE. If any of Rx queues doesn't meet the bulk * allocation or vector Rx preconditions we will reset it. @@ -1681,6 +1682,16 @@ i40evf_dev_configure(struct rte_eth_dev *dev) dev->data->dev_conf.intr_conf.lsc = !!(dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC); + + /* Considering QinQ packet, max frame size should be MTU and + * corresponding ether overhead. + */ + if (dev->data->mtu == RTE_ETHER_MTU && + rxmode->max_rx_pkt_len == RTE_ETHER_MAX_LEN) { + rxmode->max_rx_pkt_len = RTE_ETHER_MTU + I40E_ETH_OVERHEAD; + rxmode->offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; + } + if (num_queue_pairs > vf->vsi_res->num_queue_pairs) { struct i40e_hw *hw; int ret; From patchwork Tue Sep 22 01:23:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Yang X-Patchwork-Id: 78225 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4DE94A04DE; Tue, 22 Sep 2020 03:43:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CB8641DAA8; Tue, 22 Sep 2020 03:43:06 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 1B80E1D8F1 for ; Tue, 22 Sep 2020 03:43:03 +0200 (CEST) IronPort-SDR: 1NKogqrcYGaeR2hppKbvTk+zzvVJrh6nXF/xbNPzlfVXvY5leRnamQfzU5pbLks2X4mZ3RrUBJ vt2j/FrkMwYQ== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="148265207" X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="148265207" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2020 18:43:03 -0700 IronPort-SDR: gj74IFRvcLjvfLVE0CfG+QZ+Mc3FzOHMeHDoC+Ms3BK+m5qZyJ8Rc925EqEzEOTPUz5l0bATw0 dN3kdteYwxiA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="322045782" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136]) by orsmga002.jf.intel.com with ESMTP; 21 Sep 2020 18:43:01 -0700 From: SteveX Yang To: dev@dpdk.org Cc: wei.zhao1@intel.com, jia.guo@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, konstantin.ananyev@intel.com, SteveX Yang Date: Tue, 22 Sep 2020 01:23:38 +0000 Message-Id: <20200922012338.11277-6-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200922012338.11277-1-stevex.yang@intel.com> References: <20200916055212.25019-1-stevex.yang@intel.com> <20200922012338.11277-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH v2 5/5] net/iavf: fix max mtu size packets with vlan tag cannot be received by default X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" testpmd will initialize default max packet length to 1518 which doesn't include vlan tag size in ether overheader. Once, send the max mtu length packet with vlan tag, the max packet length will exceed 1518 that will cause packets dropped directly from NIC hw side. iavf can support dual vlan tags that need more 8 bytes for max packet size, so, configures the correct max packet size in dev_config ops. Fixes: 02d212ca3125 ("net/iavf: rename remaining avf strings") Signed-off-by: SteveX Yang --- drivers/net/iavf/iavf_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 6bb915d81..47caaeda3 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -226,6 +226,11 @@ iavf_dev_configure(struct rte_eth_dev *dev) if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; + /* Considering QinQ packet, max frame size should be MTU and + * corresponding ether overhead. + */ + iavf_dev_mtu_set(dev, dev->data->mtu); + /* Vlan stripping setting */ if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) { if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)