From: David Miller <davem@davemloft.net>
To: jiri@resnulli.us
Cc: netdev@vger.kernel.org, edumazet@google.com,
alexander.h.duyck@intel.com, xiyou.wangcong@gmail.com
Subject: Re: [patch net-next] net: add netnotifier event for upper device change
Date: Sun, 26 May 2013 00:37:15 -0700 (PDT) [thread overview]
Message-ID: <20130526.003715.728961070406338721.davem@davemloft.net> (raw)
In-Reply-To: <20130526071039.GA1560@minipsycho.orion>
From: Jiri Pirko <jiri@resnulli.us>
Date: Sun, 26 May 2013 09:10:39 +0200
> Sun, May 26, 2013 at 08:14:13AM CEST, davem@davemloft.net wrote:
>>If someone is looking for a useful project, switching networking over to
>>a more typed notifier system would be a worthwhile improvement.
>>
>>It's hard to right now to communicate what changed beyond "action X
>>happened to this object, you have to check to see exactly how it
>>changed"
>
> Hmm. Do you have something particular in mind? My first thought was
> passing some union instead of NETDEV_* numbers.
Part of the problem is that notifiers are untyped.
So you can say "NETDEV_* means struct foo" but nothing in the C
typing system will enforce this, so errors are inevitable.
Perhaps one level of encapsulation will help:
static inline call_netdevice_feat_change(struct net_device *dev,
netdev_features_t old,
netdev_features_t new)
{
struct netdevice_feat_change_info info;
info.dev = dev;
info.old = old;
info.new = new;
call_netdevice_notifiers(NETDEV_FEAT_CHANGE, &info);
}
>>This came up recently with the IFF_NOARP stuff.
>
> Can you point me to the discussion?
It's in this patchwork thread:
http://patchwork.ozlabs.org/patch/245256/
prev parent reply other threads:[~2013-05-26 7:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-25 14:12 [patch net-next] net: add netnotifier event for upper device change Jiri Pirko
2013-05-26 6:14 ` David Miller
2013-05-26 7:10 ` Jiri Pirko
2013-05-26 7:37 ` David Miller [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=20130526.003715.728961070406338721.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexander.h.duyck@intel.com \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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