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: <20250318152319.GD688833@kernel.org>
Date: Tue, 18 Mar 2025 15:23:19 +0000
From: Simon Horman <horms@...nel.org>
To: Xin Tian <tianx@...silicon.com>
Cc: netdev@...r.kernel.org, leon@...nel.org, andrew+netdev@...n.ch,
	kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
	davem@...emloft.net, jeff.johnson@....qualcomm.com,
	przemyslaw.kitszel@...el.com, weihg@...silicon.com,
	wanry@...silicon.com, jacky@...silicon.com,
	parthiban.veerasooran@...rochip.com, masahiroy@...nel.org,
	kalesh-anakkur.purayil@...adcom.com, geert+renesas@...der.be
Subject: Re: [PATCH net-next v8 02/14] xsc: Enable command queue

On Tue, Mar 18, 2025 at 06:06:07PM +0800, Xin Tian wrote:
> On 2025/3/12 17:17, Xin Tian wrote:
> > On 2025/3/10 14:34, Simon Horman wrote:
> >> On Fri, Mar 07, 2025 at 06:08:29PM +0800, Xin Tian wrote:
> >>> The command queue is a hardware channel for sending
> >>> commands between the driver and the firmware.
> >>> xsc_cmd.h defines the command protocol structures.
> >>> The logic for command allocation, sending,
> >>> completion handling, and error handling is implemented
> >>> in cmdq.c.
> >>>
> >>> Co-developed-by: Honggang Wei <weihg@...silicon.com>
> >>> Signed-off-by: Honggang Wei <weihg@...silicon.com>
> >>> Co-developed-by: Lei Yan <jacky@...silicon.com>
> >>> Signed-off-by: Lei Yan <jacky@...silicon.com>
> >>> Signed-off-by: Xin Tian <tianx@...silicon.com>
> >> Hi Xin,
> >>
> >> Some minor feedback from my side.
> >>
> >> ...
> >>
> >>> diff --git a/drivers/net/ethernet/yunsilicon/xsc/pci/cmdq.c b/drivers/net/ethernet/yunsilicon/xsc/pci/cmdq.c
> >> ...
> >>
> >>> +static int xsc_copy_to_cmd_msg(struct xsc_cmd_msg *to, void *from, int size)
> >>> +{
> >>> +	struct xsc_cmd_prot_block *block;
> >>> +	struct xsc_cmd_mailbox *next;
> >>> +	int copy;
> >>> +
> >>> +	if (!to || !from)
> >>> +		return -ENOMEM;
> >>> +
> >>> +	copy = min_t(int, size, sizeof(to->first.data));
> >> nit: I expect that using min() is sufficient here...
> > Ack
> 
> min(size, sizeof(to->first.data)) will lead to a compile warning.
> size is int and sizeof(to->first.data) is size_t.
> So I kept this in v9

Ack, thanks for checking.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ