From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 084062B89 for ; Tue, 14 May 2019 04:15:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2019 19:15:39 -0700 X-ExtLoop1: 1 Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga006.jf.intel.com with ESMTP; 13 May 2019 19:15:39 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 13 May 2019 19:15:38 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.150]) with mapi id 14.03.0415.000; Tue, 14 May 2019 10:15:37 +0800 From: "Yang, Qiming" To: "Zhang, Qi Z" , "Lu, Wenzhuo" CC: "Stokes, Ian" , "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [PATCH v2] net/ice: set min and max MTU Thread-Index: AQHVBHd79mi8sEafZUqCzKSSZoTKMqZp7NtA Date: Tue, 14 May 2019 02:15:37 +0000 Message-ID: References: <20190507015346.32214-1-qi.z.zhang@intel.com> In-Reply-To: <20190507015346.32214-1-qi.z.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmVhNWMwMzEtOWU0OS00Mzg5LWI2N2ItZmMzNTA0ODc0NjI3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTnMxMklJcHhlMDU1M2x6K25WbENkd2NKQTRobUc0XC9JTERCdDNXXC9sOUNLVHdLUEpSZ09jbnArSjRpYnZMQlhLIn0= 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 v2] 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: Tue, 14 May 2019 02:15:41 -0000 > -----Original Message----- > From: Zhang, Qi Z > Sent: Tuesday, May 7, 2019 9:54 AM > To: Lu, Wenzhuo ; Yang, Qiming > > Cc: Stokes, Ian ; Yigit, Ferruh > ; dev@dpdk.org; Zhang, Qi Z > Subject: [PATCH v2] net/ice: set min and max MTU >=20 > This commit sets the min and max supported MTU values for ice devices via > the ice_dev_info_get() function. Min MTU supported is set to > ETHER_MIN_MTU and max mtu is calculated as the max packet length > supported minus the transport overhead. >=20 > Signed-off-by: Qi Zhang > --- >=20 > v2: > - fix typo >=20 > drivers/net/ice/ice_ethdev.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > 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; >=20 > dev_info->rx_offload_capa =3D > DEV_RX_OFFLOAD_VLAN_STRIP | > -- > 2.13.6 Acked-by: Qiming Yang 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 A09E6A00E6 for ; Tue, 14 May 2019 04:15:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CBE032BB8; Tue, 14 May 2019 04:15:42 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 084062B89 for ; Tue, 14 May 2019 04:15:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2019 19:15:39 -0700 X-ExtLoop1: 1 Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga006.jf.intel.com with ESMTP; 13 May 2019 19:15:39 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 13 May 2019 19:15:38 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.150]) with mapi id 14.03.0415.000; Tue, 14 May 2019 10:15:37 +0800 From: "Yang, Qiming" To: "Zhang, Qi Z" , "Lu, Wenzhuo" CC: "Stokes, Ian" , "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [PATCH v2] net/ice: set min and max MTU Thread-Index: AQHVBHd79mi8sEafZUqCzKSSZoTKMqZp7NtA Date: Tue, 14 May 2019 02:15:37 +0000 Message-ID: References: <20190507015346.32214-1-qi.z.zhang@intel.com> In-Reply-To: <20190507015346.32214-1-qi.z.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmVhNWMwMzEtOWU0OS00Mzg5LWI2N2ItZmMzNTA0ODc0NjI3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTnMxMklJcHhlMDU1M2x6K25WbENkd2NKQTRobUc0XC9JTERCdDNXXC9sOUNLVHdLUEpSZ09jbnArSjRpYnZMQlhLIn0= 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 v2] 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: <20190514021537.W3W3WXv2CyVdS0BVjUEQGhVwFworHOPWSONWJlPSkUI@z> > -----Original Message----- > From: Zhang, Qi Z > Sent: Tuesday, May 7, 2019 9:54 AM > To: Lu, Wenzhuo ; Yang, Qiming > > Cc: Stokes, Ian ; Yigit, Ferruh > ; dev@dpdk.org; Zhang, Qi Z > Subject: [PATCH v2] net/ice: set min and max MTU >=20 > This commit sets the min and max supported MTU values for ice devices via > the ice_dev_info_get() function. Min MTU supported is set to > ETHER_MIN_MTU and max mtu is calculated as the max packet length > supported minus the transport overhead. >=20 > Signed-off-by: Qi Zhang > --- >=20 > v2: > - fix typo >=20 > drivers/net/ice/ice_ethdev.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > 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; >=20 > dev_info->rx_offload_capa =3D > DEV_RX_OFFLOAD_VLAN_STRIP | > -- > 2.13.6 Acked-by: Qiming Yang