git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lpm: fix scalar version header for C++
[dpdk.git]
/
lib
/
lpm
/
rte_lpm_scalar.h
diff --git
a/lib/lpm/rte_lpm_scalar.h
b/lib/lpm/rte_lpm_scalar.h
index
f0d9f37
..
df4f83f
100644
(file)
--- a/
lib/lpm/rte_lpm_scalar.h
+++ b/
lib/lpm/rte_lpm_scalar.h
@@
-17,16
+17,17
@@
static inline void
rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
uint32_t defv)
{
rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
uint32_t defv)
{
+ rte_xmm_t xip = { .x = ip };
uint32_t nh;
int ret;
uint32_t nh;
int ret;
- ret = rte_lpm_lookup(lpm,
((rte_xmm_t)ip)
.u32[0], &nh);
+ ret = rte_lpm_lookup(lpm,
xip
.u32[0], &nh);
hop[0] = (ret == 0) ? nh : defv;
hop[0] = (ret == 0) ? nh : defv;
- ret = rte_lpm_lookup(lpm,
((rte_xmm_t)ip)
.u32[1], &nh);
+ ret = rte_lpm_lookup(lpm,
xip
.u32[1], &nh);
hop[1] = (ret == 0) ? nh : defv;
hop[1] = (ret == 0) ? nh : defv;
- ret = rte_lpm_lookup(lpm,
((rte_xmm_t)ip)
.u32[2], &nh);
+ ret = rte_lpm_lookup(lpm,
xip
.u32[2], &nh);
hop[2] = (ret == 0) ? nh : defv;
hop[2] = (ret == 0) ? nh : defv;
- ret = rte_lpm_lookup(lpm,
((rte_xmm_t)ip)
.u32[3], &nh);
+ ret = rte_lpm_lookup(lpm,
xip
.u32[3], &nh);
hop[3] = (ret == 0) ? nh : defv;
}
hop[3] = (ret == 0) ? nh : defv;
}