From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id E4DD637AF for ; Tue, 7 May 2019 01:10:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 May 2019 16:10:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,439,1549958400"; d="scan'208";a="322212444" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 06 May 2019 16:10:57 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 6 May 2019 16:10:57 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.70]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.7]) with mapi id 14.03.0415.000; Tue, 7 May 2019 07:10:55 +0800 From: "Zhang, Qi Z" To: "Stillwell Jr, Paul M" , "Lu, Wenzhuo" , "Yang, Qiming" CC: "Stokes, Ian" , "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/ice: set min and max MTU Thread-Index: AQHVAl3b5pkemon7YUOu1bUMRJ4mKaZd2meAgADiKOA= Date: Mon, 6 May 2019 23:10:54 +0000 Message-ID: <039ED4275CED7440929022BC67E706115337CB21@SHSMSX103.ccr.corp.intel.com> References: <20190504094545.6039-1-qi.z.zhang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWEwOGJkMDEtMmY2Yy00NWIxLTgzNTEtMjZhZWNmOGRiZjdlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaXVcLzE3TlAxQ09RWG9PNnoyRWRHNEdycGJHWUQ0NVNrQkorM0ZZOEErUE9uQXQyenhnbjQwVUVBaHhrcUVNbmIifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 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] net/ice: set min and max MTU 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: , X-List-Received-Date: Mon, 06 May 2019 23:10:59 -0000 > -----Original Message----- > From: Stillwell Jr, Paul M > Sent: Tuesday, May 7, 2019 1:39 AM > To: Zhang, Qi Z ; Lu, Wenzhuo > ; Yang, Qiming > Cc: Stokes, Ian ; Yigit, Ferruh ; > dev@dpdk.org; Zhang, Qi Z > Subject: RE: [dpdk-dev] [PATCH] net/ice: set min and max MTU >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Qi Zhang > > Sent: Saturday, May 4, 2019 2:46 AM > > To: Lu, Wenzhuo ; Yang, Qiming > > > > Cc: Stokes, Ian ; Yigit, Ferruh > > ; dev@dpdk.org; Zhang, Qi Z > > > > Subject: [dpdk-dev] [PATCH] net/ice: set min and max MTU > > > > This commit sets the min and max supported MTU values for ice devices > > via the > > i40e_dev_info_get() function. Min MTU supported is set to > > ETHER_MIN_MTU >=20 > Should this be ice_dev_info_get()? Ah yes, will fix in v2, thanks >=20 > > and max mtu is calculated as the max packet length supported minus the > > transport overhead. > > > > Signed-off-by: Qi Zhang > > --- > > drivers/net/ice/ice_ethdev.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/net/ice/ice_ethdev.c > > b/drivers/net/ice/ice_ethdev.c index > > 1f06a2c80..9f5f919f4 100644 > > --- a/drivers/net/ice/ice_ethdev.c > > +++ b/drivers/net/ice/ice_ethdev.c > > @@ -1994,6 +1994,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct > > rte_eth_dev_info *dev_info) > > dev_info->max_tx_queues =3D vsi->nb_qps; > > dev_info->max_mac_addrs =3D vsi->max_macaddrs; > > dev_info->max_vfs =3D pci_dev->max_vfs; > > + dev_info->max_mtu =3D dev_info->max_rx_pktlen - ICE_ETH_OVERHEAD; > > + dev_info->min_mtu =3D ETHER_MIN_MTU; > > > > dev_info->rx_offload_capa =3D > > DEV_RX_OFFLOAD_VLAN_STRIP | > > -- > > 2.13.6 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 84BEFA0096 for ; Tue, 7 May 2019 01:11:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 47BA6397D; Tue, 7 May 2019 01:11:00 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id E4DD637AF for ; Tue, 7 May 2019 01:10:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 May 2019 16:10:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,439,1549958400"; d="scan'208";a="322212444" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 06 May 2019 16:10:57 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 6 May 2019 16:10:57 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.70]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.7]) with mapi id 14.03.0415.000; Tue, 7 May 2019 07:10:55 +0800 From: "Zhang, Qi Z" To: "Stillwell Jr, Paul M" , "Lu, Wenzhuo" , "Yang, Qiming" CC: "Stokes, Ian" , "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/ice: set min and max MTU Thread-Index: AQHVAl3b5pkemon7YUOu1bUMRJ4mKaZd2meAgADiKOA= Date: Mon, 6 May 2019 23:10:54 +0000 Message-ID: <039ED4275CED7440929022BC67E706115337CB21@SHSMSX103.ccr.corp.intel.com> References: <20190504094545.6039-1-qi.z.zhang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWEwOGJkMDEtMmY2Yy00NWIxLTgzNTEtMjZhZWNmOGRiZjdlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaXVcLzE3TlAxQ09RWG9PNnoyRWRHNEdycGJHWUQ0NVNrQkorM0ZZOEErUE9uQXQyenhnbjQwVUVBaHhrcUVNbmIifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ice: set min and max MTU 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" Message-ID: <20190506231054.80R9czcMTbCwG-V7gqV6qXCnJ4odVymUHFdkXB6-0D0@z> > -----Original Message----- > From: Stillwell Jr, Paul M > Sent: Tuesday, May 7, 2019 1:39 AM > To: Zhang, Qi Z ; Lu, Wenzhuo > ; Yang, Qiming > Cc: Stokes, Ian ; Yigit, Ferruh ; > dev@dpdk.org; Zhang, Qi Z > Subject: RE: [dpdk-dev] [PATCH] net/ice: set min and max MTU >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Qi Zhang > > Sent: Saturday, May 4, 2019 2:46 AM > > To: Lu, Wenzhuo ; Yang, Qiming > > > > Cc: Stokes, Ian ; Yigit, Ferruh > > ; dev@dpdk.org; Zhang, Qi Z > > > > Subject: [dpdk-dev] [PATCH] net/ice: set min and max MTU > > > > This commit sets the min and max supported MTU values for ice devices > > via the > > i40e_dev_info_get() function. Min MTU supported is set to > > ETHER_MIN_MTU >=20 > Should this be ice_dev_info_get()? Ah yes, will fix in v2, thanks >=20 > > and max mtu is calculated as the max packet length supported minus the > > transport overhead. > > > > Signed-off-by: Qi Zhang > > --- > > drivers/net/ice/ice_ethdev.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/net/ice/ice_ethdev.c > > b/drivers/net/ice/ice_ethdev.c index > > 1f06a2c80..9f5f919f4 100644 > > --- a/drivers/net/ice/ice_ethdev.c > > +++ b/drivers/net/ice/ice_ethdev.c > > @@ -1994,6 +1994,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct > > rte_eth_dev_info *dev_info) > > dev_info->max_tx_queues =3D vsi->nb_qps; > > dev_info->max_mac_addrs =3D vsi->max_macaddrs; > > dev_info->max_vfs =3D pci_dev->max_vfs; > > + dev_info->max_mtu =3D dev_info->max_rx_pktlen - ICE_ETH_OVERHEAD; > > + dev_info->min_mtu =3D ETHER_MIN_MTU; > > > > dev_info->rx_offload_capa =3D > > DEV_RX_OFFLOAD_VLAN_STRIP | > > -- > > 2.13.6