patch-2.4.22 linux-2.4.22/include/linux/netdevice.h

Next file: linux-2.4.22/include/linux/netfilter.h
Previous file: linux-2.4.22/include/linux/net.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/include/linux/netdevice.h linux-2.4.22/include/linux/netdevice.h
@@ -191,8 +191,14 @@
 	int		hh_len;		/* length of header */
 	int		(*hh_output)(struct sk_buff *skb);
 	rwlock_t	hh_lock;
+
 	/* cached hardware header; allow for machine alignment needs.        */
-	unsigned long	hh_data[16/sizeof(unsigned long)];
+#define HH_DATA_MOD	16
+#define HH_DATA_OFF(__len) \
+	(HH_DATA_MOD - ((__len) & (HH_DATA_MOD - 1)))
+#define HH_DATA_ALIGN(__len) \
+	(((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1))
+	unsigned long	hh_data[HH_DATA_ALIGN(LL_MAX_HEADER)];
 };
 
 /* These flag bits are private to the generic network queueing

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)