Skip to contentSkip to conversation

net/virtio: Add support for vectorized functions on Power systems

PATCH Applied David Christensen 2 participants 4 messages Aug 14, 2019 – Sep 18, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/virtio: Add support for vectorized functions on Power systems

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 <[email protected]>
Cc Tiwei Bie <[email protected]>
---
 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
drivers/net/virtio/Makefile +2 -0
index 6c2c996..5144e7c 100644
@@ -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
drivers/net/virtio/meson.build +2 -0
index 7949054..04c7fdf 100644
@@ -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
drivers/net/virtio/virtio_rxtx_simple_altivec.c new file +202 -0

202 lines not on this page · raw message

Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 47 lines · David Christensen

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 <[email protected]>
Cc Tiwei Bie <[email protected]>
---
 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
drivers/net/virtio/Makefile +2 -0
index 6c2c996..5144e7c 100644
@@ -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
drivers/net/virtio/meson.build +2 -0
index 7949054..04c7fdf 100644
@@ -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
drivers/net/virtio/virtio_rxtx_simple_altivec.c new file +0 -0
new file mode 100644
index 0000000..f4eb4eb

drivers/net/virtio/virtio_rxtx_simple_altivec.c line 2

Quoted 2 lines
drivers/net/virtio/virtio_rxtx_simple_altivec.c new file +2 -0
@@ -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:

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

Thanks,
Maxime

#2 lore raw
Quoted 1 line

Copyright(c) 2010-2015 Intel Corporation

The code was substantially duplicated from the SSE code so adding IBM would be appropriate:

Copyright(C) 2019 IBM Corporation

Dave

#3 lore raw
In reply to David Christensen
Quoted 7 lines · David Christensen

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 <[email protected]>
Cc Tiwei Bie <[email protected]>
Quoted 8 lines
---
 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

Shortened commit title to comply with check-git-log tool, and applied IBM Copyright.

Applied to dpdk-next-virtio/master.

Thanks,
Maxime