search for: vnet_hdr_to_sg

Displaying 17 results from an estimated 17 matches for "vnet_hdr_to_sg".

2007 Jul 24
0
[PATCH] virtio_net.c gso & feature support
..._net.h> /* FIXME: Make dynamic */ #define MAX_PACKET_LEN (ETH_HLEN+ETH_DATA_LEN) @@ -40,6 +41,18 @@ struct virtnet_info struct sk_buff_head send; }; +static inline struct virtio_net_hdr *skb_vnet_hdr(struct sk_buff *skb) +{ + return (struct virtio_net_hdr *)skb->cb; +} + +static void vnet_hdr_to_sg(struct scatterlist *sg, struct sk_buff *skb) +{ + sg->page = virt_to_page(skb_vnet_hdr(skb)); + sg->offset = offset_in_page(skb_vnet_hdr(skb)); + sg->length = sizeof(struct virtio_net_hdr); +} + static bool skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->priv; @@...
2007 Jul 24
0
[PATCH] virtio_net.c gso & feature support
..._net.h> /* FIXME: Make dynamic */ #define MAX_PACKET_LEN (ETH_HLEN+ETH_DATA_LEN) @@ -40,6 +41,18 @@ struct virtnet_info struct sk_buff_head send; }; +static inline struct virtio_net_hdr *skb_vnet_hdr(struct sk_buff *skb) +{ + return (struct virtio_net_hdr *)skb->cb; +} + +static void vnet_hdr_to_sg(struct scatterlist *sg, struct sk_buff *skb) +{ + sg->page = virt_to_page(skb_vnet_hdr(skb)); + sg->offset = offset_in_page(skb_vnet_hdr(skb)); + sg->length = sizeof(struct virtio_net_hdr); +} + static bool skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->priv; @@...
2007 Nov 18
3
[PATCH 1/2] virtio: fix net driver loop case where we fail to restart
skb is only NULL the first time around: it's more correct to test for being under-budget. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -r 2a94425ac7d5 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Thu Nov 15 13:47:28 2007 +1100 +++ b/drivers/net/virtio_net.c Thu Nov 15 23:10:44 2007 +1100 @@ -198,8 +198,8 @@ again: if (vi->num < vi->max / 2)
2007 Nov 18
3
[PATCH 1/2] virtio: fix net driver loop case where we fail to restart
skb is only NULL the first time around: it's more correct to test for being under-budget. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -r 2a94425ac7d5 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Thu Nov 15 13:47:28 2007 +1100 +++ b/drivers/net/virtio_net.c Thu Nov 15 23:10:44 2007 +1100 @@ -198,8 +198,8 @@ again: if (vi->num < vi->max / 2)
2008 Apr 18
0
virtio: wean net driver off NETDEV_TX_BUSY
...("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest)); + pr_debug("%s: xmit %p %s\n", vi->dev->name, skb, print_mac(mac, dest)); /* Encode metadata header at front. */ hdr = skb_vnet_hdr(skb); @@ -271,30 +273,47 @@ static int start_xmit(struct sk_buff *sk vnet_hdr_to_sg(sg, skb); num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; - __skb_queue_head(&vi->send, skb); + + return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); +} + +static int start_xmit(struct sk_buff *skb, struct net_device *dev) +{ + struct virtnet_info *vi = netdev_priv(de...
2008 Apr 18
0
virtio: wean net driver off NETDEV_TX_BUSY
...("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest)); + pr_debug("%s: xmit %p %s\n", vi->dev->name, skb, print_mac(mac, dest)); /* Encode metadata header at front. */ hdr = skb_vnet_hdr(skb); @@ -271,30 +273,47 @@ static int start_xmit(struct sk_buff *sk vnet_hdr_to_sg(sg, skb); num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; - __skb_queue_head(&vi->send, skb); + + return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); +} + +static int start_xmit(struct sk_buff *skb, struct net_device *dev) +{ + struct virtnet_info *vi = netdev_priv(de...
2008 May 02
1
[PATCH] virtio_net: free transmit skbs in a timer
On Thursday 01 May 2008 00:31:46 Mark McLoughlin wrote: > virtio_net currently only frees old transmit skbs just > before queueing new ones. If the queue is full, it then > enables interrupts and waits for notification that more > work has been performed. Hi Mark, This patch is fine, but it's better to do it from skb_xmit_done(). Of course, this is usually called from an
2008 May 02
1
[PATCH] virtio_net: free transmit skbs in a timer
On Thursday 01 May 2008 00:31:46 Mark McLoughlin wrote: > virtio_net currently only frees old transmit skbs just > before queueing new ones. If the queue is full, it then > enables interrupts and waits for notification that more > work has been performed. Hi Mark, This patch is fine, but it's better to do it from skb_xmit_done(). Of course, this is usually called from an
2008 Jan 15
2
[PATCH 1/3] skb_partial_csum_set
Implement skb_partial_csum_set, for setting partial csums on untrusted packets. Use it in virtio_net (replacing buggy version there), it's also going to be used by TAP for partial csum support. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/net/virtio_net.c | 11 +---------- include/linux/skbuff.h | 1 + net/core/skbuff.c | 29
2008 Jan 15
2
[PATCH 1/3] skb_partial_csum_set
Implement skb_partial_csum_set, for setting partial csums on untrusted packets. Use it in virtio_net (replacing buggy version there), it's also going to be used by TAP for partial csum support. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/net/virtio_net.c | 11 +---------- include/linux/skbuff.h | 1 + net/core/skbuff.c | 29
2008 Apr 28
3
[PATCH 1/4] virtio: wean net driver off NETDEV_TX_BUSY
...- pr_debug("%s: xmit %p " MAC_FMT "\n", dev->name, skb, + pr_debug("%s: xmit %p " MAC_FMT "\n", vi->dev->name, skb, dest[0], dest[1], dest[2], dest[3], dest[4], dest[5]); @@ -272,30 +274,50 @@ static int start_xmit(struct sk_buff *sk vnet_hdr_to_sg(sg, skb); num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; - __skb_queue_head(&vi->send, skb); + + return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); +} + +static int start_xmit(struct sk_buff *skb, struct net_device *dev) +{ + struct virtnet_info *vi = netdev_priv(de...
2008 Apr 28
3
[PATCH 1/4] virtio: wean net driver off NETDEV_TX_BUSY
...- pr_debug("%s: xmit %p " MAC_FMT "\n", dev->name, skb, + pr_debug("%s: xmit %p " MAC_FMT "\n", vi->dev->name, skb, dest[0], dest[1], dest[2], dest[3], dest[4], dest[5]); @@ -272,30 +274,50 @@ static int start_xmit(struct sk_buff *sk vnet_hdr_to_sg(sg, skb); num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; - __skb_queue_head(&vi->send, skb); + + return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); +} + +static int start_xmit(struct sk_buff *skb, struct net_device *dev) +{ + struct virtnet_info *vi = netdev_priv(de...
2008 Jun 08
2
[PATCH 1/4] virtio_net: Fix skb->csum_start computation
From: Mark McLoughlin <markmc at redhat.com> hdr->csum_start is the offset from the start of the ethernet header to the transport layer checksum field. skb->csum_start is the offset from skb->head. skb_partial_csum_set() assumes that skb->data points to the ethernet header - i.e. it computes skb->csum_start by adding the headroom to hdr->csum_start. Since
2007 Dec 14
3
virtio_net and SMP guests
Rusty, Anthony, Dor, I need your brain power :-) On smp guests I have seen a problem with virtio (the version in curent Avi's git) which do not occur on single processor guests: kernel BUG at /space/kvm/drivers/virtio/virtio_ring.c:228! illegal operation: 0001 [#1] Modules linked in: ipv6 CPU: 2 Not tainted Process swapper (pid: 0, task: 000000000f83e038, ksp: 000000000f877d70) Krnl
2007 Dec 14
3
virtio_net and SMP guests
Rusty, Anthony, Dor, I need your brain power :-) On smp guests I have seen a problem with virtio (the version in curent Avi's git) which do not occur on single processor guests: kernel BUG at /space/kvm/drivers/virtio/virtio_ring.c:228! illegal operation: 0001 [#1] Modules linked in: ipv6 CPU: 2 Not tainted Process swapper (pid: 0, task: 000000000f83e038, ksp: 000000000f877d70) Krnl
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c