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 96703231C for ; Wed, 28 Oct 2015 15:30:06 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 28 Oct 2015 07:30:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,210,1444719600"; d="scan'208";a="837135741" Received: from shwdeisgchi017.ccr.corp.intel.com (HELO [10.239.66.70]) ([10.239.66.70]) by orsmga002.jf.intel.com with ESMTP; 28 Oct 2015 07:30:04 -0700 Message-ID: <5630DBEA.2070204@intel.com> Date: Wed, 28 Oct 2015 22:30:02 +0800 From: "Liang, Cunming" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Chen Jing D(Mark)" , dev@dpdk.org 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> In-Reply-To: <1445939209-12783-9-git-send-email-jing.d.chen@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 28 Oct 2015 14:30:07 -0000 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 = rxq->pkt_first_seg; > + struct rte_mbuf *end = rxq->pkt_last_seg; > + unsigned pkt_idx, buf_idx; > + > + > + for (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) { > + if (end != NULL) { > + /* processing a split packet */ > + end->next = rx_bufs[buf_idx]; > + start->nb_segs++; > + start->pkt_len += rx_bufs[buf_idx]->data_len; > + end = end->next; > + > + if (!split_flags[buf_idx]) { > + /* it's the last packet of the set */ > + start->hash = end->hash; > + start->ol_flags = end->ol_flags; > + pkts[pkt_idx++] = start; > + start = end = NULL; > + } > + } else { > + /* not processing a split packet */ > + if (!split_flags[buf_idx]) { > + /* not a split packet, save and skip */ > + pkts[pkt_idx++] = rx_bufs[buf_idx]; > + continue; > + } > + end = start = rx_bufs[buf_idx]; > + } I guess you forgot to consider the crc_len during processing. /Steve