Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266095
b: refs/heads/master
c: 653fc91
h: refs/heads/master
i:
  266093: 90d00b3
  266091: 3fa78df
  266087: fffc187
  266079: b712b77
v: v3
  • Loading branch information
Jason Wang authored and David S. Miller committed Sep 20, 2011
1 parent 97930c2 commit 1f1f617
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59da45c4fe612cb4312bdf8e4f85fc295c73d50b
refs/heads/master: 653fc9155769f8af8ea73e7e9c99dcaa5bd62086
12 changes: 5 additions & 7 deletions trunk/drivers/net/macvtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from,
int copy = skb_headlen(skb);
int size, offset1 = 0;
int i = 0;
skb_frag_t *f;

/* Skip over from offset */
while (count && (offset >= from->iov_len)) {
Expand Down Expand Up @@ -503,14 +502,13 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from,
skb->truesize += len;
atomic_add(len, &skb->sk->sk_wmem_alloc);
while (len) {
__skb_fill_page_desc(
skb, i, page[i],
base & ~PAGE_MASK,
min_t(int, len, PAGE_SIZE - f->page_offset));
int off = base & ~PAGE_MASK;
int size = min_t(int, len, PAGE_SIZE - off);
__skb_fill_page_desc(skb, i, page[i], off, size);
skb_shinfo(skb)->nr_frags++;
/* increase sk_wmem_alloc */
base += f->size;
len -= f->size;
base += size;
len -= size;
i++;
}
offset1 = 0;
Expand Down

0 comments on commit 1f1f617

Please sign in to comment.