Currently, interrupts are enabled in telemetry and empty poll modes, but
they are not used. Switch to disabling interrupts by default, and only
enable interrupts for modes that require them.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
- },
- .intr_conf = {
- .rxq = 1,
- },
};
static struct rte_mempool * pktmbuf_pool[NB_SOCKETS];
};
static struct rte_mempool * pktmbuf_pool[NB_SOCKETS];
/* initialize all ports */
RTE_ETH_FOREACH_DEV(portid) {
struct rte_eth_conf local_port_conf = port_conf;
/* initialize all ports */
RTE_ETH_FOREACH_DEV(portid) {
struct rte_eth_conf local_port_conf = port_conf;
+ /* not all app modes need interrupts */
+ bool need_intr = app_mode == APP_MODE_LEGACY;
/* skip ports that are not enabled */
if ((enabled_port_mask & (1 << portid)) == 0) {
/* skip ports that are not enabled */
if ((enabled_port_mask & (1 << portid)) == 0) {
nb_rx_queue, (unsigned)n_tx_queue );
/* If number of Rx queue is 0, no need to enable Rx interrupt */
if (nb_rx_queue == 0)
nb_rx_queue, (unsigned)n_tx_queue );
/* If number of Rx queue is 0, no need to enable Rx interrupt */
if (nb_rx_queue == 0)
- local_port_conf.intr_conf.rxq = 0;
+ need_intr = false;
+
+ if (need_intr)
+ local_port_conf.intr_conf.rxq = 1;
ret = rte_eth_dev_info_get(portid, &dev_info);
if (ret != 0)
ret = rte_eth_dev_info_get(portid, &dev_info);
if (ret != 0)