fix unaligned access of netfron/back
PATCH 1/1 fix unaligned access of netfron/back
Hi,
We make a patch to avoid the following warnings.
The noisy warnings are happend
only when we enabele network of domU on xen/ia64.
kernel unaligned access to 0xe000000019247a1e, ip=0xa00000010093d681 kernel unaligned access to 0xe000000019247a1e, ip=0xa00000010093d751 kernel unaligned access to 0xe000000019247a1e, ip=0xa00000010093d800 kernel unaligned access to 0xe000000019247a2e, ip=0xa00000010093da10 kernel unaligned access to 0xe000000019247a1e, ip=0xa00000010093da90
Best Regards,
Akio Takebe
# HG changeset patch
# User root@tiger154
# Date 1161050883 -32400
# Node ID 77c6472e23c54dd44b832b29bfbcb622ca57cdb2
# Parent fcd746cf4647e06b8e88e620c29610ba43e3ad7c
This patche fix unaligned access when we enable network by using netfront. This problem is only happened on Xen/ia64.
linux-2.6-xen-sparse/drivers/xen/netback/netback.c +3 -3
@@ -187,7 +187,7 @@ static struct sk_buff *netbk_copy_skb(stif (unlikely (!nskb)) goto err; -skb_reserve (nskb,16 ); +skb_reserve (nskb,16 +NET_IP_ALIGN ); headlen = nskb->end - nskb->data;if (headlen >skb_headlen (skb)) headlen =skb_headlen (skb);
@@ -1210,7 +1210,7 @@ static void net_tx_action(unsigned long ret < MAX_SKB_FRAGS) ?PKT_PROT_LEN : txreq.size; - skb =alloc_skb (data_len+16 ,GFP_ATOMIC ); + skb =alloc_skb (data_len +16 +NET_IP_ALIGN ,GFP_ATOMIC );if (unlikely (skb ==NULL )) {DPRINTK ("Can't allocate a skb in start_xmit.\n" );netbk_tx_err (netif, &txreq, i);
@@ -1218,7 +1218,7 @@ static void net_tx_action(unsigned long }/* Packets passed to netif_rx() must have some headroom. */ -skb_reserve (skb,16 ); +skb_reserve (skb,16 +NET_IP_ALIGN );if (extras[XEN_NETIF_EXTRA_TYPE_GSO -1 ].type) {struct netif_extra_info *gso;
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +2 -2
@@ -684,7 +684,7 @@ static void network_alloc_rx_buffers(str* necessary here. * 16 bytes added as necessary headroom for netif_receive_skb. */ - skb =alloc_skb (RX_COPY_THRESHOLD +16 , + skb =alloc_skb (RX_COPY_THRESHOLD +16 +NET_IP_ALIGN ,GFP_ATOMIC | __GFP_NOWARN);if (unlikely (!skb)) goto no_skb;
@@ -702,7 +702,7 @@ no_skb:break ; } -skb_reserve (skb,16 );/* mimic dev_alloc_skb() */ +skb_reserve (skb,16 +NET_IP_ALIGN );/* mimic dev_alloc_skb() */ skb_shinfo (skb)->frags[0 ].page = page;skb_shinfo (skb)->nr_frags =1 ;__skb_queue_tail (&np->rx_batch, skb);
_______________________________________________
Xen-ia64-devel mailing list
[email protected]
http://lists.xensource.com/xen-ia64-devel
LSM'07
Hi.
I'm working on Libre Software Meeting '07 (RMLL), which may occur in july, and will be in the town of Amiens, in France as usual.
I am the leader of the conferences cycle about clustering and virtualization.
For this topic, I would have one or two persons able to make a keynote about XEN, and would be able to organize a meeting between some of the open source actors of clustering & virtualization.
Would you be interested in ?
Will you be able to travel to Amiens in France for July ?
Thanks in advance.
PS: i'm a regular reader of the mailing list.
Signature · 3 lines
Il vaut mieux pomper même s'il ne se passe rien, que de risquer quelque chose de bien pire en ne pompant pas. -- Devise Shadok. Gaétan RYCKEBOER