[PATCH 06/27] ia64/xen: define NET_SKB_NET to 18 if xen.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On native ia64 NET_SKB_NET isn't necessary to define.
However on xen it needs to be slightly larger. (More specifically
it's xen-netfront.c requirement.)
It causes annoying kernel unalgned access message and
network layer troubles.
Resolve it by increasing NET_SKB_NET from the default value 16 to 18.

Cc: Kouya SHIMURA <kouya@xxxxxxxxxxxxxx>
Cc: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 arch/ia64/kernel/asm-offsets.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c
index 6bd3fc5..6a8d95e 100644
--- a/arch/ia64/kernel/asm-offsets.c
+++ b/arch/ia64/kernel/asm-offsets.c
@@ -292,6 +292,17 @@ void foo(void)
 #ifdef CONFIG_XEN
 	BLANK();
 
+	{
+		union __net_skb_pad
+		{
+			/* default NET_SKB_PAD (= 16) + NET_IP_ALIGN (= 2) */
+			char xen_pad[16 + 2];
+		};
+		COMMENT("On xen NET_SKB_PAD needs to be");
+		COMMENT(" default NET_SKB_PAD (= 16) + NET_IP_ALIGN (= 2)");
+		DEFINE(NET_SKB_PAD, sizeof(union __net_skb_pad));
+	}
+
 #define DEFINE_MAPPED_REG_OFS(sym, field) \
 	DEFINE(sym, (XMAPPEDREGS_OFS + offsetof(struct mapped_regs, field)))
 
-- 
1.5.3

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux