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 15FA63230 for ; Thu, 26 Jul 2018 14:56:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2018 05:56:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,405,1526367600"; d="scan'208";a="78018421" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2018 05:56:40 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.195]) by IRSMSX104.ger.corp.intel.com ([169.254.5.225]) with mapi id 14.03.0319.002; Thu, 26 Jul 2018 13:56:39 +0100 From: "Ananyev, Konstantin" To: "Zhang, Qi Z" , "Wu, Yanglong" , "dev@dpdk.org" CC: "Bie, Tiwei" , "Yao, Lei A" , "Wu, Yanglong" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix max frame size checking Thread-Index: AQHUJK26uEa95O1KgEC0HsTy3VhE66ShOMwwgAAhOgCAAAN3AIAAElTQ///zuYCAABMpcA== Date: Thu, 26 Jul 2018 12:56:38 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258DF51E3EC@irsmsx105.ger.corp.intel.com> References: <20180726064602.157850-1-yanglong.wu@intel.com> <2601191342CEEE43887BDE71AB977258DF51E2AE@irsmsx105.ger.corp.intel.com> <039ED4275CED7440929022BC67E70611532604BB@SHSMSX103.ccr.corp.intel.com> <039ED4275CED7440929022BC67E70611532604D3@SHSMSX103.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB977258DF51E3BC@irsmsx105.ger.corp.intel.com> <039ED4275CED7440929022BC67E70611532604FC@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E70611532604FC@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzlmMWNkMDItOGY4Mi00NDVjLWJiOTgtMTZmYzExMzQyMWRmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib2ZLUzFDTDQxblg5aWdrSDNieGt1d01IVUdEdDlDQ2wrcnlRUFE5dTh1UThnbXd3TlVUaVgreXYwZ0Vqa3pDeiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix max frame size checking 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: Thu, 26 Jul 2018 12:56:43 -0000 > -----Original Message----- > From: Zhang, Qi Z > Sent: Thursday, July 26, 2018 1:48 PM > To: Ananyev, Konstantin ; Wu, Yanglong ; dev@dpdk.org > Cc: Bie, Tiwei ; Yao, Lei A ; W= u, Yanglong > Subject: RE: [dpdk-dev] [PATCH] net/i40e: fix max frame size checking >=20 >=20 >=20 > > -----Original Message----- > > From: Ananyev, Konstantin > > Sent: Thursday, July 26, 2018 8:33 PM > > To: Zhang, Qi Z ; Wu, Yanglong > > ; dev@dpdk.org > > Cc: Bie, Tiwei ; Yao, Lei A ;= Wu, > > Yanglong > > Subject: RE: [dpdk-dev] [PATCH] net/i40e: fix max frame size checking > > > > > > > > > -----Original Message----- > > > From: Zhang, Qi Z > > > Sent: Thursday, July 26, 2018 1:26 PM > > > To: Zhang, Qi Z ; Ananyev, Konstantin > > > ; Wu, Yanglong ; > > > dev@dpdk.org > > > Cc: Bie, Tiwei ; Yao, Lei A > > > ; Wu, Yanglong > > > Subject: RE: [dpdk-dev] [PATCH] net/i40e: fix max frame size checking > > > > > > > > > > > > > -----Original Message----- > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z > > > > Sent: Thursday, July 26, 2018 8:14 PM > > > > To: Ananyev, Konstantin ; Wu, Yanglon= g > > > > ; dev@dpdk.org > > > > Cc: Bie, Tiwei ; Yao, Lei A > > > > ; Wu, Yanglong > > > > Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix max frame size > > > > checking > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Ananyev, Konstantin > > > > > Sent: Thursday, July 26, 2018 5:17 PM > > > > > To: Wu, Yanglong ; dev@dpdk.org > > > > > Cc: Zhang, Qi Z ; Bie, Tiwei > > > > > ; Yao, Lei A ; Wu, > > > > > Yanglong > > > > > Subject: RE: [dpdk-dev] [PATCH] net/i40e: fix max frame size > > > > > checking > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yanglong W= u > > > > > > Sent: Thursday, July 26, 2018 7:46 AM > > > > > > To: dev@dpdk.org > > > > > > Cc: Zhang, Qi Z ; Bie, Tiwei > > > > > > ; Yao, Lei A ; Wu, > > > > > > Yanglong > > > > > > Subject: [dpdk-dev] [PATCH] net/i40e: fix max frame size > > > > > > checking > > > > > > > > > > > > No need to check max frame size in TX, the checking should be > > > > > > done in up layer protocal. This checking will lead to fail for > > > > > > TSO or other application cases. > > > > > > > > > > Not sure why is that? > > > > > i40e doesn't support single packet bigger then 9.5KB (or so), as = I > > remember. > > > > > For TSO the limit is 256KB - yes, it is bibber, but still there i= s a limit. > > > > > > > > I think we can't support more than 8 segment for TSO, right? so if > > > > the limit is 256KB, seems it is a redundant. > > > > As I remember there is no limit for number of segs for TSO. > > For non-TSO - yes, max 8 segments per packet. >=20 > Oh, yes, it's only for non-TSO case, for TSO case, > So I agree the correct fix is we check the 256KB boundary for TSO case > And still need to check the 9.5k boundary for non-TSO case. Yep, sounds good. >=20 > > > > > > > > I mean buffer size limit is 16kb according to datasheet. > > > > > > > > > > > > Might be we need to change that check, but I think we still need = to keep > > it. > > > > > Konstantin > > > > > > > > > > > > > > > > > > > > > Fixes: bfeed0262b0c ("net/i40e: check illegal packets") > > > > > > > > > > > > Signed-off-by: Yanglong Wu > > > > > > --- > > > > > > drivers/net/i40e/i40e_rxtx.c | 3 +-- > > > > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/drivers/net/i40e/i40e_rxtx.c > > > > > > b/drivers/net/i40e/i40e_rxtx.c index 3be87fe6a..baad433a7 10064= 4 > > > > > > --- a/drivers/net/i40e/i40e_rxtx.c > > > > > > +++ b/drivers/net/i40e/i40e_rxtx.c > > > > > > @@ -1459,8 +1459,7 @@ i40e_prep_pkts(__rte_unused void > > > > > > *tx_queue, > > > > > struct rte_mbuf **tx_pkts, > > > > > > } > > > > > > > > > > > > /* check the size of packet */ > > > > > > - if (m->pkt_len > I40E_FRAME_SIZE_MAX || > > > > > > - m->pkt_len < I40E_TX_MIN_PKT_LEN) { > > > > > > + if (m->pkt_len < I40E_TX_MIN_PKT_LEN) { > > > > > > rte_errno =3D -EINVAL; > > > > > > return i; > > > > > > } > > > > > > -- > > > > > > 2.11.0