Linux-RDMA Archive mirror
 help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"kalesh-anakkur.purayil@broadcom.com"
	<kalesh-anakkur.purayil@broadcom.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"jiri@resnulli.us" <jiri@resnulli.us>,
	Shay Drori <shayd@nvidia.com>, Dan Jurgens <danielj@nvidia.com>,
	Dima Chumak <dchumak@nvidia.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-rdma@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 15:36:43 +0000	[thread overview]
Message-ID: <PH0PR12MB548193D80A83300A72FA7170DC3E2@PH0PR12MB5481.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20240402081836.30912d2c@kernel.org>


> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Tuesday, April 2, 2024 8:49 PM
> 
> 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...
>
I am sorry about it.
I didn't wait for the coccicheck to finish in internal build.
Fixing it.
 
> > +	}
> > +
> > +	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

      reply	other threads:[~2024-04-02 15:36 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
2024-04-02 15:36     ` Parav Pandit [this message]

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=PH0PR12MB548193D80A83300A72FA7170DC3E2@PH0PR12MB5481.namprd12.prod.outlook.com \
    --to=parav@nvidia.com \
    --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=kuba@kernel.org \
    --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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).