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: <20240515152443.GN154012@kernel.org>
Date: Wed, 15 May 2024 16:24:43 +0100
From: Simon Horman <horms@...nel.org>
To: Mengyuan Lou <mengyuanlou@...-swift.com>
Cc: netdev@...r.kernel.org, jiawenwu@...stnetic.com,
	duanqiangwen@...-swift.com
Subject: Re: [PATCH net-next v3 4/6] net: libwx: Add msg task func

On Wed, May 15, 2024 at 05:50:07PM +0800, Mengyuan Lou wrote:
> Implement wx_msg_task which is used to process mailbox
> messages sent by vf.
> 
> Signed-off-by: Mengyuan Lou <mengyuanlou@...-swift.com>

...

> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_sriov.c b/drivers/net/ethernet/wangxun/libwx/wx_sriov.c

...

> +static inline void wx_ping_vf(struct wx *wx, int vf)
> +{
> +	u32 ping;
> +
> +	ping = WX_PF_CONTROL_MSG;
> +	if (wx->vfinfo[vf].clear_to_send)
> +		ping |= WX_VT_MSGTYPE_CTS;
> +	wx_write_mbx_pf(wx, &ping, 1, vf);
> +}

Please avoid using the static keyword for functions in .c files,
unless there is a demonstrable reason to do so. Generally the
compiler can figure out when best to inline functions.

Also, wx_ping_vf does not seem to be used until PATCH 6/6.
If so, it would be best to add it as part of that patch.

> +
> +/**
> + * wx_set_vf_rx_tx - Set VF rx tx
> + * @wx: Pointer to wx struct
> + * @vf: VF identifier
> + *
> + * Set or reset correct transmit and receive for vf
> + **/

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ