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: <20250923114935.00001730@huawei.com>
Date: Tue, 23 Sep 2025 11:49:35 +0100
From: Jonathan Cameron <jonathan.cameron@...wei.com>
To: Pavan Chebbi <pavan.chebbi@...adcom.com>
CC: <jgg@...pe.ca>, <michael.chan@...adcom.com>, <dave.jiang@...el.com>,
	<saeedm@...dia.com>, <davem@...emloft.net>, <corbet@....net>,
	<edumazet@...gle.com>, <gospo@...adcom.com>, <kuba@...nel.org>,
	<netdev@...r.kernel.org>, <pabeni@...hat.com>, <andrew+netdev@...n.ch>,
	<selvin.xavier@...adcom.com>, <leon@...nel.org>,
	<kalesh-anakkur.purayil@...adcom.com>
Subject: Re: [PATCH net-next v2 3/6] bnxt_en: Make a lookup table for
 supported aux bus devices

On Tue, 23 Sep 2025 02:58:22 -0700
Pavan Chebbi <pavan.chebbi@...adcom.com> wrote:

> We could maintain a look up table of aux bus devices supported
> by bnxt. This way, the aux bus init/add/uninit/del could have
> generic code to work on any of bnxt's aux devices.
> 
> Reviewed-by: Andy Gospodarek <gospo@...adcom.com>
> Signed-off-by: Pavan Chebbi <pavan.chebbi@...adcom.com>

Ah. Ok. This does make it more generic.  Smash this and patch 2 together
so we don't have the intermediate state where stuff is partly generic.

Key is perhaps to remember that reviewers almost always end up looking at patches
in isolation before they look at the overall result.

Jonathan

> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 105 ++++++++++++++++--
>  1 file changed, 93 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
> index 665850753f90..ecad1947ccb5 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
> @@ -29,6 +29,70 @@
>  
>  static DEFINE_IDA(bnxt_rdma_aux_dev_ids);
>  
> +struct bnxt_aux_device {
> +	const char *name;
> +	const u32 id;
> +	u32 (*alloc_ida)(void);
> +	void (*free_ida)(struct bnxt_aux_priv *priv);
> +	void (*release)(struct device *dev);
> +	void (*set_priv)(struct bnxt *bp, struct bnxt_aux_priv *priv);
> +	struct bnxt_aux_priv *(*get_priv)(struct bnxt *bp);
> +	void (*set_edev)(struct bnxt *bp, struct bnxt_en_dev *edev);
> +	struct bnxt_en_dev *(*get_edev)(struct bnxt *bp);
> +	struct auxiliary_device *(*get_auxdev)(struct bnxt *bp);
> +};



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ