All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: netdev@vger.kernel.org,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	Florian Westphal <fw@strlen.de>, Paolo Abeni <pabeni@redhat.com>,
	stephen@networkplumber.org
Subject: Re: [PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver
Date: Wed, 09 Mar 2016 12:24:20 +0100	[thread overview]
Message-ID: <1457522660.2042.9.camel@sipsolutions.net> (raw)
In-Reply-To: <20160309105614.GA24911@bistromath.redhat.com>

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 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 usually be
__packed. But it's your call. I'm not even entirely sure it has a wire-
format or similar meaning, although the name indicates it gets used
into the encryption and must be exactly these 12 octets.

> > That way, you have the same policy for everything and also don't
> > have
> > to play tricks with the aliasing since the top-level attributes
> > actually exist now, coming from the same namespace & policy.
> 
> That's a good idea, I'll have a look today.
> I don't really like the aliasing games I have to play, but I'd like
> to
> keep the RXSC attributes separate from the SA attributes, I think it
> looks cleaner (the first RFC had everything in the same policy:
> http://www.spinics.net/lists/netdev/msg358152.html).
> 

Ah, I see. Keeping it separate makes sense, but you can still achieve
that like this:

msg = [ifindex -> 7,
       rxsc -> [ sci -> 2, ...
               ],
       ...
      ]

with nested data. I'd also do the same for the stats and a whole bunch
of others too, I guess. I tend to imagine it as a kind of "dict of
dicts" (the message with nested).

Thanks,
johannes

  reply	other threads:[~2016-03-09 11:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 17:12 [PATCH net-next 0/3] MACsec IEEE 802.1AE implementation Sabrina Dubroca
2016-03-07 17:12 ` [PATCH net-next 1/3] uapi: add MACsec bits Sabrina Dubroca
2016-03-08 19:52   ` Johannes Berg
2016-03-09 10:51     ` Sabrina Dubroca
2016-03-09 11:34       ` Johannes Berg
2016-03-10  9:55         ` Sabrina Dubroca
2016-03-07 17:12 ` [PATCH net-next 2/3] net: add MACsec netdevice priv_flags and helper Sabrina Dubroca
2016-03-07 17:12 ` [PATCH net-next 3/3] macsec: introduce IEEE 802.1AE driver Sabrina Dubroca
2016-03-07 19:05   ` David Miller
2016-03-08 20:13   ` Johannes Berg
2016-03-09 10:56     ` Sabrina Dubroca
2016-03-09 11:24       ` Johannes Berg [this message]
2016-03-09 17:09         ` David Miller
2016-03-07 17:12 ` [PATCH iproute2 net-next] ip: add MACsec support Sabrina Dubroca
2016-03-07 19:48   ` Stephen Hemminger
2016-03-08 10:49     ` Sabrina Dubroca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457522660.2042.9.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=fw@strlen.de \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.