public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com,
	davem@davemloft.net, edumazet@google.com,
	jacob.e.keller@intel.com, jhs@mojatatu.com,
	johannes@sipsolutions.net, amritha.nambiar@intel.com,
	sdf@google.com, horms@kernel.org, przemyslaw.kitszel@intel.com
Subject: Re: [patch net-next v8 5/9] genetlink: introduce per-sock family private storage
Date: Mon, 18 Dec 2023 15:01:55 +0100	[thread overview]
Message-ID: <ZYBQ0zcqufs-s6hk@nanopsycho> (raw)
In-Reply-To: <ZYAmdSSos_lIjAxH@smile.fi.intel.com>

Mon, Dec 18, 2023 at 12:01:09PM CET, andriy.shevchenko@linux.intel.com wrote:
>On Sat, Dec 16, 2023 at 01:29:57PM +0100, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@nvidia.com>
>> 
>> Introduce an xarray for Generic netlink family to store per-socket
>> private. Initialize this xarray only if family uses per-socket privs.
>> 
>> Introduce genl_sk_priv_get() to get the socket priv pointer for a family
>> and initialize it in case it does not exist.
>> Introduce __genl_sk_priv_get() to obtain socket priv pointer for a
>> family under RCU read lock.
>> 
>> Allow family to specify the priv size, init() and destroy() callbacks.
>
>...
>
>> +	void			(*sock_priv_init)(void *priv);
>
>Can in some cases init fail? Shouldn't we allow to propagate the error code
>and fail the flow?

Currently not needed. Easy to add when (if ever) this is going to be
needed.

>
>> +	void			(*sock_priv_destroy)(void *priv);
>
>...
>
>P.S> I'm fine with either, just consider above as a material to think about.

I always do consider these :)


>
>-- 
>With Best Regards,
>Andy Shevchenko
>
>

  reply	other threads:[~2023-12-18 14:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-16 12:29 [patch net-next v8 0/9] devlink: introduce notifications filtering Jiri Pirko
2023-12-16 12:29 ` [patch net-next v8 1/9] devlink: use devl_is_registered() helper instead xa_get_mark() Jiri Pirko
2023-12-16 12:29 ` [patch net-next v8 2/9] devlink: introduce __devl_is_registered() helper and use it instead of xa_get_mark() Jiri Pirko
2023-12-16 12:29 ` [patch net-next v8 3/9] devlink: send notifications only if there are listeners Jiri Pirko
2023-12-16 12:29 ` [patch net-next v8 4/9] devlink: introduce a helper for netlink multicast send Jiri Pirko
2023-12-16 12:29 ` [patch net-next v8 5/9] genetlink: introduce per-sock family private storage Jiri Pirko
2023-12-18 11:01   ` Andy Shevchenko
2023-12-18 14:01     ` Jiri Pirko [this message]
2023-12-16 12:29 ` [patch net-next v8 6/9] netlink: introduce typedef for filter function Jiri Pirko
2023-12-16 12:29 ` [patch net-next v8 7/9] genetlink: introduce helpers to do filtered multicast Jiri Pirko
2023-12-16 12:30 ` [patch net-next v8 8/9] devlink: add a command to set notification filter and use it for multicasts Jiri Pirko
2023-12-16 12:30 ` [patch net-next v8 9/9] devlink: extend multicast filtering by port index Jiri Pirko
2023-12-19 14:50 ` [patch net-next v8 0/9] devlink: introduce notifications filtering patchwork-bot+netdevbpf

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=ZYBQ0zcqufs-s6hk@nanopsycho \
    --to=jiri@resnulli.us \
    --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=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --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