Re: [PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2016-03-09 Thread David Miller
From: Johannes Berg Date: Wed, 09 Mar 2016 12:24:20 +0100 > Yeah, there's probably no way a compiler could ever do something with > it that's not the same as packed, but it seems to me that just out of > convention structs that have some wire-format meaning should

Re: [PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2016-03-09 Thread Johannes Berg
Hi, Thanks for the comments. > > > +struct gcm_iv { > > > + union { > > > + u8 secure_channel_id[8]; > > > + sci_t sci; > > > + }; > > > + __be32 pn; > > > +}; > > > > Should this be __packed? > > I think that's not necessary here. Yeah, there's probably no way a compiler

Re: [PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2016-03-09 Thread Sabrina Dubroca
2016-03-08, 21:13:53 +0100, Johannes Berg wrote: > On Mon, 2016-03-07 at 18:12 +0100, Sabrina Dubroca wrote: > >  > > +struct gcm_iv { > > + union { > > + u8 secure_channel_id[8]; > > + sci_t sci; > > + }; > > + __be32 pn; > > +}; > > Should this be __packed? I think

Re: [PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2016-03-08 Thread Johannes Berg
On Mon, 2016-03-07 at 18:12 +0100, Sabrina Dubroca wrote: >  > +struct gcm_iv { > + union { > + u8 secure_channel_id[8]; > + sci_t sci; > + }; > + __be32 pn; > +}; Should this be __packed? But the struct is confusing; sci_t is a host type (that depends on

Re: [PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2016-03-07 Thread David Miller
From: Sabrina Dubroca Date: Mon, 7 Mar 2016 18:12:40 +0100 > diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig > index f184fb5bd110..2a1ba62b7da2 100644 > --- a/drivers/net/Kconfig > +++ b/drivers/net/Kconfig > @@ -193,6 +193,13 @@ config GENEVE > To compile

[PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2016-03-07 Thread Sabrina Dubroca
This is an implementation of MACsec/IEEE 802.1AE. This driver provides authentication and encryption of traffic in a LAN, typically with GCM-AES-128, and optional replay protection. http://standards.ieee.org/getieee802/download/802.1AE-2006.pdf Signed-off-by: Sabrina Dubroca

[RFCv2 PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2016-02-02 Thread Sabrina Dubroca
This is an implementation of MACsec/IEEE 802.1AE. This driver provides authentication and encryption of traffic in a LAN, typically with GCM-AES-128, and optional replay protection. http://standards.ieee.org/getieee802/download/802.1AE-2006.pdf Signed-off-by: Sabrina Dubroca

Re: [RFC PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2016-01-05 Thread Paolo Abeni
On Mon, 2015-12-28 at 13:38 +0100, Sabrina Dubroca wrote: > +#define MACSEC_SCI_LEN 8 > + > +/* SecTAG length = macsec_eth_header without the optional SCI */ > +#define MACSEC_TAG_LEN 6 > + > +struct macsec_eth_header { > + struct ethhdr eth; > + /* SecTAG */ > + u8 tci_an; > +#if

Re: [RFC PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2016-01-04 Thread Florian Westphal
Sabrina Dubroca wrote: [ Sorry for long delay ] > 2015-12-29, 02:14:06 +0100, Florian Westphal wrote: > > > + tx_sa->next_pn++; > > > + if (tx_sa->next_pn == 0) { > > > + pr_notice("PN wrapped, transitionning to !oper\n"); > > > > Is that _notice intentional? > >

Re: [RFC PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2015-12-29 Thread Sabrina Dubroca
2015-12-29, 02:14:06 +0100, Florian Westphal wrote: > Sabrina Dubroca wrote: > > + if (h->short_length) > > + return len == h->short_length + 24; > > + else > > + return len >= 72; > [..] > > + return

Re: [RFC PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2015-12-28 Thread Florian Westphal
Sabrina Dubroca wrote: > + if (h->short_length) > + return len == h->short_length + 24; > + else > + return len >= 72; [..] > + return len == h->short_length + 32; [..] > +

[RFC PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver

2015-12-28 Thread Sabrina Dubroca
This is an implementation of MACsec/IEEE 802.1AE. This driver provides authentication and encryption of traffic in a LAN, typically with GCM-AES-128, and optional replay protection. http://standards.ieee.org/getieee802/download/802.1AE-2006.pdf Signed-off-by: Sabrina Dubroca