From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, pabeni@redhat.com,
edumazet@google.com
Subject: Re: [patch net-next] net: devlink: convert port_list into xarray
Date: Sat, 5 Nov 2022 10:27:11 +0100 [thread overview]
Message-ID: <Y2Ysb/TPGS21kDTK@nanopsycho> (raw)
In-Reply-To: <20221104191910.1fd542e7@kernel.org>
Sat, Nov 05, 2022 at 03:19:10AM CET, kuba@kernel.org wrote:
>On Fri, 4 Nov 2022 16:14:05 +0100 Jiri Pirko wrote:
>> - list_add_tail(&devlink_port->list, &devlink->port_list);
>> + err = xa_alloc(&devlink->ports, &id, devlink_port, XA_LIMIT(id, id),
>> + GFP_KERNEL);
>> + if (err) {
>> + mutex_destroy(&devlink_port->reporters_lock);
>> + return err;
>> + }
>
>Odd if there isn't a cleaner API for allocating a specific ID.
>Perhaps xa_insert() is what we need?
Yeah, will change. Thanks!
prev parent reply other threads:[~2022-11-05 9:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 15:14 [patch net-next] net: devlink: convert port_list into xarray Jiri Pirko
2022-11-05 2:19 ` Jakub Kicinski
2022-11-05 9:27 ` Jiri Pirko [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=Y2Ysb/TPGS21kDTK@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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