Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348407
b: refs/heads/master
c: d9a58a7
h: refs/heads/master
i:
  348405: 62b1245
  348403: ed9ce59
  348399: ec99129
v: v3
  • Loading branch information
Ian Campbell authored and David S. Miller committed Jan 8, 2013
1 parent 87bfaa1 commit 7660b3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 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: 32fa10b24ef64b41e8ca17068fa9dc625427a05e
refs/heads/master: d9a58a782e396a0f04e8445b7ba3763c8a48c7fe
27 changes: 4 additions & 23 deletions trunk/drivers/net/xen-netfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,29 +1015,10 @@ static int xennet_poll(struct napi_struct *napi, int budget)
i = xennet_fill_frags(np, skb, &tmpq);

/*
* Truesize approximates the size of true data plus
* any supervisor overheads. Adding hypervisor
* overheads has been shown to significantly reduce
* achievable bandwidth with the default receive
* buffer size. It is therefore not wise to account
* for it here.
*
* After alloc_skb(RX_COPY_THRESHOLD), truesize is set
* to RX_COPY_THRESHOLD + the supervisor
* overheads. Here, we add the size of the data pulled
* in xennet_fill_frags().
*
* We also adjust for any unused space in the main
* data area by subtracting (RX_COPY_THRESHOLD -
* len). This is especially important with drivers
* which split incoming packets into header and data,
* using only 66 bytes of the main data area (see the
* e1000 driver for example.) On such systems,
* without this last adjustement, our achievable
* receive throughout using the standard receive
* buffer size was cut by 25%(!!!).
*/
skb->truesize += skb->data_len - RX_COPY_THRESHOLD;
* Truesize is the actual allocation size, even if the
* allocation is only partially used.
*/
skb->truesize += PAGE_SIZE * skb_shinfo(skb)->nr_frags;
skb->len += skb->data_len;

if (rx->flags & XEN_NETRXF_csum_blank)
Expand Down

0 comments on commit 7660b3e

Please sign in to comment.