search for: virtnet_rq_lock_napi_refil

Displaying 13 results from an estimated 13 matches for "virtnet_rq_lock_napi_refil".

2014 Jul 20
1
[PATCH net-next V2 3/3] virtio-net: rx busy polling support
..._rq_init_lock(struct receive_queue *rq) > +{ > + > + spin_lock_init(&rq->lock); > + rq->state = VIRTNET_RQ_STATE_IDLE; > +} > + > +/* called from the device poll routine or refill routine to get ownership of a > + * receive queue. > + */ > +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue *rq) > +{ > + int rc = true; > + > + spin_lock(&rq->lock); > + if (rq->state & VIRTNET_RQ_LOCKED) { > + WARN_ON(rq->state & VIRTNET_RQ_STATE_NAPI); > + rq->state |= VIRTNET_RQ_STATE_NAPI_YIELD; > + rc = false; > + } else &g...
2014 Jul 20
1
[PATCH net-next V2 3/3] virtio-net: rx busy polling support
..._rq_init_lock(struct receive_queue *rq) > +{ > + > + spin_lock_init(&rq->lock); > + rq->state = VIRTNET_RQ_STATE_IDLE; > +} > + > +/* called from the device poll routine or refill routine to get ownership of a > + * receive queue. > + */ > +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue *rq) > +{ > + int rc = true; > + > + spin_lock(&rq->lock); > + if (rq->state & VIRTNET_RQ_LOCKED) { > + WARN_ON(rq->state & VIRTNET_RQ_STATE_NAPI); > + rq->state |= VIRTNET_RQ_STATE_NAPI_YIELD; > + rc = false; > + } else &g...
2014 Jul 15
3
[PATCH net-next] virtio-net: rx busy polling support
...ONFIG_NET_RX_BUSY_POLL +static inline void virtnet_rq_init_lock(struct receive_queue *rq) +{ + + spin_lock_init(&rq->lock); + rq->state = VIRTNET_RQ_STATE_IDLE; +} + +/* called from the device poll routine or refill routine to get ownership of a + * receive queue. + */ +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue *rq) +{ + int rc = true; + + spin_lock(&rq->lock); + if (rq->state & VIRTNET_RQ_LOCKED) { + WARN_ON(rq->state & VIRTNET_RQ_STATE_NAPI); + rq->state |= VIRTNET_RQ_STATE_NAPI_YIELD; + rc = false; + } else + /* we don't care if someone yielded */ +...
2014 Jul 15
3
[PATCH net-next] virtio-net: rx busy polling support
...ONFIG_NET_RX_BUSY_POLL +static inline void virtnet_rq_init_lock(struct receive_queue *rq) +{ + + spin_lock_init(&rq->lock); + rq->state = VIRTNET_RQ_STATE_IDLE; +} + +/* called from the device poll routine or refill routine to get ownership of a + * receive queue. + */ +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue *rq) +{ + int rc = true; + + spin_lock(&rq->lock); + if (rq->state & VIRTNET_RQ_LOCKED) { + WARN_ON(rq->state & VIRTNET_RQ_STATE_NAPI); + rq->state |= VIRTNET_RQ_STATE_NAPI_YIELD; + rc = false; + } else + /* we don't care if someone yielded */ +...
2014 Jul 16
9
[PATCH net-next V2 0/3] rx busy polling support for virtio-net
Hi all: This series introduces the support for rx busy polling support. This was useful for reduing the latency for a kvm guest. Patch 1-2 introduces helpers which is used for rx busy polling. Patch 3 implement the main function. Test was done between a kvm guest and an external host. Two hosts were connected through 40gb mlx4 cards. With both busy_poll and busy_read are set to 50 in guest, 1
2014 Jul 16
9
[PATCH net-next V2 0/3] rx busy polling support for virtio-net
Hi all: This series introduces the support for rx busy polling support. This was useful for reduing the latency for a kvm guest. Patch 1-2 introduces helpers which is used for rx busy polling. Patch 3 implement the main function. Test was done between a kvm guest and an external host. Two hosts were connected through 40gb mlx4 cards. With both busy_poll and busy_read are set to 50 in guest, 1
2014 Jul 16
2
[PATCH net-next V2 3/3] virtio-net: rx busy polling support
..._rq_init_lock(struct receive_queue *rq) > +{ > + > + spin_lock_init(&rq->lock); > + rq->state = VIRTNET_RQ_STATE_IDLE; > +} > + > +/* called from the device poll routine or refill routine to get ownership of a > + * receive queue. > + */ > +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue *rq) > +{ > + int rc = true; > + bool instead of int...? > + spin_lock(&rq->lock); > + if (rq->state & VIRTNET_RQ_LOCKED) { > + WARN_ON(rq->state & VIRTNET_RQ_STATE_NAPI); > + rq->state |= VIRTNET_RQ_STATE_NAPI_YIELD; > + rc...
2014 Jul 16
2
[PATCH net-next V2 3/3] virtio-net: rx busy polling support
..._rq_init_lock(struct receive_queue *rq) > +{ > + > + spin_lock_init(&rq->lock); > + rq->state = VIRTNET_RQ_STATE_IDLE; > +} > + > +/* called from the device poll routine or refill routine to get ownership of a > + * receive queue. > + */ > +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue *rq) > +{ > + int rc = true; > + bool instead of int...? > + spin_lock(&rq->lock); > + if (rq->state & VIRTNET_RQ_LOCKED) { > + WARN_ON(rq->state & VIRTNET_RQ_STATE_NAPI); > + rq->state |= VIRTNET_RQ_STATE_NAPI_YIELD; > + rc...
2014 Jul 16
0
[PATCH net-next V2 3/3] virtio-net: rx busy polling support
...ONFIG_NET_RX_BUSY_POLL +static inline void virtnet_rq_init_lock(struct receive_queue *rq) +{ + + spin_lock_init(&rq->lock); + rq->state = VIRTNET_RQ_STATE_IDLE; +} + +/* called from the device poll routine or refill routine to get ownership of a + * receive queue. + */ +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue *rq) +{ + int rc = true; + + spin_lock(&rq->lock); + if (rq->state & VIRTNET_RQ_LOCKED) { + WARN_ON(rq->state & VIRTNET_RQ_STATE_NAPI); + rq->state |= VIRTNET_RQ_STATE_NAPI_YIELD; + rc = false; + } else + /* we don't care if someone yielded */ +...
2014 Jul 17
2
[PATCH net-next V2 3/3] virtio-net: rx busy polling support
...init(&rq->lock); >>> + rq->state = VIRTNET_RQ_STATE_IDLE; >>> +} >>> + >>> +/* called from the device poll routine or refill routine to get >>> ownership of a >>> + * receive queue. >>> + */ >>> +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue >>> *rq) >>> +{ >>> + int rc = true; >>> + >> bool instead of int...? > Yes, it was better. >>> + spin_lock(&rq->lock); >>> + if (rq->state & VIRTNET_RQ_LOCKED) { >>> + WARN_O...
2014 Jul 17
2
[PATCH net-next V2 3/3] virtio-net: rx busy polling support
...init(&rq->lock); >>> + rq->state = VIRTNET_RQ_STATE_IDLE; >>> +} >>> + >>> +/* called from the device poll routine or refill routine to get >>> ownership of a >>> + * receive queue. >>> + */ >>> +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue >>> *rq) >>> +{ >>> + int rc = true; >>> + >> bool instead of int...? > Yes, it was better. >>> + spin_lock(&rq->lock); >>> + if (rq->state & VIRTNET_RQ_LOCKED) { >>> + WARN_O...
2014 Jul 17
0
[PATCH net-next V2 3/3] virtio-net: rx busy polling support
...;> + >> + spin_lock_init(&rq->lock); >> + rq->state = VIRTNET_RQ_STATE_IDLE; >> +} >> + >> +/* called from the device poll routine or refill routine to get >> ownership of a >> + * receive queue. >> + */ >> +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue >> *rq) >> +{ >> + int rc = true; >> + > > bool instead of int...? Yes, it was better. > >> + spin_lock(&rq->lock); >> + if (rq->state & VIRTNET_RQ_LOCKED) { >> + WARN_ON(rq->state & VIRTN...
2014 Jul 17
0
[PATCH net-next V2 3/3] virtio-net: rx busy polling support
...>> + rq->state = VIRTNET_RQ_STATE_IDLE; >>>> +} >>>> + >>>> +/* called from the device poll routine or refill routine to get >>>> ownership of a >>>> + * receive queue. >>>> + */ >>>> +static inline bool virtnet_rq_lock_napi_refill(struct receive_queue >>>> *rq) >>>> +{ >>>> + int rc = true; >>>> + >>> bool instead of int...? >> Yes, it was better. >>>> + spin_lock(&rq->lock); >>>> + if (rq->state & VIRTNET_RQ_LOCKED...