Skip to contentSkip to conversation

Align udp-packet in netpoll_send_udp

PATCH In review Sven Henkel 2 participants 2 messages Mar 18, 2005 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

net/core/netpoll.c +1 -1
@@ -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)
maintainer
#1 lore raw
Quoted 3 lines · On Fri, 18 Mar 2005 18:57:32 +0100 Sven Henkel <[email protected]> wrote:

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.

Patch applied, thanks Sven.

Please post networking patches in the future to [email protected], as that is where the networking developers are.

Thanks.