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 1E91AA04B7; Wed, 14 Oct 2020 13:35:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F07751DDFE; Wed, 14 Oct 2020 13:35:40 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 8527C1DDFE for ; Wed, 14 Oct 2020 13:35:37 +0200 (CEST) IronPort-SDR: I9Uo58KEr8O1pS4z0qEGOvcWEvqA/uZS0ycLPwB71GUJ/VGRAP4fZjLptqLU3Lx7R3oXOL5llT NkBNoJypJEkQ== X-IronPort-AV: E=McAfee;i="6000,8403,9773"; a="165298424" X-IronPort-AV: E=Sophos;i="5.77,374,1596524400"; d="scan'208";a="165298424" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 04:35:34 -0700 IronPort-SDR: 73jMnozQzfDa0epyh6MTEf9D0dywwCa96dCNOgrk1shzg4rJKAKM0O7A6Hn/djr6J97+JKLZh2 estCbGShL5LQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,374,1596524400"; d="scan'208";a="357352382" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga007.jf.intel.com with ESMTP; 14 Oct 2020 04:35:33 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 14 Oct 2020 04:35:32 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 14 Oct 2020 19:35:31 +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, 14 Oct 2020 19:35:31 +0800 From: "Zhang, Qi Z" To: "Yang, SteveX" , "dev@dpdk.org" CC: "Guo, Jia" , "Yang, Qiming" , "Wu, Jingjing" , "Xing, Beilei" , "Ananyev, Konstantin" , "Yang, SteveX" Thread-Topic: [PATCH v5 3/5] net/ice: fix max mtu size packets with vlan tag cannot be received by default Thread-Index: AQHWogto2r9s/UkdDEa55XMxU9gGm6mW936A Date: Wed, 14 Oct 2020 11:35:30 +0000 Message-ID: <505e2e9f71ec4fb7adff1f3f03a6e0c6@intel.com> References: <20200928065541.7520-1-stevex.yang@intel.com> <20201014091945.1934-1-stevex.yang@intel.com> <20201014091945.1934-4-stevex.yang@intel.com> In-Reply-To: <20201014091945.1934-4-stevex.yang@intel.com> 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.108.32.68] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 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" Couple comments inline, Btw, no need to submit a new version, I will ack and merge the patch with b= elow fix directly. but please keep in mind in your next patch. > -----Original Message----- > From: SteveX Yang > Sent: Wednesday, October 14, 2020 5:20 PM > To: dev@dpdk.org > Cc: Guo, Jia ; Yang, Qiming ; > Zhang, Qi Z ; Wu, Jingjing ; > Xing, Beilei ; Ananyev, Konstantin > ; Yang, SteveX > Subject: [PATCH v5 3/5] net/ice: fix max mtu size packets with vlan tag c= annot > be received by default Title is too long, please use check-git-log.sh Renamed to=20 "fix MTU size for VLAN packets" >=20 > when application presets the max rx packet length and expected mtu at the s/when/When > same time, driver need identify if the preset max frame size can hold mtu= data > and Ether overhead completely. >=20 > if not, adjust the max frame size via mtu_set ops within dev_configure. s/if/If >=20 > Fixes: 50cc9d2a6e9d ("net/ice: fix max frame size") >=20 > Signed-off-by: SteveX Yang > --- > drivers/net/ice/ice_ethdev.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c = index > 0056da78a..a707612c2 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -3305,6 +3305,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; >=20 > /* Initialize to TRUE. If any of Rx queues doesn't meet the @@ -3316,6 > +3317,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; >=20 > + /** > + * Reset the max frame size via mtu_set ops if preset max frame > + * cannot hold MTU data and Ether overhead. > + */ > + if (frame_size > dev->data->dev_conf.rxmode.max_rx_pkt_len) { > + 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