A few variables linked to the in-kernel Path-Manager are confusing, and
it would help current and future developers, to clarify them.
One of them is 'addrs', which in fact represents the number of declared
endpoints, and not only the 'signal' endpoints.
No functional changes intended.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/pm_kernel.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c
index 39ba27aa731ae10df4c34a387b6c0e4c9c6d21cf..e84c381aa3a4e2ad8a05e4b0daa7a5e8daf2c35b 100644
--- a/net/mptcp/pm_kernel.c
+++ b/net/mptcp/pm_kernel.c
@@ -18,7 +18,7 @@ struct pm_nl_pernet {
/* protects pernet updates */
spinlock_t lock;
struct list_head endp_list;
- unsigned int addrs;
+ unsigned int endpoints;
unsigned int stale_loss_cnt;
unsigned int endp_signal_max;
unsigned int endp_subflow_max;
@@ -627,7 +627,7 @@ static int mptcp_pm_nl_append_new_local_addr(struct pm_nl_pernet *pernet,
*/
if (pernet->next_id == MPTCP_PM_MAX_ADDR_ID)
pernet->next_id = 1;
- if (pernet->addrs >= MPTCP_PM_ADDR_MAX) {
+ if (pernet->endpoints >= MPTCP_PM_ADDR_MAX) {
ret = -ERANGE;
goto out;
}
@@ -666,7 +666,7 @@ static int mptcp_pm_nl_append_new_local_addr(struct pm_nl_pernet *pernet,
goto out;
}
- pernet->addrs--;
+ pernet->endpoints--;
entry->addr.id = cur->addr.id;
list_del_rcu(&cur->list);
del_entry = cur;
@@ -701,7 +701,7 @@ static int mptcp_pm_nl_append_new_local_addr(struct pm_nl_pernet *pernet,
WRITE_ONCE(pernet->endp_subflow_max, addr_max + 1);
}
- pernet->addrs++;
+ pernet->endpoints++;
if (!entry->addr.port)
list_add_tail_rcu(&entry->list, &pernet->endp_list);
else
@@ -1101,7 +1101,7 @@ int mptcp_pm_nl_del_addr_doit(struct sk_buff *skb, struct genl_info *info)
WRITE_ONCE(pernet->endp_subflow_max, addr_max - 1);
}
- pernet->addrs--;
+ pernet->endpoints--;
list_del_rcu(&entry->list);
__clear_bit(entry->addr.id, pernet->id_bitmap);
spin_unlock_bh(&pernet->lock);
@@ -1182,7 +1182,7 @@ static void __reset_counters(struct pm_nl_pernet *pernet)
{
WRITE_ONCE(pernet->endp_signal_max, 0);
WRITE_ONCE(pernet->endp_subflow_max, 0);
- pernet->addrs = 0;
+ pernet->endpoints = 0;
}
int mptcp_pm_nl_flush_addrs_doit(struct sk_buff *skb, struct genl_info *info)
--
2.51.0