diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2025-04-10 16:49:17 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-04-10 16:51:07 -0700 |
| commit | cb7103298d1c5d8f71aa79283b64ca01c30264c7 (patch) | |
| tree | ce77754286d5a0ccbcaf92c47db1063a80745252 /net/core/dev_api.c | |
| parent | net: txgbe: add sriov function support (diff) | |
| parent | Merge tag 'net-6.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
| download | linux-cb7103298d1c5d8f71aa79283b64ca01c30264c7.tar.gz linux-cb7103298d1c5d8f71aa79283b64ca01c30264c7.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.15-rc2).
Conflict:
Documentation/networking/netdevices.rst
net/core/lock_debug.c
04efcee6ef8d ("net: hold instance lock during NETDEV_CHANGE")
03df156dd3a6 ("xdp: double protect netdev->xdp_flags with netdev->lock")
No adjacent changes.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/dev_api.c')
| -rw-r--r-- | net/core/dev_api.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/core/dev_api.c b/net/core/dev_api.c index 90bafb0b1b8c..90898cd540ce 100644 --- a/net/core/dev_api.c +++ b/net/core/dev_api.c @@ -327,3 +327,19 @@ int dev_xdp_propagate(struct net_device *dev, struct netdev_bpf *bpf) return ret; } EXPORT_SYMBOL_GPL(dev_xdp_propagate); + +/** + * netdev_state_change() - device changes state + * @dev: device to cause notification + * + * Called to indicate a device has changed state. This function calls + * the notifier chains for netdev_chain and sends a NEWLINK message + * to the routing socket. + */ +void netdev_state_change(struct net_device *dev) +{ + netdev_lock_ops(dev); + netif_state_change(dev); + netdev_unlock_ops(dev); +} +EXPORT_SYMBOL(netdev_state_change); |
