linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v2 1/2] net: extend drop reasons for multiple subsystems
Date: Fri, 14 Apr 2023 07:42:38 -0700	[thread overview]
Message-ID: <20230414074238.2da8f8db@kernel.org> (raw)
In-Reply-To: <9b5c442ce63c885514a833e5b7a422eed19a4314.camel@sipsolutions.net>

On Fri, 14 Apr 2023 11:25:08 +0200 Johannes Berg wrote:
> On Fri, 2023-03-31 at 21:36 -0700, Jakub Kicinski wrote:
> >   
> > > +/* Note: due to dynamic registrations, access must be under RCU */
> > > +extern const struct drop_reason_list __rcu *
> > > +drop_reasons_by_subsys[SKB_DROP_REASON_SUBSYS_NUM];
> > > +
> > > +void drop_reasons_register_subsys(enum skb_drop_reason_subsys subsys,
> > > +				  const struct drop_reason_list *list);
> > > +void drop_reasons_unregister_subsys(enum skb_drop_reason_subsys subsys);  
> > 
> > dropreason.h is included by skbuff.h because history, but I don't think
> > any of the new stuff must be visible in skbuff.h.
> > 
> > Could you make a new header, and put as much of this stuff there as
> > possible? Our future selves will thank us for shorter rebuild times..  
> 
> Sure. Not sure it'll make a big difference in rebuild, but we'll see :)
> 
> I ended up moving dropreason.h to dropreason-core.h first, that way we
> also have a naming scheme for non-core dropreason files should they
> become visible outside of the subsystem (i.e. mac80211 just has them
> internally).
> 
> Dunno, let me know if you prefer something else, I just couldn't come up
> with a non-confusing longer name for the new thing.

Sounds good.

> > Weak preference to also take the code out of skbuff.c but that's not as
> > important.  
> 
> I guess I can create a new dropreason.c, but is that worth it? It's only
> a few lines. Let me know, then I can resend.

It's hard to tell. Most additions to the core are small at the start so
we end up chucking all of them into a handful of existing source files.
And those files grow and grow. Splitting the later is extra work and
makes backports harder.

It's a game of predicting which code will likely grow into a reasonable
~500+ LoC at some point, and which code will not. I have the feeling
that dropreason code will grow. But yes, it's still fairly small, we 
can defer.

> > You To'd both wireless and netdev, who are you expecting to apply this?
> > :S  
> 
> Good question :)
> 
> The first patch (patches in v3) really should go through net-next I
> suppose, and I wouldn't mind if the other one did as well, it doesn't
> right now touch anything likely to change.

SG!

  reply	other threads:[~2023-04-14 14:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 21:22 [PATCH v2 1/2] net: extend drop reasons for multiple subsystems Johannes Berg
2023-03-30 21:22 ` [PATCH v2 2/2] mac80211: use the new drop reasons infrastructure Johannes Berg
2023-04-01  4:36 ` [PATCH v2 1/2] net: extend drop reasons for multiple subsystems Jakub Kicinski
2023-04-14  9:25   ` Johannes Berg
2023-04-14 14:42     ` Jakub Kicinski [this message]
2023-04-14  3:21 ` kernel test robot

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=20230414074238.2da8f8db@kernel.org \
    --to=kuba@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).