mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-13 03:41:54 +00:00
49 lines
1.3 KiB
Diff
49 lines
1.3 KiB
Diff
--- a/drivers/net/bonding/bond_main.c
|
|
+++ b/drivers/net/bonding/bond_main.c
|
|
@@ -208,6 +208,7 @@ atomic_t netpoll_block_tx = ATOMIC_INIT(
|
|
#endif
|
|
|
|
unsigned int bond_net_id __read_mostly;
|
|
+static unsigned long bond_id_mask = 0xFFFFFFF0; /* QCA NSS ECM bonding support */
|
|
|
|
static const struct flow_dissector_key flow_keys_bonding_keys[] = {
|
|
{
|
|
@@ -5793,8 +5794,14 @@ static void bond_destructor(struct net_d
|
|
if (bond->wq)
|
|
destroy_workqueue(bond->wq);
|
|
|
|
+ /* QCA NSS ECM bonding support - Start */
|
|
+ if (bond->id != (~0U))
|
|
+ clear_bit(bond->id, &bond_id_mask);
|
|
+ /* QCA NSS ECM bonding support - End */
|
|
+
|
|
if (bond->rr_tx_counter)
|
|
free_percpu(bond->rr_tx_counter);
|
|
+
|
|
}
|
|
|
|
void bond_setup(struct net_device *bond_dev)
|
|
@@ -6358,6 +6365,13 @@ int bond_create(struct net *net, const c
|
|
|
|
bond_work_init_all(bond);
|
|
|
|
+ /* QCA NSS ECM bonding support - Start */
|
|
+ bond->id = ~0U;
|
|
+ if (bond_id_mask != (~0UL)) {
|
|
+ bond->id = (u32)ffz(bond_id_mask);
|
|
+ set_bit(bond->id, &bond_id_mask);
|
|
+ }
|
|
+ /* QCA NSS ECM bonding support - End */
|
|
out:
|
|
rtnl_unlock();
|
|
return res;
|
|
--- a/include/net/bonding.h
|
|
+++ b/include/net/bonding.h
|
|
@@ -265,6 +265,7 @@ struct bonding {
|
|
spinlock_t ipsec_lock;
|
|
#endif /* CONFIG_XFRM_OFFLOAD */
|
|
struct bpf_prog *xdp_prog;
|
|
+ u32 id;/* QCA NSS ECM bonding support */
|
|
};
|
|
|
|
#define bond_slave_get_rcu(dev) \
|