aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_cli.c
diff options
context:
space:
mode:
authorMohammed Hawari <mohammed@hawari.fr>2021-01-08 17:19:09 +0100
committerDamjan Marion <dmarion@me.com>2021-01-26 21:45:20 +0000
commitb85b0df2a039b694fb2f3c09a01decfb89d7bce2 (patch)
treed8389bcfbb657fe03d161c0cc9fadee86f497473 /src/vnet/interface_cli.c
parent832a31652607244331f2acafbcda158b7577a919 (diff)
interface: remove vnet_device_input_runtime_t
Change-Id: I85a463b4ca15baf11e3eb70189f5190ba2585170 Type: refactor Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Diffstat (limited to 'src/vnet/interface_cli.c')
-rw-r--r--src/vnet/interface_cli.c98
1 files changed, 0 insertions, 98 deletions
diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c
index c79fddbc0b4..3cb32a225ab 100644
--- a/src/vnet/interface_cli.c
+++ b/src/vnet/interface_cli.c
@@ -1473,61 +1473,6 @@ VLIB_CLI_COMMAND (set_ip_directed_broadcast_command, static) = {
};
/* *INDENT-ON* */
-static clib_error_t *
-set_hw_interface_rx_mode (vnet_main_t * vnm, u32 hw_if_index,
- u32 queue_id, vnet_hw_if_rx_mode mode)
-{
- vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, hw_if_index);
- vnet_device_class_t *dev_class =
- vnet_get_device_class (vnm, hw->dev_class_index);
- clib_error_t *error;
- vnet_hw_if_rx_mode old_mode;
- int rv;
-
- if (mode == VNET_HW_IF_RX_MODE_DEFAULT)
- mode = hw->default_rx_mode;
-
- rv = vnet_hw_interface_get_rx_mode (vnm, hw_if_index, queue_id, &old_mode);
- switch (rv)
- {
- case 0:
- if (old_mode == mode)
- return 0; /* same rx-mode, no change */
- break;
- case VNET_API_ERROR_INVALID_INTERFACE:
- return clib_error_return (0, "invalid interface");
- case VNET_API_ERROR_INVALID_QUEUE:
- return clib_error_return (0, "invalid queue");
- default:
- return clib_error_return (0, "unknown error");
- }
-
- if (dev_class->rx_mode_change_function)
- {
- error = dev_class->rx_mode_change_function (vnm, hw_if_index, queue_id,
- mode);
- if (error)
- return (error);
- }
-
- rv = vnet_hw_interface_set_rx_mode (vnm, hw_if_index, queue_id, mode);
- switch (rv)
- {
- case 0:
- break;
- case VNET_API_ERROR_UNSUPPORTED:
- return clib_error_return (0, "unsupported");
- case VNET_API_ERROR_INVALID_INTERFACE:
- return clib_error_return (0, "invalid interface");
- case VNET_API_ERROR_INVALID_QUEUE:
- return clib_error_return (0, "invalid queue");
- default:
- return clib_error_return (0, "unknown error");
- }
-
- return 0;
-}
-
clib_error_t *
set_hw_interface_change_rx_mode (vnet_main_t * vnm, u32 hw_if_index,
u8 queue_id_valid, u32 queue_id,
@@ -1536,29 +1481,9 @@ set_hw_interface_change_rx_mode (vnet_main_t * vnm, u32 hw_if_index,
clib_error_t *error = 0;
vnet_hw_interface_t *hw;
u32 *queue_indices = 0;
- int i;
hw = vnet_get_hw_interface (vnm, hw_if_index);
- /* to be deprecated */
- if (vec_len (hw->rx_queue_indices) == 0)
- {
- if (queue_id_valid == 0)
- {
- for (i = 0; i < vec_len (hw->dq_runtime_index_by_queue); i++)
- {
- error = set_hw_interface_rx_mode (vnm, hw_if_index, i, mode);
- if (error)
- break;
- }
- hw->default_rx_mode = mode;
- }
- else
- error = set_hw_interface_rx_mode (vnm, hw_if_index, queue_id, mode);
-
- return (error);
- }
-
if (queue_id_valid)
{
u32 queue_index;
@@ -1757,7 +1682,6 @@ set_hw_interface_rx_placement (u32 hw_if_index, u32 queue_id,
vnet_device_main_t *vdm = &vnet_device_main;
vnet_hw_interface_t *hw;
u32 queue_index;
- int rv;
if (is_main)
thread_index = 0;
@@ -1770,28 +1694,6 @@ set_hw_interface_rx_placement (u32 hw_if_index, u32 queue_id,
hw = vnet_get_hw_interface (vnm, hw_if_index);
- /* to be deprecated */
- if (vec_len (hw->rx_queue_indices) == 0)
- {
- clib_error_t *error = 0;
- vnet_hw_if_rx_mode mode = VNET_HW_IF_RX_MODE_UNKNOWN;
- rv = vnet_hw_interface_get_rx_mode (vnm, hw_if_index, queue_id, &mode);
-
- if (rv)
- return clib_error_return (0, "not found");
-
- rv = vnet_hw_interface_unassign_rx_thread (vnm, hw_if_index, queue_id);
-
- if (rv)
- return clib_error_return (0, "not found");
-
- vnet_hw_interface_assign_rx_thread (vnm, hw_if_index, queue_id,
- thread_index);
- vnet_hw_interface_set_rx_mode (vnm, hw_if_index, queue_id, mode);
-
- return (error);
- }
-
queue_index =
vnet_hw_if_get_rx_queue_index_by_id (vnm, hw_if_index, queue_id);
if (queue_index == ~0)