1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2022 StarFive
3 * Copyright(c) 2022 SiFive
4 * Copyright(c) 2022 Semihalf
7 #ifndef _RTE_LPM_SCALAR_H_
8 #define _RTE_LPM_SCALAR_H_
17 rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
20 rte_xmm_t xip = { .x = ip };
24 ret = rte_lpm_lookup(lpm, xip.u32[0], &nh);
25 hop[0] = (ret == 0) ? nh : defv;
26 ret = rte_lpm_lookup(lpm, xip.u32[1], &nh);
27 hop[1] = (ret == 0) ? nh : defv;
28 ret = rte_lpm_lookup(lpm, xip.u32[2], &nh);
29 hop[2] = (ret == 0) ? nh : defv;
30 ret = rte_lpm_lookup(lpm, xip.u32[3], &nh);
31 hop[3] = (ret == 0) ? nh : defv;
38 #endif /* _RTE_LPM_SCALAR_H_ */