diff options
author | Damjan Marion <damarion@cisco.com> | 2022-01-06 20:36:14 +0100 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2022-01-07 12:49:47 +0000 |
commit | 5c954c4641c7894636aa0533634ef4f5a6bed615 (patch) | |
tree | ee3cbeb1e94fadda57aa8620eacfc30d16b7b1df /src/vnet/unix/tuntap.c | |
parent | c58b1747b34fe1987835f68268218779a81ae3db (diff) |
ethernet: new interface registration function
Prep for supporting multiple callbacks, optional args, etc.
Type: improvement
Change-Id: I96244c098712e8213374678623f12527b0e7f387
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/unix/tuntap.c')
-rw-r--r-- | src/vnet/unix/tuntap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/unix/tuntap.c b/src/vnet/unix/tuntap.c index 4a848349ae1..c588cfd208c 100644 --- a/src/vnet/unix/tuntap.c +++ b/src/vnet/unix/tuntap.c @@ -624,12 +624,12 @@ tuntap_config (vlib_main_t * vm, unformat_input_t * input) if (have_normal_interface) { vnet_main_t *vnm = vnet_get_main (); - error = ethernet_register_interface - (vnm, tuntap_dev_class.index, 0 /* device instance */ , - tm->ether_dst_mac /* ethernet address */ , - &tm->hw_if_index, 0 /* flag change */ ); - if (error) - clib_error_report (error); + vnet_eth_interface_registration_t eir = {}; + + eir.dev_class_index = tuntap_dev_class.index; + eir.address = tm->ether_dst_mac; + tm->hw_if_index = vnet_eth_register_interface (vnm, &eir); + tm->sw_if_index = tm->hw_if_index; vm->os_punt_frame = tuntap_nopunt_frame; } |