One new cmdline option `--rx-mq-mode` is added in order to have the
possibility to check whether PMD handle the mq mode correctly or not.
The reason is some NICs need to do different settings based on different
RX mq mode, i.e RSS or not.
With this support in testpmd, the above scenario can be tested easily.
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
printf(" --noisy-lkup-num-writes=N: do N random reads and writes per packet\n");
printf(" --no-iova-contig: mempool memory can be IOVA non contiguous. "
"valid only with --mp-alloc=anon\n");
printf(" --noisy-lkup-num-writes=N: do N random reads and writes per packet\n");
printf(" --no-iova-contig: mempool memory can be IOVA non contiguous. "
"valid only with --mp-alloc=anon\n");
+ printf(" --rx-mq-mode=0xX: hexadecimal bitmask of RX mq mode can be "
+ "enabled\n");
}
#ifdef RTE_LIBRTE_CMDLINE
}
#ifdef RTE_LIBRTE_CMDLINE
{ "noisy-lkup-num-reads", 1, 0, 0 },
{ "noisy-lkup-num-reads-writes", 1, 0, 0 },
{ "no-iova-contig", 0, 0, 0 },
{ "noisy-lkup-num-reads", 1, 0, 0 },
{ "noisy-lkup-num-reads-writes", 1, 0, 0 },
{ "no-iova-contig", 0, 0, 0 },
+ { "rx-mq-mode", 1, 0, 0 },
}
if (!strcmp(lgopts[opt_idx].name, "no-iova-contig"))
mempool_flags = MEMPOOL_F_NO_IOVA_CONTIG;
}
if (!strcmp(lgopts[opt_idx].name, "no-iova-contig"))
mempool_flags = MEMPOOL_F_NO_IOVA_CONTIG;
+
+ if (!strcmp(lgopts[opt_idx].name, "rx-mq-mode")) {
+ char *end = NULL;
+ n = strtoul(optarg, &end, 16);
+ if (n >= 0 && n <= ETH_MQ_RX_VMDQ_DCB_RSS)
+ rx_mq_mode = (enum rte_eth_rx_mq_mode)n;
+ else
+ rte_exit(EXIT_FAILURE,
+ "rx-mq-mode must be >= 0 and <= %d\n",
+ ETH_MQ_RX_VMDQ_DCB_RSS);
+ }
break;
case 'h':
usage(argv[0]);
break;
case 'h':
usage(argv[0]);
struct gro_status gro_ports[RTE_MAX_ETHPORTS];
uint8_t gro_flush_cycles = GRO_DEFAULT_FLUSH_CYCLES;
struct gro_status gro_ports[RTE_MAX_ETHPORTS];
uint8_t gro_flush_cycles = GRO_DEFAULT_FLUSH_CYCLES;
+/*
+ * hexadecimal bitmask of RX mq mode can be enabled.
+ */
+enum rte_eth_rx_mq_mode rx_mq_mode = ETH_MQ_RX_VMDQ_DCB_RSS;
+
/* Forward function declarations */
static void setup_attached_port(portid_t pi);
static void map_port_queue_stats_mapping_registers(portid_t pi,
/* Forward function declarations */
static void setup_attached_port(portid_t pi);
static void map_port_queue_stats_mapping_registers(portid_t pi,
if (port->dcb_flag == 0) {
if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0)
if (port->dcb_flag == 0) {
if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0)
- port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_RSS;
+ port->dev_conf.rxmode.mq_mode =
+ (enum rte_eth_rx_mq_mode)
+ (rx_mq_mode & ETH_MQ_RX_RSS);
else
port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
}
else
port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
}
}
/* set DCB mode of RX and TX of multiple queues */
}
/* set DCB mode of RX and TX of multiple queues */
- eth_conf->rxmode.mq_mode = ETH_MQ_RX_VMDQ_DCB;
+ eth_conf->rxmode.mq_mode =
+ (enum rte_eth_rx_mq_mode)
+ (rx_mq_mode & ETH_MQ_RX_VMDQ_DCB);
eth_conf->txmode.mq_mode = ETH_MQ_TX_VMDQ_DCB;
} else {
struct rte_eth_dcb_rx_conf *rx_conf =
eth_conf->txmode.mq_mode = ETH_MQ_TX_VMDQ_DCB;
} else {
struct rte_eth_dcb_rx_conf *rx_conf =
tx_conf->dcb_tc[i] = i % num_tcs;
}
tx_conf->dcb_tc[i] = i % num_tcs;
}
- eth_conf->rxmode.mq_mode = ETH_MQ_RX_DCB_RSS;
+ eth_conf->rxmode.mq_mode =
+ (enum rte_eth_rx_mq_mode)
+ (rx_mq_mode & ETH_MQ_RX_DCB_RSS);
eth_conf->rx_adv_conf.rss_conf = rss_conf;
eth_conf->txmode.mq_mode = ETH_MQ_TX_DCB;
}
eth_conf->rx_adv_conf.rss_conf = rss_conf;
eth_conf->txmode.mq_mode = ETH_MQ_TX_DCB;
}
};
extern struct mplsoudp_decap_conf mplsoudp_decap_conf;
};
extern struct mplsoudp_decap_conf mplsoudp_decap_conf;
+extern enum rte_eth_rx_mq_mode rx_mq_mode;
+
static inline unsigned int
lcore_num(void)
{
static inline unsigned int
lcore_num(void)
{
``l3fwd`` (The static code without any nodes) with the modular ``l3fwd-graph``
approach.
``l3fwd`` (The static code without any nodes) with the modular ``l3fwd-graph``
approach.
+* **Updated testpmd application.**
+
+ * Added a new cmdline option ``--rx-mq-mode`` which can be used to test PMD's
+ behaviour on handling Rx mq mode.
+
Removed Items
-------------
Removed Items
-------------
Enable to create mempool which is not IOVA contiguous. Valid only with --mp-alloc=anon.
The default value is 0.
Enable to create mempool which is not IOVA contiguous. Valid only with --mp-alloc=anon.
The default value is 0.
+
+* ``--rx-mq-mode``
+
+ Set the hexadecimal bitmask of RX multi queue mode which can be enabled.
+ The default value is 0x7::
+
+ ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG | ETH_MQ_RX_VMDQ_FLAG