Skip to content
Permalink
Browse files

app/testpmd: rename ambiguous VF config variable

[ upstream commit 5e16d9447a1e3404abd38fe4da6ea4f6c8addd05 ]

Caught while looking at the rx offloads code.

rx_mode is a global variable for the default rx configuration.
Rename the local rx_mode variable in cmd_set_vf_rxmode_parsed.

Fixes: 7741e4c ("app/testpmd: VMDq and DCB updates")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
  • Loading branch information...
david-marchand authored and kevintraynor committed Jul 26, 2019
1 parent 87a3fc7 commit 2b0c72026751c24b726bc7be0fb89ca42b2a858e
Showing with 7 additions and 7 deletions.
  1. +7 −7 app/test-pmd/cmdline.c
@@ -8367,32 +8367,32 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
__attribute__((unused)) void *data)
{
int ret = -ENOTSUP;
uint16_t rx_mode = 0;
uint16_t vf_rxmode = 0;
struct cmd_set_vf_rxmode *res = parsed_result;

int is_on = (strcmp(res->on, "on") == 0) ? 1 : 0;
if (!strcmp(res->what,"rxmode")) {
if (!strcmp(res->mode, "AUPE"))
rx_mode |= ETH_VMDQ_ACCEPT_UNTAG;
vf_rxmode |= ETH_VMDQ_ACCEPT_UNTAG;
else if (!strcmp(res->mode, "ROPE"))
rx_mode |= ETH_VMDQ_ACCEPT_HASH_UC;
vf_rxmode |= ETH_VMDQ_ACCEPT_HASH_UC;
else if (!strcmp(res->mode, "BAM"))
rx_mode |= ETH_VMDQ_ACCEPT_BROADCAST;
vf_rxmode |= ETH_VMDQ_ACCEPT_BROADCAST;
else if (!strncmp(res->mode, "MPE",3))
rx_mode |= ETH_VMDQ_ACCEPT_MULTICAST;
vf_rxmode |= ETH_VMDQ_ACCEPT_MULTICAST;
}

RTE_SET_USED(is_on);

#ifdef RTE_LIBRTE_IXGBE_PMD
if (ret == -ENOTSUP)
ret = rte_pmd_ixgbe_set_vf_rxmode(res->port_id, res->vf_id,
rx_mode, (uint8_t)is_on);
vf_rxmode, (uint8_t)is_on);
#endif
#ifdef RTE_LIBRTE_BNXT_PMD
if (ret == -ENOTSUP)
ret = rte_pmd_bnxt_set_vf_rxmode(res->port_id, res->vf_id,
rx_mode, (uint8_t)is_on);
vf_rxmode, (uint8_t)is_on);
#endif
if (ret < 0)
printf("bad VF receive mode parameter, return code = %d \n",

0 comments on commit 2b0c720

Please sign in to comment.
You can’t perform that action at this time.