From: Andrew Gallatin <gallatin@myri.com>
To: David Miller <davem@davemloft.net>
Cc: Jan-Bernd Themann <ossthema@de.ibm.com>, netdev <netdev@vger.kernel.org>
Subject: [PATCH]: fix lro_gen_skb() alignment
Date: Tue, 27 Nov 2007 09:47:23 -0500 [thread overview]
Message-ID: <474C2DFB.1090706@myri.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
The inet_lro.c:lro_gen_skb() function fails to include
NET_IP_ALIGN padding at the front of the sk_buffs it creates,
leading to alignment warnings on architectures which require
strict alignment (seen on sparc64). The attached patch
adds NET_IP_ALIGN padding.
Signed off by: Andrew Gallatin <gallatin@myri.com>
Drew
[-- Attachment #2: lro_align.diff --]
[-- Type: text/plain, Size: 508 bytes --]
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c
index ac3b1d3..91e9371 100644
--- a/net/ipv4/inet_lro.c
+++ b/net/ipv4/inet_lro.c
@@ -401,10 +401,11 @@ static struct sk_buff *lro_gen_skb(struc
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 + NET_IP_ALIGN);
if (!skb)
return NULL;
+ skb_reserve(skb, NET_IP_ALIGN);
skb->len = len;
skb->data_len = len - hdr_len;
skb->truesize += true_size;
next reply other threads:[~2007-11-27 14:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 14:47 Andrew Gallatin [this message]
2007-11-30 9:59 ` [PATCH]: fix lro_gen_skb() alignment Herbert Xu
2007-11-30 18:35 ` Andrew Gallatin
2007-11-30 19:14 ` Roland Dreier
2007-11-30 19:35 ` Andrew Gallatin
2007-11-30 22:34 ` Herbert Xu
2007-12-03 0:07 ` Andrew Gallatin
2007-12-03 9:29 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=474C2DFB.1090706@myri.com \
--to=gallatin@myri.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ossthema@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.