History

Merge tag 'net-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter and IPsec. Current release - regressions: - do not acquire dev->tx_global_lock in netdev_watchdog_up() - ethtool: keep rtnl_lock for ops using ethtool_op_get_link() - fix deadlock in nested UP notifier events Current release - new code bugs: - eth: - cn20k: fix subbank free list indexing for search order - airoha: fix BQL underflow in shared QDMA TX ring Previous releases - regressions: - netfilter: - flowtable: fix offloaded ct timeout never being extended - nf_conncount: prevent connlimit drops for early confirmed ct Previous releases - always broken: - require CAP_NET_ADMIN in the originating netns when modifying cross-netns devices - report NAPI thread PID in the caller's pid namespace - mac802154: fix dirty frag in in-place crypto for IOT radios - sctp: hold socket lock when dumping endpoints in sctp_diag, avoid an overflow - eth: gve: fix header buffer corruption with header-split and HW-GRO - af_key: initialize alg_key_len for IPComp states, prevent OOB read" * tag 'net-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (213 commits) selftests: bonding: add a test for VLAN propagation over a bonded real device vlan: defer real device state propagation to netdev_work net: add the driver-facing netdev_work scheduling API net: turn the rx_mode work into a generic netdev_work facility net: ethtool: keep rtnl_lock for ops using ethtool_op_get_link() rxrpc: Fix rxrpc_rotate_tx_rotate() to check there's something to rotate rxrpc: Fix leak of released call in recvmsg(MSG_PEEK) rxrpc: Fix socket notification race rxrpc: Fix potential infinite loop in rxrpc_recvmsg() rxrpc: Fix oob challenge leak in cleanup after notification failure rxrpc: Fix the reception of a reply packet before data transmission afs: Fix uncancelled rxrpc OOB message handler afs: Fix further netns teardown to cancel the preallocation charger rxrpc: Fix double unlock in rxrpc_recvmsg() rxrpc: Fix leak of connection from OOB challenge rxrpc: Fix ACKALL packet handling net: hns3: differentiate autoneg default values between copper and fiber net: hns3: fix permanent link down deadlock after reset net: hns3: refactor MAC autoneg and speed configuration net: hns3: unify copper port ksettings configuration path ...

Linus Torvalds committed 4 months ago

Commit 805185b2 parents c75597c fe9f4ee239 files · +3040 −1289Browse files

Showing the changes to include/linux (3 of 239 files). Show all

Unified · Split

3 files
  1. include/linux/ethtool.h +2 −0
  2. include/linux/netdevice.h +17 −4
  3. include/linux/netfilter/x_tables.h +21 −8
include/linux/ethtool.h+2−0
@@ -942,6 +942,7 @@ struct kernel_ethtool_ts_info { · 941 unmodified lines
942942 #define ETHTOOL_OP_NEEDS_RTNL_GPAUSEPARAM BIT(5)
943943 #define ETHTOOL_OP_NEEDS_RTNL_SPAUSEPARAM BIT(6)
944944 #define ETHTOOL_OP_NEEDS_RTNL_RSS BIT(7)
945+#define ETHTOOL_OP_NEEDS_RTNL_GLINK BIT(8)
945946
946947 /**
947948 * struct ethtool_ops - optional netdev operations
@@ -978,6 +979,7 @@ struct kernel_ethtool_ts_info { · 30 unmodified lines
978979 * - phylink helpers (note that phydev is currently unsupported!)
979980 * - netdev_update_features()
980981 * - netif_set_real_num_tx_queues()
982+ * - ethtool_op_get_link() (syncs link watch under rtnl_lock)
981983 *
982984 * @get_drvinfo: Report driver/device information. Modern drivers no
983985 * longer have to implement this callback. Most fields are
include/linux/netdevice.h+17−4
@@ -1131,6 +1131,9 @@ struct netdev_net_notifier { · 1130 unmodified lines
11311131 * netdev_hw_addr_list_for_each(ha, uc). Return 0 on success or a
11321132 * negative errno to request a retry via the core backoff.
11331133 *
1134+ * void (*ndo_work)(struct net_device *dev, unsigned long events);
1135+ * Run deferred work scheduled with netdev_work_sched(@events).
1136+ *
11341137 * int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
11351138 * This function is called when the Media Access Control address
11361139 * needs to be changed. If this interface is not defined, the
@@ -1460,6 +1463,8 @@ struct net_device_ops { · 323 unmodified lines
14601463 struct net_device *dev,
14611464 struct netdev_hw_addr_list *uc,
14621465 struct netdev_hw_addr_list *mc);
1466+ void (*ndo_work)(struct net_device *dev,
1467+ unsigned long events);
14631468 int (*ndo_set_mac_address)(struct net_device *dev,
14641469 void *addr);
14651470 int (*ndo_validate_addr)(struct net_device *dev);
@@ -1930,8 +1935,11 @@ enum netdev_reg_state { · 464 unmodified lines
19301935 * has been enabled due to the need to listen to
19311936 * additional unicast addresses in a device that
19321937 * does not implement ndo_set_rx_mode()
1933− * @rx_mode_node: List entry for rx_mode work processing
1934− * @rx_mode_tracker: Refcount tracker for rx_mode work
1938+ * @work_node: List entry for async netdev_work processing
1939+ * @work_tracker: Refcount tracker for async netdev_work
1940+ * @work_pending: Driver-defined pending netdev_work, passed to
1941+ * ndo_work() (see netdev_work_sched())
1942+ * @work_core_pending: Core-defined pending netdev_work (NETDEV_WORK_*)
19351943 * @rx_mode_addr_cache: Recycled snapshot entries for rx_mode work
19361944 * @rx_mode_retry_timer: Timer that re-queues rx_mode work after failure
19371945 * @rx_mode_retry_count: Number of consecutive retries already scheduled
@@ -2326,8 +2334,10 @@ struct net_device { · 388 unmodified lines
23262334 unsigned int promiscuity;
23272335 unsigned int allmulti;
23282336 bool uc_promisc;
2329− struct list_head rx_mode_node;
2330− netdevice_tracker rx_mode_tracker;
2337+ struct list_head work_node;
2338+ netdevice_tracker work_tracker;
2339+ unsigned long work_pending;
2340+ unsigned long work_core_pending;
23312341 struct netdev_hw_addr_list rx_mode_addr_cache;
23322342 struct timer_list rx_mode_retry_timer;
23332343 unsigned int rx_mode_retry_count;
@@ -5176,6 +5186,9 @@ void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, · 2842 unmodified lines
51765186 const struct pcpu_sw_netstats __percpu *netstats);
51775187 void dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s);
51785188
5189+void netdev_work_sched(struct net_device *dev, unsigned long events);
5190+unsigned long netdev_work_cancel(struct net_device *dev, unsigned long mask);
5191+
51795192 enum {
51805193 NESTED_SYNC_IMM_BIT,
51815194 NESTED_SYNC_TODO_BIT,
include/linux/netfilter/x_tables.h+21−8
@@ -18,7 +18,7 @@ · 17 unmodified lines
1818 * @match: the match extension
1919 * @target: the target extension
2020 * @matchinfo: per-match data
21− * @targetinfo: per-target data
21+ * @targinfo: per-target data
2222 * @state: pointer to hook state this packet came from
2323 * @fragoff: packet is a fragment, this is the data offset
2424 * @thoff: position of transport header relative to skb->data
@@ -77,7 +77,9 @@ static inline u_int8_t xt_family(const struct xt_action_param *par) · 52 unmodified lines
7777 * @match: struct xt_match through which this function was invoked
7878 * @matchinfo: per-match data
7979 * @hook_mask: via which hooks the new rule is reachable
80− * Other fields as above.
80+ * @family: actual NFPROTO_* through which the function is invoked
81+ * (helpful when match->family == NFPROTO_UNSPEC)
82+ * @nft_compat: running from the nft compat layer if true
8183 */
8284 struct xt_mtchk_param {
8385 struct net *net;
@@ -91,8 +93,13 @@ struct xt_mtchk_param { · 7 unmodified lines
9193 };
9294
9395 /**
94− * struct xt_mdtor_param - match destructor parameters
95− * Fields as above.
96+ * struct xt_mtdtor_param - match destructor parameters
97+ *
98+ * @net: network namespace through which the check was invoked
99+ * @match: struct xt_match through which this function was invoked
100+ * @matchinfo: per-match data
101+ * @family: actual NFPROTO_* through which the function is invoked
102+ * (helpful when match->family == NFPROTO_UNSPEC)
96103 */
97104 struct xt_mtdtor_param {
98105 struct net *net;
@@ -105,10 +112,16 @@ struct xt_mtdtor_param { · 6 unmodified lines
105112 * struct xt_tgchk_param - parameters for target extensions'
106113 * checkentry functions
107114 *
115+ * @net: network namespace through which the check was invoked
116+ * @table: table the rule is tried to be inserted into
108117 * @entryinfo: the family-specific rule data
109118 * (struct ipt_entry, ip6t_entry, arpt_entry, ebt_entry)
110− *
111− * Other fields see above.
119+ * @target: the target extension
120+ * @targinfo: per-target data
121+ * @hook_mask: via which hooks the new rule is reachable
122+ * @family: actual NFPROTO_* through which the function is invoked
123+ * (helpful when match->family == NFPROTO_UNSPEC)
124+ * @nft_compat: running from the nft compat layer if true
112125 */
113126 struct xt_tgchk_param {
114127 struct net *net;
@@ -336,9 +349,9 @@ struct xt_table_info *xt_alloc_table_info(unsigned int size); · 221 unmodified lines
336349 void xt_free_table_info(struct xt_table_info *info);
337350
338351 /**
339− * xt_recseq - recursive seqcount for netfilter use
352+ * var xt_recseq - recursive seqcount for netfilter use
340353 *
341− * Packet processing changes the seqcount only if no recursion happened
354+ * Packet processing changes the seqcount only if no recursion happened.
342355 * get_counters() can use read_seqcount_begin()/read_seqcount_retry(),
343356 * because we use the normal seqcount convention :
344357 * Low order bit set to 1 if a writer is active.