From: Jakub Kicinski <kuba@kernel.org>
To: Parav Pandit <parav@nvidia.com>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>,
<edumazet@google.com>, <pabeni@redhat.com>, <corbet@lwn.net>,
<kalesh-anakkur.purayil@broadcom.com>, <saeedm@nvidia.com>,
<leon@kernel.org>, <jiri@resnulli.us>, <shayd@nvidia.com>,
<danielj@nvidia.com>, <dchumak@nvidia.com>,
<linux-doc@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
Jiri Pirko <jiri@nvidia.com>
Subject: Re: [net-next v2 2/2] mlx5/core: Support max_io_eqs for a function
Date: Tue, 2 Apr 2024 08:18:36 -0700 [thread overview]
Message-ID: <20240402081836.30912d2c@kernel.org> (raw)
In-Reply-To: <20240402112549.598596-3-parav@nvidia.com>
On Tue, 2 Apr 2024 14:25:49 +0300 Parav Pandit wrote:
> + query_ctx = kzalloc(query_out_sz, GFP_KERNEL);
> + if (!query_ctx)
> + return -ENOMEM;
> +
> + mutex_lock(&esw->state_lock);
> + err = mlx5_vport_get_other_func_cap(esw->dev, vport_num, query_ctx,
> + MLX5_CAP_GENERAL);
> + if (err) {
> + NL_SET_ERR_MSG_MOD(extack, "Failed getting HCA caps");
> + goto out;
missing unlock
And before someone suggests we need guards, even make coccicheck catches
this...
> + }
> +
> + hca_caps = MLX5_ADDR_OF(query_hca_cap_out, query_ctx, capability);
> + MLX5_SET(cmd_hca_cap, hca_caps, max_num_eqs, max_eqs);
> +
> + err = mlx5_vport_set_other_func_cap(esw->dev, hca_caps, vport_num,
> + MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE);
> + mutex_unlock(&esw->state_lock);
> + if (err)
> + NL_SET_ERR_MSG_MOD(extack, "Failed setting HCA caps");
> +
> +out:
> + kfree(query_ctx);
> + return err;
--
pw-bot: cr
next prev parent reply other threads:[~2024-04-02 15:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 11:25 [net-next v2 0/2] devlink: Add port function attribute for IO EQs Parav Pandit
2024-04-02 11:25 ` [net-next v2 1/2] devlink: Support setting max_io_eqs Parav Pandit
2024-04-02 11:25 ` [net-next v2 2/2] mlx5/core: Support max_io_eqs for a function Parav Pandit
2024-04-02 15:18 ` Jakub Kicinski [this message]
2024-04-02 15:36 ` Parav Pandit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240402081836.30912d2c@kernel.org \
--to=kuba@kernel.org \
--cc=corbet@lwn.net \
--cc=danielj@nvidia.com \
--cc=davem@davemloft.net \
--cc=dchumak@nvidia.com \
--cc=edumazet@google.com \
--cc=jiri@nvidia.com \
--cc=jiri@resnulli.us \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=shayd@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.