These patches from Geliang better isolate the two MPTCP path-managers by
avoiding calling userspace PM functions from the in-kernel PM. Instead,
new functions declared in pm.c directly dispatch to the right PM.
In addition to have a clearer code, this also avoids a bit of duplicated
checks.
This is a refactoring, there is no behaviour change intended here.
Signed-off-by: Matthieu Baerts <[email protected]>
---
Geliang Tang (4):
mptcp: export local_address
mptcp: unify pm get_local_id interfaces
mptcp: unify pm get_flags_and_ifindex_by_id
mptcp: unify pm set_flags interfaces
net/mptcp/pm.c | 41 ++++++++++++++-
net/mptcp/pm_netlink.c | 132 ++++++++++++++++++++---------------------------
net/mptcp/pm_userspace.c | 3 --
net/mptcp/protocol.h | 9 +++-
4 files changed, 103 insertions(+), 82 deletions(-)
---
base-commit: 4a56212774acf71a7356026fb11b78228a7ad24d
change-id: 20230608-upstream-net-next-20230608-mptcp-unify-pm-interfaces-497ff5de464e
Best regards,
--
Matthieu Baerts <[email protected]>
From: Geliang Tang <[email protected]>
This patch unifies the three PM get_flags_and_ifindex_by_id() interfaces:
mptcp_pm_nl_get_flags_and_ifindex_by_id() in mptcp/pm_netlink.c for the
in-kernel PM and mptcp_userspace_pm_get_flags_and_ifindex_by_id() in
mptcp/pm_userspace.c for the userspace PM.
They'll be switched in the common PM infterface
mptcp_pm_get_flags_and_ifindex_by_id() in mptcp/pm.c based on whether
mptcp_pm_is_userspace() or not.
Signed-off-by: Geliang Tang <[email protected]>
Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
---
net/mptcp/pm.c | 14 ++++++++++++++
net/mptcp/pm_netlink.c | 27 ++++++++-------------------
net/mptcp/pm_userspace.c | 3 ---
net/mptcp/protocol.h | 2 ++
4 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index 5a027a46196c..2d04598dde05 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -419,6 +419,20 @@ int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
return mptcp_pm_nl_get_local_id(msk, &skc_local);
}
+int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id,
+ u8 *flags, int *ifindex)
+{
+ *flags = 0;
+ *ifindex = 0;
+
+ if (!id)
+ return 0;
+
+ if (mptcp_pm_is_userspace(msk))
+ return mptcp_userspace_pm_get_flags_and_ifindex_by_id(msk, id, flags, ifindex);
+ return mptcp_pm_nl_get_flags_and_ifindex_by_id(msk, id, flags, ifindex);
+}
+
void mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)
{
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 315ad669eb3c..e8b32d369f11 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -1356,31 +1356,20 @@ static int mptcp_nl_cmd_add_addr(struct sk_buff *skb, struct genl_info *info)
return ret;
}
-int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id,
- u8 *flags, int *ifindex)
+int mptcp_pm_nl_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id,
+ u8 *flags, int *ifindex)
{
struct mptcp_pm_addr_entry *entry;
struct sock *sk = (struct sock *)msk;
struct net *net = sock_net(sk);
- *flags = 0;
- *ifindex = 0;
-
- if (id) {
- if (mptcp_pm_is_userspace(msk))
- return mptcp_userspace_pm_get_flags_and_ifindex_by_id(msk,
- id,
- flags,
- ifindex);
-
- rcu_read_lock();
- entry = __lookup_addr_by_id(pm_nl_get_pernet(net), id);
- if (entry) {
- *flags = entry->flags;
- *ifindex = entry->ifindex;
- }
- rcu_read_unlock();
+ rcu_read_lock();
+ entry = __lookup_addr_by_id(pm_nl_get_pernet(net), id);
+ if (entry) {
+ *flags = entry->flags;
+ *ifindex = entry->ifindex;
}
+ rcu_read_unlock();
return 0;
}
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index 27a275805c06..e1df3a4a4f23 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -85,9 +85,6 @@ int mptcp_userspace_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk,
{
struct mptcp_pm_addr_entry *entry, *match = NULL;
- *flags = 0;
- *ifindex = 0;
-
spin_lock_bh(&msk->pm.lock);
list_for_each_entry(entry, &msk->pm.userspace_pm_local_addr_list, list) {
if (id == entry->addr.id) {
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 8a2e01d10582..607cbd2ccb98 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -822,6 +822,8 @@ mptcp_lookup_anno_list_by_saddr(const struct mptcp_sock *msk,
int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk,
unsigned int id,
u8 *flags, int *ifindex);
+int mptcp_pm_nl_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id,
+ u8 *flags, int *ifindex);
int mptcp_userspace_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk,
unsigned int id,
u8 *flags, int *ifindex);
--
2.40.1
From: Geliang Tang <[email protected]>
Rename local_address() with "mptcp_" prefix and export it in protocol.h.
This function will be re-used in the common PM code (pm.c) in the
following commit.
Signed-off-by: Geliang Tang <[email protected]>
Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
---
net/mptcp/pm_netlink.c | 17 ++++++++---------
net/mptcp/protocol.h | 1 +
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index bc343dab5e3f..c55ed3dda0d8 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -86,8 +86,7 @@ bool mptcp_addresses_equal(const struct mptcp_addr_info *a,
return a->port == b->port;
}
-static void local_address(const struct sock_common *skc,
- struct mptcp_addr_info *addr)
+void mptcp_local_address(const struct sock_common *skc, struct mptcp_addr_info *addr)
{
addr->family = skc->skc_family;
addr->port = htons(skc->skc_num);
@@ -122,7 +121,7 @@ static bool lookup_subflow_by_saddr(const struct list_head *list,
list_for_each_entry(subflow, list, node) {
skc = (struct sock_common *)mptcp_subflow_tcp_sock(subflow);
- local_address(skc, &cur);
+ mptcp_local_address(skc, &cur);
if (mptcp_addresses_equal(&cur, saddr, saddr->port))
return true;
}
@@ -263,7 +262,7 @@ bool mptcp_pm_sport_in_anno_list(struct mptcp_sock *msk, const struct sock *sk)
struct mptcp_addr_info saddr;
bool ret = false;
- local_address((struct sock_common *)sk, &saddr);
+ mptcp_local_address((struct sock_common *)sk, &saddr);
spin_lock_bh(&msk->pm.lock);
list_for_each_entry(entry, &msk->pm.anno_list, list) {
@@ -541,7 +540,7 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk)
struct mptcp_addr_info mpc_addr;
bool backup = false;
- local_address((struct sock_common *)msk->first, &mpc_addr);
+ mptcp_local_address((struct sock_common *)msk->first, &mpc_addr);
rcu_read_lock();
entry = __lookup_addr(pernet, &mpc_addr, false);
if (entry) {
@@ -752,7 +751,7 @@ int mptcp_pm_nl_mp_prio_send_ack(struct mptcp_sock *msk,
struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
struct mptcp_addr_info local, remote;
- local_address((struct sock_common *)ssk, &local);
+ mptcp_local_address((struct sock_common *)ssk, &local);
if (!mptcp_addresses_equal(&local, addr, addr->port))
continue;
@@ -1070,8 +1069,8 @@ int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
/* The 0 ID mapping is defined by the first subflow, copied into the msk
* addr
*/
- local_address((struct sock_common *)msk, &msk_local);
- local_address((struct sock_common *)skc, &skc_local);
+ mptcp_local_address((struct sock_common *)msk, &msk_local);
+ mptcp_local_address((struct sock_common *)skc, &skc_local);
if (mptcp_addresses_equal(&msk_local, &skc_local, false))
return 0;
@@ -1491,7 +1490,7 @@ static int mptcp_nl_remove_id_zero_address(struct net *net,
if (list_empty(&msk->conn_list) || mptcp_pm_is_userspace(msk))
goto next;
- local_address((struct sock_common *)msk, &msk_local);
+ mptcp_local_address((struct sock_common *)msk, &msk_local);
if (!mptcp_addresses_equal(&msk_local, addr, addr->port))
goto next;
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index c5255258bfb3..6e6cffc04ced 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -638,6 +638,7 @@ void mptcp_set_owner_r(struct sk_buff *skb, struct sock *sk);
bool mptcp_addresses_equal(const struct mptcp_addr_info *a,
const struct mptcp_addr_info *b, bool use_port);
+void mptcp_local_address(const struct sock_common *skc, struct mptcp_addr_info *addr);
/* called with sk socket lock held */
int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_addr_info *loc,
--
2.40.1
From: Geliang Tang <[email protected]>
This patch unifies the three PM get_local_id() interfaces:
mptcp_pm_nl_get_local_id() in mptcp/pm_netlink.c for the in-kernel PM and
mptcp_userspace_pm_get_local_id() in mptcp/pm_userspace.c for the
userspace PM.
They'll be switched in the common PM infterface mptcp_pm_get_local_id()
in mptcp/pm.c based on whether mptcp_pm_is_userspace() or not.
Also put together the declarations of these three functions in protocol.h.
Signed-off-by: Geliang Tang <[email protected]>
Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
---
net/mptcp/pm.c | 18 +++++++++++++++++-
net/mptcp/pm_netlink.c | 22 +++-------------------
net/mptcp/protocol.h | 2 +-
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index 7d03b5fd8200..5a027a46196c 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -400,7 +400,23 @@ bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
{
- return mptcp_pm_nl_get_local_id(msk, skc);
+ struct mptcp_addr_info skc_local;
+ struct mptcp_addr_info msk_local;
+
+ if (WARN_ON_ONCE(!msk))
+ return -1;
+
+ /* The 0 ID mapping is defined by the first subflow, copied into the msk
+ * addr
+ */
+ mptcp_local_address((struct sock_common *)msk, &msk_local);
+ mptcp_local_address((struct sock_common *)skc, &skc_local);
+ if (mptcp_addresses_equal(&msk_local, &skc_local, false))
+ return 0;
+
+ if (mptcp_pm_is_userspace(msk))
+ return mptcp_userspace_pm_get_local_id(msk, &skc_local);
+ return mptcp_pm_nl_get_local_id(msk, &skc_local);
}
void mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index c55ed3dda0d8..315ad669eb3c 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -1055,33 +1055,17 @@ static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
return 0;
}
-int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
+int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc)
{
struct mptcp_pm_addr_entry *entry;
- struct mptcp_addr_info skc_local;
- struct mptcp_addr_info msk_local;
struct pm_nl_pernet *pernet;
int ret = -1;
- if (WARN_ON_ONCE(!msk))
- return -1;
-
- /* The 0 ID mapping is defined by the first subflow, copied into the msk
- * addr
- */
- mptcp_local_address((struct sock_common *)msk, &msk_local);
- mptcp_local_address((struct sock_common *)skc, &skc_local);
- if (mptcp_addresses_equal(&msk_local, &skc_local, false))
- return 0;
-
- if (mptcp_pm_is_userspace(msk))
- return mptcp_userspace_pm_get_local_id(msk, &skc_local);
-
pernet = pm_nl_get_pernet_from_msk(msk);
rcu_read_lock();
list_for_each_entry_rcu(entry, &pernet->local_addr_list, list) {
- if (mptcp_addresses_equal(&entry->addr, &skc_local, entry->addr.port)) {
+ if (mptcp_addresses_equal(&entry->addr, skc, entry->addr.port)) {
ret = entry->addr.id;
break;
}
@@ -1095,7 +1079,7 @@ int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
if (!entry)
return -ENOMEM;
- entry->addr = skc_local;
+ entry->addr = *skc;
entry->addr.id = 0;
entry->addr.port = 0;
entry->ifindex = 0;
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 6e6cffc04ced..8a2e01d10582 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -916,13 +916,13 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, const struct sk_buff *skb,
bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
struct mptcp_rm_list *rm_list);
int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
+int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc);
int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc);
void __init mptcp_pm_nl_init(void);
void mptcp_pm_nl_work(struct mptcp_sock *msk);
void mptcp_pm_nl_rm_subflow_received(struct mptcp_sock *msk,
const struct mptcp_rm_list *rm_list);
-int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
unsigned int mptcp_pm_get_add_addr_signal_max(const struct mptcp_sock *msk);
unsigned int mptcp_pm_get_add_addr_accept_max(const struct mptcp_sock *msk);
unsigned int mptcp_pm_get_subflows_max(const struct mptcp_sock *msk);
--
2.40.1
From: Geliang Tang <[email protected]>
This patch unifies the three PM set_flags() interfaces:
mptcp_pm_nl_set_flags() in mptcp/pm_netlink.c for the in-kernel PM and
mptcp_userspace_pm_set_flags() in mptcp/pm_userspace.c for the
userspace PM.
They'll be switched in the common PM infterface mptcp_pm_set_flags() in
mptcp/pm.c based on whether token is NULL or not.
Signed-off-by: Geliang Tang <[email protected]>
Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
---
net/mptcp/pm.c | 9 +++++++
net/mptcp/pm_netlink.c | 70 +++++++++++++++++++++++++++-----------------------
net/mptcp/protocol.h | 4 +++
3 files changed, 51 insertions(+), 32 deletions(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index 2d04598dde05..36bf9196168b 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -433,6 +433,15 @@ int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id
return mptcp_pm_nl_get_flags_and_ifindex_by_id(msk, id, flags, ifindex);
}
+int mptcp_pm_set_flags(struct net *net, struct nlattr *token,
+ struct mptcp_pm_addr_entry *loc,
+ struct mptcp_pm_addr_entry *rem, u8 bkup)
+{
+ if (token)
+ return mptcp_userspace_pm_set_flags(net, token, loc, rem, bkup);
+ return mptcp_pm_nl_set_flags(net, loc, bkup);
+}
+
void mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)
{
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index e8b32d369f11..13be9205d36d 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -1864,18 +1864,50 @@ static int mptcp_nl_set_flags(struct net *net,
return ret;
}
+int mptcp_pm_nl_set_flags(struct net *net, struct mptcp_pm_addr_entry *addr, u8 bkup)
+{
+ struct pm_nl_pernet *pernet = pm_nl_get_pernet(net);
+ u8 changed, mask = MPTCP_PM_ADDR_FLAG_BACKUP |
+ MPTCP_PM_ADDR_FLAG_FULLMESH;
+ struct mptcp_pm_addr_entry *entry;
+ u8 lookup_by_id = 0;
+
+ if (addr->addr.family == AF_UNSPEC) {
+ lookup_by_id = 1;
+ if (!addr->addr.id)
+ return -EOPNOTSUPP;
+ }
+
+ spin_lock_bh(&pernet->lock);
+ entry = __lookup_addr(pernet, &addr->addr, lookup_by_id);
+ if (!entry) {
+ spin_unlock_bh(&pernet->lock);
+ return -EINVAL;
+ }
+ if ((addr->flags & MPTCP_PM_ADDR_FLAG_FULLMESH) &&
+ (entry->flags & MPTCP_PM_ADDR_FLAG_SIGNAL)) {
+ spin_unlock_bh(&pernet->lock);
+ return -EINVAL;
+ }
+
+ changed = (addr->flags ^ entry->flags) & mask;
+ entry->flags = (entry->flags & ~mask) | (addr->flags & mask);
+ *addr = *entry;
+ spin_unlock_bh(&pernet->lock);
+
+ mptcp_nl_set_flags(net, &addr->addr, bkup, changed);
+ return 0;
+}
+
static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info)
{
- struct mptcp_pm_addr_entry addr = { .addr = { .family = AF_UNSPEC }, }, *entry;
struct mptcp_pm_addr_entry remote = { .addr = { .family = AF_UNSPEC }, };
+ struct mptcp_pm_addr_entry addr = { .addr = { .family = AF_UNSPEC }, };
struct nlattr *attr_rem = info->attrs[MPTCP_PM_ATTR_ADDR_REMOTE];
struct nlattr *token = info->attrs[MPTCP_PM_ATTR_TOKEN];
struct nlattr *attr = info->attrs[MPTCP_PM_ATTR_ADDR];
- struct pm_nl_pernet *pernet = genl_info_pm_nl(info);
- u8 changed, mask = MPTCP_PM_ADDR_FLAG_BACKUP |
- MPTCP_PM_ADDR_FLAG_FULLMESH;
struct net *net = sock_net(skb->sk);
- u8 bkup = 0, lookup_by_id = 0;
+ u8 bkup = 0;
int ret;
ret = mptcp_pm_parse_entry(attr, info, false, &addr);
@@ -1890,34 +1922,8 @@ static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info)
if (addr.flags & MPTCP_PM_ADDR_FLAG_BACKUP)
bkup = 1;
- if (addr.addr.family == AF_UNSPEC) {
- lookup_by_id = 1;
- if (!addr.addr.id)
- return -EOPNOTSUPP;
- }
- if (token)
- return mptcp_userspace_pm_set_flags(net, token, &addr, &remote, bkup);
-
- spin_lock_bh(&pernet->lock);
- entry = __lookup_addr(pernet, &addr.addr, lookup_by_id);
- if (!entry) {
- spin_unlock_bh(&pernet->lock);
- return -EINVAL;
- }
- if ((addr.flags & MPTCP_PM_ADDR_FLAG_FULLMESH) &&
- (entry->flags & MPTCP_PM_ADDR_FLAG_SIGNAL)) {
- spin_unlock_bh(&pernet->lock);
- return -EINVAL;
- }
-
- changed = (addr.flags ^ entry->flags) & mask;
- entry->flags = (entry->flags & ~mask) | (addr.flags & mask);
- addr = *entry;
- spin_unlock_bh(&pernet->lock);
-
- mptcp_nl_set_flags(net, &addr.addr, bkup, changed);
- return 0;
+ return mptcp_pm_set_flags(net, token, &addr, &remote, bkup);
}
static void mptcp_nl_mcast_send(struct net *net, struct sk_buff *nlskb, gfp_t gfp)
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 607cbd2ccb98..1e7465bb66d5 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -827,6 +827,10 @@ int mptcp_pm_nl_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int
int mptcp_userspace_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk,
unsigned int id,
u8 *flags, int *ifindex);
+int mptcp_pm_set_flags(struct net *net, struct nlattr *token,
+ struct mptcp_pm_addr_entry *loc,
+ struct mptcp_pm_addr_entry *rem, u8 bkup);
+int mptcp_pm_nl_set_flags(struct net *net, struct mptcp_pm_addr_entry *addr, u8 bkup);
int mptcp_userspace_pm_set_flags(struct net *net, struct nlattr *token,
struct mptcp_pm_addr_entry *loc,
struct mptcp_pm_addr_entry *rem, u8 bkup);
--
2.40.1
On Thu, Jun 08, 2023 at 03:20:49PM +0200, Matthieu Baerts wrote:
> From: Geliang Tang <[email protected]>
>
> Rename local_address() with "mptcp_" prefix and export it in protocol.h.
>
> This function will be re-used in the common PM code (pm.c) in the
> following commit.
>
> Signed-off-by: Geliang Tang <[email protected]>
> Reviewed-by: Matthieu Baerts <[email protected]>
> Signed-off-by: Matthieu Baerts <[email protected]>
Checkpatch on patchwork complains about line length exceeding 80 columns.
But from what I see, changed files do not comply anyway.
Reviewed-by: Larysa Zaremba <[email protected]>
> ---
> net/mptcp/pm_netlink.c | 17 ++++++++---------
> net/mptcp/protocol.h | 1 +
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index bc343dab5e3f..c55ed3dda0d8 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -86,8 +86,7 @@ bool mptcp_addresses_equal(const struct mptcp_addr_info *a,
> return a->port == b->port;
> }
>
> -static void local_address(const struct sock_common *skc,
> - struct mptcp_addr_info *addr)
> +void mptcp_local_address(const struct sock_common *skc, struct mptcp_addr_info *addr)
> {
> addr->family = skc->skc_family;
> addr->port = htons(skc->skc_num);
> @@ -122,7 +121,7 @@ static bool lookup_subflow_by_saddr(const struct list_head *list,
> list_for_each_entry(subflow, list, node) {
> skc = (struct sock_common *)mptcp_subflow_tcp_sock(subflow);
>
> - local_address(skc, &cur);
> + mptcp_local_address(skc, &cur);
> if (mptcp_addresses_equal(&cur, saddr, saddr->port))
> return true;
> }
> @@ -263,7 +262,7 @@ bool mptcp_pm_sport_in_anno_list(struct mptcp_sock *msk, const struct sock *sk)
> struct mptcp_addr_info saddr;
> bool ret = false;
>
> - local_address((struct sock_common *)sk, &saddr);
> + mptcp_local_address((struct sock_common *)sk, &saddr);
>
> spin_lock_bh(&msk->pm.lock);
> list_for_each_entry(entry, &msk->pm.anno_list, list) {
> @@ -541,7 +540,7 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk)
> struct mptcp_addr_info mpc_addr;
> bool backup = false;
>
> - local_address((struct sock_common *)msk->first, &mpc_addr);
> + mptcp_local_address((struct sock_common *)msk->first, &mpc_addr);
> rcu_read_lock();
> entry = __lookup_addr(pernet, &mpc_addr, false);
> if (entry) {
> @@ -752,7 +751,7 @@ int mptcp_pm_nl_mp_prio_send_ack(struct mptcp_sock *msk,
> struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
> struct mptcp_addr_info local, remote;
>
> - local_address((struct sock_common *)ssk, &local);
> + mptcp_local_address((struct sock_common *)ssk, &local);
> if (!mptcp_addresses_equal(&local, addr, addr->port))
> continue;
>
> @@ -1070,8 +1069,8 @@ int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
> /* The 0 ID mapping is defined by the first subflow, copied into the msk
> * addr
> */
> - local_address((struct sock_common *)msk, &msk_local);
> - local_address((struct sock_common *)skc, &skc_local);
> + mptcp_local_address((struct sock_common *)msk, &msk_local);
> + mptcp_local_address((struct sock_common *)skc, &skc_local);
> if (mptcp_addresses_equal(&msk_local, &skc_local, false))
> return 0;
>
> @@ -1491,7 +1490,7 @@ static int mptcp_nl_remove_id_zero_address(struct net *net,
> if (list_empty(&msk->conn_list) || mptcp_pm_is_userspace(msk))
> goto next;
>
> - local_address((struct sock_common *)msk, &msk_local);
> + mptcp_local_address((struct sock_common *)msk, &msk_local);
> if (!mptcp_addresses_equal(&msk_local, addr, addr->port))
> goto next;
>
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index c5255258bfb3..6e6cffc04ced 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -638,6 +638,7 @@ void mptcp_set_owner_r(struct sk_buff *skb, struct sock *sk);
>
> bool mptcp_addresses_equal(const struct mptcp_addr_info *a,
> const struct mptcp_addr_info *b, bool use_port);
> +void mptcp_local_address(const struct sock_common *skc, struct mptcp_addr_info *addr);
>
> /* called with sk socket lock held */
> int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_addr_info *loc,
>
> --
> 2.40.1
>
>
On Thu, Jun 08, 2023 at 03:20:50PM +0200, Matthieu Baerts wrote:
> From: Geliang Tang <[email protected]>
>
> This patch unifies the three PM get_local_id() interfaces:
>
> mptcp_pm_nl_get_local_id() in mptcp/pm_netlink.c for the in-kernel PM and
> mptcp_userspace_pm_get_local_id() in mptcp/pm_userspace.c for the
> userspace PM.
>
> They'll be switched in the common PM infterface mptcp_pm_get_local_id()
> in mptcp/pm.c based on whether mptcp_pm_is_userspace() or not.
>
> Also put together the declarations of these three functions in protocol.h.
>
> Signed-off-by: Geliang Tang <[email protected]>
> Reviewed-by: Matthieu Baerts <[email protected]>
> Signed-off-by: Matthieu Baerts <[email protected]>
Reviewed-by: Larysa Zaremba <[email protected]>
> ---
> net/mptcp/pm.c | 18 +++++++++++++++++-
> net/mptcp/pm_netlink.c | 22 +++-------------------
> net/mptcp/protocol.h | 2 +-
> 3 files changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
> index 7d03b5fd8200..5a027a46196c 100644
> --- a/net/mptcp/pm.c
> +++ b/net/mptcp/pm.c
> @@ -400,7 +400,23 @@ bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
>
> int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
> {
> - return mptcp_pm_nl_get_local_id(msk, skc);
> + struct mptcp_addr_info skc_local;
> + struct mptcp_addr_info msk_local;
> +
> + if (WARN_ON_ONCE(!msk))
> + return -1;
> +
> + /* The 0 ID mapping is defined by the first subflow, copied into the msk
> + * addr
> + */
> + mptcp_local_address((struct sock_common *)msk, &msk_local);
> + mptcp_local_address((struct sock_common *)skc, &skc_local);
> + if (mptcp_addresses_equal(&msk_local, &skc_local, false))
> + return 0;
> +
> + if (mptcp_pm_is_userspace(msk))
> + return mptcp_userspace_pm_get_local_id(msk, &skc_local);
> + return mptcp_pm_nl_get_local_id(msk, &skc_local);
> }
>
> void mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index c55ed3dda0d8..315ad669eb3c 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -1055,33 +1055,17 @@ static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
> return 0;
> }
>
> -int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
> +int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc)
> {
> struct mptcp_pm_addr_entry *entry;
> - struct mptcp_addr_info skc_local;
> - struct mptcp_addr_info msk_local;
> struct pm_nl_pernet *pernet;
> int ret = -1;
>
> - if (WARN_ON_ONCE(!msk))
> - return -1;
> -
> - /* The 0 ID mapping is defined by the first subflow, copied into the msk
> - * addr
> - */
> - mptcp_local_address((struct sock_common *)msk, &msk_local);
> - mptcp_local_address((struct sock_common *)skc, &skc_local);
> - if (mptcp_addresses_equal(&msk_local, &skc_local, false))
> - return 0;
> -
> - if (mptcp_pm_is_userspace(msk))
> - return mptcp_userspace_pm_get_local_id(msk, &skc_local);
> -
> pernet = pm_nl_get_pernet_from_msk(msk);
>
> rcu_read_lock();
> list_for_each_entry_rcu(entry, &pernet->local_addr_list, list) {
> - if (mptcp_addresses_equal(&entry->addr, &skc_local, entry->addr.port)) {
> + if (mptcp_addresses_equal(&entry->addr, skc, entry->addr.port)) {
> ret = entry->addr.id;
> break;
> }
> @@ -1095,7 +1079,7 @@ int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
> if (!entry)
> return -ENOMEM;
>
> - entry->addr = skc_local;
> + entry->addr = *skc;
> entry->addr.id = 0;
> entry->addr.port = 0;
> entry->ifindex = 0;
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 6e6cffc04ced..8a2e01d10582 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -916,13 +916,13 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, const struct sk_buff *skb,
> bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
> struct mptcp_rm_list *rm_list);
> int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
> +int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc);
> int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc);
>
> void __init mptcp_pm_nl_init(void);
> void mptcp_pm_nl_work(struct mptcp_sock *msk);
> void mptcp_pm_nl_rm_subflow_received(struct mptcp_sock *msk,
> const struct mptcp_rm_list *rm_list);
> -int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
> unsigned int mptcp_pm_get_add_addr_signal_max(const struct mptcp_sock *msk);
> unsigned int mptcp_pm_get_add_addr_accept_max(const struct mptcp_sock *msk);
> unsigned int mptcp_pm_get_subflows_max(const struct mptcp_sock *msk);
>
> --
> 2.40.1
>
>
On Thu, Jun 08, 2023 at 03:20:51PM +0200, Matthieu Baerts wrote:
> From: Geliang Tang <[email protected]>
>
> This patch unifies the three PM get_flags_and_ifindex_by_id() interfaces:
>
> mptcp_pm_nl_get_flags_and_ifindex_by_id() in mptcp/pm_netlink.c for the
> in-kernel PM and mptcp_userspace_pm_get_flags_and_ifindex_by_id() in
> mptcp/pm_userspace.c for the userspace PM.
>
> They'll be switched in the common PM infterface
> mptcp_pm_get_flags_and_ifindex_by_id() in mptcp/pm.c based on whether
> mptcp_pm_is_userspace() or not.
>
> Signed-off-by: Geliang Tang <[email protected]>
> Reviewed-by: Matthieu Baerts <[email protected]>
> Signed-off-by: Matthieu Baerts <[email protected]>
Reviewed-by: Larysa Zaremba <[email protected]>
> ---
> net/mptcp/pm.c | 14 ++++++++++++++
> net/mptcp/pm_netlink.c | 27 ++++++++-------------------
> net/mptcp/pm_userspace.c | 3 ---
> net/mptcp/protocol.h | 2 ++
> 4 files changed, 24 insertions(+), 22 deletions(-)
>
> diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
> index 5a027a46196c..2d04598dde05 100644
> --- a/net/mptcp/pm.c
> +++ b/net/mptcp/pm.c
> @@ -419,6 +419,20 @@ int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc)
> return mptcp_pm_nl_get_local_id(msk, &skc_local);
> }
>
> +int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id,
> + u8 *flags, int *ifindex)
> +{
> + *flags = 0;
> + *ifindex = 0;
> +
> + if (!id)
> + return 0;
> +
> + if (mptcp_pm_is_userspace(msk))
> + return mptcp_userspace_pm_get_flags_and_ifindex_by_id(msk, id, flags, ifindex);
> + return mptcp_pm_nl_get_flags_and_ifindex_by_id(msk, id, flags, ifindex);
> +}
> +
> void mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)
> {
> struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index 315ad669eb3c..e8b32d369f11 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -1356,31 +1356,20 @@ static int mptcp_nl_cmd_add_addr(struct sk_buff *skb, struct genl_info *info)
> return ret;
> }
>
> -int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id,
> - u8 *flags, int *ifindex)
> +int mptcp_pm_nl_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id,
> + u8 *flags, int *ifindex)
> {
> struct mptcp_pm_addr_entry *entry;
> struct sock *sk = (struct sock *)msk;
> struct net *net = sock_net(sk);
>
> - *flags = 0;
> - *ifindex = 0;
> -
> - if (id) {
> - if (mptcp_pm_is_userspace(msk))
> - return mptcp_userspace_pm_get_flags_and_ifindex_by_id(msk,
> - id,
> - flags,
> - ifindex);
> -
> - rcu_read_lock();
> - entry = __lookup_addr_by_id(pm_nl_get_pernet(net), id);
> - if (entry) {
> - *flags = entry->flags;
> - *ifindex = entry->ifindex;
> - }
> - rcu_read_unlock();
> + rcu_read_lock();
> + entry = __lookup_addr_by_id(pm_nl_get_pernet(net), id);
> + if (entry) {
> + *flags = entry->flags;
> + *ifindex = entry->ifindex;
> }
> + rcu_read_unlock();
>
> return 0;
> }
> diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
> index 27a275805c06..e1df3a4a4f23 100644
> --- a/net/mptcp/pm_userspace.c
> +++ b/net/mptcp/pm_userspace.c
> @@ -85,9 +85,6 @@ int mptcp_userspace_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk,
> {
> struct mptcp_pm_addr_entry *entry, *match = NULL;
>
> - *flags = 0;
> - *ifindex = 0;
> -
> spin_lock_bh(&msk->pm.lock);
> list_for_each_entry(entry, &msk->pm.userspace_pm_local_addr_list, list) {
> if (id == entry->addr.id) {
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 8a2e01d10582..607cbd2ccb98 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -822,6 +822,8 @@ mptcp_lookup_anno_list_by_saddr(const struct mptcp_sock *msk,
> int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk,
> unsigned int id,
> u8 *flags, int *ifindex);
> +int mptcp_pm_nl_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id,
> + u8 *flags, int *ifindex);
> int mptcp_userspace_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk,
> unsigned int id,
> u8 *flags, int *ifindex);
>
> --
> 2.40.1
>
>
On Thu, Jun 08, 2023 at 03:20:52PM +0200, Matthieu Baerts wrote:
> From: Geliang Tang <[email protected]>
>
> This patch unifies the three PM set_flags() interfaces:
>
> mptcp_pm_nl_set_flags() in mptcp/pm_netlink.c for the in-kernel PM and
> mptcp_userspace_pm_set_flags() in mptcp/pm_userspace.c for the
> userspace PM.
>
> They'll be switched in the common PM infterface mptcp_pm_set_flags() in
> mptcp/pm.c based on whether token is NULL or not.
>
> Signed-off-by: Geliang Tang <[email protected]>
> Reviewed-by: Matthieu Baerts <[email protected]>
> Signed-off-by: Matthieu Baerts <[email protected]>
Reviewed-by: Larysa Zaremba <[email protected]>
> ---
> net/mptcp/pm.c | 9 +++++++
> net/mptcp/pm_netlink.c | 70 +++++++++++++++++++++++++++-----------------------
> net/mptcp/protocol.h | 4 +++
> 3 files changed, 51 insertions(+), 32 deletions(-)
>
> diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
> index 2d04598dde05..36bf9196168b 100644
> --- a/net/mptcp/pm.c
> +++ b/net/mptcp/pm.c
> @@ -433,6 +433,15 @@ int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id
> return mptcp_pm_nl_get_flags_and_ifindex_by_id(msk, id, flags, ifindex);
> }
>
> +int mptcp_pm_set_flags(struct net *net, struct nlattr *token,
> + struct mptcp_pm_addr_entry *loc,
> + struct mptcp_pm_addr_entry *rem, u8 bkup)
> +{
> + if (token)
> + return mptcp_userspace_pm_set_flags(net, token, loc, rem, bkup);
> + return mptcp_pm_nl_set_flags(net, loc, bkup);
> +}
> +
> void mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)
> {
> struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index e8b32d369f11..13be9205d36d 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -1864,18 +1864,50 @@ static int mptcp_nl_set_flags(struct net *net,
> return ret;
> }
>
> +int mptcp_pm_nl_set_flags(struct net *net, struct mptcp_pm_addr_entry *addr, u8 bkup)
> +{
> + struct pm_nl_pernet *pernet = pm_nl_get_pernet(net);
> + u8 changed, mask = MPTCP_PM_ADDR_FLAG_BACKUP |
> + MPTCP_PM_ADDR_FLAG_FULLMESH;
> + struct mptcp_pm_addr_entry *entry;
> + u8 lookup_by_id = 0;
> +
> + if (addr->addr.family == AF_UNSPEC) {
> + lookup_by_id = 1;
> + if (!addr->addr.id)
> + return -EOPNOTSUPP;
> + }
> +
> + spin_lock_bh(&pernet->lock);
> + entry = __lookup_addr(pernet, &addr->addr, lookup_by_id);
> + if (!entry) {
> + spin_unlock_bh(&pernet->lock);
> + return -EINVAL;
> + }
> + if ((addr->flags & MPTCP_PM_ADDR_FLAG_FULLMESH) &&
> + (entry->flags & MPTCP_PM_ADDR_FLAG_SIGNAL)) {
> + spin_unlock_bh(&pernet->lock);
> + return -EINVAL;
> + }
> +
> + changed = (addr->flags ^ entry->flags) & mask;
> + entry->flags = (entry->flags & ~mask) | (addr->flags & mask);
> + *addr = *entry;
> + spin_unlock_bh(&pernet->lock);
> +
> + mptcp_nl_set_flags(net, &addr->addr, bkup, changed);
> + return 0;
> +}
> +
> static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info)
> {
> - struct mptcp_pm_addr_entry addr = { .addr = { .family = AF_UNSPEC }, }, *entry;
> struct mptcp_pm_addr_entry remote = { .addr = { .family = AF_UNSPEC }, };
> + struct mptcp_pm_addr_entry addr = { .addr = { .family = AF_UNSPEC }, };
> struct nlattr *attr_rem = info->attrs[MPTCP_PM_ATTR_ADDR_REMOTE];
> struct nlattr *token = info->attrs[MPTCP_PM_ATTR_TOKEN];
> struct nlattr *attr = info->attrs[MPTCP_PM_ATTR_ADDR];
> - struct pm_nl_pernet *pernet = genl_info_pm_nl(info);
> - u8 changed, mask = MPTCP_PM_ADDR_FLAG_BACKUP |
> - MPTCP_PM_ADDR_FLAG_FULLMESH;
> struct net *net = sock_net(skb->sk);
> - u8 bkup = 0, lookup_by_id = 0;
> + u8 bkup = 0;
> int ret;
>
> ret = mptcp_pm_parse_entry(attr, info, false, &addr);
> @@ -1890,34 +1922,8 @@ static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info)
>
> if (addr.flags & MPTCP_PM_ADDR_FLAG_BACKUP)
> bkup = 1;
> - if (addr.addr.family == AF_UNSPEC) {
> - lookup_by_id = 1;
> - if (!addr.addr.id)
> - return -EOPNOTSUPP;
> - }
>
> - if (token)
> - return mptcp_userspace_pm_set_flags(net, token, &addr, &remote, bkup);
> -
> - spin_lock_bh(&pernet->lock);
> - entry = __lookup_addr(pernet, &addr.addr, lookup_by_id);
> - if (!entry) {
> - spin_unlock_bh(&pernet->lock);
> - return -EINVAL;
> - }
> - if ((addr.flags & MPTCP_PM_ADDR_FLAG_FULLMESH) &&
> - (entry->flags & MPTCP_PM_ADDR_FLAG_SIGNAL)) {
> - spin_unlock_bh(&pernet->lock);
> - return -EINVAL;
> - }
> -
> - changed = (addr.flags ^ entry->flags) & mask;
> - entry->flags = (entry->flags & ~mask) | (addr.flags & mask);
> - addr = *entry;
> - spin_unlock_bh(&pernet->lock);
> -
> - mptcp_nl_set_flags(net, &addr.addr, bkup, changed);
> - return 0;
> + return mptcp_pm_set_flags(net, token, &addr, &remote, bkup);
> }
>
> static void mptcp_nl_mcast_send(struct net *net, struct sk_buff *nlskb, gfp_t gfp)
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 607cbd2ccb98..1e7465bb66d5 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -827,6 +827,10 @@ int mptcp_pm_nl_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int
> int mptcp_userspace_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk,
> unsigned int id,
> u8 *flags, int *ifindex);
> +int mptcp_pm_set_flags(struct net *net, struct nlattr *token,
> + struct mptcp_pm_addr_entry *loc,
> + struct mptcp_pm_addr_entry *rem, u8 bkup);
> +int mptcp_pm_nl_set_flags(struct net *net, struct mptcp_pm_addr_entry *addr, u8 bkup);
> int mptcp_userspace_pm_set_flags(struct net *net, struct nlattr *token,
> struct mptcp_pm_addr_entry *loc,
> struct mptcp_pm_addr_entry *rem, u8 bkup);
>
> --
> 2.40.1
>
>
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <[email protected]>:
On Thu, 08 Jun 2023 15:20:48 +0200 you wrote:
> These patches from Geliang better isolate the two MPTCP path-managers by
> avoiding calling userspace PM functions from the in-kernel PM. Instead,
> new functions declared in pm.c directly dispatch to the right PM.
>
> In addition to have a clearer code, this also avoids a bit of duplicated
> checks.
>
> [...]
Here is the summary with links:
- [net-next,1/4] mptcp: export local_address
https://git.kernel.org/netdev/net-next/c/dc886bce753c
- [net-next,2/4] mptcp: unify pm get_local_id interfaces
https://git.kernel.org/netdev/net-next/c/9bbec87ecfe8
- [net-next,3/4] mptcp: unify pm get_flags_and_ifindex_by_id
https://git.kernel.org/netdev/net-next/c/f40be0db0b76
- [net-next,4/4] mptcp: unify pm set_flags interfaces
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html