From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id EE804378E for ; Thu, 29 Oct 2015 09:07:06 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 29 Oct 2015 01:07:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,213,1444719600"; d="scan'208";a="838225236" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 29 Oct 2015 01:07:06 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 29 Oct 2015 01:07:05 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 29 Oct 2015 01:07: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 16:06:57 +0800 From: "Liang, Cunming" To: "Chen, Jing D" , "dev@dpdk.org" Thread-Topic: [PATCH v3 08/16] fm10k: add Vector RX scatter function Thread-Index: AQHREJyCXXoRJmu/ZkODgWyZ3wEZAZ6A+QkAgAB0wwCAALD9EA== Date: Thu, 29 Oct 2015 08:06:56 +0000 Message-ID: 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> <4341B239C0EFF9468EE453F9E9F4604D02AE610C@shsmsx102.ccr.corp.intel.com> In-Reply-To: <4341B239C0EFF9468EE453F9E9F4604D02AE610C@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, 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 08:07:07 -0000 Hi Mark, > -----Original Message----- > From: Chen, Jing D > Sent: Thursday, October 29, 2015 1:28 PM > To: Liang, Cunming; 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, Steve, >=20 > Best Regards, > Mark >=20 >=20 > > -----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 > > > > Hi Mark, > > > > 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 >=20 > 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 diff= erent > from IXGBE. Ok, that's fine. /Steve