From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 18294B62 for ; Tue, 29 Sep 2015 16:27:50 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 29 Sep 2015 07:27:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,608,1437462000"; d="scan'208";a="815486939" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.61]) by orsmga002.jf.intel.com with SMTP; 29 Sep 2015 07:27:42 -0700 Received: by (sSMTP sendmail emulation); Tue, 29 Sep 2015 15:27:42 +0025 Date: Tue, 29 Sep 2015 15:27:41 +0100 From: Bruce Richardson To: Zhe Tao Message-ID: <20150929142741.GD6748@bricha3-MOBL3> References: <1443373527-28948-1-git-send-email-zhe.tao@intel.com> <1443373527-28948-2-git-send-email-zhe.tao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443373527-28948-2-git-send-email-zhe.tao@intel.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 1/4] add vector PMD RX for FVL 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, 29 Sep 2015 14:27:51 -0000 On Mon, Sep 28, 2015 at 01:05:24AM +0800, Zhe Tao wrote: > The vPMD RX function uses the multi-buffer and SSE instructions to > accelerate the RX speed, but now the pktype cannot be supported by the vPMD RX, > because it will decrease the performance heavily. > > Signed-off-by: Zhe Tao > --- > config/common_bsdapp | 2 + > config/common_linuxapp | 2 + > drivers/net/i40e/Makefile | 1 + > drivers/net/i40e/base/i40e_type.h | 3 + > drivers/net/i40e/i40e_rxtx.c | 28 ++- > drivers/net/i40e/i40e_rxtx.h | 20 +- > drivers/net/i40e/i40e_rxtx_vec.c | 484 ++++++++++++++++++++++++++++++++++++++ > 7 files changed, 535 insertions(+), 5 deletions(-) > create mode 100644 drivers/net/i40e/i40e_rxtx_vec.c > > + > + /* vPMD receive routine, now only accept (nb_pkts == RTE_I40E_VPMD_RX_BURST) > + * in one loop > + * > + * Notice: > + * - nb_pkts < RTE_I40E_VPMD_RX_BURST, just return no packet I don't think this comment matches the implementation below. I think you are allowed to request bursts as small as RTE_I40E_DESCS_PER_LOOP. > + * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST > + * numbers of DD bits > + > + */ > +static inline uint16_t > +_recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts, > + uint16_t nb_pkts, uint8_t *split_packet) > +{ > + volatile union i40e_rx_desc *rxdp; > + struct i40e_rx_entry *sw_ring; > + uint16_t nb_pkts_recd; > + int pos; > + uint64_t var; > + __m128i shuf_msk; > + > + __m128i crc_adjust = _mm_set_epi16( > + 0, 0, 0, /* ignore non-length fields */ > + -rxq->crc_len, /* sub crc on data_len */ > + 0, /* ignore high-16bits of pkt_len */ > + -rxq->crc_len, /* sub crc on pkt_len */ > + 0, 0 /* ignore pkt_type field */ > + ); > + __m128i dd_check, eop_check; > + > + /* nb_pkts shall be less equal than RTE_I40E_MAX_RX_BURST */ > + nb_pkts = RTE_MIN(nb_pkts, RTE_I40E_MAX_RX_BURST); > + > + /* nb_pkts has to be floor-aligned to RTE_I40E_DESCS_PER_LOOP */ > + nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_I40E_DESCS_PER_LOOP); /Bruce