[dpdk-dev] [PATCH] net/virtio: Add support for vectorized functions on Power systems

Maxime Coquelin maxime.coquelin at redhat.com
Fri Sep 6 15:44:34 CEST 2019



On 8/14/19 7:49 PM, David Christensen wrote:
> Added the file virtio_rxtx_simple_altivec.c which implements Altivec
> code for the virtio vectorized RX functions. Updated the various build
> files.
> 
> Cc: Maxime Coquelin <maxime.coquelin at redhat.com>
> Cc: Tiwei Bie <tiwei.bie at intel.com>
> 
> Signed-off-by: David Christensen <drc at linux.vnet.ibm.com>
> ---
>  drivers/net/virtio/Makefile                     |   2 +
>  drivers/net/virtio/meson.build                  |   2 +
>  drivers/net/virtio/virtio_rxtx_simple_altivec.c | 202 ++++++++++++++++++++++++
>  3 files changed, 206 insertions(+)
>  create mode 100644 drivers/net/virtio/virtio_rxtx_simple_altivec.c
> 
> diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile
> index 6c2c996..5144e7c 100644
> --- a/drivers/net/virtio/Makefile
> +++ b/drivers/net/virtio/Makefile
> @@ -33,6 +33,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple.c
>  
>  ifeq ($(CONFIG_RTE_ARCH_X86),y)
>  SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple_sse.c
> +else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
> +SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple_altivec.c
>  else ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)
>  SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple_neon.c
>  endif
> diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
> index 7949054..04c7fdf 100644
> --- a/drivers/net/virtio/meson.build
> +++ b/drivers/net/virtio/meson.build
> @@ -11,6 +11,8 @@ deps += ['kvargs', 'bus_pci']
>  
>  if arch_subdir == 'x86'
>  	sources += files('virtio_rxtx_simple_sse.c')
> +elif arch_subdir == 'ppc_64'
> +	sources += files('virtio_rxtx_simple_altivec.c')
>  elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
>  	sources += files('virtio_rxtx_simple_neon.c')
>  endif
> diff --git a/drivers/net/virtio/virtio_rxtx_simple_altivec.c b/drivers/net/virtio/virtio_rxtx_simple_altivec.c
> new file mode 100644
> index 0000000..f4eb4eb
> --- /dev/null
> +++ b/drivers/net/virtio/virtio_rxtx_simple_altivec.c
> @@ -0,0 +1,202 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2010-2015 Intel Corporation

You may want to also add IBM's copyright here?

Other than that, it looks good to me:
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Let me know what to add as copyright if needed, I'll add it
when applying.

Thanks,
Maxime


More information about the dev mailing list