kernel: refresh 6.1 patches (#13240)

This commit is contained in:
Beginner 2024-12-27 10:30:06 +08:00 committed by GitHub
parent 6d2364bf77
commit abac351b33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 33 additions and 33 deletions

View File

@ -19,8 +19,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ +
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
/* /**
@@ -243,6 +245,4 @@ static inline void *offset_to_ptr(const @@ -258,6 +260,4 @@ static inline void *offset_to_ptr(const
*/ */
#define prevent_tail_call_optimization() mb() #define prevent_tail_call_optimization() mb()

View File

@ -9,7 +9,7 @@
static struct flow_dissector flow_keys_bonding __read_mostly; static struct flow_dissector flow_keys_bonding __read_mostly;
/*-------------------------- Forward declarations ---------------------------*/ /*-------------------------- Forward declarations ---------------------------*/
@@ -4425,6 +4427,24 @@ static int bond_get_lowest_level_rcu(str @@ -4426,6 +4428,24 @@ static int bond_get_lowest_level_rcu(str
} }
#endif #endif
@ -34,7 +34,7 @@
static void bond_get_stats(struct net_device *bond_dev, static void bond_get_stats(struct net_device *bond_dev,
struct rtnl_link_stats64 *stats) struct rtnl_link_stats64 *stats)
{ {
@@ -5837,6 +5857,11 @@ static void bond_destructor(struct net_d @@ -5838,6 +5858,11 @@ static void bond_destructor(struct net_d
if (bond->rr_tx_counter) if (bond->rr_tx_counter)
free_percpu(bond->rr_tx_counter); free_percpu(bond->rr_tx_counter);
@ -46,7 +46,7 @@
} }
void bond_setup(struct net_device *bond_dev) void bond_setup(struct net_device *bond_dev)
@@ -6400,6 +6425,14 @@ int bond_create(struct net *net, const c @@ -6401,6 +6426,14 @@ int bond_create(struct net *net, const c
bond_work_init_all(bond); bond_work_init_all(bond);

View File

@ -237,7 +237,7 @@
if (bond_is_lb(bond)) if (bond_is_lb(bond))
bond_alb_handle_link_change(bond, new_active, BOND_LINK_UP); bond_alb_handle_link_change(bond, new_active, BOND_LINK_UP);
} else { } else {
@@ -1841,6 +1858,7 @@ int bond_enslave(struct net_device *bond @@ -1842,6 +1859,7 @@ int bond_enslave(struct net_device *bond
const struct net_device_ops *slave_ops = slave_dev->netdev_ops; const struct net_device_ops *slave_ops = slave_dev->netdev_ops;
struct slave *new_slave = NULL, *prev_slave; struct slave *new_slave = NULL, *prev_slave;
struct sockaddr_storage ss; struct sockaddr_storage ss;
@ -245,7 +245,7 @@
int link_reporting; int link_reporting;
int res = 0, i; int res = 0, i;
@@ -2288,6 +2306,15 @@ int bond_enslave(struct net_device *bond @@ -2289,6 +2307,15 @@ int bond_enslave(struct net_device *bond
bond_is_active_slave(new_slave) ? "an active" : "a backup", bond_is_active_slave(new_slave) ? "an active" : "a backup",
new_slave->link != BOND_LINK_DOWN ? "an up" : "a down"); new_slave->link != BOND_LINK_DOWN ? "an up" : "a down");
@ -261,7 +261,7 @@
/* enslave is successful */ /* enslave is successful */
bond_queue_slave_event(new_slave); bond_queue_slave_event(new_slave);
return 0; return 0;
@@ -2353,6 +2380,15 @@ err_undo_flags: @@ -2354,6 +2381,15 @@ err_undo_flags:
} }
} }
@ -277,7 +277,7 @@
return res; return res;
} }
@@ -2375,6 +2411,7 @@ static int __bond_release_one(struct net @@ -2376,6 +2412,7 @@ static int __bond_release_one(struct net
struct slave *slave, *oldcurrent; struct slave *slave, *oldcurrent;
struct sockaddr_storage ss; struct sockaddr_storage ss;
int old_flags = bond_dev->flags; int old_flags = bond_dev->flags;
@ -285,7 +285,7 @@
netdev_features_t old_features = bond_dev->features; netdev_features_t old_features = bond_dev->features;
/* slave is not a slave or master is not master of this slave */ /* slave is not a slave or master is not master of this slave */
@@ -2396,6 +2433,15 @@ static int __bond_release_one(struct net @@ -2397,6 +2434,15 @@ static int __bond_release_one(struct net
bond_set_slave_inactive_flags(slave, BOND_SLAVE_NOTIFY_NOW); bond_set_slave_inactive_flags(slave, BOND_SLAVE_NOTIFY_NOW);
@ -301,7 +301,7 @@
bond_sysfs_slave_del(slave); bond_sysfs_slave_del(slave);
/* recompute stats just before removing the slave */ /* recompute stats just before removing the slave */
@@ -2721,6 +2767,8 @@ static void bond_miimon_commit(struct bo @@ -2722,6 +2768,8 @@ static void bond_miimon_commit(struct bo
struct slave *slave, *primary, *active; struct slave *slave, *primary, *active;
bool do_failover = false; bool do_failover = false;
struct list_head *iter; struct list_head *iter;
@ -310,7 +310,7 @@
ASSERT_RTNL(); ASSERT_RTNL();
@@ -2760,6 +2808,12 @@ static void bond_miimon_commit(struct bo @@ -2761,6 +2809,12 @@ static void bond_miimon_commit(struct bo
bond_set_active_slave(slave); bond_set_active_slave(slave);
} }
@ -323,7 +323,7 @@
slave_info(bond->dev, slave->dev, "link status definitely up, %u Mbps %s duplex\n", slave_info(bond->dev, slave->dev, "link status definitely up, %u Mbps %s duplex\n",
slave->speed == SPEED_UNKNOWN ? 0 : slave->speed, slave->speed == SPEED_UNKNOWN ? 0 : slave->speed,
slave->duplex ? "full" : "half"); slave->duplex ? "full" : "half");
@@ -2808,6 +2862,16 @@ static void bond_miimon_commit(struct bo @@ -2809,6 +2863,16 @@ static void bond_miimon_commit(struct bo
unblock_netpoll_tx(); unblock_netpoll_tx();
} }
@ -340,7 +340,7 @@
bond_set_carrier(bond); bond_set_carrier(bond);
} }
@@ -4055,9 +4119,220 @@ static inline u32 bond_eth_hash(struct s @@ -4056,9 +4120,220 @@ static inline u32 bond_eth_hash(struct s
return 0; return 0;
ep = (struct ethhdr *)(data + mhoff); ep = (struct ethhdr *)(data + mhoff);
@ -562,7 +562,7 @@
static bool bond_flow_ip(struct sk_buff *skb, struct flow_keys *fk, const void *data, static bool bond_flow_ip(struct sk_buff *skb, struct flow_keys *fk, const void *data,
int hlen, __be16 l2_proto, int *nhoff, int *ip_proto, bool l34) int hlen, __be16 l2_proto, int *nhoff, int *ip_proto, bool l34)
{ {
@@ -5253,15 +5528,23 @@ static netdev_tx_t bond_3ad_xor_xmit(str @@ -5254,15 +5529,23 @@ static netdev_tx_t bond_3ad_xor_xmit(str
struct net_device *dev) struct net_device *dev)
{ {
struct bonding *bond = netdev_priv(dev); struct bonding *bond = netdev_priv(dev);
@ -593,7 +593,7 @@
} }
/* in broadcast mode, we send everything to all usable interfaces. */ /* in broadcast mode, we send everything to all usable interfaces. */
@@ -5511,8 +5794,9 @@ static netdev_tx_t __bond_start_xmit(str @@ -5512,8 +5795,9 @@ static netdev_tx_t __bond_start_xmit(str
return bond_xmit_roundrobin(skb, dev); return bond_xmit_roundrobin(skb, dev);
case BOND_MODE_ACTIVEBACKUP: case BOND_MODE_ACTIVEBACKUP:
return bond_xmit_activebackup(skb, dev); return bond_xmit_activebackup(skb, dev);

View File

@ -27,8 +27,8 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
+ +
#define BOND_VLAN_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ #define BOND_VLAN_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | \ NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | \
NETIF_F_HIGHDMA | NETIF_F_LRO) NETIF_F_GSO_ENCAP_ALL | \
@@ -1501,13 +1505,25 @@ static void bond_compute_features(struct @@ -1502,13 +1506,25 @@ static void bond_compute_features(struct
if (!bond_has_slaves(bond)) if (!bond_has_slaves(bond))
goto done; goto done;
@ -57,7 +57,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
enc_features = netdev_increment_features(enc_features, enc_features = netdev_increment_features(enc_features,
slave->dev->hw_enc_features, slave->dev->hw_enc_features,
BOND_ENC_FEATURES); BOND_ENC_FEATURES);
@@ -1652,6 +1668,16 @@ static rx_handler_result_t bond_handle_f @@ -1653,6 +1669,16 @@ static rx_handler_result_t bond_handle_f
bond->dev->addr_len); bond->dev->addr_len);
} }
@ -74,7 +74,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
return ret; return ret;
} }
@@ -1869,6 +1895,8 @@ int bond_enslave(struct net_device *bond @@ -1870,6 +1896,8 @@ int bond_enslave(struct net_device *bond
return -EPERM; return -EPERM;
} }
@ -83,7 +83,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
if (!bond->params.use_carrier && if (!bond->params.use_carrier &&
slave_dev->ethtool_ops->get_link == NULL && slave_dev->ethtool_ops->get_link == NULL &&
slave_ops->ndo_eth_ioctl == NULL) { slave_ops->ndo_eth_ioctl == NULL) {
@@ -1982,13 +2010,17 @@ int bond_enslave(struct net_device *bond @@ -1983,13 +2011,17 @@ int bond_enslave(struct net_device *bond
call_netdevice_notifiers(NETDEV_JOIN, slave_dev); call_netdevice_notifiers(NETDEV_JOIN, slave_dev);
/* If this is the first slave, then we need to set the master's hardware /* If this is the first slave, then we need to set the master's hardware
@ -107,7 +107,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
} }
new_slave = bond_alloc_slave(bond, slave_dev); new_slave = bond_alloc_slave(bond, slave_dev);
@@ -2017,18 +2049,21 @@ int bond_enslave(struct net_device *bond @@ -2018,18 +2050,21 @@ int bond_enslave(struct net_device *bond
bond_hw_addr_copy(new_slave->perm_hwaddr, slave_dev->dev_addr, bond_hw_addr_copy(new_slave->perm_hwaddr, slave_dev->dev_addr,
slave_dev->addr_len); slave_dev->addr_len);
@ -141,7 +141,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
} }
} }
@@ -2391,6 +2426,7 @@ err_undo_flags: @@ -2392,6 +2427,7 @@ err_undo_flags:
return res; return res;
} }
@ -149,7 +149,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
/* Try to release the slave device <slave> from the bond device <master> /* Try to release the slave device <slave> from the bond device <master>
* It is legal to access curr_active_slave without a lock because all the function * It is legal to access curr_active_slave without a lock because all the function
@@ -2518,13 +2554,23 @@ static int __bond_release_one(struct net @@ -2519,13 +2555,23 @@ static int __bond_release_one(struct net
} }
bond_set_carrier(bond); bond_set_carrier(bond);
@ -175,7 +175,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
if (!bond_has_slaves(bond)) { if (!bond_has_slaves(bond)) {
call_netdevice_notifiers(NETDEV_CHANGEADDR, bond->dev); call_netdevice_notifiers(NETDEV_CHANGEADDR, bond->dev);
call_netdevice_notifiers(NETDEV_RELEASE, bond->dev); call_netdevice_notifiers(NETDEV_RELEASE, bond->dev);
@@ -2591,6 +2637,7 @@ int bond_release(struct net_device *bond @@ -2592,6 +2638,7 @@ int bond_release(struct net_device *bond
{ {
return __bond_release_one(bond_dev, slave_dev, false, false); return __bond_release_one(bond_dev, slave_dev, false, false);
} }
@ -183,7 +183,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
/* First release a slave and then destroy the bond if no more slaves are left. /* First release a slave and then destroy the bond if no more slaves are left.
* Must be under rtnl_lock when this function is called. * Must be under rtnl_lock when this function is called.
@@ -2612,6 +2659,29 @@ static int bond_release_and_destroy(stru @@ -2613,6 +2660,29 @@ static int bond_release_and_destroy(stru
return ret; return ret;
} }
@ -213,7 +213,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
static void bond_info_query(struct net_device *bond_dev, struct ifbond *info) static void bond_info_query(struct net_device *bond_dev, struct ifbond *info)
{ {
struct bonding *bond = netdev_priv(bond_dev); struct bonding *bond = netdev_priv(bond_dev);
@@ -4263,6 +4333,24 @@ static struct net_device *bond_xor_get_t @@ -4264,6 +4334,24 @@ static struct net_device *bond_xor_get_t
return NULL; return NULL;
} }
@ -238,7 +238,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
/* bond_get_tx_dev - Calculate egress interface for a given packet. /* bond_get_tx_dev - Calculate egress interface for a given packet.
* *
* Supports 802.3AD and balance-xor modes * Supports 802.3AD and balance-xor modes
@@ -4303,6 +4391,9 @@ struct net_device *bond_get_tx_dev(struc @@ -4304,6 +4392,9 @@ struct net_device *bond_get_tx_dev(struc
return bond_3ad_get_tx_dev(skb, src_mac, dst_mac, return bond_3ad_get_tx_dev(skb, src_mac, dst_mac,
src, dst, protocol, src, dst, protocol,
bond_dev, layer4hdr); bond_dev, layer4hdr);
@ -248,7 +248,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
default: default:
return NULL; return NULL;
} }
@@ -5099,20 +5190,26 @@ static int bond_set_mac_address(struct n @@ -5100,20 +5191,26 @@ static int bond_set_mac_address(struct n
if (!is_valid_ether_addr(ss->__data)) if (!is_valid_ether_addr(ss->__data))
return -EADDRNOTAVAIL; return -EADDRNOTAVAIL;
@ -289,7 +289,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
} }
} }
@@ -5776,6 +5873,27 @@ static netdev_tx_t bond_tls_device_xmit( @@ -5777,6 +5874,27 @@ static netdev_tx_t bond_tls_device_xmit(
} }
#endif #endif
@ -317,7 +317,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
static netdev_tx_t __bond_start_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t __bond_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct bonding *bond = netdev_priv(dev); struct bonding *bond = netdev_priv(dev);
@@ -5804,6 +5922,8 @@ static netdev_tx_t __bond_start_xmit(str @@ -5805,6 +5923,8 @@ static netdev_tx_t __bond_start_xmit(str
return bond_alb_xmit(skb, dev); return bond_alb_xmit(skb, dev);
case BOND_MODE_TLB: case BOND_MODE_TLB:
return bond_tlb_xmit(skb, dev); return bond_tlb_xmit(skb, dev);
@ -326,7 +326,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
default: default:
/* Should never happen, mode already checked */ /* Should never happen, mode already checked */
netdev_err(dev, "Unknown bonding mode %d\n", BOND_MODE(bond)); netdev_err(dev, "Unknown bonding mode %d\n", BOND_MODE(bond));
@@ -6146,6 +6266,15 @@ static void bond_destructor(struct net_d @@ -6147,6 +6267,15 @@ static void bond_destructor(struct net_d
if (bond->id != (~0U)) if (bond->id != (~0U))
clear_bit(bond->id, &bond_id_mask); clear_bit(bond->id, &bond_id_mask);
/* QCA NSS ECM bonding support */ /* QCA NSS ECM bonding support */
@ -342,7 +342,7 @@ Signed-off-by: Shivani Soni <quic_soni@quicinc.com>
} }
void bond_setup(struct net_device *bond_dev) void bond_setup(struct net_device *bond_dev)
@@ -6722,6 +6851,76 @@ out: @@ -6723,6 +6852,76 @@ out:
return res; return res;
} }