From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id C781D2BA3 for ; Tue, 30 May 2017 12:45:52 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6F78E20BFE; Tue, 30 May 2017 06:45:52 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 30 May 2017 06:45:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=5WprymK3DqFBT5c ZGpu7fN3lX6+94Md9g91poxCN8gs=; b=QXfDxSBg55UGv680mNTrdJ9GCElS+6z naepLokHgmYVaVUOHk7dwt2xY3P6xAAP2eDw7AJXPUMyNOQzDdTSJsGjY7sWl8hH +92ElqX5vsShZXJSYEC82bf9ep5pyOR3S5nvO5g/H2FtYkkdFpI5Ml9PXkMH8I5V Y6M2M76Hllkc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=5WprymK3DqFBT5cZGpu7fN3lX6+94Md9g91poxCN8gs=; b=Kb8w5XPn mPCRVnMtbsg530ocdYlO0q2DPuFO0CKCPrd153uR4WmLBb+myjtdpTvBuIgHv4hj tGVgBLFUMxLS88otCJR9Crl8EcTMjKyW5jxwGjwuEJdReWbo8PGS6y0ONx+CX24H VwAerFOov+QmxqmAVh8akKiQXLX0VnAo9t4nQK8OmLW18X4uzZwVBtp+jnMG6rnb w9ezv8pHkFkaYNYeAqJ53D4+3ic+pEQPRq2Tta8/o2pyZrnjqHDuwQvs40ss+/oF wKt0snswbmz68EvdXx0tlNo0Uih2ynO/zMCXEgTB7r9+AmigyWSgPrkpFvxQioyz xf2VhH/ot8DXVg== X-ME-Sender: X-Sasl-enc: nn7hr2yq+6MBl7zL6sQA2xivajCGoVjtV2sChR2HDVZt 1496141151 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id B708E7E85E; Tue, 30 May 2017 06:45:51 -0400 (EDT) From: Thomas Monjalon To: Yongseok Koh Cc: dev@dpdk.org, ferruh.yigit@intel.com, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Date: Tue, 30 May 2017 12:45:49 +0200 Message-ID: <2868391.oB23BVWmct@xps> In-Reply-To: <20170528154035.32198-1-yskoh@mellanox.com> References: <20170528154035.32198-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] net/mlx5: add vectorized Rx 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: Tue, 30 May 2017 10:45:53 -0000 28/05/2017 17:40, Yongseok Koh: > Vectorized Rx API for x86 is added. > > Signed-off-by: Yongseok Koh > --- > drivers/net/mlx5/Makefile | 1 + > drivers/net/mlx5/mlx5_defs.h | 6 + > drivers/net/mlx5/mlx5_ethdev.c | 8 + > drivers/net/mlx5/mlx5_rxq.c | 39 +++- > drivers/net/mlx5/mlx5_rxtx.c | 485 +++++++++++++++++++++++++++++++++++++++++ > drivers/net/mlx5/mlx5_rxtx.h | 10 + > 6 files changed, 548 insertions(+), 1 deletion(-) It would be probably clearer to have a specific file for Rx/Tx on SSE. So it would be compiled only for x86. > --- a/drivers/net/mlx5/Makefile > +++ b/drivers/net/mlx5/Makefile > @@ -60,6 +60,7 @@ CFLAGS += -D_DEFAULT_SOURCE > CFLAGS += -D_XOPEN_SOURCE=600 > CFLAGS += $(WERROR_FLAGS) > CFLAGS += -Wno-strict-prototypes > +CFLAGS += -msse4.1 > LDLIBS += -libverbs [...] > --- a/drivers/net/mlx5/mlx5_ethdev.c > +++ b/drivers/net/mlx5/mlx5_ethdev.c > @@ -723,7 +723,11 @@ mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev) > > }; > > +#ifdef MLX5_VECTORIZED_RX > + if (dev->rx_pkt_burst == mlx5_rx_burst_vec) > +#else > if (dev->rx_pkt_burst == mlx5_rx_burst) > +#endif > return ptypes; > return NULL; > } Can we avoid an #ifdef here? We should check SSE support at runtime with rte_cpu_get_flag_enabled().