1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2016-2018 Intel Corporation.
3 * Copyright(c) 2017-2018 Linaro Limited.
6 #ifndef __L3FWD_EM_HLM_NEON_H__
7 #define __L3FWD_EM_HLM_NEON_H__
12 get_ipv4_5tuple(struct rte_mbuf *m0, int32x4_t mask0,
13 union ipv4_5tuple_host *key)
15 int32x4_t tmpdata0 = vld1q_s32(rte_pktmbuf_mtod_offset(m0, int32_t *,
16 sizeof(struct ether_hdr) +
17 offsetof(struct ipv4_hdr, time_to_live)));
19 key->xmm = vandq_s32(tmpdata0, mask0);
23 get_ipv6_5tuple(struct rte_mbuf *m0, int32x4_t mask0,
24 int32x4_t mask1, union ipv6_5tuple_host *key)
26 int32x4_t tmpdata0 = vld1q_s32(
27 rte_pktmbuf_mtod_offset(m0, int *,
28 sizeof(struct ether_hdr) +
29 offsetof(struct ipv6_hdr, payload_len)));
31 int32x4_t tmpdata1 = vld1q_s32(
32 rte_pktmbuf_mtod_offset(m0, int *,
33 sizeof(struct ether_hdr) +
34 offsetof(struct ipv6_hdr, payload_len) + 8));
36 int32x4_t tmpdata2 = vld1q_s32(
37 rte_pktmbuf_mtod_offset(m0, int *,
38 sizeof(struct ether_hdr) +
39 offsetof(struct ipv6_hdr, payload_len) + 16));
41 key->xmm[0] = vandq_s32(tmpdata0, mask0);
42 key->xmm[1] = tmpdata1;
43 key->xmm[2] = vandq_s32(tmpdata2, mask1);
45 #endif /* __L3FWD_EM_HLM_NEON_H__ */