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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200310132402.GF5932@lunn.ch>
Date:   Tue, 10 Mar 2020 14:24:02 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Antoine Tenart <antoine.tenart@...tlin.com>
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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ