dev: remove unused code
Change-Id: If380e4ab6ca30243137fd31fbe51845c0414721a Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
@ -391,7 +391,6 @@ vnet_dev_main_init (vlib_main_t *vm)
|
|||||||
.admin_up_down_function = vnet_dev_admin_up_down_fn,
|
.admin_up_down_function = vnet_dev_admin_up_down_fn,
|
||||||
.rx_redirect_to_node = vnet_dev_set_interface_next_node,
|
.rx_redirect_to_node = vnet_dev_set_interface_next_node,
|
||||||
.clear_counters = vnet_dev_clear_hw_interface_counters,
|
.clear_counters = vnet_dev_clear_hw_interface_counters,
|
||||||
.rx_mode_change_function = vnet_dev_rx_mode_change_fn,
|
|
||||||
.mac_addr_change_function = vnet_dev_port_mac_change,
|
.mac_addr_change_function = vnet_dev_port_mac_change,
|
||||||
.mac_addr_add_del_function = vnet_dev_add_del_mac_address,
|
.mac_addr_add_del_function = vnet_dev_add_del_mac_address,
|
||||||
.flow_ops_function = vnet_dev_flow_ops_fn,
|
.flow_ops_function = vnet_dev_flow_ops_fn,
|
||||||
|
@ -503,8 +503,6 @@ clib_error_t *vnet_dev_interface_set_rss_queues (vnet_main_t *,
|
|||||||
vnet_hw_interface_t *,
|
vnet_hw_interface_t *,
|
||||||
clib_bitmap_t *);
|
clib_bitmap_t *);
|
||||||
void vnet_dev_clear_hw_interface_counters (u32);
|
void vnet_dev_clear_hw_interface_counters (u32);
|
||||||
clib_error_t *vnet_dev_rx_mode_change_fn (vnet_main_t *, u32, u32,
|
|
||||||
vnet_hw_if_rx_mode);
|
|
||||||
void vnet_dev_set_interface_next_node (vnet_main_t *, u32, u32);
|
void vnet_dev_set_interface_next_node (vnet_main_t *, u32, u32);
|
||||||
|
|
||||||
/* port.c */
|
/* port.c */
|
||||||
|
@ -169,40 +169,6 @@ vnet_dev_clear_hw_interface_counters (u32 instance)
|
|||||||
vnet_dev_process_call_port_op_no_rv (vm, port, vnet_dev_port_clear_counters);
|
vnet_dev_process_call_port_op_no_rv (vm, port, vnet_dev_port_clear_counters);
|
||||||
}
|
}
|
||||||
|
|
||||||
clib_error_t *
|
|
||||||
vnet_dev_rx_mode_change_fn (vnet_main_t *vnm, u32 hw_if_index, u32 qid,
|
|
||||||
vnet_hw_if_rx_mode mode)
|
|
||||||
{
|
|
||||||
vlib_main_t *vm = vlib_get_main ();
|
|
||||||
vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, hw_if_index);
|
|
||||||
vnet_dev_port_t *port =
|
|
||||||
vnet_dev_get_port_from_dev_instance (hw->dev_instance);
|
|
||||||
vnet_dev_rv_t rv;
|
|
||||||
|
|
||||||
if (!port)
|
|
||||||
return clib_error_return (0, "not for us");
|
|
||||||
|
|
||||||
if (qid >= (vnet_dev_queue_id_t) ~0)
|
|
||||||
return clib_error_return (0, "not supported");
|
|
||||||
|
|
||||||
vnet_dev_port_cfg_change_req_t req = {
|
|
||||||
.type = mode == VNET_HW_IF_RX_MODE_POLLING ?
|
|
||||||
VNET_DEV_PORT_CFG_RXQ_INTR_MODE_DISABLE :
|
|
||||||
VNET_DEV_PORT_CFG_RXQ_INTR_MODE_ENABLE,
|
|
||||||
.queue_id = qid,
|
|
||||||
};
|
|
||||||
|
|
||||||
if ((rv = vnet_dev_port_cfg_change_req_validate (vm, port, &req)))
|
|
||||||
return vnet_dev_port_err (
|
|
||||||
vm, port, rv, "rx queue interupt mode enable/disable not supported");
|
|
||||||
|
|
||||||
if ((rv = vnet_dev_process_port_cfg_change_req (vm, port, &req)))
|
|
||||||
return vnet_dev_port_err (
|
|
||||||
vm, port, rv, "device failed to enable/disable queue interrupt mode");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
vnet_dev_set_interface_next_node (vnet_main_t *vnm, u32 hw_if_index,
|
vnet_dev_set_interface_next_node (vnet_main_t *vnm, u32 hw_if_index,
|
||||||
u32 node_index)
|
u32 node_index)
|
||||||
|
Reference in New Issue
Block a user