search for: netdev_queue

Displaying 20 results from an estimated 145 matches for "netdev_queue".

2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...t; +++ b/drivers/net/virtio_net.c > @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, > return stats.packets; > } > > -static void free_old_xmit_skbs(struct send_queue *sq) > +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, > + bool use_napi) > { > struct sk_buff *skb; > unsigned int len; > @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) > if (!packets) > return; > > + if (use_napi) > + netdev_tx_completed_queue(txq, packets, b...
2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...t; +++ b/drivers/net/virtio_net.c > @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, > return stats.packets; > } > > -static void free_old_xmit_skbs(struct send_queue *sq) > +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, > + bool use_napi) > { > struct sk_buff *skb; > unsigned int len; > @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) > if (!packets) > return; > > + if (use_napi) > + netdev_tx_completed_queue(txq, packets, b...
2018 Dec 05
3
[PATCH RFC 0/2] virtio-net: interrupt related improvements
Now that we have brought the virtio overhead way down with a fast packed ring implementation, we seem to be actually observing TCP drops indicative of bufferbloat. So let's try to enable TSQ. Note: it isn't clear that the default pacing is great for the virt usecase. It's worth trying to play with sk_pacing_shift_update to see what happens. For this reason, and for a more important
2014 Oct 20
0
[PATCH RFC v3 2/3] virtio_net: bql
...--- drivers/net/virtio_net.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 14f4cda..b83d39d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -227,6 +227,7 @@ static unsigned int free_old_xmit_skbs(struct netdev_queue *txq, struct virtnet_info *vi = sq->vq->vdev->priv; struct virtnet_stats *stats = this_cpu_ptr(vi->stats); unsigned int packets = 0; + unsigned int bytes = 0; while (packets < budget && (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { @@ -234,6 +23...
2014 Oct 20
0
[PATCH RFC v3 2/3] virtio_net: bql
...--- drivers/net/virtio_net.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 14f4cda..b83d39d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -227,6 +227,7 @@ static unsigned int free_old_xmit_skbs(struct netdev_queue *txq, struct virtnet_info *vi = sq->vq->vdev->priv; struct virtnet_stats *stats = this_cpu_ptr(vi->stats); unsigned int packets = 0; + unsigned int bytes = 0; while (packets < budget && (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { @@ -234,6 +23...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...>>> @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, >>> return stats.packets; >>> } >>> -static void free_old_xmit_skbs(struct send_queue *sq) >>> +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, >>> + bool use_napi) >>> { >>> struct sk_buff *skb; >>> unsigned int len; >>> @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) >>> if (!packets) >>> return; >>> + if...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...>>> @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, >>> return stats.packets; >>> } >>> -static void free_old_xmit_skbs(struct send_queue *sq) >>> +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, >>> + bool use_napi) >>> { >>> struct sk_buff *skb; >>> unsigned int len; >>> @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) >>> if (!packets) >>> return; >>> + if...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...>>> @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, >>> return stats.packets; >>> } >>> -static void free_old_xmit_skbs(struct send_queue *sq) >>> +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, >>> + bool use_napi) >>> { >>> struct sk_buff *skb; >>> unsigned int len; >>> @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) >>> if (!packets) >>> return; >>> + if...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...>>> @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, >>> return stats.packets; >>> } >>> -static void free_old_xmit_skbs(struct send_queue *sq) >>> +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, >>> + bool use_napi) >>> { >>> struct sk_buff *skb; >>> unsigned int len; >>> @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) >>> if (!packets) >>> return; >>> + if...
2018 Dec 05
0
[PATCH RFC 1/2] virtio-net: bql support
...0644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, return stats.packets; } -static void free_old_xmit_skbs(struct send_queue *sq) +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, + bool use_napi) { struct sk_buff *skb; unsigned int len; @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) if (!packets) return; + if (use_napi) + netdev_tx_completed_queue(txq, packets, bytes); + u64_stats_update_begin(&sq->stats.sync...
2014 Oct 15
1
[PATCH RFC v2 2/3] virtio_net: bql
...644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -219,13 +219,15 @@ static struct page *get_a_page(struct receive_queue *rq, gfp_t gfp_mask) return p; } -static unsigned int free_old_xmit_skbs(struct send_queue *sq, int budget) +static unsigned int free_old_xmit_skbs(struct netdev_queue *txq, + struct send_queue *sq, int budget) { struct sk_buff *skb; unsigned int len; struct virtnet_info *vi = sq->vq->vdev->priv; struct virtnet_stats *stats = this_cpu_ptr(vi->stats); unsigned int packets = 0; + unsigned int bytes = 0; while (packets < budge...
2014 Oct 15
1
[PATCH RFC v2 2/3] virtio_net: bql
...644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -219,13 +219,15 @@ static struct page *get_a_page(struct receive_queue *rq, gfp_t gfp_mask) return p; } -static unsigned int free_old_xmit_skbs(struct send_queue *sq, int budget) +static unsigned int free_old_xmit_skbs(struct netdev_queue *txq, + struct send_queue *sq, int budget) { struct sk_buff *skb; unsigned int len; struct virtnet_info *vi = sq->vq->vdev->priv; struct virtnet_stats *stats = this_cpu_ptr(vi->stats); unsigned int packets = 0; + unsigned int bytes = 0; while (packets < budge...
2019 Jan 02
2
[PATCH RFC 1/2] virtio-net: bql support
...static int virtnet_receive(struct receive_queue *rq, int budget, >>>>> return stats.packets; >>>>> } >>>>> -static void free_old_xmit_skbs(struct send_queue *sq) >>>>> +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, >>>>> + bool use_napi) >>>>> { >>>>> struct sk_buff *skb; >>>>> unsigned int len; >>>>> @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) >>>>> if (!...
2019 Jan 02
2
[PATCH RFC 1/2] virtio-net: bql support
...static int virtnet_receive(struct receive_queue *rq, int budget, >>>>> return stats.packets; >>>>> } >>>>> -static void free_old_xmit_skbs(struct send_queue *sq) >>>>> +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, >>>>> + bool use_napi) >>>>> { >>>>> struct sk_buff *skb; >>>>> unsigned int len; >>>>> @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) >>>>> if (!...
2018 Dec 26
0
[PATCH RFC 1/2] virtio-net: bql support
...net/virtio_net.c > > @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, > > return stats.packets; > > } > > -static void free_old_xmit_skbs(struct send_queue *sq) > > +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, > > + bool use_napi) > > { > > struct sk_buff *skb; > > unsigned int len; > > @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) > > if (!packets) > > return; > > + if (use_napi) > > + netd...
2018 Jan 23
2
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) > { > struct virtnet_info *vi = netdev_priv(dev); > int qnum = skb_get_queue_mapping(skb); > struct send_queue *sq = &vi->sq[qnum]; > + struct net_device *vf_netdev; > int err; > struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); > bool kick = !skb->xmit_more; > bool use_napi = sq->napi.weight; > > + /* If VF is present and up then redirect packets > + * called with rcu_read_lock_bh > + */ > + vf_netdev = rcu_dereference_bh(vi->vf_netdev); >...
2018 Jan 23
2
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) > { > struct virtnet_info *vi = netdev_priv(dev); > int qnum = skb_get_queue_mapping(skb); > struct send_queue *sq = &vi->sq[qnum]; > + struct net_device *vf_netdev; > int err; > struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); > bool kick = !skb->xmit_more; > bool use_napi = sq->napi.weight; > > + /* If VF is present and up then redirect packets > + * called with rcu_read_lock_bh > + */ > + vf_netdev = rcu_dereference_bh(vi->vf_netdev); >...
2018 Dec 26
0
[PATCH RFC 1/2] virtio-net: bql support
...net/virtio_net.c > > @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, > > return stats.packets; > > } > > -static void free_old_xmit_skbs(struct send_queue *sq) > > +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, > > + bool use_napi) > > { > > struct sk_buff *skb; > > unsigned int len; > > @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) > > if (!packets) > > return; > > + if (use_napi) > > + netd...
2018 Dec 26
0
[PATCH RFC 1/2] virtio-net: bql support
...net/virtio_net.c > > @@ -1325,7 +1325,8 @@ static int virtnet_receive(struct receive_queue *rq, int budget, > > return stats.packets; > > } > > -static void free_old_xmit_skbs(struct send_queue *sq) > > +static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq, > > + bool use_napi) > > { > > struct sk_buff *skb; > > unsigned int len; > > @@ -1347,6 +1348,9 @@ static void free_old_xmit_skbs(struct send_queue *sq) > > if (!packets) > > return; > > + if (use_napi) > > + netd...
2014 Oct 15
6
[PATCH] virtio_net: fix use after free
...t.c index 3d0ce44..13d0a8b 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -920,6 +920,8 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) int qnum = skb_get_queue_mapping(skb); struct send_queue *sq = &vi->sq[qnum]; int err; + struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); + bool kick = !skb->xmit_more; /* Free up any pending old buffers before queueing new ones. */ free_old_xmit_skbs(sq); @@ -956,7 +958,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) } } - if (__netif_subqueue_sto...