macvtap: zerocopy: fix offset calculation when building skb
authorJason Wang <jasowang@redhat.com>
Wed, 2 May 2012 03:41:30 +0000 (11:41 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 2 May 2012 15:22:17 +0000 (18:22 +0300)
commit3afc9621f15701c557e60f61eba9242bac2771dd
treeb4fc1cda638c3bc4fb3c4fca80cd27bd03d9ea3b
parent64d098886e0ec01f88349fe757161c2e2e89086b
macvtap: zerocopy: fix offset calculation when building skb

This patch fixes the offset calculation when building skb:

- offset1 were used as skb data offset not vector offset
- reset offset to zero only when we advance to next vector

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/net/macvtap.c