lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 10 Mar 2020 15:38:34 +0100
From:   Antoine Tenart <antoine.tenart@...tlin.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     davem@...emloft.net, f.fainelli@...il.com, hkallweit1@...il.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] net: phy: mscc: split the driver into separate files

Hello Andrew,

Quoting Andrew Lunn (2020-03-10 14:24:02)
> On Tue, Mar 10, 2020 at 10:07:19AM +0100, Antoine Tenart wrote:
> > +++ b/drivers/net/phy/mscc/mscc.h
> > @@ -0,0 +1,451 @@
> > +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
> > +/*
> > + * Driver for Microsemi VSC85xx PHYs
> > + *
> > + * Copyright (c) 2016 Microsemi Corporation
> > + */
> > +
> > +#ifndef _MSCC_PHY_H_
> > +#define _MSCC_PHY_H_
> > +
> > +#if IS_ENABLED(CONFIG_MACSEC)
> > +#include <net/macsec.h>
> > +#include "mscc_macsec.h"
> > +#endif
> 
> > +#if IS_ENABLED(CONFIG_MACSEC)
> > +struct macsec_flow {
> > +     struct list_head list;
> > +     enum mscc_macsec_destination_ports port;
> > +     enum macsec_bank bank;
> > +     u32 index;
> > +     int assoc_num;
> > +     bool has_transformation;
> > +
> > +     /* Highest takes precedence [0..15] */
> > +     u8 priority;
> > +
> > +     u8 key[MACSEC_KEYID_LEN];
> > +
> > +     union {
> > +             struct macsec_rx_sa *rx_sa;
> > +             struct macsec_tx_sa *tx_sa;
> > +     };
> > +
> > +     /* Matching */
> > +     struct {
> > +             u8 sci:1;
> > +             u8 tagged:1;
> > +             u8 untagged:1;
> > +             u8 etype:1;
> > +     } match;
> > +
> > +     u16 etype;
> > +
> > +     /* Action */
> > +     struct {
> > +             u8 bypass:1;
> > +             u8 drop:1;
> > +     } action;
> > +
> > +};
> > +#endif
> 
> Could some of this be moved into mscc_macsec.h? It would reduce the
> number of #ifdefs.

You're right, will do in v2.

Do you also want the '#if IS_ENABLED(MACSEC)' to be in the mscc_macsec.h
file, for the whole file, or do I keep its inclusion conditional here?

Thanks!
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists