On Tue, Nov 24, 2009 at 08:54:23AM +1030, Rusty Russell wrote:
On Tue, 24 Nov 2009 02:37:01 am Shirley Ma wrote:
Hi Shirley,Without this cast there is a compile warning.+ skb = (struct sk_buff *)buf;This cast is unnecessary, but a comment would be nice:
Looks like buf is a void *, so no cast should be necessary. But I could
be reading the patch wrong.
It's a qemu bug. It insists the header be an element in the scatterlist byHowever, I question whether making it 16 byte is the right thing: theBecause in QEMU it requires 10 bytes header in a separately, so one page
ethernet header is 14 bytes long, so don't we want 8 bytes of padding?
is used to share between virtio_net_hdr header which is 10 bytes head
and rest of data. So I put 6 bytes offset here between two buffers. I
didn't look at the reason why a seperate buf is used for virtio_net_hdr
in QEMU.
itself. Unfortunately we have to accommodate it.
We do? Let's just fix this?