All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Yongseok Koh <yskoh@mellanox.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com, adrien.mazarguil@6wind.com,
	nelio.laranjeiro@6wind.com
Subject: Re: [PATCH] net/mlx5: add vectorized Rx
Date: Tue, 30 May 2017 12:45:49 +0200	[thread overview]
Message-ID: <2868391.oB23BVWmct@xps> (raw)
In-Reply-To: <20170528154035.32198-1-yskoh@mellanox.com>

28/05/2017 17:40, Yongseok Koh:
> Vectorized Rx API for x86 is added.
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  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().

      reply	other threads:[~2017-05-30 10:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 15:40 [PATCH] net/mlx5: add vectorized Rx Yongseok Koh
2017-05-30 10:45 ` Thomas Monjalon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2868391.oB23BVWmct@xps \
    --to=thomas@monjalon.net \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.