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: <20250708180107.7886ea41@kernel.org>
Date: Tue, 8 Jul 2025 18:01:07 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Parvathi Pudi <parvathi@...thit.com>
Cc: danishanwar@...com, rogerq@...nel.org, andrew+netdev@...n.ch,
 davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
 robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
 ssantosh@...nel.org, richardcochran@...il.com, s.hauer@...gutronix.de,
 m-karicheri2@...com, glaroque@...libre.com, afd@...com,
 saikrishnag@...vell.com, m-malladi@...com, jacob.e.keller@...el.com,
 diogo.ivo@...mens.com, javier.carrasco.cruz@...il.com, horms@...nel.org,
 s-anna@...com, basharath@...thit.com, linux-arm-kernel@...ts.infradead.org,
 netdev@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, vadim.fedorenko@...ux.dev, pratheesh@...com,
 prajith@...com, vigneshr@...com, praneeth@...com, srk@...com,
 rogerq@...com, krishna@...thit.com, pmohan@...thit.com, mohan@...thit.com
Subject: Re: [PATCH net-next v10 04/11] net: ti: prueth: Adds link
 detection, RX and TX support.

On Wed,  2 Jul 2025 20:47:49 +0530 Parvathi Pudi wrote:
> +			if (emac->port_id) {
> +				regmap_update_bits
> +					(prueth->mii_rt,
> +					 PRUSS_MII_RT_TXCFG1,
> +					 PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_MASK,
> +					 delay);

Instead of breaking the lines up like this you should factor the code
out or find some other way to reduce the indentation.

> +	qid = icssm_prueth_get_tx_queue_id(emac->prueth, skb);
> +	ret = icssm_prueth_tx_enqueue(emac, skb, qid);
> +	if (ret) {
> +		if (ret != -ENOBUFS && netif_msg_tx_err(emac) &&
> +		    net_ratelimit())
> +			netdev_err(ndev, "packet queue failed: %d\n", ret);
> +		goto fail_tx;
> +	}

> +	if (ret == -ENOBUFS) {
> +		ret = NETDEV_TX_BUSY;


Something needs to stop the queue, right? Otherwise the stack will 
send the frame right back to the driver.

> +static inline void icssm_emac_finish_napi(struct prueth_emac *emac,
> +					  struct napi_struct *napi,
> +					  int irq)
> +{
> +	napi_complete(napi);
> +	enable_irq(irq);

This helper has a single caller, just put the two lines of code directly
there. And use napi_complete_done(), please.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ