From: Jakub Kicinski <kuba@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, pabeni@redhat.com, davem@davemloft.net,
edumazet@google.com, jacob.e.keller@intel.com, jhs@mojatatu.com,
johannes@sipsolutions.net, andriy.shevchenko@linux.intel.com,
amritha.nambiar@intel.com, sdf@google.com, horms@kernel.org,
przemyslaw.kitszel@intel.com
Subject: Re: [patch net-next v7 5/9] genetlink: introduce per-sock family private storage
Date: Fri, 15 Dec 2023 17:47:07 -0800 [thread overview]
Message-ID: <20231215174707.6ae0a290@kernel.org> (raw)
In-Reply-To: <ZXwnqqsFPDhRUNBy@nanopsycho>
Sorry for the latency...
On Fri, 15 Dec 2023 11:17:14 +0100 Jiri Pirko wrote:
> Wait, let me make your suggestion clear. Do you suggest to remove the
> WARN_ON_ONCE from __genl_sk_priv_get() as well?
>
> To put it in code:
> void *__genl_sk_priv_get(struct genl_family *family, struct sock *sk)
> {
> if (WARN_ON_ONCE(!family->sock_privs))
> return ERR_PTR(-EINVAL);
> return xa_load(family->sock_privs, (unsigned long) sk);
> }
I meant this, although no strong feelings.
> OR:
> void *__genl_sk_priv_get(struct genl_family *family, struct sock *sk)
> {
> if (!family->sock_privs)
> return ERR_PTR(-EINVAL);
> return xa_load(family->sock_privs, (unsigned long) sk);
> }
> ?
next prev parent reply other threads:[~2023-12-16 1:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 18:15 [patch net-next v7 0/9] devlink: introduce notifications filtering Jiri Pirko
2023-12-14 18:15 ` [patch net-next v7 1/9] devlink: use devl_is_registered() helper instead xa_get_mark() Jiri Pirko
2023-12-14 18:15 ` [patch net-next v7 2/9] devlink: introduce __devl_is_registered() helper and use it instead of xa_get_mark() Jiri Pirko
2023-12-14 18:15 ` [patch net-next v7 3/9] devlink: send notifications only if there are listeners Jiri Pirko
2023-12-14 18:15 ` [patch net-next v7 4/9] devlink: introduce a helper for netlink multicast send Jiri Pirko
2023-12-14 18:15 ` [patch net-next v7 5/9] genetlink: introduce per-sock family private storage Jiri Pirko
2023-12-15 3:05 ` Jacob Keller
2023-12-15 3:23 ` Jakub Kicinski
2023-12-15 10:03 ` Jiri Pirko
2023-12-15 10:17 ` Jiri Pirko
2023-12-16 1:47 ` Jakub Kicinski [this message]
2023-12-16 9:17 ` Jiri Pirko
2023-12-14 18:15 ` [patch net-next v7 6/9] netlink: introduce typedef for filter function Jiri Pirko
2023-12-14 18:15 ` [patch net-next v7 7/9] genetlink: introduce helpers to do filtered multicast Jiri Pirko
2023-12-14 18:15 ` [patch net-next v7 8/9] devlink: add a command to set notification filter and use it for multicasts Jiri Pirko
2023-12-14 18:15 ` [patch net-next v7 9/9] devlink: extend multicast filtering by port index Jiri Pirko
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=20231215174707.6ae0a290@kernel.org \
--to=kuba@kernel.org \
--cc=amritha.nambiar@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=sdf@google.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 NNTP newsgroup(s).