search for: dev_kfree_skb_any

Displaying 20 results from an estimated 125 matches for "dev_kfree_skb_any".

2014 Oct 15
2
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...ed-off-by: Jason Wang <jasowang at redhat.com> > > Not sure how much it's worth but since Eric suggested it ... Probably depends on the actual cost of u64_stats_update_begin/end against the likely extra saving of the tx_bytes and tx_packets values onto the stack across the call to dev_kfree_skb_any(). (Which depends on the number of caller saved registers.) > Acked-by: Michael S. Tsirkin <mst at redhat.com> > > > --- > > drivers/net/virtio_net.c | 12 ++++++++---- > > 1 files changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/n...
2014 Oct 15
2
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...ed-off-by: Jason Wang <jasowang at redhat.com> > > Not sure how much it's worth but since Eric suggested it ... Probably depends on the actual cost of u64_stats_update_begin/end against the likely extra saving of the tx_bytes and tx_packets values onto the stack across the call to dev_kfree_skb_any(). (Which depends on the number of caller saved registers.) > Acked-by: Michael S. Tsirkin <mst at redhat.com> > > > --- > > drivers/net/virtio_net.c | 12 ++++++++---- > > 1 files changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/n...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...> > > > > Not sure how much it's worth but since Eric suggested it ... > > > > Probably depends on the actual cost of u64_stats_update_begin/end > > against the likely extra saving of the tx_bytes and tx_packets > > values onto the stack across the call to dev_kfree_skb_any(). > > (Which depends on the number of caller saved registers.) > > Yea, some benchmark results would be nice to see. I there are likely to be multiple skb on the queue the fastest code would probably do one 'virtqueue_get_all()' that returned a linked list of buffers, then fo...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...> > > > > Not sure how much it's worth but since Eric suggested it ... > > > > Probably depends on the actual cost of u64_stats_update_begin/end > > against the likely extra saving of the tx_bytes and tx_packets > > values onto the stack across the call to dev_kfree_skb_any(). > > (Which depends on the number of caller saved registers.) > > Yea, some benchmark results would be nice to see. I there are likely to be multiple skb on the queue the fastest code would probably do one 'virtqueue_get_all()' that returned a linked list of buffers, then fo...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...uf(sq->vq, &len)) != NULL) { pr_debug("Sent skb %p\n", skb); - u64_stats_update_begin(&stats->tx_syncp); - stats->tx_bytes += skb->len; - stats->tx_packets++; - u64_stats_update_end(&stats->tx_syncp); + tx_bytes += skb->len; + tx_packets++; dev_kfree_skb_any(skb); } + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += tx_bytes; + stats->tx_packets =+ tx_packets; + u64_stats_update_end(&stats->tx_syncp); } static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) -- 1.7.1
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...uf(sq->vq, &len)) != NULL) { pr_debug("Sent skb %p\n", skb); - u64_stats_update_begin(&stats->tx_syncp); - stats->tx_bytes += skb->len; - stats->tx_packets++; - u64_stats_update_end(&stats->tx_syncp); + tx_bytes += skb->len; + tx_packets++; dev_kfree_skb_any(skb); } + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += tx_bytes; + stats->tx_packets =+ tx_packets; + u64_stats_update_end(&stats->tx_syncp); } static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) -- 1.7.1
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...uct virtnet_stats *stats = this_cpu_ptr(vi->stats); + u64 tx_bytes = 0, tx_packets = 0; + + while (tx_packets < budget && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + tx_bytes += skb->len; + tx_packets++; + + dev_kfree_skb_any(skb); + } + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += tx_bytes; + stats->tx_packets =+ tx_packets; + u64_stats_update_end(&stats->tx_syncp); + + return tx_packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...uct virtnet_stats *stats = this_cpu_ptr(vi->stats); + u64 tx_bytes = 0, tx_packets = 0; + + while (tx_packets < budget && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + tx_bytes += skb->len; + tx_packets++; + + dev_kfree_skb_any(skb); + } + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += tx_bytes; + stats->tx_packets =+ tx_packets; + u64_stats_update_end(&stats->tx_syncp); + + return tx_packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...le (tx_packets < budget && >> > + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { >> > + pr_debug("Sent skb %p\n", skb); >> > + >> > + tx_bytes += skb->len; >> > + tx_packets++; >> > + >> > + dev_kfree_skb_any(skb); >> > + } >> > + >> > + u64_stats_update_begin(&stats->tx_syncp); >> > + stats->tx_bytes += tx_bytes; >> > + stats->tx_packets =+ tx_packets; >> > + u64_stats_update_end(&stats->tx_syncp); >> > + >> > +...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...le (tx_packets < budget && >> > + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { >> > + pr_debug("Sent skb %p\n", skb); >> > + >> > + tx_bytes += skb->len; >> > + tx_packets++; >> > + >> > + dev_kfree_skb_any(skb); >> > + } >> > + >> > + u64_stats_update_begin(&stats->tx_syncp); >> > + stats->tx_bytes += tx_bytes; >> > + stats->tx_packets =+ tx_packets; >> > + u64_stats_update_end(&stats->tx_syncp); >> > + >> > +...
2014 Oct 15
0
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...wang at redhat.com> > > > > Not sure how much it's worth but since Eric suggested it ... > > Probably depends on the actual cost of u64_stats_update_begin/end > against the likely extra saving of the tx_bytes and tx_packets > values onto the stack across the call to dev_kfree_skb_any(). > (Which depends on the number of caller saved registers.) Yea, some benchmark results would be nice to see. > > Acked-by: Michael S. Tsirkin <mst at redhat.com> > > > > > --- > > > drivers/net/virtio_net.c | 12 ++++++++---- > > > 1 files c...
2014 Oct 14
4
[PATCH RFC] virtio_net: enable tx interrupt
...et && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_end(&stats->tx_syncp); + + dev_kfree_skb_any(skb); + sent++; + } + + return sent; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably waiting f...
2014 Oct 14
4
[PATCH RFC] virtio_net: enable tx interrupt
...et && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_end(&stats->tx_syncp); + + dev_kfree_skb_any(skb); + sent++; + } + + return sent; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably waiting f...
2014 Oct 15
1
[PATCH RFC v2 1/3] virtio_net: enable tx interrupt
...et && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_end(&stats->tx_syncp); + + dev_kfree_skb_any(skb); + packets++; + } + + return packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably wai...
2014 Oct 15
1
[PATCH RFC v2 1/3] virtio_net: enable tx interrupt
...et && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_end(&stats->tx_syncp); + + dev_kfree_skb_any(skb); + packets++; + } + + return packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably wai...
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
According to David, proper accounting and queueing (at all levels, not just TCP sockets) is more important than trying to skim a bunch of cycles by avoiding TX interrupts. Having an event to free the SKB is absolutely essential for the stack to operate correctly. This series tries to enable tx interrupt for virtio-net. The idea is simple: enable tx interrupt and schedule a tx napi to free old
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
According to David, proper accounting and queueing (at all levels, not just TCP sockets) is more important than trying to skim a bunch of cycles by avoiding TX interrupts. Having an event to free the SKB is absolutely essential for the stack to operate correctly. This series tries to enable tx interrupt for virtio-net. The idea is simple: enable tx interrupt and schedule a tx napi to free old
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...et && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_end(&stats->tx_syncp); + + dev_kfree_skb_any(skb); + sent++; + } + + return sent; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably waiting f...
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...et && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_end(&stats->tx_syncp); + + dev_kfree_skb_any(skb); + sent++; + } + + return sent; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably waiting f...
2014 Oct 15
0
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...p; > >> > + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { > >> > + pr_debug("Sent skb %p\n", skb); > >> > + > >> > + tx_bytes += skb->len; > >> > + tx_packets++; > >> > + > >> > + dev_kfree_skb_any(skb); > >> > + } > >> > + > >> > + u64_stats_update_begin(&stats->tx_syncp); > >> > + stats->tx_bytes += tx_bytes; > >> > + stats->tx_packets =+ tx_packets; > >> > + u64_stats_update_end(&stats->tx_syncp); &...