[dpdk-dev,1/5] ethdev: check for rxq interrupt support
Commit Message
Not all devices support rxq interrupt yet.
It is better to check for interrupt support in driver at configuration
time than waiting for later failures.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_ether/rte_ethdev.c | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -1183,6 +1183,14 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
}
/*
+ * If Receive Queue interrupt is enabled, check that
+ * the device supports interrupt control.
+ */
+ if (dev_conf->intr_conf.rxq == 1)
+ FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_enable,
+ -EINVAL);
+
+ /*
* If jumbo frames are enabled, check that the maximum RX packet
* length is supported by the configured device.
*/