summaryrefslogtreecommitdiffstats
path: root/src/vnet/dpo/dpo.c
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2020-11-26 09:41:01 +0000
committerBeno�t Ganne <bganne@cisco.com>2020-11-26 13:12:27 +0000
commitab4fbedf27ece4ea623d7c3b54cc54f0133ba1f7 (patch)
treeeb7db2763ca43d9fb87671e4e6d23637be57a9b1 /src/vnet/dpo/dpo.c
parente1ab06c14deaff5cc0870f7ec76f36613ffcc2d3 (diff)
fib: DPO layout add u64 parameter.
Type: improvement Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: Iee04af801814b6360b045cf7dc8bcad6f517229e
Diffstat (limited to 'src/vnet/dpo/dpo.c')
-rw-r--r--src/vnet/dpo/dpo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vnet/dpo/dpo.c b/src/vnet/dpo/dpo.c
index d5865d13a1d..1331b5501bc 100644
--- a/src/vnet/dpo/dpo.c
+++ b/src/vnet/dpo/dpo.c
@@ -262,13 +262,15 @@ void
dpo_copy (dpo_id_t *dst,
const dpo_id_t *src)
{
- dpo_id_t tmp = *dst;
+ dpo_id_t tmp = {
+ .as_u64 = dst->as_u64
+ };
/*
* the destination is written in a single u64 write - hence atomically w.r.t
* any packets inflight.
*/
- *((u64*)dst) = *(u64*)src;
+ dst->as_u64 = src->as_u64;
dpo_lock(dst);
dpo_unlock(&tmp);
@@ -279,6 +281,9 @@ dpo_is_adj (const dpo_id_t *dpo)
{
return ((dpo->dpoi_type == DPO_ADJACENCY) ||
(dpo->dpoi_type == DPO_ADJACENCY_INCOMPLETE) ||
+ (dpo->dpoi_type == DPO_ADJACENCY_GLEAN) ||
+ (dpo->dpoi_type == DPO_ADJACENCY_MCAST) ||
+ (dpo->dpoi_type == DPO_ADJACENCY_MCAST_MIDCHAIN) ||
(dpo->dpoi_type == DPO_ADJACENCY_MIDCHAIN) ||
(dpo->dpoi_type == DPO_ADJACENCY_GLEAN));
}