lkml.org 
[lkml]   [2005]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] Align udp-packet in netpoll_send_udp

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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.041 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site