* ``RTE_EVENT_QUEUE_ATTR_WEIGHT``
* ``RTE_EVENT_QUEUE_ATTR_AFFINITY``
+* **Added scalar version of the LPM library.**
+
+ Added scalar implementation of ``rte_lpm_lookupx4``.
+ This is a fall-back implementation for platforms that
+ don't support vector operations.
+
Removed Items
-------------
#endif
#elif defined(RTE_ARCH_PPC_64)
#include "rte_lpm_altivec.h"
-#else
+#elif defined(RTE_ARCH_X86)
#include "rte_lpm_sse.h"
+#else
+#include "rte_lpm_scalar.h"
#endif
#ifdef __cplusplus
--- /dev/null
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 StarFive
+ * Copyright(c) 2022 SiFive
+ * Copyright(c) 2022 Semihalf
+ */
+
+#ifndef _RTE_LPM_SCALAR_H_
+#define _RTE_LPM_SCALAR_H_
+
+#include <rte_vect.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static inline void
+rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
+ uint32_t defv)
+{
+ uint32_t nh;
+ int ret;
+
+ ret = rte_lpm_lookup(lpm, ((rte_xmm_t)ip).u32[0], &nh);
+ hop[0] = (ret == 0) ? nh : defv;
+ ret = rte_lpm_lookup(lpm, ((rte_xmm_t)ip).u32[1], &nh);
+ hop[1] = (ret == 0) ? nh : defv;
+ ret = rte_lpm_lookup(lpm, ((rte_xmm_t)ip).u32[2], &nh);
+ hop[2] = (ret == 0) ? nh : defv;
+ ret = rte_lpm_lookup(lpm, ((rte_xmm_t)ip).u32[3], &nh);
+ hop[3] = (ret == 0) ? nh : defv;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_LPM_SCALAR_H_ */