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: <20240730164401.GD1967603@kernel.org>
Date: Tue, 30 Jul 2024 17:44:01 +0100
From: Simon Horman <horms@...nel.org>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: kernel@...gutronix.de, Vincent Mailhol <mailhol.vincent@...adoo.fr>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Heiko Stuebner <heiko@...ech.de>,
	Philipp Zabel <p.zabel@...gutronix.de>,
	Elaine Zhang <zhangqing@...k-chips.com>,
	David Jander <david.jander@...tonic.nl>, linux-can@...r.kernel.org,
	netdev@...r.kernel.org, devicetree@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH can-next 12/21] can: rockchip_canfd: add TX PATH

On Mon, Jul 29, 2024 at 03:05:43PM +0200, Marc Kleine-Budde wrote:
> The IP core has a TX event FIFO. In other IP cores, this type of FIFO
> normally contains the event that a CAN frame has been successfully
> sent. However, the IP core on the rk3568v2 the FIFO also holds events
> of unsuccessful transmission attempts.
> 
> It turned out that the best way to work around this problem is to set
> the IP core to self-receive mode (RXSTX), filter out the self-received
> frames and insert them into the complete TX path.
> 
> Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>

...

> diff --git a/drivers/net/can/rockchip/rockchip_canfd-tx.c b/drivers/net/can/rockchip/rockchip_canfd-tx.c

...

> +void rkcanfd_handle_tx_done_one(struct rkcanfd_priv *priv, const u32 ts,
> +				unsigned int *frame_len_p)
> +{
> +	struct net_device_stats *stats = &priv->ndev->stats;
> +	unsigned int tx_tail;
> +	struct sk_buff *skb;
> +
> +	tx_tail = rkcanfd_get_tx_tail(priv);
> +	skb = priv->can.echo_skb[tx_tail];

nit: skb is set but otherwise unused in this function.

> +	stats->tx_bytes +=
> +		can_rx_offload_get_echo_skb_queue_timestamp(&priv->offload,
> +							    tx_tail, ts,
> +							    frame_len_p);
> +	stats->tx_packets++;
> +}

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ