diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-21 17:46:16 +0900 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-21 17:46:16 +0900 |
commit | 69485d3e6d6839b46a56c77d2dffad18cb7d373f (patch) | |
tree | 20e9de1d5fd9f6617b05e759f9326eaffaf743ee /drivers/net/xen-netfront.c | |
parent | f2a93e2a4c048dfb5c7ee3f159a4a1d1cb61b4b5 (diff) | |
parent | 7881fd0fb3ecc9e367ba998a4de533e7eecbdfeb (diff) |
Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adsp
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r-- | drivers/net/xen-netfront.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index c26e28b4bd9..7ffa43bd7cf 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1015,29 +1015,10 @@ err: 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) |