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 7ACABA00BE; Wed, 30 Oct 2019 07:35:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 803141BEB5; Wed, 30 Oct 2019 07:35:00 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 036B91BEB3 for ; Wed, 30 Oct 2019 07:34:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 23:34:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,246,1569308400"; d="scan'208";a="400040909" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 29 Oct 2019 23:34:56 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 29 Oct 2019 23:34:56 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 29 Oct 2019 23:34:55 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.63]) with mapi id 14.03.0439.000; Wed, 30 Oct 2019 14:34:54 +0800 From: "Min, JiaqiX" To: "Ye, Xiaolong" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame size Thread-Index: AQHVjWbUYaxsven5JkOHoXqmBTZ8nKdvN3WAgAG1JtD//5/kgIACKfVA Date: Wed, 30 Oct 2019 06:34:54 +0000 Message-ID: <88691F3C94B94D4584B3478B96DE5B740B06C61E@SHSMSX101.ccr.corp.intel.com> References: <20191024190818.36524-1-jiaqix.min@intel.com> <20191028155453.37207-1-jiaqix.min@intel.com> <20191028084627.GA12923@intel.com> <88691F3C94B94D4584B3478B96DE5B740B06B869@SHSMSX101.ccr.corp.intel.com> <20191029050705.GE12923@intel.com> In-Reply-To: <20191029050705.GE12923@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDU5YWZkZDUtNmRmNy00ZjA3LTliMGItNDk1YWY4NWMxOTY5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiOFRnd2E1KzVwVWZrdHpHY3JSQkp3bkJTS2FTRHZNb0FPZG9CRGpyYVdldWgxd3NheXl4XC9lbUZCa3V3VVwvR2RjIn0= dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame size 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" Hi, Xiaolong > -----Original Message----- > From: Ye, Xiaolong > Sent: Tuesday, October 29, 2019 1:07 PM > To: Min, JiaqiX > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame size >=20 > On 10/29, Min, JiaqiX wrote: > >Hi Xiaolong, > > > >> -----Original Message----- > >> From: Ye, Xiaolong > >> Sent: Monday, October 28, 2019 4:46 PM > >> To: Min, JiaqiX > >> Cc: dev@dpdk.org; stable@dpdk.org > >> Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame > >> size > >> > >> On 10/28, Min JiaqiX wrote: > >> >Max frame size is not set to HW, so packets above the MTU do not get > >> >dropped by HW. The patch fixed the issue. > >> > > >> >Fixes: ae2bdd0219cb ("net/ice: support MTU setting") > >> > >> We should set max frame size to HW in the beginning when the driver > >> was introduced, so the fix commit should be 50370662b727 ("net/ice: > >> support device and queue ops") > >Modify commit message in patch v3. > >> > >> Fix this while merging. > >> > >> >Cc: stable@dpdk.org > >> > > >> >Signed-off-by: Min JiaqiX > >> >--- > >> >v2: > >> >* Changed commit message. > >> >--- > >> > drivers/net/ice/ice_ethdev.c | 4 ++++ > >> > 1 file changed, 4 insertions(+) > >> > > >> >diff --git a/drivers/net/ice/ice_ethdev.c > >> >b/drivers/net/ice/ice_ethdev.c index 022b58c01..403305cfb 100644 > >> >--- a/drivers/net/ice/ice_ethdev.c > >> >+++ b/drivers/net/ice/ice_ethdev.c > >> >@@ -2506,6 +2506,10 @@ ice_dev_start(struct rte_eth_dev *dev) > >> > > >> > pf->adapter_stopped =3D false; > >> > > >> >+ /* Set the max frame size */ > >> >+ ice_aq_set_mac_cfg(hw, > >> >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL); > >> >+ > >> > >> Why set the max frame size to HW in start ops, not in init stage like = in i40e? > >> and what if max_rx_pkt_len hasn't been set? > >> > >max_rx_pkt_len need to be set to HW when set mtu , init stage won't be > called when open port again. >=20 > Agree, I think it makes sense to set max frame size to hw in start ops, b= ut > what if user doesn't set mtu, then the max_rx_pkt_len would be 0, do we > need a default max frame value in this case? Agree, we should set a default max frame size value to HW. >=20 > And since i40e doesn't update max frame size to HW in start ops, do you > think it needs a fix? It can't fix the issue to set max frame size to HW in start ops in i40e, I= don't know the cause. It is ok to set max frame size to HW in link_update ops in i40e,=20 however when user opens port, link_update ops will be called three times,= =20 so I don't think it makes sense to set max frame size to hw in link_update = ops too. Where to set the maximum frame size to HW in i40e is a problem. >=20 > Thanks, > Xiaolong >=20 >=20 > > > >Appendix: > >Steps for using Example/ethtool to set mtu: > >EthApp>stop 0 > >EthApp>mtu 0 200 > >EthApp>open 0 > > > >> > >> Thanks, > >> Xiaolong > >> > >> > >> > return 0; > >> > > >> > /* stop the started queues if failed to start all queues */ > >> >-- > >> >2.17.1 > >> > > >> > >> Reviewed-by: Xiaolong Ye > >> > >> Applied to dpdk-next-net-intel. Thanks.