[dpdk-dev,v13,1/2] ethdev: Add a new event type to notify a queue state changed event

Message ID 1458539108-15686-2-git-send-email-mukawa@igel.co.jp (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Tetsuya Mukawa March 21, 2016, 5:45 a.m. UTC
  This patch adds a below event type.
 - RTE_ETH_EVENT_QUEUE_STATE_CHANGE

This event will be occured 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>
---
 lib/librte_ether/rte_ethdev.h | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Thomas Monjalon March 21, 2016, 8:37 a.m. UTC | #1
2016-03-21 14:45, Tetsuya Mukawa:
> This event will be occured 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.
[...]
> 
> +	RTE_ETH_EVENT_QUEUE_STATE_CHANGE,
> +				/**< queue state changed interrupt */

Is the shorter RTE_ETH_EVENT_QUEUE_STATE descriptive enough?

What about this comment?
/**< queue state event (enabled/disabled) */
  
Tetsuya Mukawa March 21, 2016, 9:24 a.m. UTC | #2
2016-03-21 17:37 GMT+09:00 Thomas Monjalon <thomas.monjalon@6wind.com>:
> 2016-03-21 14:45, Tetsuya Mukawa:
>> This event will be occured 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.
> [...]
>>
>> +     RTE_ETH_EVENT_QUEUE_STATE_CHANGE,
>> +                             /**< queue state changed interrupt */
>
> Is the shorter RTE_ETH_EVENT_QUEUE_STATE descriptive enough?
>
> What about this comment?
> /**< queue state event (enabled/disabled) */

Hi Thomas,

Yes, it's enough, and above comment is nice.
Thanks for suggestion.


Hi Bruce,

If today is the deadline, could you kindly please replace above
changes while merging?
I need half a day to re-submit the patch. Sorry for asking it.
I will ask my company to let me have vpn access. ;)

Regards,
Tetsuya
  
Bruce Richardson March 21, 2016, 11:05 a.m. UTC | #3
On Mon, Mar 21, 2016 at 06:24:36PM +0900, Tetsuya Mukawa wrote:
> 2016-03-21 17:37 GMT+09:00 Thomas Monjalon <thomas.monjalon@6wind.com>:
> > 2016-03-21 14:45, Tetsuya Mukawa:
> >> This event will be occured 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.
> > [...]
> >>
> >> +     RTE_ETH_EVENT_QUEUE_STATE_CHANGE,
> >> +                             /**< queue state changed interrupt */
> >
> > Is the shorter RTE_ETH_EVENT_QUEUE_STATE descriptive enough?
> >
> > What about this comment?
> > /**< queue state event (enabled/disabled) */
> 
> Hi Thomas,
> 
> Yes, it's enough, and above comment is nice.
> Thanks for suggestion.
> 
> 
> Hi Bruce,
> 
> If today is the deadline, could you kindly please replace above
> changes while merging?
> I need half a day to re-submit the patch. Sorry for asking it.
> I will ask my company to let me have vpn access. ;)
> 
> Regards,
> Tetsuya

Yes, I can fix on apply to dpdk-next-net.

/Bruce
  
Tetsuya Mukawa March 21, 2016, 1:51 p.m. UTC | #4
2016-03-21 20:05 GMT+09:00 Bruce Richardson <bruce.richardson@intel.com>:
> On Mon, Mar 21, 2016 at 06:24:36PM +0900, Tetsuya Mukawa wrote:
>> 2016-03-21 17:37 GMT+09:00 Thomas Monjalon <thomas.monjalon@6wind.com>:
>> > 2016-03-21 14:45, Tetsuya Mukawa:
>> >> This event will be occured 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.
>> > [...]
>> >>
>> >> +     RTE_ETH_EVENT_QUEUE_STATE_CHANGE,
>> >> +                             /**< queue state changed interrupt */
>> >
>> > Is the shorter RTE_ETH_EVENT_QUEUE_STATE descriptive enough?
>> >
>> > What about this comment?
>> > /**< queue state event (enabled/disabled) */
>>
>> Hi Thomas,
>>
>> Yes, it's enough, and above comment is nice.
>> Thanks for suggestion.
>>
>>
>> Hi Bruce,
>>
>> If today is the deadline, could you kindly please replace above
>> changes while merging?
>> I need half a day to re-submit the patch. Sorry for asking it.
>> I will ask my company to let me have vpn access. ;)
>>
>> Regards,
>> Tetsuya
>
> Yes, I can fix on apply to dpdk-next-net.
>
> /Bruce

I appreciate your helping.

Regards,
Tetsuya
  

Patch

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index b5704e1..470d7a5 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -2917,6 +2917,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_CHANGE,
+				/**< queue state changed interrupt */
 	RTE_ETH_EVENT_MAX       /**< max value of this enum */
 };