summaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_lro.c
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@myri.com>2007-12-05 11:31:42 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2007-12-05 14:37:32 +0100
commit621544eb8c3beaa859c75850f816dd9b056a00a3 (patch)
tree15c4375c8899ced48bd751eb139cfe9b3778bda9 /net/ipv4/inet_lro.c
parent[TCP]: NAGLE_PUSH seems to be a wrong way around (diff)
downloadlinux-621544eb8c3beaa859c75850f816dd9b056a00a3.tar.xz
linux-621544eb8c3beaa859c75850f816dd9b056a00a3.zip
[LRO]: fix lro_gen_skb() alignment
Add a field to the lro_mgr struct so that drivers can specify how much padding is required to align layer 3 headers when a packet is copied into a freshly allocated skb by inet_lro.c:lro_gen_skb(). Without padding, skbs generated by LRO will cause alignment warnings on architectures which require strict alignment (seen on sparc64). Myri10GE is updated to use this field. Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_lro.c')
-rw-r--r--net/ipv4/inet_lro.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c
index ac3b1d3dba2e..9a96c277393d 100644
--- a/net/ipv4/inet_lro.c
+++ b/net/ipv4/inet_lro.c
@@ -401,10 +401,11 @@ static struct sk_buff *lro_gen_skb(struct net_lro_mgr *lro_mgr,
int data_len = len;
int hdr_len = min(len, hlen);
- skb = netdev_alloc_skb(lro_mgr->dev, hlen);
+ skb = netdev_alloc_skb(lro_mgr->dev, hlen + lro_mgr->frag_align_pad);
if (!skb)
return NULL;
+ skb_reserve(skb, lro_mgr->frag_align_pad);
skb->len = len;
skb->data_len = len - hdr_len;
skb->truesize += true_size;