From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by dpdk.org (Postfix) with ESMTP id 6A8872C8 for ; Thu, 6 Jul 2017 09:16:18 +0200 (CEST) Received: by mail-wr0-f172.google.com with SMTP id k67so15814253wrc.2 for ; Thu, 06 Jul 2017 00:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=x7+dlC7q/w/fzwtUUx2p1FAuKubMzr2i87kCSeZ9SiE=; b=ByxkDaBfDy/H0iNc0flwqSS9MI9Egn8qKe5EEKp1fbOcPwAtVm5HpfQUiPnEXfc+g7 vDuIWZntvLlMo/9kr7Ij43a7Gd7A96K3a8YUEI/feTmNoLP+nC7Lr0LbgHu9hdhzUOhw HzjZObzP0aR4nmZDiYBW5Cg898BF8H3aD0yE42jmiS2XjYpyx7HSsaVsOeK1oh+80Tap HSBNBdZqwY9lqAN1qujnRDgNdsr6lkRX2ijvxtbT1LMlaoK4PdibQmAuXTl0m3rITD8i b0pulKDglQLDJFQcLnk7iELUV5EjtSUV09UMFLODlug+wNVWz+v69LsO91YzVzYTPEzh peMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=x7+dlC7q/w/fzwtUUx2p1FAuKubMzr2i87kCSeZ9SiE=; b=TEI4vaGmFDwyfv3WCtWslybVmuY7PjfEH9FcSPIFFesSjanQsAPWomqkf89aweBbP6 O8CrtlMJS9W1wNy7cXUKPespyjj8+fFWbsl50tbZr4Q3piqThTpnEAKrHRC7ghSD7LrA aNEaRkEgGEV5xXGmYihm3CnPlEC+fu3uiSHQ1y5lfPXxLU9MhzrAmFUGkoaNHsKwvSfc bY5MP+sJXj2IVG7w+JHDOMNXCdY85/IsO4eMkF2wanek/KurQqSzVq7CQB5oVhkmoSVa NPfCMbW15sJmP6NviEjPRsgD/US4ySE2VBaj1yustxAWPQygyPTfvsqlUacIQzNMwd8x cKrg== X-Gm-Message-State: AKS2vOxR0u/sNcIgloLL/Ok1LZettWZaF66pHEe5OxH5V/xKiD7A6kjc cHOxqKp3F8ideDWS X-Received: by 10.223.130.162 with SMTP id 31mr38189267wrc.202.1499325377975; Thu, 06 Jul 2017 00:16:17 -0700 (PDT) Received: from autoinstall.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id w96sm948270wrc.33.2017.07.06.00.16.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2017 00:16:17 -0700 (PDT) Date: Thu, 6 Jul 2017 09:16:09 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Yongseok Koh Cc: ferruh.yigit@intel.com, dev@dpdk.org, adrien.mazarguil@6wind.com Message-ID: <20170706071609.GL21379@autoinstall.dev.6wind.com> References: <20170628230403.10142-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 5/5] net/mlx5: add vectorized Rx/Tx burst for SSE4.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 07:16:18 -0000 On Wed, Jul 05, 2017 at 11:12:28AM -0700, Yongseok Koh wrote: >[...] > diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c > new file mode 100644 > index 000000000..4595f7a33 > --- /dev/null > +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c > @@ -0,0 +1,1378 @@ >[...] > + > +#include > +#include > +#include > +#include > +#include > + > +/* Verbs header. */ > +#include > +#include > +#include Pragma on Verbs must remain, their headers are still not clear for pdentic compilation. >[...] > +/** > + * Replenish buffers for RX in bulk. > + * > + * @param rxq > + * Pointer to RX queue structure. > + * @param n > + * Number of buffers to be replenished. > + */ > +static inline void > +rxq_replenish_bulk_mbuf(struct rxq *rxq, uint16_t n) > +{ > + const uint16_t q_n = 1 << rxq->elts_n; > + const uint16_t q_mask = q_n - 1; > + const uint16_t elts_idx = rxq->rq_ci & q_mask; > + struct rte_mbuf **elts = &(*rxq->elts)[elts_idx]; > + volatile struct mlx5_wqe_data_seg *wq = &(*rxq->wqes)[elts_idx]; > + unsigned int i; > + > + assert(n >= MLX5_VPMD_RXQ_RPLNSH_THRESH); > + assert(n <= (uint16_t)(q_n - (rxq->rq_ci - rxq->rq_pi))); > + assert(MLX5_VPMD_RXQ_RPLNSH_THRESH > MLX5_VPMD_DESCS_PER_LOOP); Info: as the PMD is compiled in C11, you could use the static_assert which verifies at compilation time the constants are correct. (I am not asking to change it now, we can make a compain to change all this kind of assert at onces). Unless the pragma which must remain on Verbs header: Acked-by: Nelio Laranjeiro Great work. Thanks, -- Nélio Laranjeiro 6WIND