Skip to contentSkip to conversation

introduce s390x architecture

RFC In review Vivian Kong 9 participants 42 messages Apr 9, 2019 – Mar 24, 2021 1 message not in the archive

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

cover introduce s390x architecture

To build and run DPDK on Linux on IBM Z (s390x), big endian support is added and s390x vector intrinics are used in the implementation of DPDK libraries.

I appreciate your feedback.

Vivian Kong (12):
mk: introduce s390x architecture
eal: add support for s390x architecture
acl: add support for s390x architecture
lpm: add support for s390x architecture examples/l3fwd: add support for s390x architecture net/i40e: add support for s390x architecture
test: add support for s390x architecture
hash: add support for s390x architecture
doc: introduce s390x architecture
ethdev: add cast for bus_device
mbuf: trivial fix
test: miscellaneous test fixes

 MAINTAINERS                                   |   9 +
 app/test-acl/main.c                           |   4 +
 app/test/autotest_data.py                     |   2 +-
 app/test/test_cmdline.c                       |   6 +-
 app/test/test_cmdline_ipaddr.c                |  13 +-
 app/test/test_cmdline_num.c                   | 111 +++
 app/test/test_xmmt_ops.h                      |  14 +
 config/defconfig_s390x-native-linux-gcc       |   1 +
 config/defconfig_s390x-native-linuxapp-gcc    |  33 +
 doc/guides/nics/features/i40e.ini             |   1 +
 doc/guides/nics/features/i40e_vec.ini         |   1 +
 doc/guides/rel_notes/release_19_05.rst        |   3 +
 drivers/net/i40e/Makefile                     |   2 +
 drivers/net/i40e/i40e_rxtx_vec_s390x.c        | 631 ++++++++++++++++++
 examples/l3fwd/l3fwd_em.c                     |   8 +
 examples/l3fwd/l3fwd_lpm_s390x.h              | 137 ++++
 examples/l3fwd/l3fwd_s390x.h                  | 259 +++++++
 lib/librte_acl/Makefile                       |   2 +
 lib/librte_acl/acl_bld.c                      |  69 +-
 lib/librte_acl/acl_gen.c                      |   9 +
 lib/librte_acl/acl_run_scalar.c               |   8 +
 lib/librte_acl/rte_acl.c                      |   4 +
 lib/librte_acl/rte_acl.h                      |   1 +
 .../common/arch/s390x/rte_cpuflags.c          |  90 +++
 lib/librte_eal/common/arch/s390x/rte_cycles.c |  11 +
 .../common/arch/s390x/rte_hypervisor.c        |  11 +
 .../common/include/arch/s390x/rte_atomic.h    |  47 ++
 .../common/include/arch/s390x/rte_byteorder.h |  43 ++
 .../common/include/arch/s390x/rte_cpuflags.h  |  42 ++
 .../common/include/arch/s390x/rte_cycles.h    |  44 ++
 .../common/include/arch/s390x/rte_io.h        |  18 +
 .../common/include/arch/s390x/rte_memcpy.h    |  55 ++
 .../common/include/arch/s390x/rte_pause.h     |  22 +
 .../common/include/arch/s390x/rte_prefetch.h  |  40 ++
 .../common/include/arch/s390x/rte_rwlock.h    |  42 ++
 .../common/include/arch/s390x/rte_spinlock.h  |  85 +++
 .../include/arch/s390x/rte_ticketlock.h       |  18 +
 .../common/include/arch/s390x/rte_vect.h      |  33 +
 lib/librte_ethdev/rte_ethdev_pci.h            |   2 +-
 lib/librte_hash/rte_fbk_hash.h                |   7 +
 lib/librte_lpm/Makefile                       |   2 +
 lib/librte_lpm/meson.build                    |   2 +-
 lib/librte_lpm/rte_lpm.h                      |   2 +
 lib/librte_lpm/rte_lpm6.c                     |  26 +-
 lib/librte_lpm/rte_lpm_s390x.h                | 130 ++++
 lib/librte_mbuf/rte_mbuf.h                    |   2 +-
 mk/arch/s390x/rte.vars.mk                     |  16 +
 mk/rte.cpuflags.mk                            |   5 +
 48 files changed, 2099 insertions(+), 24 deletions(-)
 create mode 120000 config/defconfig_s390x-native-linux-gcc
 create mode 100644 config/defconfig_s390x-native-linuxapp-gcc
 create mode 100644 drivers/net/i40e/i40e_rxtx_vec_s390x.c
 create mode 100644 examples/l3fwd/l3fwd_lpm_s390x.h
 create mode 100644 examples/l3fwd/l3fwd_s390x.h
 create mode 100644 lib/librte_eal/common/arch/s390x/rte_cpuflags.c
 create mode 100644 lib/librte_eal/common/arch/s390x/rte_cycles.c
 create mode 100644 lib/librte_eal/common/arch/s390x/rte_hypervisor.c
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_atomic.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_byteorder.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_cpuflags.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_cycles.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_io.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_memcpy.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_pause.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_prefetch.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_rwlock.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_spinlock.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_ticketlock.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_vect.h
 create mode 100644 lib/librte_lpm/rte_lpm_s390x.h
 create mode 100644 mk/arch/s390x/rte.vars.mk
Signature · 1 line
2.17.1
#1 lore raw

RFC 1/12 mk: introduce s390x architecture

Add config and mk files to build DPDK on Linux on IBM Z (s390x).

---
 config/defconfig_s390x-native-linux-gcc    |  1 +
 config/defconfig_s390x-native-linuxapp-gcc | 33 ++++++++++++++++++++++
 mk/arch/s390x/rte.vars.mk                  | 16 +++++++++++
 mk/rte.cpuflags.mk                         |  5 ++++
 4 files changed, 55 insertions(+)
 create mode 120000 config/defconfig_s390x-native-linux-gcc
 create mode 100644 config/defconfig_s390x-native-linuxapp-gcc
 create mode 100644 mk/arch/s390x/rte.vars.mk
config/defconfig_s390x-native-linux-gcc new file +1 -0
new file mode 120000
index 000000000..28b9275cf
@@ -0,0 +1 @@
+defconfig_s390x-native-linuxapp-gcc
\ No newline at end of file
config/defconfig_s390x-native-linuxapp-gcc new file +33 -0
new file mode 100644
index 000000000..1241157d9
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# (c) Copyright IBM Corp. 2018, 2019
+
+#include "common_linux"
+
+CONFIG_RTE_MACHINE="z13"
+
+CONFIG_RTE_ARCH="s390x"
+CONFIG_RTE_ARCH_64=y
+CONFIG_RTE_ARCH_S390X=y
+
+#CONFIG_RTE_MAX_LCORE=256
+#CONFIG_RTE_MAX_NUMA_NODES=32
+#CONFIG_RTE_CACHE_LINE_SIZE=128
+
+CONFIG_RTE_TOOLCHAIN="gcc"
+CONFIG_RTE_TOOLCHAIN_GCC=y
+CONFIG_RTE_FORCE_INTRINSICS=y
+# Note: Power doesn't have this support
+CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=n
+
+# Note: Initially, all of the PMD drivers compilation are turned off on s390x
+# Will turn on them only after the successful testing on s390x
+CONFIG_RTE_LIBRTE_IXGBE_PMD=n
+CONFIG_RTE_LIBRTE_VIRTIO_PMD=y
+CONFIG_RTE_LIBRTE_VMXNET3_PMD=n
+CONFIG_RTE_LIBRTE_ENIC_PMD=n
+CONFIG_RTE_LIBRTE_FM10K_PMD=n
+CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n
+CONFIG_RTE_LIBRTE_AVP_PMD=n
+CONFIG_RTE_LIBRTE_BNXT_PMD=n
+CONFIG_RTE_LIBRTE_ENETC_PMD=n
mk/arch/s390x/rte.vars.mk new file +16 -0
new file mode 100644
index 000000000..9740c5684
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# (c) Copyright IBM Corp. 2018, 2019
+
+ARCH  ?= s390
+CROSS ?=
+
+CPU_CFLAGS  ?= -m64
+CPU_LDFLAGS ?=
+CPU_ASFLAGS ?= -felf64
+
+export ARCH CROSS CPU_CFLAGS CPU_LDFLAGS CPU_ASFLAGS
+
+RTE_OBJCOPY_TARGET = elf64-s390
+RTE_OBJCOPY_ARCH = s390
+
+export RTE_OBJCOPY_TARGET RTE_OBJCOPY_ARCH
mk/rte.cpuflags.mk +5 -0
index 541211c61..195022926 100644
@@ -93,6 +93,11 @@ ifneq ($(filter $(AUTO_CPUFLAGS),__builtin_vsx_xvnmaddadp),)
 CPUFLAGS += VSX
 endif
 
+# s390x
+ifneq ($(filter $(AUTO_CPUFLAGS),__s390x__),)
+CPUFLAGS += ZARCH
+endif
+
 # ARM flags
 ifneq ($(filter __ARM_NEON __aarch64__,$(AUTO_CPUFLAGS)),)
 CPUFLAGS += NEON
Signature · 1 line
2.17.1
#2 lore raw

Re: [dpdk-dev] [RFC 01/12] mk: introduce s390x architecture

Quoted 5 lines · Vivian Kong

Add config and mk files to build DPDK on Linux on IBM Z (s390x).

Signed-off-by: Vivian Kong <
[email protected]

Quoted 1 line
Quoted 10 lines
---
 config/defconfig_s390x-native-linux-gcc    |  1 +
 config/defconfig_s390x-native-linuxapp-gcc | 33
++++++++++++++++++++++
 mk/arch/s390x/rte.vars.mk                  | 16 +++++++++++
 mk/rte.cpuflags.mk                         |  5 ++++
 4 files changed, 55 insertions(+)
 create mode 120000 config/defconfig_s390x-native-linux-gcc
 create mode 100644 config/defconfig_s390x-native-linuxapp-gcc
 create mode 100644 mk/arch/s390x/rte.vars.mk

Hi,

Please look into adding support for Meson as well. Thanks!

Signature · 2 lines
Kind regards,
Luca Boccassi
#3 lore raw

Re: [dpdk-dev] [RFC 01/12] mk: introduce s390x architecture

I'll look into adding that. Thanks.

Regards,

Vivian Kong
Linux on IBM Z Open Source Ecosystem
IBM Canada Toronto Lab

Luca Boccassi <[email protected]> wrote on 2019/04/09 03:38:45 PM:

Quoted 30 lines

From: Luca Boccassi <[email protected]>
To: [email protected], [email protected]
Date: 2019/04/09 03:38 PM
Subject: Re: [dpdk-dev] [RFC 01/12] mk: introduce s390x architecture

Quoted 5 lines · Vivian Kong

Add config and mk files to build DPDK on Linux on IBM Z (s390x).

Signed-off-by: Vivian Kong <
[email protected]

Quoted 1 line
Quoted 10 lines
---
 config/defconfig_s390x-native-linux-gcc    |  1 +
 config/defconfig_s390x-native-linuxapp-gcc | 33
++++++++++++++++++++++
 mk/arch/s390x/rte.vars.mk                  | 16 +++++++++++
 mk/rte.cpuflags.mk                         |  5 ++++
 4 files changed, 55 insertions(+)
 create mode 120000 config/defconfig_s390x-native-linux-gcc
 create mode 100644 config/defconfig_s390x-native-linuxapp-gcc
 create mode 100644 mk/arch/s390x/rte.vars.mk

Hi,

Please look into adding support for Meson as well. Thanks!

--
Kind regards,
Luca Boccassi

#4 lore raw

RFC 2/12 eal: add support for s390x architecture

In reply to Vivian Kong

Implement DPDK EAL for s390x architecture.

---
 .../common/arch/s390x/rte_cpuflags.c          | 90 +++++++++++++++++++
 lib/librte_eal/common/arch/s390x/rte_cycles.c | 11 +++
 .../common/arch/s390x/rte_hypervisor.c        | 11 +++
 .../common/include/arch/s390x/rte_atomic.h    | 47 ++++++++++
 .../common/include/arch/s390x/rte_byteorder.h | 43 +++++++++
 .../common/include/arch/s390x/rte_cpuflags.h  | 42 +++++++++
 .../common/include/arch/s390x/rte_cycles.h    | 44 +++++++++
 .../common/include/arch/s390x/rte_io.h        | 18 ++++
 .../common/include/arch/s390x/rte_memcpy.h    | 55 ++++++++++++
 .../common/include/arch/s390x/rte_pause.h     | 22 +++++
 .../common/include/arch/s390x/rte_prefetch.h  | 40 +++++++++
 .../common/include/arch/s390x/rte_rwlock.h    | 42 +++++++++
 .../common/include/arch/s390x/rte_spinlock.h  | 85 ++++++++++++++++++
 .../include/arch/s390x/rte_ticketlock.h       | 18 ++++
 .../common/include/arch/s390x/rte_vect.h      | 33 +++++++
 15 files changed, 601 insertions(+)
 create mode 100644 lib/librte_eal/common/arch/s390x/rte_cpuflags.c
 create mode 100644 lib/librte_eal/common/arch/s390x/rte_cycles.c
 create mode 100644 lib/librte_eal/common/arch/s390x/rte_hypervisor.c
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_atomic.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_byteorder.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_cpuflags.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_cycles.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_io.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_memcpy.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_pause.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_prefetch.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_rwlock.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_spinlock.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_ticketlock.h
 create mode 100644 lib/librte_eal/common/include/arch/s390x/rte_vect.h
lib/librte_eal/common/arch/s390x/rte_cpuflags.c new file +90 -0
new file mode 100644
index 000000000..1f8c6ef41
@@ -0,0 +1,90 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#include "rte_cpuflags.h"
+
+#include <elf.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <unistd.h>
+
+/* Symbolic values for the entries in the auxiliary table */
+#define AT_HWCAP  16
+#define AT_HWCAP2 26
+
+/* software based registers */
+enum cpu_register_t {
+	REG_NONE = 0,
+	REG_HWCAP,
+	REG_HWCAP2,
+	REG_MAX
+};
+
+typedef uint32_t hwcap_registers_t[REG_MAX];
+
+struct feature_entry {
+	uint32_t reg;
+	uint32_t bit;
+#define CPU_FLAG_NAME_MAX_LEN 64
+	char name[CPU_FLAG_NAME_MAX_LEN];
+};
+
+#define FEAT_DEF(name, reg, bit) \
+	[RTE_CPUFLAG_##name] = {reg, bit, #name},
+
+const struct feature_entry rte_cpu_feature_table[] = {
+	FEAT_DEF(ESAN3,                  REG_HWCAP,   0)
+	FEAT_DEF(ZARCH,                  REG_HWCAP,   1)
+	FEAT_DEF(STFLE,                  REG_HWCAP,   2)
+	FEAT_DEF(MSA,                    REG_HWCAP,   3)
+	FEAT_DEF(LDISP,                  REG_HWCAP,   4)
+	FEAT_DEF(EIMM,                   REG_HWCAP,   5)
+	FEAT_DEF(DFP,                    REG_HWCAP,   6)
+	FEAT_DEF(HPAGE,                  REG_HWCAP,   7)
+	FEAT_DEF(ETF3EH,                 REG_HWCAP,   8)
+	FEAT_DEF(HIGH_GPRS,              REG_HWCAP,   9)
+	FEAT_DEF(TE,                     REG_HWCAP,  10)
+	FEAT_DEF(VXRS,                   REG_HWCAP,  11)
+	FEAT_DEF(VXRS_BCD,               REG_HWCAP,  12)
+	FEAT_DEF(VXRS_EXT,               REG_HWCAP,  13)
+	FEAT_DEF(GS,                     REG_HWCAP,  14)
+};
+
+/*
+ * Read AUXV software register and get cpu features for Power
+ */
+static void
+rte_cpu_get_features(hwcap_registers_t out)
+{
+	out[REG_HWCAP] = rte_cpu_getauxval(AT_HWCAP);
+	out[REG_HWCAP2] = rte_cpu_getauxval(AT_HWCAP2);
+}
+
+/*
+ * Checks if a particular flag is available on current machine.
+ */
+int
+rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature)
+{
+	const struct feature_entry *feat;
+	hwcap_registers_t regs = {0};
+
+	if (feature >= RTE_CPUFLAG_NUMFLAGS)
+		return -ENOENT;
+
+	feat = &rte_cpu_feature_table[feature];
+	if (feat->reg == REG_NONE)
+		return -EFAULT;
+
+	rte_cpu_get_features(regs);
+	return (regs[feat->reg] >> feat->bit) & 1;
+}
+
+const char *
+rte_cpu_get_flag_name(enum rte_cpu_flag_t feature)
+{
+	if (feature >= RTE_CPUFLAG_NUMFLAGS)
+		return NULL;
+	return rte_cpu_feature_table[feature].name;
+}
lib/librte_eal/common/arch/s390x/rte_cycles.c new file +11 -0
new file mode 100644
index 000000000..b29c4454a
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#include "eal_private.h"
+
+uint64_t
+get_tsc_freq_arch(void)
+{
+	return 0;
+}
lib/librte_eal/common/arch/s390x/rte_hypervisor.c new file +11 -0
new file mode 100644
index 000000000..22b0c5cc4
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#include "rte_hypervisor.h"
+
+enum rte_hypervisor
+rte_hypervisor_get(void)
+{
+	return RTE_HYPERVISOR_UNKNOWN;
+}
lib/librte_eal/common/include/arch/s390x/rte_atomic.h new file +47 -0

47 lines not on this page · raw message

lib/librte_eal/common/include/arch/s390x/rte_byteorder.h new file +43 -0

43 lines not on this page · raw message

lib/librte_eal/common/include/arch/s390x/rte_cpuflags.h new file +42 -0

42 lines not on this page · raw message

lib/librte_eal/common/include/arch/s390x/rte_cycles.h new file +44 -0

44 lines not on this page · raw message

lib/librte_eal/common/include/arch/s390x/rte_io.h new file +18 -0
new file mode 100644
index 000000000..e6b718ef3
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_IO_S390X_H_
+#define _RTE_IO_S390X_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "generic/rte_io.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_IO_S390X_H_ */
lib/librte_eal/common/include/arch/s390x/rte_memcpy.h new file +55 -0

55 lines not on this page · raw message

lib/librte_eal/common/include/arch/s390x/rte_pause.h new file +22 -0
new file mode 100644
index 000000000..be90ce6a1
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_PAUSE_S390X_H_
+#define _RTE_PAUSE_S390X_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "generic/rte_pause.h"
+
+static inline void rte_pause(void)
+{
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_PAUSE_S390X_H_ */
lib/librte_eal/common/include/arch/s390x/rte_prefetch.h new file +40 -0
new file mode 100644
index 000000000..c76c6d898
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_PREFETCH_S390X_H_
+#define _RTE_PREFETCH_S390X_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_common.h>
+#include "generic/rte_prefetch.h"
+
+static inline void rte_prefetch0(const volatile void *p)
+{
+	asm volatile ("pfd 1, 0(%[p])" : : [p] "r" (p));
+}
+
+static inline void rte_prefetch1(const volatile void *p)
+{
+	asm volatile ("pfd 1, 0(%[p])" : : [p] "r" (p));
+}
+
+static inline void rte_prefetch2(const volatile void *p)
+{
+	asm volatile ("pfd 1, 0(%[p])" : : [p] "r" (p));
+}
+
+static inline void rte_prefetch_non_temporal(const volatile void *p)
+{
+	/* non-temporal version not available, fallback to rte_prefetch0 */
+	rte_prefetch0(p);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_PREFETCH_S390X_H_ */
lib/librte_eal/common/include/arch/s390x/rte_rwlock.h new file +42 -0

42 lines not on this page · raw message

lib/librte_eal/common/include/arch/s390x/rte_spinlock.h new file +85 -0

85 lines not on this page · raw message

lib/librte_eal/common/include/arch/s390x/rte_ticketlock.h new file +18 -0
new file mode 100644
index 000000000..0785363c9
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2019
+ */
+
+#ifndef _RTE_TICKETLOCK_S390X_H_
+#define _RTE_TICKETLOCK_S390X_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "generic/rte_ticketlock.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_TICKETLOCK_S390X_H_ */
lib/librte_eal/common/include/arch/s390x/rte_vect.h new file +33 -0
new file mode 100644
index 000000000..459744aa4
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_VECT_S390X_H_
+#define _RTE_VECT_S390X_H_
+
+#include <vecintrin.h>
+#include "generic/rte_vect.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int xmm_t __attribute__((vector_size(4*sizeof(int))));
+
+#define	XMM_SIZE	(sizeof(xmm_t))
+#define	XMM_MASK	(XMM_SIZE - 1)
+
+typedef union rte_xmm {
+	xmm_t    x;
+	uint8_t  u8[XMM_SIZE / sizeof(uint8_t)];
+	uint16_t u16[XMM_SIZE / sizeof(uint16_t)];
+	uint32_t u32[XMM_SIZE / sizeof(uint32_t)];
+	uint64_t u64[XMM_SIZE / sizeof(uint64_t)];
+	double   pd[XMM_SIZE / sizeof(double)];
+} __attribute__((aligned(16))) rte_xmm_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_VECT_S390X_H_ */
Signature · 1 line
2.17.1
#5 lore raw

RFC 3/12 acl: add support for s390x architecture

In reply to Vivian Kong

Add big endian support for s390x architecture.

---
 app/test-acl/main.c             |  4 ++
 lib/librte_acl/Makefile         |  2 +
 lib/librte_acl/acl_bld.c        | 69 +++++++++++++++++++++++++++------
 lib/librte_acl/acl_gen.c        |  9 +++++
 lib/librte_acl/acl_run_scalar.c |  8 ++++
 lib/librte_acl/rte_acl.c        |  4 ++
 lib/librte_acl/rte_acl.h        |  1 +
 7 files changed, 85 insertions(+), 12 deletions(-)
app/test-acl/main.c +4 -0
index b80179417..b6c5c9abd 100644
@@ -81,6 +81,10 @@ static const struct acl_alg acl_alg[] = {
 		.name = "altivec",
 		.alg = RTE_ACL_CLASSIFY_ALTIVEC,
 	},
+	{
+		.name = "s390x",
+		.alg = RTE_ACL_CLASSIFY_S390X,
+	},
 };
 
 static struct {
lib/librte_acl/Makefile +2 -0
index ea5edf00a..f87693d1e 100644
@@ -30,6 +30,8 @@ CFLAGS_acl_run_neon.o += -Wno-maybe-uninitialized
 endif
 else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_altivec.c
+else ifeq ($(CONFIG_RTE_ARCH_S390X),y)
+SRCS-$(CONFIG_RTE_LIBRTE_ACL) +=
 else
 SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_sse.c
 endif
lib/librte_acl/acl_bld.c +57 -12

137 lines not on this page · raw message

lib/librte_acl/acl_gen.c +9 -0
index 35a0140b4..b4e8df0ce 100644
@@ -360,7 +360,16 @@ acl_gen_node(struct rte_acl_node *node, uint64_t *node_array,
 		array_ptr = &node_array[index->quad_index];
 		acl_add_ptrs(node, array_ptr, no_match, 0);
 		qtrp = (uint32_t *)node->transitions;
+
+		/* Swap qtrp on big endian that transitions[0]
+		 * is at least signifcant byte.
+		 */
+#if __BYTE_ORDER == __ORDER_BIG_ENDIAN__
+		node->node_index = __bswap_32(qtrp[0]);
+#else
 		node->node_index = qtrp[0];
+#endif
+
 		node->node_index <<= sizeof(index->quad_index) * CHAR_BIT;
 		node->node_index |= index->quad_index | node->node_type;
 		index->quad_index += node->fanout;
lib/librte_acl/acl_run_scalar.c +8 -0
index 3d61e7940..9f01ef8d8 100644
@@ -141,6 +141,14 @@ rte_acl_classify_scalar(const struct rte_acl_ctx *ctx, const uint8_t **data,
 		input0 = GET_NEXT_4BYTES(parms, 0);
 		input1 = GET_NEXT_4BYTES(parms, 1);
 
+		/* input needs to be swapped because the rules get
+		 * swapped while building the trie.
+		 */
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+		input0 = __bswap_32(input0);
+		input1 = __bswap_32(input1);
+#endif
+
 		for (n = 0; n < 4; n++) {
 
 			transition0 = scalar_transition(flows.trans,
lib/librte_acl/rte_acl.c +4 -0
index c436a9bfd..6d4d3f239 100644
@@ -64,6 +64,8 @@ static const rte_acl_classify_t classify_fns[] = {
 	[RTE_ACL_CLASSIFY_AVX2] = rte_acl_classify_avx2,
 	[RTE_ACL_CLASSIFY_NEON] = rte_acl_classify_neon,
 	[RTE_ACL_CLASSIFY_ALTIVEC] = rte_acl_classify_altivec,
+	/* use scalar for s390x for now */
+	[RTE_ACL_CLASSIFY_S390X] = rte_acl_classify_scalar,
 };
 
 /* by default, use always available scalar code path. */
@@ -103,6 +105,8 @@ RTE_INIT(rte_acl_init)
 		alg =  RTE_ACL_CLASSIFY_NEON;
 #elif defined(RTE_ARCH_PPC_64)
 	alg = RTE_ACL_CLASSIFY_ALTIVEC;
+#elif defined(RTE_ARCH_S390X)
+	alg = RTE_ACL_CLASSIFY_S390X;
 #else
 #ifdef CC_AVX2_SUPPORT
 	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2))
lib/librte_acl/rte_acl.h +1 -0
index aa22e70c6..9537196db 100644
@@ -241,6 +241,7 @@ enum rte_acl_classify_alg {
 	RTE_ACL_CLASSIFY_AVX2 = 3,    /**< requires AVX2 support. */
 	RTE_ACL_CLASSIFY_NEON = 4,    /**< requires NEON support. */
 	RTE_ACL_CLASSIFY_ALTIVEC = 5,    /**< requires ALTIVEC support. */
+	RTE_ACL_CLASSIFY_S390X = 6,    /**< requires s390x z13 support. */
 	RTE_ACL_CLASSIFY_NUM          /* should always be the last one. */
 };
 
Signature · 1 line
2.17.1
#6 lore raw

RFC 4/12 lpm: add support for s390x architecture

In reply to Vivian Kong

Add big endian support for s390x architecture.

---
 lib/librte_lpm/Makefile        |   2 +
 lib/librte_lpm/meson.build     |   2 +-
 lib/librte_lpm/rte_lpm.h       |   2 +
 lib/librte_lpm/rte_lpm6.c      |  26 ++++++-
 lib/librte_lpm/rte_lpm_s390x.h | 130 +++++++++++++++++++++++++++++++++
 5 files changed, 157 insertions(+), 5 deletions(-)
 create mode 100644 lib/librte_lpm/rte_lpm_s390x.h
lib/librte_lpm/Makefile +2 -0
index a7946a1c5..16b868304 100644
@@ -26,6 +26,8 @@ else ifeq ($(CONFIG_RTE_ARCH_X86),y)
 SYMLINK-$(CONFIG_RTE_LIBRTE_LPM)-include += rte_lpm_sse.h
 else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
 SYMLINK-$(CONFIG_RTE_LIBRTE_LPM)-include += rte_lpm_altivec.h
+else ifeq ($(CONFIG_RTE_ARCH_S390X),y)
+SYMLINK-$(CONFIG_RTE_LIBRTE_LPM)-include += rte_lpm_s390x.h
 endif
 
 include $(RTE_SDK)/mk/rte.lib.mk
lib/librte_lpm/meson.build +1 -1
index a5176d8ae..68317ed52 100644
@@ -6,5 +6,5 @@ sources = files('rte_lpm.c', 'rte_lpm6.c')
 headers = files('rte_lpm.h', 'rte_lpm6.h')
 # since header files have different names, we can install all vector headers
 # without worrying about which architecture we actually need
-headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h')
+headers += files('rte_lpm_s390x.h', 'rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h')
 deps += ['hash']
lib/librte_lpm/rte_lpm.h +2 -0
index 21550444d..aa8a43968 100644
@@ -459,6 +459,8 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
 #include "rte_lpm_neon.h"
 #elif defined(RTE_ARCH_PPC_64)
 #include "rte_lpm_altivec.h"
+#elif defined(RTE_ARCH_S390X)
+#include "rte_lpm_s390x.h"
 #else
 #include "rte_lpm_sse.h"
 #endif
lib/librte_lpm/rte_lpm6.c +22 -4
index a91803113..7aead4035 100644
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2010-2014 Intel Corporation
  */
+
 #include <string.h>
 #include <stdint.h>
 #include <errno.h>
@@ -24,6 +25,7 @@
 #include <rte_hash.h>
 #include <assert.h>
 #include <rte_jhash.h>
+#include <rte_byteorder.h>
 
 #include "rte_lpm6.h"
 
@@ -58,17 +60,33 @@ static struct rte_tailq_elem rte_lpm6_tailq = {
 };
 EAL_REGISTER_TAILQ(rte_lpm6_tailq)
 
+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
+
 /** Tbl entry structure. It is the same for both tbl24 and tbl8 */
 struct rte_lpm6_tbl_entry {
-	uint32_t next_hop:	21;  /**< Next hop / next table to be checked. */
-	uint32_t depth	:8;      /**< Rule depth. */
+	uint32_t next_hop :21;  /**< Next hop / next table to be checked. */
+	uint32_t depth	  :8;   /**< Rule depth. */
+
+	/* Flags. */
+	uint32_t valid       :1; /**< Validation flag. */
+	uint32_t valid_group :1; /**< Group validation flag. */
+	uint32_t ext_entry   :1; /**< External entry. */
+};
+
+#else
 
+struct rte_lpm6_tbl_entry {
 	/* Flags. */
-	uint32_t valid     :1;   /**< Validation flag. */
+	uint32_t ext_entry   :1; /**< External entry. */
 	uint32_t valid_group :1; /**< Group validation flag. */
-	uint32_t ext_entry :1;   /**< External entry. */
+	uint32_t valid       :1; /**< Validation flag. */
+
+	uint32_t depth    :8;   /**< Rule depth. */
+	uint32_t next_hop :21;  /**< Next hop / next table to be checked. */
 };
 
+#endif
+
 /** Rules tbl entry structure. */
 struct rte_lpm6_rule {
 	uint8_t ip[RTE_LPM6_IPV6_ADDR_SIZE]; /**< Rule IP address. */
lib/librte_lpm/rte_lpm_s390x.h new file +130 -0

130 lines not on this page · raw message

Signature · 1 line
2.17.1
#7 lore raw

RFC 5/12 examples/l3fwd: add support for s390x architecture

In reply to Vivian Kong

Add s390x specific implementation.

---
 examples/l3fwd/l3fwd_em.c        |   8 +
 examples/l3fwd/l3fwd_lpm_s390x.h | 137 ++++++++++++++++
 examples/l3fwd/l3fwd_s390x.h     | 259 +++++++++++++++++++++++++++++++
 3 files changed, 404 insertions(+)
 create mode 100644 examples/l3fwd/l3fwd_lpm_s390x.h
 create mode 100644 examples/l3fwd/l3fwd_s390x.h
examples/l3fwd/l3fwd_em.c +8 -0
index fa8f82be6..a486a9c57 100644
@@ -240,6 +240,14 @@ em_mask_key(void *key, xmm_t mask)
 
 	return vec_and(data, mask);
 }
+#elif defined(RTE_MACHINE_CPUFLAG_ZARCH)
+static inline xmm_t
+em_mask_key(void *key, xmm_t mask)
+{
+	xmm_t data = (xmm_t) vec_xld2(0, (unsigned int *)(key));
+
+	return data + mask;
+}
 #else
 #error No vector engine (SSE, NEON, ALTIVEC) available, check your toolchain
 #endif
examples/l3fwd/l3fwd_lpm_s390x.h new file +137 -0

137 lines not on this page · raw message

examples/l3fwd/l3fwd_s390x.h new file +259 -0

259 lines not on this page · raw message

Signature · 1 line
2.17.1
#8 lore raw

RFC 6/12 net/i40e: add support for s390x architecture

In reply to Vivian Kong

Enable i40e and i40e vector support on s390x.

---
 doc/guides/nics/features/i40e.ini      |   1 +
 doc/guides/nics/features/i40e_vec.ini  |   1 +
 drivers/net/i40e/Makefile              |   2 +
 drivers/net/i40e/i40e_rxtx_vec_s390x.c | 631 +++++++++++++++++++++++++
 4 files changed, 635 insertions(+)
 create mode 100644 drivers/net/i40e/i40e_rxtx_vec_s390x.c
doc/guides/nics/features/i40e.ini +1 -0
index 16eab7f43..0c1acfc23 100644
@@ -55,3 +55,4 @@ x86-32               = Y
 x86-64               = Y
 ARMv8                = Y
 Power8               = Y
+s390x                = Y
doc/guides/nics/features/i40e_vec.ini +1 -0
index c65e8b036..8c5062698 100644
@@ -43,3 +43,4 @@ x86-32               = Y
 x86-64               = Y
 ARMv8                = Y
 Power8               = Y
+s390x                = Y
drivers/net/i40e/Makefile +2 -0
index 3f869a8d6..d13223cc9 100644
@@ -78,6 +78,8 @@ ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_neon.c
 else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_altivec.c
+else ifeq ($(CONFIG_RTE_ARCH_S390X),y)
+SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_s390x.c
 else
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_sse.c
 endif
drivers/net/i40e/i40e_rxtx_vec_s390x.c new file +631 -0

631 lines not on this page · raw message

Signature · 1 line
2.17.1
#9 lore raw

RFC 7/12 test: add support for s390x architecture

In reply to Vivian Kong

Add big endian support for s390x architecture.

---
 app/test/test_cmdline_ipaddr.c |  13 +++-
 app/test/test_cmdline_num.c    | 111 +++++++++++++++++++++++++++++++++
 app/test/test_xmmt_ops.h       |  14 +++++
 3 files changed, 137 insertions(+), 1 deletion(-)
app/test/test_cmdline_ipaddr.c +12 -1
index 8ee7f6288..5e7629bba 100644
@@ -6,6 +6,7 @@
 #include <string.h>
 #include <inttypes.h>
 #include <netinet/in.h>
+#include <rte_byteorder.h>
 
 #ifndef __linux__
 #ifndef __FreeBSD__
@@ -22,7 +23,8 @@
 
 #include "test_cmdline.h"
 
-#define IP4(a,b,c,d) {((uint32_t)(((a) & 0xff)) | \
+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
+#define IP4(a, b, c, d) {((uint32_t)(((a) & 0xff)) | \
 					   (((b) & 0xff) << 8) | \
 					   (((c) & 0xff) << 16)  | \
 					   ((d) & 0xff)  << 24)}
@@ -30,6 +32,15 @@
 #define U16_SWAP(x) \
 		(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8))
 
+#else
+#define IP4(a, b, c, d) {((uint32_t)(((a) & 0xff) << 24) | \
+					   (((b) & 0xff) << 16) | \
+					   (((c) & 0xff) << 8)  | \
+					   ((d) & 0xff))}
+
+#define U16_SWAP(x) x
+#endif
+
 /* create IPv6 address, swapping bytes where needed */
 #ifndef s6_addr16
 # define s6_addr16      __u6_addr.__u6_addr16
app/test/test_cmdline_num.c +111 -0

141 lines not on this page · raw message

app/test/test_xmmt_ops.h +14 -0
index 8bcf0b261..6d8cd1998 100644
@@ -49,6 +49,20 @@ vect_set_epi32(int i3, int i2, int i1, int i0)
 	return data;
 }
 
+#elif defined(RTE_ARCH_S390X)
+
+/* loads the xmm_t value from address p(does not need to be 16-byte aligned)*/
+#define vect_loadu_sil128(p) vec_xld2(0, (signed int *)p)
+
+/* sets the 4 signed 32-bit integer values and returns the xmm_t variable */
+static __rte_always_inline xmm_t
+vect_set_epi32(int i3, int i2, int i1, int i0)
+{
+	xmm_t data = (xmm_t){i0, i1, i2, i3};
+
+	return data;
+}
+
 #endif
 
 #endif /* _TEST_XMMT_OPS_H_ */
Signature · 1 line
2.17.1
#10 lore raw

RFC 8/12 hash: add support for s390x architecture

In reply to Vivian Kong

Add big endian support for s390x architecture.

---
 lib/librte_hash/rte_fbk_hash.h | 7 +++++++
 1 file changed, 7 insertions(+)
lib/librte_hash/rte_fbk_hash.h +7 -0
index c4d6976d2..5e49950a7 100644
@@ -125,9 +125,16 @@ rte_fbk_hash_add_key_with_bucket(struct rte_fbk_hash_table *ht,
 	 * corrupted due to race conditions, but it's still possible to
 	 * overwrite entries that have just been made valid.
 	 */
+	#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
 	const uint64_t new_entry = ((uint64_t)(key) << 32) |
 			((uint64_t)(value) << 16) |
 			1;  /* 1 = is_entry bit. */
+	#else
+	const uint64_t new_entry =
+			((uint64_t)(1) << 48) | /* 1 = is_entry bit. */
+			((uint64_t)(value) << 32) |
+			(uint64_t)(key);
+	#endif
 	uint32_t i;
 
 	for (i = 0; i < ht->entries_per_bucket; i++) {
Signature · 1 line
2.17.1
#11 lore raw

Re: [dpdk-dev] [RFC 08/12] hash: add support for s390x architecture

Hi,
Please find the inline comment.

Quoted 14 lines · Vivian Kong

Add big endian support for s390x architecture.

---
lib/librte_hash/rte_fbk_hash.h | 7 +++++++

1 file changed, 7 insertions(+)
lib/librte_hash/rte_fbk_hash.h +0 -0
index c4d6976d2..5e49950a7 100644

lib/librte_hash/rte_fbk_hash.h rte_fbk_hash_add_key_with_bucket(struct rte_fbk_hash_table *ht, · line 134

Quoted 10 lines
lib/librte_hash/rte_fbk_hash.h +4 -0
@@ -125,9 +125,16 @@ rte_fbk_hash_add_key_with_bucket(struct rte_fbk_hash_table *ht,
 	 * corrupted due to race conditions, but it's still possible to
 	 * overwrite entries that have just been made valid.
 	 */
+	#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
 	const uint64_t new_entry = ((uint64_t)(key) << 32) |
 			((uint64_t)(value) << 16) |
 			1;  /* 1 = is_entry bit. */
+	#else
+	const uint64_t new_entry =
+			((uint64_t)(1) << 48) | /* 1 = is_entry bit. */

((uint64_t)(1) << 56)?

Quoted 9 lines
lib/librte_hash/rte_fbk_hash.h +3 -0
+			((uint64_t)(value) << 32) |
+			(uint64_t)(key);
+	#endif
 	uint32_t i;
 
 	for (i = 0; i < ht->entries_per_bucket; i++) {
Signature · 1 line
2.17.1
#12 lore raw

RFC 9/12 doc: introduce s390x architecture

In reply to Vivian Kong
---
 MAINTAINERS                            | 9 +++++++++
 doc/guides/rel_notes/release_19_05.rst | 3 +++
 2 files changed, 12 insertions(+)
MAINTAINERS +9 -0
index 9774344dd..6d4c51215 100644
@@ -248,6 +248,15 @@ F: lib/librte_eal/common/include/arch/ppc_64/
 F: drivers/net/i40e/i40e_rxtx_vec_altivec.c
 F: examples/l3fwd/*altivec.h
 
+Linux on IBM Z (s390x)
+M: Vivian Kong <[email protected]>
+F: lib/librte_eal/common/arch/s390x/
+F: lib/librte_eal/common/include/arch/s390x/
+F: lib/librte_lpm/rte_lpm_s390x.h
+F: drivers/net/i40e/i40e_rxtx_vec_s390x.c
+F: examples/l3fwd/*s390x.h
+F: mk/arch/s390x/rte.vars.mk
+
 Intel x86
 M: Bruce Richardson <[email protected]>
 M: Konstantin Ananyev <[email protected]>
doc/guides/rel_notes/release_19_05.rst +3 -0
index dbdf07a0c..2e0b39ee5 100644
@@ -155,6 +155,9 @@ New Features
   Improved testpmd application performance on ARM platform. For ``macswap``
   forwarding mode, NEON intrinsics were used to do swap to save CPU cycles.
 
+* **Added support for Linux on IBM Z (s390x).**
+
+  Added initial support for Linux on IBM Z (s390x).
 
 Removed Items
 -------------
Signature · 1 line
2.17.1
#13 lore raw

Re: [dpdk-dev] [RFC 09/12] doc: introduce s390x architecture

09/04/2019 21:06, Vivian Kong:

MAINTAINERS F: lib/librte_eal/common/include/arch/ppc_64/ · line 251

Quoted 3 lines
MAINTAINERS +1 -0
+Linux on IBM Z (s390x)

What is specific to Linux?
If it's supported only with Linux, better to say it in the doc than in the MAINTAINERS file.

Quoted 1 line

+M: Vivian Kong <[email protected]>

Your email above is wrong.

doc/guides/rel_notes/release_19_05.rst New Features · line 160

Quoted 5 lines
doc/guides/rel_notes/release_19_05.rst +3 -0
+* **Added support for Linux on IBM Z (s390x).**
+
+  Added initial support for Linux on IBM Z (s390x).

No way we add it in 19.05 while we are in release candidate phase. I will discuss more about it in the reply to the cover letter.

#14 lore raw

Re: [dpdk-dev] [RFC 09/12] doc: introduce s390x architecture

Hi Thomas,

I haven't figured out how to send out patches via Notes so I sent them via Gmail server. I set up "git send-email" to send as my IBM email but Gmail changed that when the patches get sent out. I have to see if there are another server I can use to send patches.

Right I don't expect these to go in 19.05. I wanted to follow the contribution doc and update documentation.

Regards,

Vivian Kong
Linux on IBM Z Open Source Ecosystem
IBM Canada Toronto Lab

Thomas Monjalon <[email protected]> wrote on 2019/04/09 04:12:01 PM:

Quoted 30 lines

From: Thomas Monjalon <[email protected]>
To: [email protected]
Cc: [email protected]
Date: 2019/04/09 04:12 PM
Subject: Re: [dpdk-dev] [RFC 09/12] doc: introduce s390x architecture

09/04/2019 21:06, Vivian Kong:

MAINTAINERS F: lib/librte_eal/common/include/arch/ppc_64/ · line 251

Quoted 3 lines
MAINTAINERS +1 -0
+Linux on IBM Z (s390x)

What is specific to Linux?
If it's supported only with Linux, better to say it in the doc than in the MAINTAINERS file.

Quoted 1 line

+M: Vivian Kong <[email protected]>

Your email above is wrong.

doc/guides/rel_notes/release_19_05.rst New Features · line 160

Quoted 5 lines
doc/guides/rel_notes/release_19_05.rst +3 -0
+* **Added support for Linux on IBM Z (s390x).**
+
+  Added initial support for Linux on IBM Z (s390x).

No way we add it in 19.05 while we are in release candidate phase. I will discuss more about it in the reply to the cover letter.

#15 lore raw

RFC 10/12 ethdev: add cast for bus_device

In reply to Vivian Kong
---
 lib/librte_ethdev/rte_ethdev_pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_ethdev/rte_ethdev_pci.h +1 -1
index 23257e986..80bd120b9 100644
@@ -72,7 +72,7 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
 
 static inline int
 eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) {
-	struct rte_pci_device *pci_dev = bus_device;
+	struct rte_pci_device *pci_dev = (struct rte_pci_device *) bus_device;
 
 	if (!pci_dev)
 		return -ENODEV;
Signature · 1 line
2.17.1
#16 lore raw

Re: [dpdk-dev] [RFC 10/12] ethdev: add cast for bus_device

09/04/2019 21:06, Vivian Kong:

lib/librte_ethdev/rte_ethdev_pci.h rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, · line 75

Quoted 6 lines

---
static inline int
eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) {

lib/librte_ethdev/rte_ethdev_pci.h +1 -1
-	struct rte_pci_device *pci_dev = bus_device;
+	struct rte_pci_device *pci_dev = (struct rte_pci_device *) bus_device;

Why do we need such cast?

#17 lore raw

Re: [dpdk-dev] [RFC 10/12] ethdev: add cast for bus_device

Quoted 11 lines · On Tue, 09 Apr 2019 22:14:08 +0200 Thomas Monjalon <[email protected]> wrote:

09/04/2019 21:06, Vivian Kong:

lib/librte_ethdev/rte_ethdev_pci.h rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, · line 75

Quoted 6 lines

---
static inline int
eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) {

lib/librte_ethdev/rte_ethdev_pci.h +1 -1
-	struct rte_pci_device *pci_dev = bus_device;
+	struct rte_pci_device *pci_dev = (struct rte_pci_device *) bus_device;  

Why do we need such cast?

I agree with Thomas, we try to avoid extra casts and there is even a script to find them.

#18 lore raw

Re: [dpdk-dev] [RFC 10/12] ethdev: add cast for bus_device

In reply to Thomas Monjalon

Hmm...we weren't able to compile without the cast. I'll take a closer look. Thanks.

Regards,

Vivian Kong
Linux on IBM Z Open Source Ecosystem
IBM Canada Toronto Lab

Thomas Monjalon <[email protected]> wrote on 2019/04/09 04:14:08 PM:

Quoted 11 lines

From: Thomas Monjalon <[email protected]>
To: [email protected]
Cc: [email protected]
Date: 2019/04/09 04:14 PM
Subject: Re: [dpdk-dev] [RFC 10/12] ethdev: add cast for bus_device

09/04/2019 21:06, Vivian Kong:

Quoted 4 lines

---
static inline int eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void

*bus_device) {

Quoted 2 lines

Review

Quoted 2 lines
(quoted diff) +1 -1
-   struct rte_pci_device *pci_dev = bus_device;
+   struct rte_pci_device *pci_dev = (struct rte_pci_device *)

bus_device;

Quoted 4 lines

Why do we need such cast?

#19 lore raw

RFC 11/12 mbuf: trivial fix

In reply to Vivian Kong
---
 lib/librte_mbuf/rte_mbuf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_mbuf/rte_mbuf.h +1 -1
index f7886dcb3..7dd2e7fb3 100644
@@ -500,7 +500,7 @@ enum {
 		RTE_MBUF_OUTL2_LEN_BITS,
 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
 	RTE_MBUF_L2_LEN_OFS =
-		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS
+		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS,
 	RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS - RTE_MBUF_L3_LEN_BITS,
 	RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS - RTE_MBUF_L4_LEN_BITS,
 	RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS - RTE_MBUF_TSO_SEGSZ_BITS,
Signature · 1 line
2.17.1
#20 lore raw

Re: [dpdk-dev] [RFC 11/12] mbuf: trivial fix

09/04/2019 21:06, Vivian Kong:

lib/librte_mbuf/rte_mbuf.h enum { · line 503

Quoted 8 lines
lib/librte_mbuf/rte_mbuf.h +1 -1
@@ -500,7 +500,7 @@ enum {
 		RTE_MBUF_OUTL2_LEN_BITS,
 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
 	RTE_MBUF_L2_LEN_OFS =
-		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS
+		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS,

That's funny because I was fixing it at the same time:

	https://patches.dpdk.org/patch/52515/
#21 lore raw

RFC 12/12 test: miscellaneous test fixes

In reply to Vivian Kong

Minor test case fixes.

---
 app/test/autotest_data.py | 2 +-
 app/test/test_cmdline.c   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
app/test/autotest_data.py +1 -1
index db2527489..72c56e528 100644
@@ -175,7 +175,7 @@
         "Command": "ticketlock_autotest",
         "Func":    ticketlock_autotest,
         "Report":  None,
-    }
+    },
     {
         "Name":    "Byte order autotest",
         "Command": "byteorder_autotest",
app/test/test_cmdline.c +3 -3
index 115bee966..e0720ff34 100644
@@ -10,21 +10,21 @@
 static int
 test_cmdline(void)
 {
-	printf("Testind parsing ethernet addresses...\n");
+	printf("Testing parsing ethernet addresses...\n");
 	if (test_parse_etheraddr_valid() < 0)
 		return -1;
 	if (test_parse_etheraddr_invalid_data() < 0)
 		return -1;
 	if (test_parse_etheraddr_invalid_param() < 0)
 		return -1;
-	printf("Testind parsing port lists...\n");
+	printf("Testing parsing port lists...\n");
 	if (test_parse_portlist_valid() < 0)
 		return -1;
 	if (test_parse_portlist_invalid_data() < 0)
 		return -1;
 	if (test_parse_portlist_invalid_param() < 0)
 		return -1;
-	printf("Testind parsing numbers...\n");
+	printf("Testing parsing numbers...\n");
 	if (test_parse_num_valid() < 0)
 		return -1;
 	if (test_parse_num_invalid_data() < 0)
Signature · 1 line
2.17.1
#22 lore raw
In reply to Vivian Kong

09/04/2019 21:06, Vivian Kong:

Quoted 5 lines

To build and run DPDK on Linux on IBM Z (s390x), big endian support is added and s390x vector intrinics are used in the implementation of DPDK libraries.

I appreciate your feedback.

I understand you worked on it during some time and you reveal it just now. I must say thank you for the work.
It would have been better to notify the community in advance so we would have discussed about the need for this work before you start.

First question: What is the use case of DPDK on s390x?

Second question: How is it tested? Do you have any CI?

Third question: Do you have time to dedicate to DPDK? If yes, why not helping with IBM Power?

The reason for this last question is that the support for IBM Power is still beta. I feel unconfortable merging one more IBM arch while the first one does not receive enough support and testing. I think running a CI for IBM Power would be a good first step.

#23 lore raw

Hi Thomas,

Thanks for your comments. Please see my answers to your questions below.

Quoted 1 line

First question: What is the use case of DPDK on s390x?

IBM would like to use DPDK in our new IBM cloud offering on Z.

Quoted 1 line

Second question: How is it tested? Do you have any CI?

We ran the tests by "make tests". We don't have CI set up at the moment but this is definitely something we are looking into adding.

Quoted 1 line

Third question: Do you have time to dedicate to DPDK?

After this initial port, we do plan to keep currency base on need but how frequent will be determined by usage.

Quoted 1 line

If yes, why not helping with IBM Power?

Our work is specific to Z offering, we'll be interested to run CI for Z also which will help maintaining our currency.

How is CI set up on the platforms currently supported in DPDK? It looks like a build gets run after a patch is submitted. Wondering if there are any documentation on how this is set up?

Thanks.

Regards,

Vivian Kong
Linux on IBM Z Open Source Ecosystem
IBM Canada Toronto Lab

Thomas Monjalon <[email protected]> wrote on 2019/04/09 04:25:30 PM:

Quoted 6 lines

From: Thomas Monjalon <[email protected]>
To: [email protected]
Cc: [email protected]
Date: 2019/04/09 04:25 PM
Subject: Re: [dpdk-dev] [RFC 00/12] introduce s390x architecture

Quoted 8 lines

09/04/2019 21:06, Vivian Kong:

Quoted 5 lines

To build and run DPDK on Linux on IBM Z (s390x), big endian support is added and s390x vector intrinics are used in the implementation of DPDK libraries.

I appreciate your feedback.

I understand you worked on it during some time and you reveal it just

now.

Quoted 18 lines

I must say thank you for the work.
It would have been better to notify the community in advance so we would have discussed about the need for this work before you start.

First question: What is the use case of DPDK on s390x?

Second question: How is it tested? Do you have any CI?

Third question: Do you have time to dedicate to DPDK? If yes, why not helping with IBM Power?

The reason for this last question is that the support for IBM Power is still beta. I feel unconfortable merging one more IBM arch while the first one does not receive enough support and testing. I think running a CI for IBM Power would be a good first step.

#24 lore raw

10/04/2019 19:09, Vivian Kong:

Quoted 24 lines

Hi Thomas,

Thanks for your comments. Please see my answers to your questions below.

Quoted 1 line

First question: What is the use case of DPDK on s390x?

IBM would like to use DPDK in our new IBM cloud offering on Z.

Quoted 1 line

Second question: How is it tested? Do you have any CI?

We ran the tests by "make tests". We don't have CI set up at the moment but this is definitely something we are looking into adding.

Quoted 1 line

Third question: Do you have time to dedicate to DPDK?

After this initial port, we do plan to keep currency base on need but how frequent will be determined by usage.

Quoted 8 lines
Quoted 1 line

If yes, why not helping with IBM Power?

Our work is specific to Z offering, we'll be interested to run CI for Z also which will help maintaining our currency.

How is CI set up on the platforms currently supported in DPDK? It looks like a build gets run after a patch is submitted. Wondering if there are any documentation on how this is set up?

There is no complete documentation, but we should build one. That would be great if you could help while riding this path.

Some starting points:

	https://patches.dpdk.org
	http://git.dpdk.org/tools/dpdk-ci/
	http://mails.dpdk.org/listinfo/ci

Please help with IBM Power CI at the same time.
I would like to see some progress on this front
before integrating a new IBM CPU.

#25 lore raw

Thanks for the links! I'll go through them.

For Power CI, not sure how we can help as it is done by another team. If s390x is added, we plan on maintaining currency and setting up CI on s390x will help do that.

Regards,

Vivian Kong
Linux on IBM Z Open Source Ecosystem
IBM Canada Toronto Lab

Thomas Monjalon <[email protected]> wrote on 2019/04/10 01:43:34 PM:

Quoted 10 lines

From: Thomas Monjalon <[email protected]>
To: Vivian Kong <[email protected]>
Cc: [email protected]
Date: 2019/04/10 01:43 PM
Subject: Re: [dpdk-dev] [RFC 00/12] introduce s390x architecture

10/04/2019 19:09, Vivian Kong:

Quoted 3 lines

Hi Thomas,

Thanks for your comments. Please see my answers to your questions

below.

Quoted 10 lines
Quoted 10 lines
Quoted 2 lines

First question: What is the use case of DPDK on s390x?

IBM would like to use DPDK in our new IBM cloud offering on Z.

Quoted 1 line

Second question: How is it tested? Do you have any CI?

We ran the tests by "make tests". We don't have CI set up at the

moment

Quoted 7 lines
Quoted 7 lines

but this is definitely something we are looking into adding.

Quoted 1 line

Third question: Do you have time to dedicate to DPDK?

After this initial port, we do plan to keep currency base on need but

how

Quoted 10 lines
Quoted 10 lines

frequent will be determined by usage.

Quoted 1 line

If yes, why not helping with IBM Power?

Our work is specific to Z offering, we'll be interested to run CI for Z also which will help maintaining our currency.

How is CI set up on the platforms currently supported in DPDK? It

looks

Quoted 1 line
Quoted 1 line

like a build gets run after a patch is submitted. Wondering if there

are

Quoted 9 lines
Quoted 1 line

any documentation on how this is set up?

There is no complete documentation, but we should build one. That would be great if you could help while riding this path.

Some starting points:
https://urldefense.proofpoint.com/v2/url?
u=https-3A__patches.dpdk.org&d=DwICAg&c=jf_iaSHvJObTbx-

siA1ZOg&r=t7gXFFEkLvveGPwCXa29Q41okXMOY7sJK43BPFcHaRY&m=VchTLEmGgUOXsp5m5hZPa8aCYMnWpA3V_TmZGGW995I&s=Y9d-

Quoted 4 lines

qW-nAewmuq-Op0l7kKOtq7hzIC3Wm-qcdkqQO8E&e=
https://urldefense.proofpoint.com/v2/url?
u=http-3A__git.dpdk.org_tools_dpdk-2Dci_&d=DwICAg&c=jf_iaSHvJObTbx-

siA1ZOg&r=t7gXFFEkLvveGPwCXa29Q41okXMOY7sJK43BPFcHaRY&m=VchTLEmGgUOXsp5m5hZPa8aCYMnWpA3V_TmZGGW995I&s=cP_hEZmUedWHOcXUF-

Quoted 4 lines

TTShw8UprsMFFrYhFyqp_mWHw&e=
https://urldefense.proofpoint.com/v2/url?
u=http-3A__mails.dpdk.org_listinfo_ci&d=DwICAg&c=jf_iaSHvJObTbx-

siA1ZOg&r=t7gXFFEkLvveGPwCXa29Q41okXMOY7sJK43BPFcHaRY&m=VchTLEmGgUOXsp5m5hZPa8aCYMnWpA3V_TmZGGW995I&s=WWm6B32WFdHyVc3CAuMwfNsIZEDpPeAhy9MJRKnKXow&e=

Quoted 7 lines

Please help with IBM Power CI at the same time.
I would like to see some progress on this front
before integrating a new IBM CPU.

#26 lore raw

10/04/2019 21:15, Vivian Kong:

Quoted 8 lines

Thomas Monjalon <[email protected]> wrote on 2019/04/10 01:43:34 PM:

Quoted 3 lines

Please help with IBM Power CI at the same time.
I would like to see some progress on this front
before integrating a new IBM CPU.

For Power CI, not sure how we can help as it is done by another team. If s390x is added, we plan on maintaining currency and setting up CI on s390x will help do that.

You have the same objective as another team in your company, so there is probably some room to collaborate.
You are probably in better position to help with CI on Power than anyone else in the community.
I know it is a different team, but think about other contributors who are not even in the same company.

#27 lore raw

Sorry what I meant to say is that we have no control over what Power team will do in terms on CI. And yes I will definitely reach out to them to see what their plans are.

Regards,

Vivian Kong
Linux on IBM Z Open Source Ecosystem
IBM Canada Toronto Lab

Thomas Monjalon <[email protected]> wrote on 2019/04/10 03:46:12 PM:

Quoted 6 lines

From: Thomas Monjalon <[email protected]>
To: Vivian Kong <[email protected]>
Cc: [email protected]
Date: 2019/04/10 03:46 PM
Subject: Re: [dpdk-dev] [RFC 00/12] introduce s390x architecture

Quoted 8 lines

10/04/2019 21:15, Vivian Kong:

Quoted 7 lines

Thomas Monjalon <[email protected]> wrote on 2019/04/10 01:43:34 PM:

Quoted 3 lines

Please help with IBM Power CI at the same time.
I would like to see some progress on this front
before integrating a new IBM CPU.

For Power CI, not sure how we can help as it is done by another team. If s390x is added, we plan on maintaining currency and setting up CI

on

Quoted 12 lines
Quoted 1 line

s390x will help do that.

You have the same objective as another team in your company, so there is probably some room to collaborate.
You are probably in better position to help with CI on Power than anyone else in the community.
I know it is a different team, but think about other contributors who are not even in the same company.

#28 lore raw
In reply to Thomas Monjalon
Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Second question: How is it tested? Do you have any CI?

We ran the tests by "make tests". We don't have CI set up at the moment but this is definitely something we are looking into adding.

Please help with IBM Power CI at the same time.
I would like to see some progress on this front
before integrating a new IBM CPU.

The IBM Power team is not idle in this area. There's ongoing work to enable DTS on Power systems.

Dave

#29 lore raw

10/04/2019 22:31, David Christensen:

Quoted 11 lines
Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Second question: How is it tested? Do you have any CI?

We ran the tests by "make tests". We don't have CI set up at the moment but this is definitely something we are looking into adding.

Please help with IBM Power CI at the same time.
I would like to see some progress on this front
before integrating a new IBM CPU.

The IBM Power team is not idle in this area. There's ongoing work to enable DTS on Power systems.

Good to read there is some work in the pipe.
I can remember the first emails (in 2015) talking about some automated tests for compilation and unit tests on IBM Power.
We are still seeing some compilation issues regularly on Power. Before going to DTS, I think you should extend your compilation testing, and basic feature testing with builtin unit tests.

#30 lore raw
Quoted 9 lines
Quoted 2 lines

The IBM Power team is not idle in this area. There's ongoing work to enable DTS on Power systems.

Good to read there is some work in the pipe.
I can remember the first emails (in 2015) talking about some automated tests for compilation and unit tests on IBM Power.
We are still seeing some compilation issues regularly on Power. Before going to DTS, I think you should extend your compilation testing, and basic feature testing with builtin unit tests.

That's on my ToDo list. I'm currently investigating some errors from app/test/test_barrier.c which fails on weakly ordered memory systems such as Power. I have my eye on several other tests as well that definitely need to be validated.

Dave

#31 lore raw
In reply to Thomas Monjalon
Quoted 7 lines
Quoted 3 lines

The IBM Power team is not idle in this area. There's ongoing work to enable DTS on Power systems.

Good to read there is some work in the pipe.
I can remember the first emails (in 2015) talking about some automated tests for compilation and unit tests on IBM Power.

Thomas, Unfortunately we previously had some churn in the teams that worked on DPDK
on Power. That had a downstream impact. We (Power) should be in better shape than we
were in the past. For the last several weeks, we have been regularly running a sub-set of
DTS with unit tests, sample applications and so on against the master branch. We are also
periodically running these tests against several of the stable branches as well.

Quoted 3 lines

We are still seeing some compilation issues regularly on Power. Before going to DTS, I think you should extend your compilation testing, and basic feature testing with builtin unit tests.

We have not observed any compilation issues since we started the CI. The last issue reported
was during 18.11-rc1 that Mellanox fixed. Hopefully, we should catch any such regressions
quickly in the future, since we now have a CI that runs periodically.

On a different note, I will reach out to Vivian and the s390 team.

Thanks
Pradeep
[email protected]

#32 lore raw

10/04/2019 23:45, Pradeep Satyanarayana:

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

The IBM Power team is not idle in this area. There's ongoing work to enable DTS on Power systems.

Good to read there is some work in the pipe.
I can remember the first emails (in 2015) talking about some automated tests for compilation and unit tests on IBM Power.

Quoted 10 lines

Thomas, Unfortunately we previously had some churn in the teams that worked on DPDK
on Power. That had a downstream impact. We (Power) should be in better shape than we
were in the past. For the last several weeks, we have been regularly running a sub-set of
DTS with unit tests, sample applications and so on against the master branch. We are also
periodically running these tests against several of the stable branches as well.

Good.
Next step will be to report some test result for each patchset submitted on the mailing-list, so we can monitor the results from patchwork.

Quoted 9 lines
Quoted 3 lines

We are still seeing some compilation issues regularly on Power. Before going to DTS, I think you should extend your compilation testing, and basic feature testing with builtin unit tests.

We have not observed any compilation issues since we started the CI. The last issue reported
was during 18.11-rc1 that Mellanox fixed. Hopefully, we should catch any such regressions
quickly in the future, since we now have a CI that runs periodically.

There are some failure when compiling with big endian toolchain. It seems you are not testing big endian.
If you don't support big endian, please mention it in the doc.

Quoted 1 line

On a different note, I will reach out to Vivian and the s390 team.

Thank you

#33 lore raw
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

We are still seeing some compilation issues regularly on Power. Before going to DTS, I think you should extend your compilation

testing,

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

and basic feature testing with builtin unit tests.

We have not observed any compilation issues since we started the CI.

The

Quoted 2 lines
Quoted 2 lines

last issue reported
was during 18.11-rc1 that Mellanox fixed. Hopefully, we should catch

any

Quoted 5 lines
Quoted 2 lines

such regressions
quickly in the future, since we now have a CI that runs periodically.

There are some failure when compiling with big endian toolchain. It seems you are not testing big endian.

Correct, we have been doing all our work on little endian only.

Quoted 1 line

If you don't support big endian, please mention it in the doc.

Thank you for alerting us about this. Good point that you bring up. I will need some time to consult and figure out how we approach this. Let me get back to you on this.

Thanks
Pradeep
[email protected]

#34 lore raw
In reply to Vivian Kong

Hello,

Quoted 3 lines · Vivian Kong

To build and run DPDK on Linux on IBM Z (s390x), big endian support is added and s390x vector intrinics are used in the implementation

intrinsics*

of DPDK libraries.

Quoted 3 lines

I appreciate your feedback.

Quick check since this is not 19.05 material.

- New files should be Copyright 2019.
- Avoid copy/paste from Power, noticed a reference to Power in the config file.
- Configuration files are stacked, only enable/disable the needed parts in the specific s390 file
- Meson must be added.
- No need to add dead code, remove the commented code like:
//#define dsb(opt) asm volatile("" : : : "memory")
- Comments using // are banned.
- No need to introduce a RTE_ACL_CLASSIFY_S390X to map to the scalar code. Just avoid the SSE code to be selected in the build framework (iiuc).
- Avoid introducing empty lines

Run check scripts from devtools before submitting:

[dmarchan@dmarchan dpdk]$ ./devtools/checkpatches.sh

### mk: introduce s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 61 lines checked

### eal: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 601 lines checked

### acl: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 208 lines checked

### lpm: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 203 lines checked

### examples/l3fwd: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 410 lines checked

### net/i40e: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 647 lines checked

### test: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 192 lines checked

### hash: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 16 lines checked

### doc: introduce s390x architecture

WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 2 warnings, 24 lines checked

### ethdev: add cast for bus_device

WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 2 warnings, 8 lines checked

### mbuf: trivial fix

WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 2 warnings, 8 lines checked

### test: miscellaneous test fixes

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 32 lines checked

0/12 valid patch

Signature · 1 line
David Marchand
#35 lore raw

Hello,

Quoted 118 lines · David Marchand

Hello,

Quoted 3 lines · Vivian Kong

To build and run DPDK on Linux on IBM Z (s390x), big endian support is added and s390x vector intrinics are used in the implementation

intrinsics*

of DPDK libraries.

Quoted 3 lines

I appreciate your feedback.

Quick check since this is not 19.05 material.

- New files should be Copyright 2019.
- Avoid copy/paste from Power, noticed a reference to Power in the config file.
- Configuration files are stacked, only enable/disable the needed parts in the specific s390 file
- Meson must be added.
- No need to add dead code, remove the commented code like:
//#define dsb(opt) asm volatile("" : : : "memory")
- Comments using // are banned.
- No need to introduce a RTE_ACL_CLASSIFY_S390X to map to the scalar code. Just avoid the SSE code to be selected in the build framework (iiuc).
- Avoid introducing empty lines

Run check scripts from devtools before submitting:

[dmarchan@dmarchan dpdk]$ ./devtools/checkpatches.sh

### mk: introduce s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 61 lines checked

### eal: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 601 lines checked

### acl: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 208 lines checked

### lpm: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 203 lines checked

### examples/l3fwd: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 410 lines checked

### net/i40e: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 647 lines checked

### test: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 192 lines checked

### hash: add support for s390x architecture

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 16 lines checked

### doc: introduce s390x architecture

WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 2 warnings, 24 lines checked

### ethdev: add cast for bus_device

WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 2 warnings, 8 lines checked

### mbuf: trivial fix

WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 2 warnings, 8 lines checked

Quoted 9 lines

### test: miscellaneous test fixes

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Vivian Kong <[email protected]>'

total: 0 errors, 1 warnings, 32 lines checked

0/12 valid patch

We are now post 19.05.
This is the right time to propose new features/architectures. If you want to post a new series, please take into account the previous comments.

Thanks.

Signature · 1 line
David Marchand

A message that is not in the archive (sent off-list or not yet received): OFB9049735.7E51096E-ON882583D9.00574783-882583D9.00579FE2@LocalDomain

#37 lore raw

Pradeep Satyanarayana/Beaverton/IBM wrote on 04/11/2019 08:57:05 AM:

Quoted 10 lines

From: Pradeep Satyanarayana/Beaverton/IBM
To: Thomas Monjalon <[email protected]>
Cc: [email protected], David Christensen <[email protected]>, Vivian Kong <[email protected]>, David Wilder <[email protected]>
Date: 04/11/2019 08:57 AM
Subject: Re: [dpdk-dev] [RFC 00/12] introduce s390x architecture

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

We are still seeing some compilation issues regularly on Power. Before going to DTS, I think you should extend your compilation

testing,

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

and basic feature testing with builtin unit tests.

We have not observed any compilation issues since we started the CI.

The

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

last issue reported
was during 18.11-rc1 that Mellanox fixed. Hopefully, we should catch

any

Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

such regressions
quickly in the future, since we now have a CI that runs periodically.

There are some failure when compiling with big endian toolchain. It seems you are not testing big endian.

Quoted 7 lines

Correct, we have been doing all our work on little endian only.

Quoted 1 line

If you don't support big endian, please mention it in the doc.

Thank you for alerting us about this. Good point that you bring up. I will need some time to consult and figure out how we approach this. Let me get back to you on this.

On the Linux on Power front going forward, there are currently no plans to support BE,
just LE.

The doc you mention above, is that this one?

https://doc.dpdk.org/guides/platform/index.html

Thanks
Pradeep
[email protected]

#38 lore raw

18/04/2019 23:06, Pradeep Satyanarayana:

Quoted 35 lines

Pradeep Satyanarayana/Beaverton/IBM wrote on 04/11/2019 08:57:05 AM:

Quoted 10 lines

From: Pradeep Satyanarayana/Beaverton/IBM
To: Thomas Monjalon <[email protected]>
Cc: [email protected], David Christensen <[email protected]>, Vivian Kong <[email protected]>, David Wilder <[email protected]>
Date: 04/11/2019 08:57 AM
Subject: Re: [dpdk-dev] [RFC 00/12] introduce s390x architecture

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

We are still seeing some compilation issues regularly on Power. Before going to DTS, I think you should extend your compilation

testing,

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

and basic feature testing with builtin unit tests.

We have not observed any compilation issues since we started the CI.

The

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

last issue reported
was during 18.11-rc1 that Mellanox fixed. Hopefully, we should catch

any

Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

such regressions
quickly in the future, since we now have a CI that runs periodically.

There are some failure when compiling with big endian toolchain. It seems you are not testing big endian.

Quoted 7 lines

Correct, we have been doing all our work on little endian only.

Quoted 1 line

If you don't support big endian, please mention it in the doc.

Thank you for alerting us about this. Good point that you bring up. I will need some time to consult and figure out how we approach this. Let me get back to you on this.

Quoted 7 lines

On the Linux on Power front going forward, there are currently no plans to support BE,
just LE.

The doc you mention above, is that this one?

https://doc.dpdk.org/guides/platform/index.html

Yes, thank you.

#39 lore raw
In reply to Vivian Kong

Hi,

09/04/2019 21:06, Vivian Kong:

Quoted 3 lines

To build and run DPDK on Linux on IBM Z (s390x), big endian support is added and s390x vector intrinics are used in the implementation of DPDK libraries.

What is the status of this work?
Is it abandoned?

#40 lore raw

Thomas Monjalon <[email protected]> wrote on 02/18/2020 01:03:27 PM:

Quoted 6 lines

From: Thomas Monjalon <[email protected]>
To: Vivian Kong <[email protected]>
Cc: [email protected], Pradeep Satyanarayana <[email protected]>, David Christensen <[email protected]>, David Wilder <[email protected]>
Date: 02/18/2020 01:03 PM
Subject: [EXTERNAL] Re: [dpdk-dev] [RFC 00/12] introduce s390x

architecture

Quoted 10 lines

Hi,

09/04/2019 21:06, Vivian Kong:

Quoted 3 lines

To build and run DPDK on Linux on IBM Z (s390x), big endian support is added and s390x vector intrinics are used in the implementation of DPDK libraries.

What is the status of this work?
Is it abandoned?

Thomas, Our team is not associated with this effort. Let me reach out to Vivian and
request her to respond.

Thanks
Pradeep
[email protected]

#41 lore raw
In reply to Thomas Monjalon

Sorry for the delayed reply.

We are working on updating the port to a newer version. We'd like to ask for feedback when it's ready.

Regards,

Vivian Kong
Linux on IBM Z Open Source Ecosystem
IBM Canada Toronto Lab

Thomas Monjalon <[email protected]> wrote on 2020/02/18 04:03:27 PM:

Quoted 6 lines

From: Thomas Monjalon <[email protected]>
To: Vivian Kong <[email protected]>
Cc: [email protected], Pradeep Satyanarayana <[email protected]>, David Christensen <[email protected]>, David Wilder <[email protected]>
Date: 2020/02/18 04:03 PM
Subject: [EXTERNAL] Re: [dpdk-dev] [RFC 00/12] introduce s390x

architecture

Quoted 12 lines

Hi,

09/04/2019 21:06, Vivian Kong:

Quoted 3 lines

To build and run DPDK on Linux on IBM Z (s390x), big endian support is added and s390x vector intrinics are used in the implementation of DPDK libraries.

What is the status of this work?
Is it abandoned?

#42 lore raw

Hi,

Same question as last year.
I guess we can consider this work abandoned?

21/02/2020 14:33, Vivian Kong:

Quoted 30 lines

Sorry for the delayed reply.

We are working on updating the port to a newer version. We'd like to ask for feedback when it's ready.

Regards,

Vivian Kong
Linux on IBM Z Open Source Ecosystem
IBM Canada Toronto Lab

Thomas Monjalon <[email protected]> wrote on 2020/02/18 04:03:27 PM:

Quoted 6 lines

From: Thomas Monjalon <[email protected]>
To: Vivian Kong <[email protected]>
Cc: [email protected], Pradeep Satyanarayana <[email protected]>, David Christensen <[email protected]>, David Wilder <[email protected]>
Date: 2020/02/18 04:03 PM
Subject: [EXTERNAL] Re: [dpdk-dev] [RFC 00/12] introduce s390x

architecture

Quoted 10 lines

Hi,

09/04/2019 21:06, Vivian Kong:

Quoted 3 lines

To build and run DPDK on Linux on IBM Z (s390x), big endian support is added and s390x vector intrinics are used in the implementation of DPDK libraries.

What is the status of this work?
Is it abandoned?