diff options
author | Damjan Marion <damarion@cisco.com> | 2016-12-02 08:09:45 +0100 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2016-12-02 16:02:44 +0000 |
commit | 8b2247d24749a13e1b1e395c64fb358ef5bd0aa8 (patch) | |
tree | d041fdb44684edad8ce2ccb0ccb676395f4aea9d | |
parent | 143faaa3459b1a0c36524c76ce94560032723a86 (diff) |
interfaces: make no_flatten variant of inteface_ouptut fn default
Flatten variant was used only by old native drivers.
Change-Id: If206c6c8b4f10843d60f908c3acb4e8db83ce03d
Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r-- | vnet/vnet/devices/af_packet/device.c | 1 | ||||
-rw-r--r-- | vnet/vnet/devices/dpdk/device.c | 1 | ||||
-rw-r--r-- | vnet/vnet/devices/netmap/device.c | 1 | ||||
-rw-r--r-- | vnet/vnet/devices/nic/ixge.c | 1 | ||||
-rw-r--r-- | vnet/vnet/devices/ssvm/ssvm_eth.c | 1 | ||||
-rw-r--r-- | vnet/vnet/devices/virtio/vhost-user.c | 1 | ||||
-rw-r--r-- | vnet/vnet/ethernet/interface.c | 1 | ||||
-rw-r--r-- | vnet/vnet/interface.c | 8 | ||||
-rw-r--r-- | vnet/vnet/interface.h | 4 | ||||
-rw-r--r-- | vnet/vnet/interface_funcs.h | 2 | ||||
-rw-r--r-- | vnet/vnet/interface_output.c | 18 | ||||
-rw-r--r-- | vnet/vnet/lisp-gpe/interface.c | 2 | ||||
-rw-r--r-- | vnet/vnet/mpls/mpls_tunnel.c | 1 | ||||
-rw-r--r-- | vnet/vnet/unix/tapcli.c | 1 |
14 files changed, 17 insertions, 26 deletions
diff --git a/vnet/vnet/devices/af_packet/device.c b/vnet/vnet/devices/af_packet/device.c index 1a46caa7810..1fb4000f6e6 100644 --- a/vnet/vnet/devices/af_packet/device.c +++ b/vnet/vnet/devices/af_packet/device.c @@ -235,7 +235,6 @@ VNET_DEVICE_CLASS (af_packet_device_class) = { .clear_counters = af_packet_clear_hw_interface_counters, .admin_up_down_function = af_packet_interface_admin_up_down, .subif_add_del_function = af_packet_subif_add_del_function, - .no_flatten_output_chains = 1, }; VLIB_DEVICE_TX_FUNCTION_MULTIARCH (af_packet_device_class, diff --git a/vnet/vnet/devices/dpdk/device.c b/vnet/vnet/devices/dpdk/device.c index 800a06caf13..f6d9621e64c 100644 --- a/vnet/vnet/devices/dpdk/device.c +++ b/vnet/vnet/devices/dpdk/device.c @@ -769,7 +769,6 @@ VNET_DEVICE_CLASS (dpdk_device_class) = { .admin_up_down_function = dpdk_interface_admin_up_down, .subif_add_del_function = dpdk_subif_add_del_function, .rx_redirect_to_node = dpdk_set_interface_next_node, - .no_flatten_output_chains = 1, .mac_addr_change_function = dpdk_set_mac_address, }; diff --git a/vnet/vnet/devices/netmap/device.c b/vnet/vnet/devices/netmap/device.c index 74535208aec..2152824f733 100644 --- a/vnet/vnet/devices/netmap/device.c +++ b/vnet/vnet/devices/netmap/device.c @@ -246,7 +246,6 @@ VNET_DEVICE_CLASS (netmap_device_class) = { .clear_counters = netmap_clear_hw_interface_counters, .admin_up_down_function = netmap_interface_admin_up_down, .subif_add_del_function = netmap_subif_add_del_function, - .no_flatten_output_chains = 1, }; VLIB_DEVICE_TX_FUNCTION_MULTIARCH(netmap_device_class, diff --git a/vnet/vnet/devices/nic/ixge.c b/vnet/vnet/devices/nic/ixge.c index 849dd084f0a..d4c4c6b7414 100644 --- a/vnet/vnet/devices/nic/ixge.c +++ b/vnet/vnet/devices/nic/ixge.c @@ -2452,6 +2452,7 @@ VNET_DEVICE_CLASS (ixge_device_class) = { .clear_counters = ixge_clear_hw_interface_counters, .admin_up_down_function = ixge_interface_admin_up_down, .rx_redirect_to_node = ixge_set_interface_next_node, + .flatten_output_chains = 1, }; /* *INDENT-ON* */ diff --git a/vnet/vnet/devices/ssvm/ssvm_eth.c b/vnet/vnet/devices/ssvm/ssvm_eth.c index f35127bd7ff..db4fafa9a14 100644 --- a/vnet/vnet/devices/ssvm/ssvm_eth.c +++ b/vnet/vnet/devices/ssvm/ssvm_eth.c @@ -476,7 +476,6 @@ VNET_DEVICE_CLASS (ssvm_eth_device_class) = { .admin_up_down_function = ssvm_eth_interface_admin_up_down, .subif_add_del_function = ssvm_eth_subif_add_del_function, .rx_redirect_to_node = ssvm_eth_set_interface_next_node, - .no_flatten_output_chains = 1, }; VLIB_DEVICE_TX_FUNCTION_MULTIARCH (ssvm_eth_device_class, diff --git a/vnet/vnet/devices/virtio/vhost-user.c b/vnet/vnet/devices/virtio/vhost-user.c index d008d387dd0..6a7bbc16f7e 100644 --- a/vnet/vnet/devices/virtio/vhost-user.c +++ b/vnet/vnet/devices/virtio/vhost-user.c @@ -2107,7 +2107,6 @@ VNET_DEVICE_CLASS (vhost_user_dev_class,static) = { .format_device_name = format_vhost_user_interface_name, .name_renumber = vhost_user_name_renumber, .admin_up_down_function = vhost_user_interface_admin_up_down, - .no_flatten_output_chains = 1, .format_tx_trace = format_vhost_trace, }; diff --git a/vnet/vnet/ethernet/interface.c b/vnet/vnet/ethernet/interface.c index a0dea6f52a2..66f788c8e89 100644 --- a/vnet/vnet/ethernet/interface.c +++ b/vnet/vnet/ethernet/interface.c @@ -409,7 +409,6 @@ VNET_DEVICE_CLASS (ethernet_simulated_device_class) = { .format_device_name = format_simulated_ethernet_name, .tx_function = simulated_ethernet_interface_tx, .admin_up_down_function = simulated_ethernet_admin_up_down, - .no_flatten_output_chains = 1, }; /* *INDENT-ON* */ diff --git a/vnet/vnet/interface.c b/vnet/vnet/interface.c index 8c19ca7d9a3..b72dcd41f46 100644 --- a/vnet/vnet/interface.c +++ b/vnet/vnet/interface.c @@ -767,8 +767,8 @@ vnet_register_interface (vnet_main_t * vnm, /* The new class may differ from the old one. * Functions have to be updated. */ node = vlib_get_node (vm, hw->output_node_index); - node->function = dev_class->no_flatten_output_chains ? - vnet_interface_output_node_no_flatten_multiarch_select () : + node->function = dev_class->flatten_output_chains ? + vnet_interface_output_node_flatten_multiarch_select () : vnet_interface_output_node_multiarch_select (); node->format_trace = format_vnet_interface_output_trace; nrt = vlib_node_get_runtime (vm, hw->output_node_index); @@ -812,8 +812,8 @@ vnet_register_interface (vnet_main_t * vnm, r.flags = 0; r.name = output_node_name; - r.function = dev_class->no_flatten_output_chains ? - vnet_interface_output_node_no_flatten_multiarch_select () : + r.function = dev_class->flatten_output_chains ? + vnet_interface_output_node_flatten_multiarch_select () : vnet_interface_output_node_multiarch_select (); r.format_trace = format_vnet_interface_output_trace; diff --git a/vnet/vnet/interface.h b/vnet/vnet/interface.h index d3076a55679..b5245e45a7f 100644 --- a/vnet/vnet/interface.h +++ b/vnet/vnet/interface.h @@ -180,8 +180,8 @@ typedef struct _vnet_device_class /* Link-list of all device classes set up by constructors created below */ struct _vnet_device_class *next_class_registration; - /* Do not splice vnet_interface_output_node into TX path */ - u8 no_flatten_output_chains; + /* Splice vnet_interface_output_node into TX path */ + u8 flatten_output_chains; /* Function to set mac address. */ vnet_interface_set_mac_address_function_t *mac_addr_change_function; diff --git a/vnet/vnet/interface_funcs.h b/vnet/vnet/interface_funcs.h index a488599cff0..b84d151c86d 100644 --- a/vnet/vnet/interface_funcs.h +++ b/vnet/vnet/interface_funcs.h @@ -274,7 +274,7 @@ typedef struct /* Interface output functions. */ void *vnet_interface_output_node_multiarch_select (void); -void *vnet_interface_output_node_no_flatten_multiarch_select (void); +void *vnet_interface_output_node_flatten_multiarch_select (void); word vnet_sw_interface_compare (vnet_main_t * vnm, uword sw_if_index0, uword sw_if_index1); diff --git a/vnet/vnet/interface_output.c b/vnet/vnet/interface_output.c index 502fa7b4dfd..3302e791173 100644 --- a/vnet/vnet/interface_output.c +++ b/vnet/vnet/interface_output.c @@ -229,8 +229,9 @@ incr_output_stats (vnet_main_t * vnm, /* Interface output functions. */ uword -vnet_interface_output_node (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +vnet_interface_output_node_flatten (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { vnet_main_t *vnm = vnet_get_main (); vnet_interface_output_runtime_t *rt = (void *) node->runtime_data; @@ -413,13 +414,12 @@ vnet_interface_output_node (vlib_main_t * vm, return n_buffers; } -VLIB_NODE_FUNCTION_MULTIARCH_CLONE (vnet_interface_output_node); -CLIB_MULTIARCH_SELECT_FN (vnet_interface_output_node); +VLIB_NODE_FUNCTION_MULTIARCH_CLONE (vnet_interface_output_node_flatten); +CLIB_MULTIARCH_SELECT_FN (vnet_interface_output_node_flatten); uword -vnet_interface_output_node_no_flatten (vlib_main_t * vm, - vlib_node_runtime_t * node, - vlib_frame_t * frame) +vnet_interface_output_node (vlib_main_t * vm, + vlib_node_runtime_t * node, vlib_frame_t * frame) { vnet_main_t *vnm = vnet_get_main (); vnet_interface_output_runtime_t *rt = (void *) node->runtime_data; @@ -604,8 +604,8 @@ vnet_interface_output_node_no_flatten (vlib_main_t * vm, return n_buffers; } -VLIB_NODE_FUNCTION_MULTIARCH_CLONE (vnet_interface_output_node_no_flatten); -CLIB_MULTIARCH_SELECT_FN (vnet_interface_output_node_no_flatten); +VLIB_NODE_FUNCTION_MULTIARCH_CLONE (vnet_interface_output_node); +CLIB_MULTIARCH_SELECT_FN (vnet_interface_output_node); /* Use buffer's sw_if_index[VNET_TX] to choose output interface. */ static uword diff --git a/vnet/vnet/lisp-gpe/interface.c b/vnet/vnet/lisp-gpe/interface.c index b293e2db10e..3288b2414b7 100644 --- a/vnet/vnet/lisp-gpe/interface.c +++ b/vnet/vnet/lisp-gpe/interface.c @@ -164,7 +164,6 @@ VNET_DEVICE_CLASS (lisp_gpe_device_class) = { .format_device_name = format_lisp_gpe_name, .format_tx_trace = format_lisp_gpe_tx_trace, .tx_function = lisp_gpe_interface_tx, - .no_flatten_output_chains = 1, }; /* *INDENT-ON* */ @@ -304,7 +303,6 @@ VNET_DEVICE_CLASS (l2_lisp_gpe_device_class,static) = { .format_device_name = format_l2_lisp_gpe_name, .format_tx_trace = format_l2_lisp_gpe_tx_trace, .tx_function = l2_lisp_gpe_interface_tx, - .no_flatten_output_chains = 1, }; /* *INDENT-ON* */ diff --git a/vnet/vnet/mpls/mpls_tunnel.c b/vnet/vnet/mpls/mpls_tunnel.c index 656bf330b1a..6ad11e322b0 100644 --- a/vnet/vnet/mpls/mpls_tunnel.c +++ b/vnet/vnet/mpls/mpls_tunnel.c @@ -385,7 +385,6 @@ VNET_DEVICE_CLASS (mpls_tunnel_class) = { .format_device = format_mpls_tunnel_device, .format_tx_trace = format_mpls_tunnel_tx_trace, .tx_function = mpls_tunnel_tx, - .no_flatten_output_chains = 1, .admin_up_down_function = mpls_tunnel_admin_up_down, }; diff --git a/vnet/vnet/unix/tapcli.c b/vnet/vnet/unix/tapcli.c index db634f710fe..9862a2bda50 100644 --- a/vnet/vnet/unix/tapcli.c +++ b/vnet/vnet/unix/tapcli.c @@ -718,7 +718,6 @@ VNET_DEVICE_CLASS (tapcli_dev_class,static) = { .rx_redirect_to_node = tapcli_set_interface_next_node, .name_renumber = tap_name_renumber, .admin_up_down_function = tapcli_interface_admin_up_down, - .no_flatten_output_chains = 1, }; /** |