[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

--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux