mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sven Henkel <shenkel@gmail.com>
To: mpm@selenic.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Align udp-packet in netpoll_send_udp
Date: Fri, 18 Mar 2005 18:57:32 +0100	[thread overview]
Message-ID: <16955.5772.749812.983639@gargle.gargle.HOWL> (raw)


Hi!

The udp-packet constructed in netpoll_send_udp should be aligned
to avoid alignment-traps on some platforms. The patch applies to
vanilla 2.6.11.2.

Ciao,
Sven


Signed-off-by: Sven Henkel <shenkel@gmail.com>

--- linux-2.6.11.2/net/core/netpoll.c	2005-03-09 09:12:58.000000000 +0100
+++ mylinux-2.6.11.2/net/core/netpoll.c	2005-03-18 15:56:30.330061256 +0100
@@ -233,7 +233,7 @@ void netpoll_send_udp(struct netpoll *np
 
 	udp_len = len + sizeof(*udph);
 	ip_len = eth_len = udp_len + sizeof(*iph);
-	total_len = eth_len + ETH_HLEN;
+	total_len = eth_len + ETH_HLEN + NET_IP_ALIGN;
 
 	skb = find_skb(np, total_len, total_len - len);
 	if (!skb)


             reply	other threads:[~2005-03-18 17:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-18 17:57 Sven Henkel [this message]
2005-03-18 18:32 ` David S. Miller

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=16955.5772.749812.983639@gargle.gargle.HOWL \
    --to=shenkel@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®