From: Andrew Lunn <andrew@lunn.ch>
To: Antoine Tenart <antoine.tenart@bootlin.com>
Cc: davem@davemloft.net, f.fainelli@gmail.com, hkallweit1@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/3] net: phy: mscc: split the driver into separate files
Date: Tue, 10 Mar 2020 14:24:02 +0100 [thread overview]
Message-ID: <20200310132402.GF5932@lunn.ch> (raw)
In-Reply-To: <20200310090720.521745-3-antoine.tenart@bootlin.com>
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.
Andrew
next prev parent reply other threads:[~2020-03-10 13:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 9:07 [PATCH net-next 0/3] net: phy: split the mscc driver Antoine Tenart
2020-03-10 9:07 ` [PATCH net-next 1/3] net: phy: move the mscc driver to its own directory Antoine Tenart
2020-03-10 13:13 ` Andrew Lunn
2020-03-10 9:07 ` [PATCH net-next 2/3] net: phy: mscc: split the driver into separate files Antoine Tenart
2020-03-10 13:24 ` Andrew Lunn [this message]
2020-03-10 14:38 ` Antoine Tenart
2020-03-10 20:12 ` kbuild test robot
2020-03-10 9:07 ` [PATCH net-next 3/3] net: phy: mscc: fix header defines and descriptions Antoine Tenart
2020-03-10 13:24 ` Andrew Lunn
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=20200310132402.GF5932@lunn.ch \
--to=andrew@lunn.ch \
--cc=antoine.tenart@bootlin.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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.