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 6BBBC2FDD for ; Thu, 29 Oct 2015 06:28:14 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 28 Oct 2015 22:28:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,213,1444719600"; d="scan'208";a="837692531" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 28 Oct 2015 22:28:12 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 28 Oct 2015 22:28:05 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.253]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.194]) with mapi id 14.03.0248.002; Thu, 29 Oct 2015 13:27:56 +0800 From: "Chen, Jing D" To: "Liang, Cunming" , "dev@dpdk.org" Thread-Topic: [PATCH v3 08/16] fm10k: add Vector RX scatter function Thread-Index: AQHREJyCtcP8M1IGYEy19rJ5o7iZTp6Acu0AgAF//PA= Date: Thu, 29 Oct 2015 05:27:56 +0000 Message-ID: <4341B239C0EFF9468EE453F9E9F4604D02AE610C@shsmsx102.ccr.corp.intel.com> References: <1445507104-22563-2-git-send-email-jing.d.chen@intel.com> <1445939209-12783-1-git-send-email-jing.d.chen@intel.com> <1445939209-12783-9-git-send-email-jing.d.chen@intel.com> <5630DBEA.2070204@intel.com> In-Reply-To: <5630DBEA.2070204@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 v3 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: Thu, 29 Oct 2015 05:28:15 -0000 Hi, Steve, Best Regards, Mark > -----Original Message----- > From: Liang, Cunming > Sent: Wednesday, October 28, 2015 10:30 PM > To: Chen, Jing D; dev@dpdk.org > Cc: Tao, Zhe; He, Shaopeng; Ananyev, Konstantin; Richardson, Bruce > Subject: Re: [PATCH v3 08/16] fm10k: add Vector RX scatter function >=20 > Hi Mark, >=20 > On 10/27/2015 5:46 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(-) > > > > diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h > > index 1502ae3..06697fa 100644 > > --- a/drivers/net/fm10k/fm10k.h > > +++ b/drivers/net/fm10k/fm10k.h > > @@ -329,4 +329,6 @@ uint16_t fm10k_xmit_pkts(void *tx_queue, struct > rte_mbuf **tx_pkts, > > int fm10k_rxq_vec_setup(struct fm10k_rx_queue *rxq); > > int fm10k_rx_vec_condition_check(struct rte_eth_dev *); > > uint16_t fm10k_recv_pkts_vec(void *, struct rte_mbuf **, uint16_t); > > +uint16_t fm10k_recv_scattered_pkts_vec(void *, struct rte_mbuf **, > > + uint16_t); > > #endif > > diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c > b/drivers/net/fm10k/fm10k_rxtx_vec.c > > index 2e6f1a2..3fd5d45 100644 > > --- a/drivers/net/fm10k/fm10k_rxtx_vec.c > > +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c > > @@ -513,3 +513,91 @@ fm10k_recv_pkts_vec(void *rx_queue, struct > rte_mbuf **rx_pkts, > > { > > return fm10k_recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, > NULL); > > } > > + > > +static inline uint16_t > > +fm10k_reassemble_packets(struct fm10k_rx_queue *rxq, > > + struct rte_mbuf **rx_bufs, > > + uint16_t nb_bufs, uint8_t *split_flags) > > +{ > > + struct rte_mbuf *pkts[RTE_FM10K_MAX_RX_BURST]; /*finished > pkts*/ > > + struct rte_mbuf *start =3D rxq->pkt_first_seg; > > + struct rte_mbuf *end =3D rxq->pkt_last_seg; > > + unsigned pkt_idx, buf_idx; > > + > > + > > + for (buf_idx =3D 0, pkt_idx =3D 0; buf_idx < nb_bufs; buf_idx++) { > > + if (end !=3D NULL) { > > + /* processing a split packet */ > > + end->next =3D rx_bufs[buf_idx]; > > + start->nb_segs++; > > + start->pkt_len +=3D rx_bufs[buf_idx]->data_len; > > + end =3D end->next; > > + > > + if (!split_flags[buf_idx]) { > > + /* it's the last packet of the set */ > > + start->hash =3D end->hash; > > + start->ol_flags =3D end->ol_flags; > > + pkts[pkt_idx++] =3D start; > > + start =3D end =3D NULL; > > + } > > + } else { > > + /* not processing a split packet */ > > + if (!split_flags[buf_idx]) { > > + /* not a split packet, save and skip */ > > + pkts[pkt_idx++] =3D rx_bufs[buf_idx]; > > + continue; > > + } > > + end =3D start =3D rx_bufs[buf_idx]; > > + } > I guess you forgot to consider the crc_len during processing. /Steve In fm10k, crc is always be stripped and pkt_len/data_len carried actual data length. So, we needn't add crc_len back here. This is a little differ= ent from IXGBE.