summaryrefslogtreecommitdiffstats
path: root/app/test-pmd/cmdline.c
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo.salveti@linaro.org>2016-07-18 15:30:06 -0300
committerRicardo Salveti <ricardo.salveti@linaro.org>2016-07-18 15:30:30 -0300
commita41e6ff15809d40e0f9bbc9576bf8f7f80fbec1d (patch)
treec9e6fc399c2738e84ed2585e6e51e90f9608ca12 /app/test-pmd/cmdline.c
parent8b25d1ad5d2264bdfc2818c7bda74ee2697df6db (diff)
Imported Upstream version 16.07-rc2
Change-Id: Ie9e8ec528a2a0dace085c5e44aa7fa3b489d4ba0 Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Diffstat (limited to 'app/test-pmd/cmdline.c')
-rw-r--r--app/test-pmd/cmdline.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index b6b61ad3..f90befc8 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -94,10 +94,6 @@ static struct cmdline *testpmd_cl;
static void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
-#ifdef RTE_NIC_BYPASS
-uint8_t bypass_is_supported(portid_t port_id);
-#endif
-
/* *** Help command with introduction. *** */
struct cmd_help_brief_result {
cmdline_fixed_string_t help;
@@ -3656,9 +3652,6 @@ cmd_set_bypass_mode_parsed(void *parsed_result,
portid_t port_id = res->port_id;
uint32_t bypass_mode = RTE_BYPASS_MODE_NORMAL;
- if (!bypass_is_supported(port_id))
- return;
-
if (!strcmp(res->value, "bypass"))
bypass_mode = RTE_BYPASS_MODE_BYPASS;
else if (!strcmp(res->value, "isolate"))
@@ -3725,9 +3718,6 @@ cmd_set_bypass_event_parsed(void *parsed_result,
uint32_t bypass_event = RTE_BYPASS_EVENT_NONE;
uint32_t bypass_mode = RTE_BYPASS_MODE_NORMAL;
- if (!bypass_is_supported(port_id))
- return;
-
if (!strcmp(res->event_value, "timeout"))
bypass_event = RTE_BYPASS_EVENT_TIMEOUT;
else if (!strcmp(res->event_value, "os_on"))
@@ -3903,9 +3893,6 @@ cmd_show_bypass_config_parsed(void *parsed_result,
"timeout"};
int num_events = (sizeof events) / (sizeof events[0]);
- if (!bypass_is_supported(port_id))
- return;
-
/* Display the bypass mode.*/
if (0 != rte_eth_dev_bypass_state_show(port_id, &bypass_mode)) {
printf("\tFailed to get bypass mode for port = %d\n", port_id);
@@ -10800,29 +10787,3 @@ cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue)
ports[id].need_reconfig_queues = queue;
}
}
-
-#ifdef RTE_NIC_BYPASS
-#include <rte_pci_dev_ids.h>
-uint8_t
-bypass_is_supported(portid_t port_id)
-{
- struct rte_port *port;
- struct rte_pci_id *pci_id;
-
- if (port_id_is_invalid(port_id, ENABLED_WARN))
- return 0;
-
- /* Get the device id. */
- port = &ports[port_id];
- pci_id = &port->dev_info.pci_dev->id;
-
- /* Check if NIC supports bypass. */
- if (pci_id->device_id == IXGBE_DEV_ID_82599_BYPASS) {
- return 1;
- }
- else {
- printf("\tBypass not supported for port_id = %d.\n", port_id);
- return 0;
- }
-}
-#endif