summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_fib.c
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2019-10-24 13:52:42 +0200
committerOle Trøan <otroan@employees.org>2020-03-09 13:46:29 +0000
commit145e330f019920b5ef77f4e8b3fa70de3228710d (patch)
tree7eede6c2dfa7a3f0568071c9f1bbf6aa8319fb71 /src/vnet/l2/l2_fib.c
parent262971e7830413c58b9b45965f799f540e634437 (diff)
l2: API cleanup
Use consistent API types. Type: fix Change-Id: I7ac7cd00606101864fa3422e7b9ea2f1143665dd Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_fib.c')
-rw-r--r--src/vnet/l2/l2_fib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c
index 57325afa496..160e4e64048 100644
--- a/src/vnet/l2/l2_fib.c
+++ b/src/vnet/l2/l2_fib.c
@@ -1084,7 +1084,10 @@ l2fib_scan (vlib_main_t * vm, f64 start_time, u8 event_only)
key.fields.mac, 6);
mp->mac[evt_idx].action =
l2fib_entry_result_is_set_LRN_MOV (&result) ?
- MAC_EVENT_ACTION_MOVE : MAC_EVENT_ACTION_ADD;
+ (vl_api_mac_event_action_t) MAC_EVENT_ACTION_MOVE
+ : (vl_api_mac_event_action_t) MAC_EVENT_ACTION_ADD;
+ mp->mac[evt_idx].action =
+ htonl (mp->mac[evt_idx].action);
mp->mac[evt_idx].sw_if_index =
htonl (result.fields.sw_if_index);
/* clear event bits and update mac entry */
@@ -1127,7 +1130,9 @@ l2fib_scan (vlib_main_t * vm, f64 start_time, u8 event_only)
/* copy mac entry to event msg */
clib_memcpy_fast (mp->mac[evt_idx].mac_addr, key.fields.mac,
6);
- mp->mac[evt_idx].action = MAC_EVENT_ACTION_DELETE;
+ mp->mac[evt_idx].action =
+ (vl_api_mac_event_action_t) MAC_EVENT_ACTION_DELETE;
+ mp->mac[evt_idx].action = htonl (mp->mac[evt_idx].action);
mp->mac[evt_idx].sw_if_index =
htonl (result.fields.sw_if_index);
evt_idx++;