Displaying 20 results from an estimated 96 matches for "xmit_more".
2014 Oct 15
6
[PATCH] virtio_net: fix use after free
commit 0b725a2ca61bedc33a2a63d0451d528b268cf975
net: Remove ndo_xmit_flush netdev operation, use signalling instead.
added code that looks at skb->xmit_more after the skb has
been put in TX VQ. Since some paths process the ring and free the skb
immediately, this can cause use after free.
Fix by storing xmit_more in a local variable.
Cc: David S. Miller <davem at davemloft.net>
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
Dav...
2014 Oct 15
6
[PATCH] virtio_net: fix use after free
commit 0b725a2ca61bedc33a2a63d0451d528b268cf975
net: Remove ndo_xmit_flush netdev operation, use signalling instead.
added code that looks at skb->xmit_more after the skb has
been put in TX VQ. Since some paths process the ring and free the skb
immediately, this can cause use after free.
Fix by storing xmit_more in a local variable.
Cc: David S. Miller <davem at davemloft.net>
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
Dav...
2014 Oct 15
1
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
With the help of xmit_more and virtqueue_enable_cb_avail(), this patch
enable tx interrupt only for the final skb in the chain if
needed. This will help to mitigate tx interrupts.
Cc: Rusty Russell <rusty at rustcorp.com.au>
Cc: Michael S. Tsirkin <mst at redhat.com>
Signed-off-by: Jason Wang <jasowang at red...
2014 Oct 15
1
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
With the help of xmit_more and virtqueue_enable_cb_avail(), this patch
enable tx interrupt only for the final skb in the chain if
needed. This will help to mitigate tx interrupts.
Cc: Rusty Russell <rusty at rustcorp.com.au>
Cc: Michael S. Tsirkin <mst at redhat.com>
Signed-off-by: Jason Wang <jasowang at red...
2014 Oct 15
0
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
On Wed, Oct 15, 2014 at 03:25:30PM +0800, Jason Wang wrote:
> With the help of xmit_more and virtqueue_enable_cb_avail(), this patch
> enable tx interrupt only for the final skb in the chain if
> needed. This will help to mitigate tx interrupts.
>
> Cc: Rusty Russell <rusty at rustcorp.com.au>
> Cc: Michael S. Tsirkin <mst at redhat.com>
> Signed-off-by:...
2014 Oct 15
1
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
On 10/15/2014 06:22 PM, Michael S. Tsirkin wrote:
> On Wed, Oct 15, 2014 at 03:25:30PM +0800, Jason Wang wrote:
>> With the help of xmit_more and virtqueue_enable_cb_avail(), this patch
>> enable tx interrupt only for the final skb in the chain if
>> needed. This will help to mitigate tx interrupts.
>>
>> Cc: Rusty Russell <rusty at rustcorp.com.au>
>> Cc: Michael S. Tsirkin <mst at redhat.com>
&...
2014 Oct 15
0
[PATCH] virtio_net: fix use after free
From: Michael S. Tsirkin
> commit 0b725a2ca61bedc33a2a63d0451d528b268cf975
> net: Remove ndo_xmit_flush netdev operation, use signalling instead.
>
> added code that looks at skb->xmit_more after the skb has
> been put in TX VQ. Since some paths process the ring and free the skb
> immediately, this can cause use after free.
>
> Fix by storing xmit_more in a local variable.
>
> Cc: David S. Miller <davem at davemloft.net>
> Signed-off-by: Michael S. Tsirkin...
2014 Oct 31
0
[PATCH] virtio_net: fix use after free
On Wed, 2014-10-15 at 16:23 +0300, Michael S. Tsirkin wrote:
> commit 0b725a2ca61bedc33a2a63d0451d528b268cf975
> net: Remove ndo_xmit_flush netdev operation, use signalling instead.
>
> added code that looks at skb->xmit_more after the skb has
> been put in TX VQ. Since some paths process the ring and free the skb
> immediately, this can cause use after free.
>
> Fix by storing xmit_more in a local variable.
>
> Cc: David S. Miller <davem at davemloft.net>
> Signed-off-by: Michael S. Tsirkin...
2014 Oct 31
1
[PATCH] virtio_net: fix use after free
On 10/31/2014 11:36 AM, Eric Dumazet wrote:
> On Wed, 2014-10-15 at 16:23 +0300, Michael S. Tsirkin wrote:
>> commit 0b725a2ca61bedc33a2a63d0451d528b268cf975
>> net: Remove ndo_xmit_flush netdev operation, use signalling instead.
>>
>> added code that looks at skb->xmit_more after the skb has
>> been put in TX VQ. Since some paths process the ring and free the skb
>> immediately, this can cause use after free.
>>
>> Fix by storing xmit_more in a local variable.
>>
>> Cc: David S. Miller <davem at davemloft.net>
>> Signed-...
2014 Oct 15
1
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
On 10/15/2014 06:22 PM, Michael S. Tsirkin wrote:
> On Wed, Oct 15, 2014 at 03:25:30PM +0800, Jason Wang wrote:
>> With the help of xmit_more and virtqueue_enable_cb_avail(), this patch
>> enable tx interrupt only for the final skb in the chain if
>> needed. This will help to mitigate tx interrupts.
>>
>> Cc: Rusty Russell <rusty at rustcorp.com.au>
>> Cc: Michael S. Tsirkin <mst at redhat.com>
&...
2014 Oct 31
1
[PATCH] virtio_net: fix use after free
On 10/31/2014 11:36 AM, Eric Dumazet wrote:
> On Wed, 2014-10-15 at 16:23 +0300, Michael S. Tsirkin wrote:
>> commit 0b725a2ca61bedc33a2a63d0451d528b268cf975
>> net: Remove ndo_xmit_flush netdev operation, use signalling instead.
>>
>> added code that looks at skb->xmit_more after the skb has
>> been put in TX VQ. Since some paths process the ring and free the skb
>> immediately, this can cause use after free.
>>
>> Fix by storing xmit_more in a local variable.
>>
>> Cc: David S. Miller <davem at davemloft.net>
>> Signed-...
2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...complete(napi, sq->vq, 0);
> @@ -1505,13 +1509,15 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
> struct send_queue *sq = &vi->sq[qnum];
> int err;
> struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum);
> - bool kick = !skb->xmit_more;
> + bool more = skb->xmit_more;
> bool use_napi = sq->napi.weight;
> + unsigned int bytes = skb->len;
> + bool kick;
>
> /* Free up any pending old buffers before queueing new ones. */
> - free_old_xmit_skbs(sq);
> + free_old_xmit_skbs(sq, txq, use_napi);...
2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...complete(napi, sq->vq, 0);
> @@ -1505,13 +1509,15 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
> struct send_queue *sq = &vi->sq[qnum];
> int err;
> struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum);
> - bool kick = !skb->xmit_more;
> + bool more = skb->xmit_more;
> bool use_napi = sq->napi.weight;
> + unsigned int bytes = skb->len;
> + bool kick;
>
> /* Free up any pending old buffers before queueing new ones. */
> - free_old_xmit_skbs(sq);
> + free_old_xmit_skbs(sq, txq, use_napi);...
2018 Jan 23
2
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...; 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);
> + if (vf_netdev && netif_running(vf_netdev) &&
> + !net...
2018 Jan 23
2
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...; 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);
> + if (vf_netdev && netif_running(vf_netdev) &&
> + !net...
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
...k to make sure used event never go
back. This will let the napi not enable the callbacks wrongly after
delayed callbacks was used.
- For bulk dequeuing, there's no need to enable tx interrupt for each
packet. The last patch only enable tx interrupt for the final skb in
the chain through xmit_more and a new helper to publish current avail
idx as used event.
This series fixes several issues of original rfc pointed out by Michael.
Smoking test is done, and will do complete netperf test. Send the
seires for early review.
Thanks
Jason Wang (6):
virtio: make sure used event never go backw...
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
...k to make sure used event never go
back. This will let the napi not enable the callbacks wrongly after
delayed callbacks was used.
- For bulk dequeuing, there's no need to enable tx interrupt for each
packet. The last patch only enable tx interrupt for the final skb in
the chain through xmit_more and a new helper to publish current avail
idx as used event.
This series fixes several issues of original rfc pointed out by Michael.
Smoking test is done, and will do complete netperf test. Send the
seires for early review.
Thanks
Jason Wang (6):
virtio: make sure used event never go backw...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...@@ -1505,13 +1509,15 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
>>> struct send_queue *sq = &vi->sq[qnum];
>>> int err;
>>> struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum);
>>> - bool kick = !skb->xmit_more;
>>> + bool more = skb->xmit_more;
>>> bool use_napi = sq->napi.weight;
>>> + unsigned int bytes = skb->len;
>>> + bool kick;
>>> /* Free up any pending old buffers before queueing new ones. */
>>> - free_old_xmit_skbs(sq);
>...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...@@ -1505,13 +1509,15 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
>>> struct send_queue *sq = &vi->sq[qnum];
>>> int err;
>>> struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum);
>>> - bool kick = !skb->xmit_more;
>>> + bool more = skb->xmit_more;
>>> bool use_napi = sq->napi.weight;
>>> + unsigned int bytes = skb->len;
>>> + bool kick;
>>> /* Free up any pending old buffers before queueing new ones. */
>>> - free_old_xmit_skbs(sq);
>...
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