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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241031172944.ykgvlsysz5srxyr4@skbuf>
Date: Thu, 31 Oct 2024 19:29:44 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Furong Xu <0x1207@...il.com>
Cc: netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Andrew Lunn <andrew@...n.ch>, Simon Horman <horms@...nel.org>,
	andrew+netdev@...n.ch,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Jose Abreu <joabreu@...opsys.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>, xfr@...look.com
Subject: Re: [PATCH net-next v7 1/8] net: stmmac: Introduce separate files
 for FPE implementation

On Thu, Oct 31, 2024 at 08:37:55PM +0800, Furong Xu wrote:
> +void stmmac_fpe_link_state_handle(struct stmmac_priv *priv, bool is_up)
> +{
> +	struct stmmac_fpe_cfg *fpe_cfg = &priv->fpe_cfg;
> +	unsigned long flags;
> +
> +	timer_shutdown_sync(&fpe_cfg->verify_timer);
> +
> +	spin_lock_irqsave(&fpe_cfg->lock, flags);
> +
> +	if (is_up && fpe_cfg->pmac_enabled) {
> +		/* VERIFY process requires pmac enabled when NIC comes up */
> +		stmmac_fpe_configure(priv, priv->ioaddr, fpe_cfg,
> +				     priv->plat->tx_queues_to_use,
> +				     priv->plat->rx_queues_to_use,
> +				     false, true);
> +
> +		/* New link => maybe new partner => new verification process */
> +		stmmac_fpe_apply(priv);
> +	} else {
> +		/* No link => turn off EFPE */
> +		stmmac_fpe_configure(priv, priv->ioaddr, fpe_cfg,
> +				     priv->plat->tx_queues_to_use,
> +				     priv->plat->rx_queues_to_use,
> +				     false, false);
> +	}
> +
> +	spin_unlock_irqrestore(&fpe_cfg->lock, flags);
> +}
> +
> +void stmmac_fpe_apply(struct stmmac_priv *priv)

This is absolutely minor, but could you please sort the functions in
their natural calling order (callee first, caller second)? It's fine now
that stmmac_fpe_apply() has its function prototype exported, and that
works as a forward declaration because we also include stmmac_fpe.h.
But if somebody were to unexport stmmac_fpe_apply() in the future, they
would also have to move it too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ