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] [day] [month] [year] [list]
Message-ID: <20240826115022.75974fb6@kernel.org>
Date: Mon, 26 Aug 2024 11:50:22 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jijie Shao <shaojijie@...wei.com>
Cc: <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
 <shenjian15@...wei.com>, <wangpeiyang1@...wei.com>,
 <liuyonglong@...wei.com>, <chenhao418@...wei.com>,
 <sudongming1@...wei.com>, <xujunsheng@...wei.com>,
 <shiyongbang@...wei.com>, <libaihan@...wei.com>, <andrew@...n.ch>,
 <jdamato@...tly.com>, <horms@...nel.org>, <jonathan.cameron@...wei.com>,
 <shameerali.kolothum.thodi@...wei.com>, <salil.mehta@...wei.com>,
 <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V4 net-next 06/11] net: hibmcge: Implement
 .ndo_start_xmit function

On Mon, 26 Aug 2024 16:12:53 +0800 Jijie Shao wrote:
> +static int hbg_napi_tx_recycle(struct napi_struct *napi, int budget)
> +{
> +	struct hbg_ring *ring = container_of(napi, struct hbg_ring, napi);
> +	struct hbg_priv *priv = ring->priv;
> +	/* This smp_load_acquire() pairs with smp_store_release() in
> +	 * hbg_start_xmit() called in xmit process.
> +	 */
> +	u32 ntu = smp_load_acquire(&ring->ntu);
> +	struct hbg_buffer *buffer;
> +	u32 ntc = ring->ntc;
> +	int packet_done = 0;
> +
> +	while (packet_done < budget) {
> +		if (unlikely(hbg_queue_is_empty(ntc, ntu)))
> +			break;
> +
> +		/* make sure HW write desc complete */
> +		dma_rmb();
> +
> +		buffer = &ring->queue[ntc];
> +		if (buffer->state != HBG_TX_STATE_COMPLETE)
> +			break;
> +
> +		hbg_buffer_free(buffer);
> +		ntc = hbg_queue_next_prt(ntc, ring);
> +		packet_done++;
> +	};

unnecessary semicolon
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ