diff options
author | Bogdan Hamciuc <bogdan.hamciuc@freescale.com> | 2015-07-29 12:45:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-29 23:00:39 -0700 |
commit | 879c7220e828af8bd82ea9d774c7e45c46b976e4 (patch) | |
tree | 86c9b13748cf6b7878d37487309f979b7eba68a0 /net/core/pktgen.c | |
parent | 92a99bf3bae7c1267db87bb3e3babda2c6dcc8a7 (diff) | |
download | linux-879c7220e828af8bd82ea9d774c7e45c46b976e4.tar.bz2 |
net: pktgen: Observe needed_headroom of the device
Allocate enough space so as not to force the outgoing net device to do
skb_realloc_headroom().
Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 1ebdf1c0d118..5961da69cb03 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2279,7 +2279,7 @@ static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until) static inline void set_pkt_overhead(struct pktgen_dev *pkt_dev) { - pkt_dev->pkt_overhead = 0; + pkt_dev->pkt_overhead = LL_RESERVED_SPACE(pkt_dev->odev); pkt_dev->pkt_overhead += pkt_dev->nr_labels*sizeof(u32); pkt_dev->pkt_overhead += VLAN_TAG_SIZE(pkt_dev); pkt_dev->pkt_overhead += SVLAN_TAG_SIZE(pkt_dev); @@ -2788,6 +2788,7 @@ static struct sk_buff *pktgen_alloc_skb(struct net_device *dev, } else { skb = __netdev_alloc_skb(dev, size, GFP_NOWAIT); } + skb_reserve(skb, LL_RESERVED_SPACE(dev)); return skb; } |