summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-12-11 05:32:34 +0300
committerJakub Kicinski <kuba@kernel.org>2024-12-11 05:32:34 +0300
commit90da34d146383b56e0e0be1ff03bcaf68221e39e (patch)
tree63c64074a98fa8303d59a012af7b31f0cb010e05 /include/linux
parent4eb0308d78d3891d7d691f719e262cf908bdcb35 (diff)
parent53a6d8912372fc23ea82cc7a49eb59047aa0a650 (diff)
downloadlinux-90da34d146383b56e0e0be1ff03bcaf68221e39e.tar.xz
Merge branch 'net-prepare-for-removal-of-net-dev_index_head'
Eric Dumazet says: ==================== net: prepare for removal of net->dev_index_head This series changes rtnl_fdb_dump, last iterator using net->dev_index_head[] First patch creates ndo_fdb_dump_context structure, to no longer assume specific layout for the arguments. Second patch adopts for_each_netdev_dump() in rtnl_fdb_dump(), while changing two first fields of ndo_fdb_dump_context. Third patch removes the padding, thus changing the location of ctx->fdb_idx now that all users agree on how to retrive it. After this series, the only users of net->dev_index_head are __dev_get_by_index() and dev_get_by_index_rcu(). We have to evaluate if switching them to dev_by_index xarray would be sensible. v1: https://lore.kernel.org/20241207162248.18536-1-edumazet@google.com/T/#m800755d4b16c7f335927a76d9f52ebd37f7f077c ==================== Link: https://patch.msgid.link/20241209100747.2269613-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rtnetlink.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 811ce44113f6..3b9d132cbc9e 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -178,6 +178,12 @@ void rtnetlink_init(void);
void __rtnl_unlock(void);
void rtnl_kfree_skbs(struct sk_buff *head, struct sk_buff *tail);
+/* Shared by rtnl_fdb_dump() and various ndo_fdb_dump() helpers. */
+struct ndo_fdb_dump_context {
+ unsigned long ifindex;
+ unsigned long fdb_idx;
+};
+
extern int ndo_dflt_fdb_dump(struct sk_buff *skb,
struct netlink_callback *cb,
struct net_device *dev,