From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhang, Qi Z" Subject: Re: [PATCH v2 1/2] net/fm10k: convert to new Rx offloads API Date: Thu, 29 Mar 2018 10:29:45 +0000 Message-ID: <039ED4275CED7440929022BC67E706115317602B@SHSMSX103.ccr.corp.intel.com> References: <20180302141105.4954-1-wei.dai@intel.com> <20180328080037.16207-1-wei.dai@intel.com> <20180328080037.16207-2-wei.dai@intel.com> <039ED4275CED7440929022BC67E706115317576C@SHSMSX103.ccr.corp.intel.com> <039ED4275CED7440929022BC67E7061153175E35@SHSMSX103.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB977258A0AB5BB9@irsmsx105.ger.corp.intel.com> <039ED4275CED7440929022BC67E7061153175FD0@SHSMSX103.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB977258A0AB5C19@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "'dev@dpdk.org'" To: "Ananyev, Konstantin" , "Dai, Wei" , "Wang, Xiao W" Return-path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 8E69F1F28 for ; Thu, 29 Mar 2018 12:29:49 +0200 (CEST) In-Reply-To: <2601191342CEEE43887BDE71AB977258A0AB5C19@irsmsx105.ger.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Thursday, March 29, 2018 6:21 PM > To: Zhang, Qi Z ; Dai, Wei ; Wan= g, > Xiao W > Cc: 'dev@dpdk.org' > Subject: RE: [dpdk-dev] [PATCH v2 1/2] net/fm10k: convert to new Rx > offloads API >=20 > Hi Qi, >=20 > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: Thursday, March 29, 2018 10:51 AM > > To: Ananyev, Konstantin ; Dai, Wei > > ; Wang, Xiao W > > Cc: 'dev@dpdk.org' > > Subject: RE: [dpdk-dev] [PATCH v2 1/2] net/fm10k: convert to new Rx > > offloads API > > > > Hi Konstantin: > > > > > -----Original Message----- > > > From: Ananyev, Konstantin > > > Sent: Thursday, March 29, 2018 5:29 PM > > > To: Zhang, Qi Z ; Dai, Wei > > > ; Wang, Xiao W > > > Cc: 'dev@dpdk.org' > > > Subject: RE: [dpdk-dev] [PATCH v2 1/2] net/fm10k: convert to new Rx > > > offloads API > > > > > > > > > > > > > -----Original Message----- > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z > > > > Sent: Thursday, March 29, 2018 7:09 AM > > > > To: Dai, Wei ; Wang, Xiao W > > > > > > > > Cc: 'dev@dpdk.org' > > > > Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/fm10k: convert to new > > > > Rx offloads API > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Zhang, Qi Z > > > > > Sent: Wednesday, March 28, 2018 6:08 PM > > > > > To: Dai, Wei ; Wang, Xiao W > > > > > > > > > > Cc: dev@dpdk.org > > > > > Subject: RE: [PATCH v2 1/2] net/fm10k: convert to new Rx > > > > > offloads API > > > > > > > > > > Hi Daiwei: > > > > > > > > > > > +static uint64_t fm10k_get_rx_queue_offloads_capa(struct > > > > > > +rte_eth_dev > > > > > > +*dev) { > > > > > > + RTE_SET_USED(dev); > > > > > > + > > > > > > + return (uint64_t)(DEV_RX_OFFLOAD_SCATTER); > > > > > > +} > > > > > > > > > > why per queue rx scattered feature here? > > > > > My understanding is either we use scattered rx function that > > > > > enable this feature for all queues or we use non-scattered rx > > > > > function that disable this feature for all queues, right? > > > > > > > > Checked with Dai Wei offline, fm10k have per queue register that > > > > can be configured to support rx scattered, So it is per queue offlo= ad. > > > > > > Ok, but these days we have one RX function per device. > > > Looking at fm10k - it clearly has different RX function for > > > scattered and non-scattered case. > > > Yes, HW does support scatter/non-scatter selection per queue, but > > > our SW - doesn't (same for ixgbe and i40e) So how it could be per que= ue > offload? > > > > We saw the implementation of fm10k is a little bit different with i40e. > > It set per queue register "FM10K_SRRCTL_BUFFER_CHAINING_EN" to turn > on multi-seg feature when offload is required. > > > > That means two queues can have different behavior when process a > > packet that exceed the buffer size base on the register setting, though= we > use the same rx scattered function, so we think this is per queue feature= , is > that make sense? >=20 > Ok, suppose we have 2 functions configured. > One with DEV_RX_OFFLOAD_SCATTER is on, second with > DEV_RX_OFFLOAD_SCATTER is off. > So scatter RX function will be selected, but for second queue HW support > will not be enabled, so packets bigger then RX buffer will be silently dr= opped > by HW, right? Yes according to datasheet Bit FM10K_SRRCTL_BUFFER_CHAINING_EN: 0b =3D Any packet longer than the data buffer size is terminated with a TOO_BIG error status in Rx descriptor write-back. The remainder of the frame is not posted to host, it is silently dropped. 1b =3D A packet can be spread over more than one single receive data buffer > Konstantin >=20 > > > > Regards > > Qi > > > > > > > Konstantin > > > > > > > > > > > > > > > > > Regards > > > > > Qi