[PATCH 1/4] virtio_net: Fix skb->csum_start computation

2008-06-08 Thread Rusty Russell
From: Mark McLoughlin <[EMAIL PROTECTED]> 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->cs

[PATCH 4/4] virtio: use callback on empty in virtio_net

2008-06-08 Thread Rusty Russell
virtio_net uses a timer to free old transmitted packets, rather than leaving callbacks enabled all the time. If the host promises to always notify us when the transmit ring is empty, we can free packets at that point and avoid the timer. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drive

[PATCH 3/4] virtio: virtio_net free transmit skbs in a timer

2008-06-08 Thread Rusty Russell
From: Mark McLoughlin <[EMAIL PROTECTED]> 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. However, a side-effect of this scheme is that there are always

[PATCH 2/4] virtio: Fix typo in virtio_net_hdr comments

2008-06-08 Thread Rusty Russell
From: Mark McLoughlin <[EMAIL PROTECTED]> Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- include/linux/virtio_net.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net