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 948B7A04B1; Wed, 30 Sep 2020 02:34:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA7431DAB5; Wed, 30 Sep 2020 02:34:42 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 27D8E1DAA9 for ; Wed, 30 Sep 2020 02:34:39 +0200 (CEST) IronPort-SDR: QReff9fnL+ekEIRjg1Kd3a/NYUPcDvWH6y1rZGmO37BLqGDGX7VGRmomSGDG5kL3Ih2HhxrL9L bsjZynZNNCdA== X-IronPort-AV: E=McAfee;i="6000,8403,9759"; a="223922463" X-IronPort-AV: E=Sophos;i="5.77,320,1596524400"; d="scan'208";a="223922463" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 17:34:36 -0700 IronPort-SDR: SwKNDvF95/yse+DOeLF5WnEop5RakM8nRUX3o60Bh55BA2dfD8t2faMDxXa5OKKpKjGweJm5FN o4MEuxLg4phA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,320,1596524400"; d="scan'208";a="293859487" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga007.fm.intel.com with ESMTP; 29 Sep 2020 17:34:35 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 29 Sep 2020 17:34:34 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 30 Sep 2020 08:34:33 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Wed, 30 Sep 2020 08:34:33 +0800 From: "Zhang, Qi Z" To: "Ananyev, Konstantin" , "Yang, SteveX" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Guo, Jia" , "Yang, Qiming" , "Wu, Jingjing" , "Xing, Beilei" Thread-Topic: [PATCH v4 3/5] net/ice: fix max mtu size packets with vlan tag cannot be received by default Thread-Index: AQHWlWX9EtlsyJt3ykGYcwPr+NXbUKl/f7dggAA4XgCAAJqoUA== Date: Wed, 30 Sep 2020 00:34:32 +0000 Message-ID: <6ad9e3ec00194e31891d97849135655c@intel.com> References: <20200923040909.73418-1-stevex.yang@intel.com> <20200928065541.7520-1-stevex.yang@intel.com> <20200928065541.7520-4-stevex.yang@intel.com> <8459e979b76c43cdbd5a9fbd809f9b00@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 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" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Wednesday, September 30, 2020 7:02 AM > To: Zhang, Qi Z ; Yang, SteveX > ; dev@dpdk.org > Cc: Zhao1, Wei ; Guo, Jia ; Yang, > Qiming ; Wu, Jingjing ; Xin= g, > Beilei > Subject: RE: [PATCH v4 3/5] net/ice: fix max mtu size packets with vlan t= ag > cannot be received by default >=20 > > > > > -----Original Message----- > > > From: Yang, SteveX > > > Sent: Monday, September 28, 2020 2:56 PM > > > To: dev@dpdk.org > > > Cc: Zhao1, Wei ; Guo, Jia ; > > > Yang, Qiming ; Zhang, Qi Z > > > ; Wu, Jingjing ; Xing, > > > Beilei ; Ananyev, Konstantin > > > ; Yang, SteveX > > > Subject: [PATCH v4 3/5] net/ice: fix max mtu size packets with vlan > > > tag cannot be received by default > > > > > > 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 | 11 +++++++++++ > > > 1 file changed, 11 insertions(+) > > > > > > diff --git a/drivers/net/ice/ice_ethdev.c > > > b/drivers/net/ice/ice_ethdev.c index > > > cfd357b05..6b7098444 100644 > > > --- a/drivers/net/ice/ice_ethdev.c > > > +++ b/drivers/net/ice/ice_ethdev.c > > > @@ -3146,6 +3146,7 @@ ice_dev_configure(struct rte_eth_dev *dev) > > > struct ice_adapter *ad =3D > > > ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > > > struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); > > > +uint32_t frame_size =3D dev->data->mtu + ICE_ETH_OVERHEAD; > > > int ret; > > > > > > /* Initialize to TRUE. If any of Rx queues doesn't meet the @@ > > > -3157,6 > > > +3158,16 @@ 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 |=3D DEV_RX_OFFLOAD_RSS_HASH; > > > > > > +/** > > > + * Considering QinQ packet, max frame size should be equal or > > > + * larger than total size of MTU and Ether overhead. > > > + */ > > > > > +if (frame_size > dev->data->dev_conf.rxmode.max_rx_pkt_len) { > > > > > > Why we need this check? > > Can we just call ice_mtu_set directly >=20 > I think that without that check we can silently overwrite provided by use= r > dev_conf.rxmode.max_rx_pkt_len value. OK, I see But still have one question dev->data->mtu is initialized to 1518 as default , but if application set d= ev_conf.rxmode.max_rx_pkt_len =3D 1000 in dev_configure. does that mean we will still will set mtu to 1518, is this expected? Should we just call ice_mtu_set(dev, dev_conf.rxmode.max_rx_pkt_len) here? >=20 > > And please remove above comment, since ether overhead is already > considered in ice_mtu_set. > > > > > > > +ret =3D ice_mtu_set(dev, dev->data->mtu); if (ret !=3D 0) return ret= ; } > > > + > > > ret =3D ice_init_rss(pf); > > > if (ret) { > > > PMD_DRV_LOG(ERR, "Failed to enable rss for PF"); > > > -- > > > 2.17.1 > > >=20