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