ethdev: add queue state change event type
authorTetsuya Mukawa <mukawa@igel.co.jp>
Mon, 21 Mar 2016 05:45:07 +0000 (14:45 +0900)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 25 Mar 2016 17:56:43 +0000 (18:56 +0100)
This patch adds a below event type.
 - RTE_ETH_EVENT_QUEUE_STATE

This event will occur when some queues are enabled or disabled.
So far, only vhost PMD supports the event, and it indicates some queues
are enabled or disabled by virtio-net device. Such an event is needed
because virtio-net device may not enable all queues vhost PMD prepare.

Because only vhost PMD uses the event so far, it isn't an actual hardware
interrupt but a simple software event.

Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Rich Lane <rich.lane@bigswitch.com>
Tested-by: Rich Lane <rich.lane@bigswitch.com>
Minor modification to event name and comment:
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_ether/rte_ethdev.h

index ef9d02b..f7448d3 100644 (file)
@@ -2945,6 +2945,8 @@ rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,
 enum rte_eth_event_type {
        RTE_ETH_EVENT_UNKNOWN,  /**< unknown event type */
        RTE_ETH_EVENT_INTR_LSC, /**< lsc interrupt event */
+       RTE_ETH_EVENT_QUEUE_STATE,
+                               /**< queue state event (enabled/disabled) */
        RTE_ETH_EVENT_MAX       /**< max value of this enum */
 };