From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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"); -- 2.17.1