From 5c954c4641c7894636aa0533634ef4f5a6bed615 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 6 Jan 2022 20:36:14 +0100 Subject: ethernet: new interface registration function Prep for supporting multiple callbacks, optional args, etc. Type: improvement Change-Id: I96244c098712e8213374678623f12527b0e7f387 Signed-off-by: Damjan Marion --- src/vnet/unix/tuntap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/vnet/unix/tuntap.c') 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; } -- cgit 1.2.3-korg