aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-05-06 23:38:58 +0200
committerElias Rudberg <elias.rudberg@bahnhof.net>2020-05-07 02:23:23 +0200
commita1e03d4da71a2452c1e5da399d96c51f1b487cad (patch)
tree9fa4b92a2dfbadc7b2fdac503a480243da45de17
parentb5a575b0924036378b6deb50ac8fe7de3380e18d (diff)
rdma: fix alignment issue
Type: fix Change-Id: I0ff7a6f3354066c2252c1ebd0d43ac59db278bf0 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
-rw-r--r--src/plugins/rdma/input.c4
-rw-r--r--src/vppinfra/clib.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/rdma/input.c b/src/plugins/rdma/input.c
index cf0b6bffe7d..80c211bae15 100644
--- a/src/plugins/rdma/input.c
+++ b/src/plugins/rdma/input.c
@@ -103,7 +103,7 @@ rdma_device_input_refill (vlib_main_t * vm, rdma_device_t * rd,
if (is_mlx5dv)
{
- u64 va[8];
+ u64 __clib_aligned (32) va[8];
mlx5dv_rwq_t *wqe = rxq->wqes + slot;
while (n >= 1)
@@ -488,7 +488,7 @@ rdma_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
rdma_rxq_t *rxq = vec_elt_at_index (rd->rxqs, qid);
vlib_buffer_t *bufs[VLIB_FRAME_SIZE], **b = bufs;
struct ibv_wc wc[VLIB_FRAME_SIZE];
- u32 byte_cnts[VLIB_FRAME_SIZE];
+ u32 __clib_aligned (32) byte_cnts[VLIB_FRAME_SIZE];
vlib_buffer_t bt;
u32 next_index, *to_next, n_left_to_next, n_rx_bytes = 0;
int n_rx_packets, skip_ip4_cksum = 0;
diff --git a/src/vppinfra/clib.h b/src/vppinfra/clib.h
index bdea43b3fe0..398f1aebb04 100644
--- a/src/vppinfra/clib.h
+++ b/src/vppinfra/clib.h
@@ -95,6 +95,9 @@
#define __clib_weak __attribute__ ((weak))
#define __clib_packed __attribute__ ((packed))
#define __clib_constructor __attribute__ ((constructor))
+#define __clib_noinline __attribute__ ((noinline))
+#define __clib_aligned(x) __attribute__ ((aligned(x)))
+#define __clib_section(s) __attribute__ ((section(s)))
#define never_inline __attribute__ ((__noinline__))