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 6C41DA0353; Mon, 4 Nov 2019 08:06:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0095D5681; Mon, 4 Nov 2019 08:06:06 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 61F2C4C99; Mon, 4 Nov 2019 08:06:04 +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 orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Nov 2019 23:06:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,266,1569308400"; d="scan'208";a="401516041" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 03 Nov 2019 23:06:02 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 3 Nov 2019 23:06:02 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 3 Nov 2019 23:06:01 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.248]) with mapi id 14.03.0439.000; Mon, 4 Nov 2019 15:06:00 +0800 From: "Min, JiaqiX" To: "Ye, Xiaolong" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4] net/ice: fix setting max frame size Thread-Index: AQHVjwoddx9Wv+MYDkSEWBfqCdBj+6d50rkAgACrCpA= Date: Mon, 4 Nov 2019 07:05:59 +0000 Message-ID: <88691F3C94B94D4584B3478B96DE5B740B06E583@SHSMSX101.ccr.corp.intel.com> References: <20191029125431.16862-1-jiaqix.min@intel.com> <20191030100400.3120-1-jiaqix.min@intel.com> <20191104025630.GS11315@intel.com> In-Reply-To: <20191104025630.GS11315@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmJjMjQ5NDMtZjQ5MC00NzU5LWE5N2MtMjRhZDNmYTMwNDBkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZ0kzazZISG1acll4Nko5UmJZNDlcL3J4YWxOTmlTWldLXC9Pazl5YnVMeXdydW5IVVRkeHJPWERWbDdUdkFZeHZNIn0= 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 v4] 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: Monday, November 4, 2019 10:57 AM > To: Min, JiaqiX > Cc: dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4] net/ice: fix setting max frame size >=20 > On 10/30, 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: 50370662b727 ("net/ice: support device and queue ops") > >Cc: stable@dpdk.org > > > >Signed-off-by: Min JiaqiX > > > >--- > >v4: > >* Removed Reviewed-by > >* Checked and set defaut max frame size to HW in start ops. > >v3: > >* Changed Fixes line. > >v2: > >* Changed commit message. > >--- > > drivers/net/ice/ice_ethdev.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > >diff --git a/drivers/net/ice/ice_ethdev.c > >b/drivers/net/ice/ice_ethdev.c index d74675842..d8aa68f07 100644 > >--- a/drivers/net/ice/ice_ethdev.c > >+++ b/drivers/net/ice/ice_ethdev.c > >@@ -2724,6 +2724,16 @@ ice_dev_start(struct rte_eth_dev *dev) > > > > pf->adapter_stopped =3D false; > > > >+ /* Set the max frame size to default value*/ > >+ if (pf->dev_data->dev_conf.rxmode.max_rx_pkt_len =3D=3D 0) { > >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len =3D > >+ RTE_ETHER_MAX_LEN; >=20 > I think ICE_FRAME_SIZE_MAX is more suitable here. Agree. Will be modified in Patch v5. >=20 > >+ } > >+ > >+ /* Set the max frame size to HW*/ > >+ ice_aq_set_mac_cfg(hw, > >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL); >=20 > What about >=20 > max_frame_size =3D pf->dev_data- > >dev_conf.rxmode.max_rx_pkt_len ? > pf->dev_data->dev_conf.rxmode.max_rx_pkt_len : > ICE_FRAME_SIZE_MAX; Agree. Will be modified in Patch v5. >=20 > /* Set the max frame size to HW*/ > ice_aq_set_mac_cfg(hw, max_frame_size, NULL); >=20 >=20 > Thanks, > Xiaolong > >+ > > return 0; > > > > /* stop the started queues if failed to start all queues */ > >-- > >2.17.1 > >