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: <20240418183207.GL3975545@kernel.org>
Date: Thu, 18 Apr 2024 19:32:07 +0100
From: Simon Horman <horms@...nel.org>
To: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [net-next] net: ethernet: rtsn: Add support for Renesas
 Ethernet-TSN

+ Arnd

On Sun, Apr 14, 2024 at 03:59:37PM +0200, Niklas Söderlund wrote:
> Add initial support for Renesas Ethernet-TSN End-station device of R-Car
> V4H. The Ethernet End-station can connect to an Ethernet network using a
> 10 Mbps, 100 Mbps, or 1 Gbps full-duplex link via MII/GMII/RMII/RGMII.
> Depending on the connected PHY.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>

...

> diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig
> index b03fae7a0f72..ea4aca5f406f 100644
> --- a/drivers/net/ethernet/renesas/Kconfig
> +++ b/drivers/net/ethernet/renesas/Kconfig
> @@ -58,4 +58,15 @@ config RENESAS_GEN4_PTP
>  	help
>  	  Renesas R-Car Gen4 gPTP device driver.
>  
> +config RTSN
> +	tristate "Renesas Ethernet-TSN support"
> +	depends on ARCH_RENESAS || COMPILE_TEST

Hi Niklas,

I think that the use of __iowbm() means that this will not
compile for many architectures: grep indicates it
is only defined for arm, arm64, and arc.

Perhaps COMPILE_TEST should be qualified somehow?

> +	depends on PTP_1588_CLOCK
> +	select CRC32
> +	select MII
> +	select PHYLIB
> +	select RENESAS_GEN4_PTP
> +	help
> +	  Renesas Ethernet-TSN device driver.
> +
>  endif # NET_VENDOR_RENESAS

...

> diff --git a/drivers/net/ethernet/renesas/rtsn.c b/drivers/net/ethernet/renesas/rtsn.c
>

...

> +static int rtsn_poll(struct napi_struct *napi, int budget)
> +{
> +	struct rtsn_private *priv;
> +	struct net_device *ndev;
> +	unsigned long flags;
> +	int quota = budget;
> +
> +	ndev = napi->dev;
> +	priv = netdev_priv(ndev);
> +
> +	/* Processing RX Descriptor Ring */
> +	if (rtsn_rx(ndev, &quota))
> +		goto out;
> +
> +	/* Processing TX Descriptor Ring */
> +	spin_lock_irqsave(&priv->lock, flags);
> +	rtsn_tx_free(ndev, true);
> +	netif_wake_subqueue(ndev, 0);
> +	spin_unlock_irqrestore(&priv->lock, flags);
> +
> +	napi_complete(napi);
> +
> +	/* Re-enable TX/RX interrupts */
> +	spin_lock_irqsave(&priv->lock, flags);
> +	rtsn_ctrl_data_irq(priv, true);
> +	__iowmb();
> +	spin_unlock_irqrestore(&priv->lock, flags);
> +out:
> +	return budget - quota;
> +}

...


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ