From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A37566A80 for ; Tue, 27 Oct 2015 06:55:54 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 26 Oct 2015 22:55:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,203,1444719600"; d="scan'208";a="803953609" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 26 Oct 2015 22:55:54 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 26 Oct 2015 22:55:53 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 26 Oct 2015 22:55:53 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.253]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.106]) with mapi id 14.03.0248.002; Tue, 27 Oct 2015 13:55:51 +0800 From: "Chen, Jing D" To: "Liang, Cunming" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 08/16] fm10k: add Vector RX scatter function Thread-Index: AQHREHqFqei6jiGUK0e6J1DHhOPacJ5+1qHA Date: Tue, 27 Oct 2015 05:55:51 +0000 Message-ID: <4341B239C0EFF9468EE453F9E9F4604D02AE4B17@shsmsx102.ccr.corp.intel.com> References: <1443531824-22767-2-git-send-email-jing.d.chen@intel.com> <1445507104-22563-1-git-send-email-jing.d.chen@intel.com> <1445507104-22563-9-git-send-email-jing.d.chen@intel.com> <562F0B51.9080508@intel.com> <4341B239C0EFF9468EE453F9E9F4604D02AE4AC8@shsmsx102.ccr.corp.intel.com> In-Reply-To: <4341B239C0EFF9468EE453F9E9F4604D02AE4AC8@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 08/16] fm10k: add Vector RX scatter function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 05:55:55 -0000 Hi, Steve, Best Regards, Mark > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chen, Jing D > Sent: Tuesday, October 27, 2015 1:44 PM > To: Liang, Cunming; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 08/16] fm10k: add Vector RX scatter > function >=20 > Hi, Steve, >=20 > Best Regards, > Mark >=20 >=20 > > -----Original Message----- > > From: Liang, Cunming > > Sent: Tuesday, October 27, 2015 1:28 PM > > To: Chen, Jing D; dev@dpdk.org > > Cc: Tao, Zhe; He, Shaopeng; Ananyev, Konstantin; Richardson, Bruce > > Subject: Re: [PATCH v2 08/16] fm10k: add Vector RX scatter function > > > > Hi, > > > > On 10/22/2015 5:44 PM, Chen Jing D(Mark) wrote: > > > From: "Chen Jing D(Mark)" > > > > > > Add func fm10k_recv_scattered_pkts_vec to receive chained packets > > > with SSE instructions. > > > > > > Signed-off-by: Chen Jing D(Mark) > > > --- > > > drivers/net/fm10k/fm10k.h | 2 + > > > drivers/net/fm10k/fm10k_rxtx_vec.c | 88 > > ++++++++++++++++++++++++++++++++++++ > > > 2 files changed, 90 insertions(+), 0 deletions(-) > > > > > [...] > > > + > > > +/* > > > + * vPMD receive routine that reassembles scattered packets > > > + * > > > + * Notice: > > > + * - don't support ol_flags for rss and csum err > > > + * - nb_pkts < RTE_IXGBE_DESCS_PER_LOOP, just return no packet > > > + * - nb_pkts > RTE_IXGBE_MAX_RX_BURST, only scan > > RTE_IXGBE_MAX_RX_BURST > > > + * numbers of DD bit > > In order to make sure nb_pkts > RTE_IXGBE_MAX_RX_BURST, it's > necessary > > to do RTE_MIN(). My bad. You indicates nb_pkts should be less or equal than RTE_IXGBE_MAX_TX= _BURST. I'll change accordingly. >=20 > I'll remove the improper comments. In func fm10k_recv_raw_pkts_vec, it > will use > nb_pkts as index to iterate properly. > After then, below func will use actual received packet size nb_bufs as in= dex > to iterate. > So, I think RTE_MIN() is not necessary? >=20 > > > + * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two > > > + */ > > > +uint16_t > > > +fm10k_recv_scattered_pkts_vec(void *rx_queue, > > > + struct rte_mbuf **rx_pkts, > > > + uint16_t nb_pkts) > > > +{ > > > + struct fm10k_rx_queue *rxq =3D rx_queue; > > > + uint8_t split_flags[RTE_FM10K_MAX_RX_BURST] =3D {0}; > > > + unsigned i =3D 0; > > > + > > > + /* get some new buffers */ > > > + uint16_t nb_bufs =3D fm10k_recv_raw_pkts_vec(rxq, rx_pkts, nb_pkts, > > > + split_flags); > > > + if (nb_bufs =3D=3D 0) > > > + return 0; > > > + > > > + /* happy day case, full burst + no packets to be joined */ > > > + const uint64_t *split_fl64 =3D (uint64_t *)split_flags; > > > + if (rxq->pkt_first_seg =3D=3D NULL && > > > + split_fl64[0] =3D=3D 0 && split_fl64[1] =3D=3D 0 && > > > + split_fl64[2] =3D=3D 0 && split_fl64[3] =3D=3D 0) > > > + return nb_bufs; > > > + > > > + /* reassemble any packets that need reassembly*/ > > > + if (rxq->pkt_first_seg =3D=3D NULL) { > > > + /* find the first split flag, and only reassemble then*/ > > > + while (i < nb_bufs && !split_flags[i]) > > > + i++; > > > + if (i =3D=3D nb_bufs) > > > + return nb_bufs; > > > + } > > > + return i + fm10k_reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i, > > > + &split_flags[i]); > > > +}