DPDK patches and discussions
 help / color / mirror / Atom feed
From: Vivian Kong <vivkong@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [RFC 02/12] eal: add support for s390x architecture
Date: Tue,  9 Apr 2019 15:06:20 -0400	[thread overview]
Message-ID: <20190409190630.31975-3-vivkong@ca.ibm.com> (raw)
In-Reply-To: <20190409190630.31975-1-vivkong@ca.ibm.com>

Implement DPDK EAL for s390x architecture.

Signed-off-by: Vivian Kong <vivkong@ca.ibm.com>
---
 .../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

diff --git a/lib/librte_eal/common/arch/s390x/rte_cpuflags.c b/lib/librte_eal/common/arch/s390x/rte_cpuflags.c
new file mode 100644
index 000000000..1f8c6ef41
--- /dev/null
+++ b/lib/librte_eal/common/arch/s390x/rte_cpuflags.c
@@ -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;
+}
diff --git a/lib/librte_eal/common/arch/s390x/rte_cycles.c b/lib/librte_eal/common/arch/s390x/rte_cycles.c
new file mode 100644
index 000000000..b29c4454a
--- /dev/null
+++ b/lib/librte_eal/common/arch/s390x/rte_cycles.c
@@ -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;
+}
diff --git a/lib/librte_eal/common/arch/s390x/rte_hypervisor.c b/lib/librte_eal/common/arch/s390x/rte_hypervisor.c
new file mode 100644
index 000000000..22b0c5cc4
--- /dev/null
+++ b/lib/librte_eal/common/arch/s390x/rte_hypervisor.c
@@ -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;
+}
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_atomic.h b/lib/librte_eal/common/include/arch/s390x/rte_atomic.h
new file mode 100644
index 000000000..5fce6d5f0
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_atomic.h
@@ -0,0 +1,47 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_ATOMIC_S390X_H_
+#define _RTE_ATOMIC_S390X_H_
+
+#ifndef RTE_FORCE_INTRINSICS
+#  error Platform must be built with CONFIG_RTE_FORCE_INTRINSICS
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "generic/rte_atomic.h"
+
+//#define dsb(opt) asm volatile("" : : : "memory")
+//#define dmb(opt) asm volatile("" : : : "memory")
+
+#define rte_mb() rte_compiler_barrier() //asm volatile("" : : : "memory")
+
+#define rte_wmb() rte_mb()
+
+#define rte_rmb() rte_mb()
+
+#define rte_smp_mb() rte_mb()
+
+#define rte_smp_wmb() rte_wmb()
+
+#define rte_smp_rmb() rte_rmb()
+
+#define rte_io_mb() rte_mb()
+
+#define rte_io_wmb() rte_wmb()
+
+#define rte_io_rmb() rte_rmb()
+
+#define rte_cio_wmb() rte_wmb()
+
+#define rte_cio_rmb() rte_rmb()
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_ATOMIC_S390X_H_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_byteorder.h b/lib/librte_eal/common/include/arch/s390x/rte_byteorder.h
new file mode 100644
index 000000000..de6e410b4
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_byteorder.h
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+/* Inspired from FreeBSD src/sys/powerpc/include/endian.h
+ * Copyright (c) 1987, 1991, 1993
+ * The Regents of the University of California.  All rights reserved.
+ */
+
+#ifndef _RTE_BYTEORDER_S390X_H_
+#define _RTE_BYTEORDER_S390X_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include "generic/rte_byteorder.h"
+
+/* s390x is big endian
+ */
+
+#define rte_cpu_to_le_16(x) rte_bswap16(x)
+#define rte_cpu_to_le_32(x) rte_bswap32(x)
+#define rte_cpu_to_le_64(x) rte_bswap64(x)
+
+#define rte_cpu_to_be_16(x) (x)
+#define rte_cpu_to_be_32(x) (x)
+#define rte_cpu_to_be_64(x) (x)
+
+#define rte_le_to_cpu_16(x) rte_bswap16(x)
+#define rte_le_to_cpu_32(x) rte_bswap32(x)
+#define rte_le_to_cpu_64(x) rte_bswap64(x)
+
+#define rte_be_to_cpu_16(x) (x)
+#define rte_be_to_cpu_32(x) (x)
+#define rte_be_to_cpu_64(x) (x)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_BYTEORDER_S390X_H_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_cpuflags.h b/lib/librte_eal/common/include/arch/s390x/rte_cpuflags.h
new file mode 100644
index 000000000..bfeff3f98
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_cpuflags.h
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_CPUFLAGS_S390X_H_
+#define _RTE_CPUFLAGS_S390X_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Enumeration of all CPU features supported
+ */
+enum rte_cpu_flag_t {
+	RTE_CPUFLAG_ESAN3 = 0,
+	RTE_CPUFLAG_ZARCH,
+	RTE_CPUFLAG_STFLE,
+	RTE_CPUFLAG_MSA,
+	RTE_CPUFLAG_LDISP,
+	RTE_CPUFLAG_EIMM,
+	RTE_CPUFLAG_DFP,
+	RTE_CPUFLAG_HPAGE, //from elf.h
+	//RTE_CPUFLAG_EDAT, //from hwcap.h
+	RTE_CPUFLAG_ETF3EH,
+	RTE_CPUFLAG_HIGH_GPRS,
+	RTE_CPUFLAG_TE,
+	RTE_CPUFLAG_VXRS,
+	RTE_CPUFLAG_VXRS_BCD,
+	RTE_CPUFLAG_VXRS_EXT,
+	RTE_CPUFLAG_GS,
+	/* The last item */
+	RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */
+};
+
+#include "generic/rte_cpuflags.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_CPUFLAGS_S390X_H_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_cycles.h b/lib/librte_eal/common/include/arch/s390x/rte_cycles.h
new file mode 100644
index 000000000..211bbe448
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_cycles.h
@@ -0,0 +1,44 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_CYCLES_S390X_H_
+#define _RTE_CYCLES_S390X_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "generic/rte_cycles.h"
+
+#include <rte_common.h>
+
+/**
+ * Read the time base register.
+ *
+ * @return
+ *   The time base for this lcore.
+ */
+static inline uint64_t
+rte_rdtsc(void)
+{
+	uint64_t tsc;
+	asm volatile("stck %0" : "=Q"(tsc) : : "cc");
+	return tsc;
+}
+
+static inline uint64_t
+rte_rdtsc_precise(void)
+{
+	rte_mb();
+	return rte_rdtsc();
+}
+
+static inline uint64_t
+rte_get_tsc_cycles(void) { return rte_rdtsc(); }
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_CYCLES_S390X_H_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_io.h b/lib/librte_eal/common/include/arch/s390x/rte_io.h
new file mode 100644
index 000000000..e6b718ef3
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_io.h
@@ -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_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_memcpy.h b/lib/librte_eal/common/include/arch/s390x/rte_memcpy.h
new file mode 100644
index 000000000..1135b1af6
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_memcpy.h
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_MEMCPY_S390X_H_
+#define _RTE_MEMCPY_S390X_H_
+
+#include <stdint.h>
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "generic/rte_memcpy.h"
+
+
+static inline void
+rte_mov16(uint8_t *dst, const uint8_t *src)
+{
+	memcpy(dst, src, 16);
+}
+static inline void
+rte_mov32(uint8_t *dst, const uint8_t *src)
+{
+	memcpy(dst, src, 32);
+}
+static inline void
+rte_mov48(uint8_t *dst, const uint8_t *src)
+{
+	memcpy(dst, src, 48);
+}
+static inline void
+rte_mov64(uint8_t *dst, const uint8_t *src)
+{
+	memcpy(dst, src, 64);
+}
+static inline void
+rte_mov128(uint8_t *dst, const uint8_t *src)
+{
+	memcpy(dst, src, 128);
+}
+static inline void
+rte_mov256(uint8_t *dst, const uint8_t *src)
+{
+	memcpy(dst, src, 256);
+}
+#define rte_memcpy(d, s, n)	memcpy((d), (s), (n))
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_MEMCPY_S390X_H_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_pause.h b/lib/librte_eal/common/include/arch/s390x/rte_pause.h
new file mode 100644
index 000000000..be90ce6a1
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_pause.h
@@ -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_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_prefetch.h b/lib/librte_eal/common/include/arch/s390x/rte_prefetch.h
new file mode 100644
index 000000000..c76c6d898
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_prefetch.h
@@ -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_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_rwlock.h b/lib/librte_eal/common/include/arch/s390x/rte_rwlock.h
new file mode 100644
index 000000000..f649484f3
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_rwlock.h
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_RWLOCK_S390X_H_
+#define _RTE_RWLOCK_S390X_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "generic/rte_rwlock.h"
+
+static inline void
+rte_rwlock_read_lock_tm(rte_rwlock_t *rwl)
+{
+	rte_rwlock_read_lock(rwl);
+}
+
+static inline void
+rte_rwlock_read_unlock_tm(rte_rwlock_t *rwl)
+{
+	rte_rwlock_read_unlock(rwl);
+}
+
+static inline void
+rte_rwlock_write_lock_tm(rte_rwlock_t *rwl)
+{
+	rte_rwlock_write_lock(rwl);
+}
+
+static inline void
+rte_rwlock_write_unlock_tm(rte_rwlock_t *rwl)
+{
+	rte_rwlock_write_unlock(rwl);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_RWLOCK_S390X_H_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_spinlock.h b/lib/librte_eal/common/include/arch/s390x/rte_spinlock.h
new file mode 100644
index 000000000..0434864fb
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_spinlock.h
@@ -0,0 +1,85 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * (c) Copyright IBM Corp. 2018, 2019
+ */
+
+#ifndef _RTE_SPINLOCK_S390X_H_
+#define _RTE_SPINLOCK_S390X_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_common.h>
+#include "generic/rte_spinlock.h"
+
+#ifndef RTE_FORCE_INTRINSICS
+
+static inline void
+rte_spinlock_lock(rte_spinlock_t *sl)
+{
+	while (__sync_lock_test_and_set(&sl->locked, 1))
+		while (sl->locked)
+			rte_pause();
+}
+
+static inline void
+rte_spinlock_unlock(rte_spinlock_t *sl)
+{
+	__sync_lock_release(&sl->locked);
+}
+
+static inline int
+rte_spinlock_trylock(rte_spinlock_t *sl)
+{
+	return __sync_lock_test_and_set(&sl->locked, 1) == 0;
+}
+
+#endif
+
+
+static inline int rte_tm_supported(void)
+{
+	return 0;
+}
+
+static inline void
+rte_spinlock_lock_tm(rte_spinlock_t *sl)
+{
+	rte_spinlock_lock(sl); /* fall-back */
+}
+
+static inline int
+rte_spinlock_trylock_tm(rte_spinlock_t *sl)
+{
+	return rte_spinlock_trylock(sl);
+}
+
+static inline void
+rte_spinlock_unlock_tm(rte_spinlock_t *sl)
+{
+	rte_spinlock_unlock(sl);
+}
+
+static inline void
+rte_spinlock_recursive_lock_tm(rte_spinlock_recursive_t *slr)
+{
+	rte_spinlock_recursive_lock(slr); /* fall-back */
+}
+
+static inline void
+rte_spinlock_recursive_unlock_tm(rte_spinlock_recursive_t *slr)
+{
+	rte_spinlock_recursive_unlock(slr);
+}
+
+static inline int
+rte_spinlock_recursive_trylock_tm(rte_spinlock_recursive_t *slr)
+{
+	return rte_spinlock_recursive_trylock(slr);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_SPINLOCK_S390X_H_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_ticketlock.h b/lib/librte_eal/common/include/arch/s390x/rte_ticketlock.h
new file mode 100644
index 000000000..0785363c9
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_ticketlock.h
@@ -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_ */
diff --git a/lib/librte_eal/common/include/arch/s390x/rte_vect.h b/lib/librte_eal/common/include/arch/s390x/rte_vect.h
new file mode 100644
index 000000000..459744aa4
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/s390x/rte_vect.h
@@ -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_ */
-- 
2.17.1

  parent reply	other threads:[~2019-04-09 19:06 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 19:06 [dpdk-dev] [RFC 00/12] introduce " Vivian Kong
2019-04-09 19:06 ` Vivian Kong
2019-04-09 19:06 ` [dpdk-dev] [RFC 01/12] mk: " Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 19:38   ` Luca Boccassi
2019-04-09 19:38     ` Luca Boccassi
2019-04-10 16:50     ` Vivian Kong
2019-04-10 16:50       ` Vivian Kong
2019-04-09 19:06 ` Vivian Kong [this message]
2019-04-09 19:06   ` [dpdk-dev] [RFC 02/12] eal: add support for " Vivian Kong
2019-04-09 19:06 ` [dpdk-dev] [RFC 03/12] acl: " Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 19:06 ` [dpdk-dev] [RFC 04/12] lpm: " Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 19:06 ` [dpdk-dev] [RFC 05/12] examples/l3fwd: " Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 19:06 ` [dpdk-dev] [RFC 06/12] net/i40e: " Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 19:06 ` [dpdk-dev] [RFC 07/12] test: " Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 19:06 ` [dpdk-dev] [RFC 08/12] hash: " Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-15 20:43   ` Dharmik Thakkar
2019-04-15 20:43     ` Dharmik Thakkar
2019-04-09 19:06 ` [dpdk-dev] [RFC 09/12] doc: introduce " Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 20:12   ` Thomas Monjalon
2019-04-09 20:12     ` Thomas Monjalon
2019-04-10 16:52     ` Vivian Kong
2019-04-10 16:52       ` Vivian Kong
2019-04-09 19:06 ` [dpdk-dev] [RFC 10/12] ethdev: add cast for bus_device Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 20:14   ` Thomas Monjalon
2019-04-09 20:14     ` Thomas Monjalon
2019-04-10  2:41     ` Stephen Hemminger
2019-04-10  2:41       ` Stephen Hemminger
2019-04-10 17:10     ` Vivian Kong
2019-04-10 17:10       ` Vivian Kong
2019-04-09 19:06 ` [dpdk-dev] [RFC 11/12] mbuf: trivial fix Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 20:13   ` Thomas Monjalon
2019-04-09 20:13     ` Thomas Monjalon
2019-04-09 19:06 ` [dpdk-dev] [RFC 12/12] test: miscellaneous test fixes Vivian Kong
2019-04-09 19:06   ` Vivian Kong
2019-04-09 20:25 ` [dpdk-dev] [RFC 00/12] introduce s390x architecture Thomas Monjalon
2019-04-09 20:25   ` Thomas Monjalon
2019-04-10 17:09   ` Vivian Kong
2019-04-10 17:09     ` Vivian Kong
2019-04-10 17:43     ` Thomas Monjalon
2019-04-10 17:43       ` Thomas Monjalon
2019-04-10 19:15       ` Vivian Kong
2019-04-10 19:15         ` Vivian Kong
2019-04-10 19:46         ` Thomas Monjalon
2019-04-10 19:46           ` Thomas Monjalon
2019-04-10 20:45           ` Vivian Kong
2019-04-10 20:45             ` Vivian Kong
2019-04-10 20:31       ` David Christensen
2019-04-10 20:31         ` David Christensen
2019-04-10 20:46         ` Thomas Monjalon
2019-04-10 20:46           ` Thomas Monjalon
2019-04-10 21:03           ` David Christensen
2019-04-10 21:03             ` David Christensen
2019-04-10 21:45           ` Pradeep Satyanarayana
2019-04-10 21:45             ` Pradeep Satyanarayana
2019-04-11  6:59             ` Thomas Monjalon
2019-04-11  6:59               ` Thomas Monjalon
2019-04-11 15:57               ` Pradeep Satyanarayana
2019-04-11 15:57                 ` Pradeep Satyanarayana
     [not found]               ` <OFB9049735.7E51096E-ON882583D9.00574783-882583D9.00579FE2@LocalDomain>
2019-04-18 21:06                 ` Pradeep Satyanarayana
2019-04-18 21:06                   ` Pradeep Satyanarayana
2019-04-18 21:18                   ` Thomas Monjalon
2019-04-18 21:18                     ` Thomas Monjalon
2019-04-11  7:45 ` David Marchand
2019-04-11  7:45   ` David Marchand
2019-05-15 12:45   ` David Marchand
2019-05-15 12:45     ` David Marchand
2020-02-18 21:03 ` Thomas Monjalon
2020-02-20  0:20   ` Pradeep Satyanarayana
2020-02-21 13:33   ` Vivian Kong
2021-03-24 21:40     ` Thomas Monjalon

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=20190409190630.31975-3-vivkong@ca.ibm.com \
    --to=vivkong@gmail.com \
    --cc=dev@dpdk.org \
    --cc=vivkong@ca.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).