Agree. But we should get this message also to the other guys
What message would this be? Are you advocating a different use of #pragma pack()?
Kevin Curtis Linux Development FarSite Communications Ltd http://www.farsite.com Winner of The Queen's Award for Enterprise 2009 tel: +44 1256 330461 fax: +44 1256 854931
-----Original Message----- From: Sven Eckelmann [mailto:sven@narfation.org] Sent: 21 November 2012 18:20 To: David Miller Cc: ordex@autistici.org; netdev@vger.kernel.org; b.a.t.m.a.n@lists.open-mesh.org; lindner_marek@yahoo.de; Kevin Curtis; linux-driver@qlogic.com; ron.mercer@qlogic.com; jitendra.kalsaria@qlogic.com; rmody@brocade.com; andy@greyhouse.net; fubar@us.ibm.com Subject: Re: Re: [PATCH 9/9] batman-adv: Use packing of 2 for all headers before an ethernet header
On Wednesday 21 November 2012 12:57:59 David Miller wrote:
From: Antonio Quartulli ordex@autistici.org Date: Wed, 21 Nov 2012 13:11:59 +0100
+#pragma pack(2)
...
-} __packed;
The __packed attribute is an abstraction of the actual syntax the compiler uses, if it is supported at all.
Therefore, you can't just unconditionally use the #pragma, and you would need to use some kind of similar compiler abstraction for it.
But to be honest this is really ugly and for very little, if any, gain.
Agree. But we should get this message also to the other guys
$ git grep pragma -- drivers/net drivers/net/bonding/bond_3ad.h:#pragma pack(1) drivers/net/bonding/bond_3ad.h:#pragma pack() drivers/net/bonding/bond_3ad.h:#pragma pack(8) drivers/net/bonding/bond_3ad.h:#pragma pack() drivers/net/bonding/bond_alb.c:#pragma pack(1) drivers/net/bonding/bond_alb.c:#pragma pack() drivers/net/ethernet/brocade/bna/bfa_defs.h:#pragma pack(1) drivers/net/ethernet/brocade/bna/bfa_defs.h:#pragma pack() drivers/net/ethernet/brocade/bna/bfa_defs_cna.h:#pragma pack(1) drivers/net/ethernet/brocade/bna/bfa_defs_cna.h:#pragma pack() drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h:#pragma pack(1) drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h:#pragma pack() drivers/net/ethernet/brocade/bna/bfi.h:#pragma pack(1) drivers/net/ethernet/brocade/bna/bfi.h:#pragma pack() drivers/net/ethernet/brocade/bna/bfi_cna.h:#pragma pack(1) drivers/net/ethernet/brocade/bna/bfi_cna.h:#pragma pack() drivers/net/ethernet/brocade/bna/bfi_enet.h:#pragma pack(1) drivers/net/ethernet/brocade/bna/bfi_enet.h:#pragma pack() drivers/net/ethernet/brocade/bna/cna.h:#pragma pack(1) drivers/net/ethernet/brocade/bna/cna.h:#pragma pack() drivers/net/ethernet/qlogic/qla3xxx.h:#pragma pack(1) drivers/net/ethernet/qlogic/qla3xxx.h:#pragma pack() drivers/net/wan/farsync.c:#pragma pack(1) drivers/net/wan/farsync.c:#pragma pack()
Kind regards, Sven