VPP-148 added bvi_mac flag to l2fib_add_del api call similarly to cli
Change-Id: I3b65e85d24ed37b6889af7e194fee45ec61b15a8 Signed-off-by: marek zavodsky <mazavods@gmail.com>
This commit is contained in:

committed by
Damjan Marion

parent
0d2a8e7897
commit
689acafcab
@ -3905,6 +3905,7 @@ static int api_l2fib_add_del (vat_main_t * vam)
|
||||
u8 is_add = 1;
|
||||
u8 static_mac = 0;
|
||||
u8 filter_mac = 0;
|
||||
u8 bvi_mac = 0;
|
||||
|
||||
/* Parse args required to build the message */
|
||||
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) {
|
||||
@ -3925,6 +3926,9 @@ static int api_l2fib_add_del (vat_main_t * vam)
|
||||
else if (unformat (i, "filter")) {
|
||||
filter_mac = 1;
|
||||
static_mac = 1;
|
||||
} else if (unformat (i, "bvi")) {
|
||||
bvi_mac = 1;
|
||||
static_mac = 1;
|
||||
} else if (unformat (i, "del"))
|
||||
is_add = 0;
|
||||
else
|
||||
@ -3956,6 +3960,7 @@ static int api_l2fib_add_del (vat_main_t * vam)
|
||||
mp->sw_if_index = ntohl(sw_if_index);
|
||||
mp->static_mac = static_mac;
|
||||
mp->filter_mac = filter_mac;
|
||||
mp->bvi_mac = bvi_mac;
|
||||
}
|
||||
|
||||
S; W;
|
||||
|
@ -1652,6 +1652,7 @@ vl_api_l2fib_add_del_t_handler (
|
||||
u32 bd_index;
|
||||
u32 static_mac;
|
||||
u32 filter_mac;
|
||||
u32 bvi_mac;
|
||||
uword * p;
|
||||
|
||||
mac = mp->mac;
|
||||
@ -1678,8 +1679,9 @@ vl_api_l2fib_add_del_t_handler (
|
||||
}
|
||||
static_mac = mp->static_mac ? 1 : 0;
|
||||
filter_mac = mp->filter_mac ? 1 : 0;
|
||||
bvi_mac = mp->bvi_mac ? 1 : 0;
|
||||
l2fib_add_entry(mac, bd_index, sw_if_index, static_mac, filter_mac,
|
||||
0 /* bvi_mac */);
|
||||
bvi_mac);
|
||||
} else {
|
||||
l2fib_del_entry(mac, bd_index);
|
||||
}
|
||||
|
@ -240,6 +240,7 @@ static void *vl_api_l2fib_add_del_t_print
|
||||
s = format (s, "sw_if_index %d ", ntohl(mp->sw_if_index));
|
||||
if (mp->static_mac) s = format (s, "%s", "static ");
|
||||
if (mp->filter_mac) s = format (s, "%s", "filter ");
|
||||
if (mp->bvi_mac) s = format (s, "%s", "bvi ");
|
||||
} else {
|
||||
s = format (s, "del ");
|
||||
}
|
||||
|
@ -1392,6 +1392,7 @@ define l2fib_add_del {
|
||||
u8 is_add;
|
||||
u8 static_mac;
|
||||
u8 filter_mac;
|
||||
u8 bvi_mac;
|
||||
};
|
||||
|
||||
/** \brief L2 FIB add entry response
|
||||
|
Reference in New Issue
Block a user