Jason Wang
2017-Mar-29 09:58 UTC
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
On 2017?03?23? 13:34, Jason Wang wrote:> > >> >>> +{ >>> + if (rvq->rh != rvq->rt) >>> + goto out; >>> + >>> + rvq->rh = rvq->rt = 0; >>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, >>> + VHOST_RX_BATCH); >> A comment explaining why is is -bh would be helpful. > > Ok. > > ThanksRethink about this. It looks like -bh is not needed in this case since no consumer run in bh. Thanks
Pankaj Gupta
2017-Mar-29 10:46 UTC
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
Hi Jason,> > On 2017?03?23? 13:34, Jason Wang wrote: > > > > > >> > >>> +{ > >>> + if (rvq->rh != rvq->rt) > >>> + goto out; > >>> + > >>> + rvq->rh = rvq->rt = 0; > >>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, > >>> + VHOST_RX_BATCH); > >> A comment explaining why is is -bh would be helpful. > > > > Ok. > > > > Thanks > > Rethink about this. It looks like -bh is not needed in this case since > no consumer run in bh.In that case do we need other variants of "ptr_ring_consume_batched_*()" functions. Are we planning to use them in future?> > Thanks >
Jason Wang
2017-Mar-29 10:53 UTC
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
On 2017?03?29? 18:46, Pankaj Gupta wrote:> Hi Jason, > >> On 2017?03?23? 13:34, Jason Wang wrote: >>> >>>>> +{ >>>>> + if (rvq->rh != rvq->rt) >>>>> + goto out; >>>>> + >>>>> + rvq->rh = rvq->rt = 0; >>>>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, >>>>> + VHOST_RX_BATCH); >>>> A comment explaining why is is -bh would be helpful. >>> Ok. >>> >>> Thanks >> Rethink about this. It looks like -bh is not needed in this case since >> no consumer run in bh. > In that case do we need other variants of "ptr_ring_consume_batched_*()" functions. > Are we planning to use them in future?I think we'd better keep them, since it serves as helpers. You can see that not all the helpers in ptr_ring has real users, but they were prepared for the future use. Thanks> >> Thanks >>
Seemingly Similar Threads
- [PATCH net-next 7/8] vhost_net: try batch dequing from skb array
- [PATCH net-next 7/8] vhost_net: try batch dequing from skb array
- [PATCH net-next 7/8] vhost_net: try batch dequing from skb array
- [PATCH net-next 7/8] vhost_net: try batch dequing from skb array
- [PATCH net-next 7/8] vhost_net: try batch dequing from skb array