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: <20240311091904.GA24043@kernel.org>
Date: Mon, 11 Mar 2024 09:19:04 +0000
From: Simon Horman <horms@...nel.org>
To: Jijie Shao <shaojijie@...wei.com>
Cc: yisen.zhuang@...wei.com, salil.mehta@...wei.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	jiri@...nulli.us, shenjian15@...wei.com, wangjie125@...wei.com,
	liuyonglong@...wei.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V5 net-next 4/4] net: hns3: add support to query scc
 version by devlink info

On Sat, Mar 09, 2024 at 06:00:44PM +0800, Jijie Shao wrote:
> From: Hao Chen <chenhao418@...wei.com>
> 
> Add support to query scc version by devlink info for device V3.
> 
> Signed-off-by: Hao Chen <chenhao418@...wei.com>
> Signed-off-by: Jijie Shao <shaojijie@...wei.com>
> ---
>  drivers/net/ethernet/hisilicon/hns3/hnae3.h   |  9 ++++
>  .../hns3/hns3_common/hclge_comm_cmd.h         |  8 ++++
>  .../hisilicon/hns3/hns3pf/hclge_devlink.c     | 44 +++++++++++++++++--
>  .../hisilicon/hns3/hns3pf/hclge_devlink.h     |  2 +
>  .../hisilicon/hns3/hns3pf/hclge_main.c        | 18 ++++++++
>  .../hisilicon/hns3/hns3pf/hclge_main.h        |  1 +
>  6 files changed, 79 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
> index e9266c65b331..7c2c8bea4c06 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
> +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
> @@ -366,6 +366,15 @@ struct hnae3_vector_info {
>  #define HNAE3_FW_VERSION_BYTE0_SHIFT	0
>  #define HNAE3_FW_VERSION_BYTE0_MASK	GENMASK(7, 0)
>  
> +#define HNAE3_SCC_VERSION_BYTE3_SHIFT	24
> +#define HNAE3_SCC_VERSION_BYTE3_MASK	GENMASK(31, 24)
> +#define HNAE3_SCC_VERSION_BYTE2_SHIFT	16
> +#define HNAE3_SCC_VERSION_BYTE2_MASK	GENMASK(23, 16)
> +#define HNAE3_SCC_VERSION_BYTE1_SHIFT	8
> +#define HNAE3_SCC_VERSION_BYTE1_MASK	GENMASK(15, 8)
> +#define HNAE3_SCC_VERSION_BYTE0_SHIFT	0
> +#define HNAE3_SCC_VERSION_BYTE0_MASK	GENMASK(7, 0)

Not strictly related to this patch, but FWIIW, I suspect that
hnae3_set_field() and hnae3_get_field() could be reworked to use / replaced
by use of FIELD_PREP and FIELD_GET.  In which case I suspect that the
*_SHIFT #defines would no longer be needed.

> +
>  struct hnae3_ring_chain_node {
>  	struct hnae3_ring_chain_node *next;
>  	u32 tqp_index;

..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ