Re: [PATCH net-next] Add bnxt_netlink to facilitate representor pair configurations.

From: Andrew Lunn
Date: Sat Aug 05 2023 - 16:25:07 EST


On Fri, Aug 04, 2023 at 02:29:54PM -0700, Matthew Cover wrote:
> To leverage the SmartNIC capabilities available in Broadcom
> NetXtreme-C/E ethernet devices, representor pairs must be configured
> via bnxt-ctl

Could you give a link to the bnxt-ctl sources. Also give a brief
description of what they do.

> @@ -0,0 +1,231 @@
> +/* Broadcom NetXtreme-C/E network driver.
> + *
> + * Copyright (c) 2014-2016 Broadcom Corporation
> + * Copyright (c) 2016-2017 Broadcom Limited
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation.

Please remove the license boilerplate and use a SPDX-License-Identifier.

> + */
> +#include <linux/netdevice.h>
> +#include <linux/pci.h>
> +#include "bnxt_hsi.h"
> +#include "bnxt_netlink.h"
> +#include "bnxt.h"
> +#include "bnxt_hwrm.h"
> +
> +/* attribute policy */
> +static struct nla_policy bnxt_netlink_policy[BNXT_NUM_ATTRS] = {
> + [BNXT_ATTR_PID] = { .type = NLA_U32 },
> + [BNXT_ATTR_IF_INDEX] = { .type = NLA_U32 },
> + [BNXT_ATTR_REQUEST] = { .type = NLA_BINARY },
> + [BNXT_ATTR_RESPONSE] = { .type = NLA_BINARY },

Passing binary blobs from user space to firmware will not be
accepted. You need well defined and documented individual commands.


Andrew

---
pw-bot: cr