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 CCF73A04B1; Wed, 23 Sep 2020 06:27:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6E8F71DB2A; Wed, 23 Sep 2020 06:27:05 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0AF251DABC for ; Wed, 23 Sep 2020 06:27:02 +0200 (CEST) IronPort-SDR: 7evv5Q+V1/a89Zn9BQIjG+xibQ08ocUprprQKbShCqVyZUgs7fkgTbEnX94EgUvEWWFTFyA0Ju 7oIllJ5kmrYg== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="178858024" X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="178858024" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 21:27:02 -0700 IronPort-SDR: l9fkRiAWq+fbz103RyCvyTgZkvWI4V1T8AdAzkzeRvlRAa+zMgPScH4+qtxQna4fxML+IGrvVt P3t+pUm+zSwA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="322471591" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136]) by orsmga002.jf.intel.com with ESMTP; 22 Sep 2020 21:26:59 -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: Wed, 23 Sep 2020 04:09:06 +0000 Message-Id: <20200923040909.73418-3-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200923040909.73418-1-stevex.yang@intel.com> References: <20200922012338.11277-1-stevex.yang@intel.com> <20200923040909.73418-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH v3 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; -- 2.17.1