From: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
To: netdev@vger.kernel.org
Cc: aroulin@nvidia.com, sbrivio@redhat.com, roopa@nvidia.com,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org,
Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
Subject: [PATCH RFC net-next 1/3] net: core: export call_netdevice_notifiers_info
Date: Tue, 9 Aug 2022 23:11:19 -0400 [thread overview]
Message-ID: <b5f740fac8d95cd663a2a21e8ac2ab9ffd06d3c0.1660100506.git.sevinj.aghayeva@gmail.com> (raw)
In-Reply-To: <cover.1660100506.git.sevinj.aghayeva@gmail.com>
When a bridge binding flag is changed for a vlan interface, the
vlan_dev_change_flags function in the 8021q module is called. Currently, this
function only sets the flag for the vlan interface and returns, which results in
a buggy behavior; it also needs to let the bridge module module know that upper
device for the bridge has changed by propagating NETDEV_CHANGEUPPER event. This
event can be triggered using call_netdevice_notifiers_info function, so export
this function.
Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
---
include/linux/netdevice.h | 2 ++
net/core/dev.c | 7 +++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 2563d30736e9..d17ef56c8a06 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2898,6 +2898,8 @@ netdev_notifier_info_to_extack(const struct netdev_notifier_info *info)
}
int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
+int call_netdevice_notifiers_info(unsigned long val,
+ struct netdev_notifier_info *info);
extern rwlock_t dev_base_lock; /* Device list lock */
diff --git a/net/core/dev.c b/net/core/dev.c
index 30a1603a7225..50e7483946e0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -160,8 +160,6 @@ struct list_head ptype_base[PTYPE_HASH_SIZE] __read_mostly;
struct list_head ptype_all __read_mostly; /* Taps */
static int netif_rx_internal(struct sk_buff *skb);
-static int call_netdevice_notifiers_info(unsigned long val,
- struct netdev_notifier_info *info);
static int call_netdevice_notifiers_extack(unsigned long val,
struct net_device *dev,
struct netlink_ext_ack *extack);
@@ -1927,8 +1925,8 @@ static void move_netdevice_notifiers_dev_net(struct net_device *dev,
* are as for raw_notifier_call_chain().
*/
-static int call_netdevice_notifiers_info(unsigned long val,
- struct netdev_notifier_info *info)
+int call_netdevice_notifiers_info(unsigned long val,
+ struct netdev_notifier_info *info)
{
struct net *net = dev_net(info->dev);
int ret;
@@ -1944,6 +1942,7 @@ static int call_netdevice_notifiers_info(unsigned long val,
return ret;
return raw_notifier_call_chain(&netdev_chain, val, info);
}
+EXPORT_SYMBOL(call_netdevice_notifiers_info);
/**
* call_netdevice_notifiers_info_robust - call per-netns notifier blocks
--
2.25.1
next prev parent reply other threads:[~2022-08-10 3:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 3:11 [PATCH RFC net-next 0/3] net: vlan: fix bridge binding behavior and add selftests Sevinj Aghayeva
2022-08-10 3:11 ` Sevinj Aghayeva [this message]
2022-08-10 3:11 ` [PATCH RFC net-next 2/3] net: 8021q: fix bridge binding behavior for vlan interfaces Sevinj Aghayeva
2022-08-10 3:11 ` [PATCH RFC net-next 3/3] selftests: net: tests for bridge binding behavior Sevinj Aghayeva
2022-08-10 8:54 ` [PATCH RFC net-next 0/3] net: vlan: fix bridge binding behavior and add selftests Nikolay Aleksandrov
[not found] ` <CAMWRUK45nbZS3PeSLR1X=Ko6oavrjKj2AWeh2F1wckMPrz_dEg@mail.gmail.com>
2022-08-10 14:50 ` Nikolay Aleksandrov
2022-08-10 15:00 ` Sevinj Aghayeva
2022-08-10 15:10 ` Nikolay Aleksandrov
2022-08-10 15:21 ` Sevinj Aghayeva
2022-08-12 15:30 ` Sevinj Aghayeva
2022-08-14 7:38 ` Nikolay Aleksandrov
2022-08-18 11:50 ` Sevinj Aghayeva
2022-08-18 12:00 ` Nikolay Aleksandrov
2022-08-20 11:33 ` Sevinj Aghayeva
2022-08-22 8:01 ` Nikolay Aleksandrov
[not found] ` <CAMWRUK4J_-siQTrObifPvfLE4CEXAYme6+6JqpR3+qsr5E0-kQ@mail.gmail.com>
[not found] ` <CAMWRUK7_w+TLvLBN-tR+f7ygF=Bu9MqY=PQFABA+CsQChGTfTg@mail.gmail.com>
2022-08-31 10:16 ` Nikolay Aleksandrov
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=b5f740fac8d95cd663a2a21e8ac2ab9ffd06d3c0.1660100506.git.sevinj.aghayeva@gmail.com \
--to=sevinj.aghayeva@gmail.com \
--cc=aroulin@nvidia.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
--cc=sbrivio@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
all inboxes | Powered by JetHome®