Message ID | 20191105052624.3269-1-peter.krystad@linux.intel.com |
---|---|
State | Accepted, archived |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | mptcp: Use sk_family field in the mptcp_sock for address family. | expand |
On Mon, 2019-11-04 at 21:26 -0800, Peter Krystad wrote: > It was not necessary to add a family field to mptcp_sock as it is > a wrapper around a struct sock, and sk_family is set correctly when > the msk is created as a result of a socket() call. > > squashto: Associate MPTCP context with TCP socket > mptcp: Implement basic path manager > > Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com> LGTM, nice cleanup, thanks! It's unclear to me if I should update patchwork status, too ("Under review"? would that help?) Paolo
On Tue, 5 Nov 2019, Paolo Abeni wrote: > On Mon, 2019-11-04 at 21:26 -0800, Peter Krystad wrote: >> It was not necessary to add a family field to mptcp_sock as it is >> a wrapper around a struct sock, and sk_family is set correctly when >> the msk is created as a result of a socket() call. >> >> squashto: Associate MPTCP context with TCP socket >> mptcp: Implement basic path manager >> >> Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com> > > LGTM, nice cleanup, thanks! > > It's unclear to me if I should update patchwork status, too ("Under > review"? would that help?) > Looks good to me, too. For handling patchwork status, I went to the upcoming meeting page to create a proposal - and found that Matthieu has already done it :) -- Mat Martineau Intel
Hi Peter, Paolo, Mat, On 05/11/2019 22:57, Mat Martineau wrote: > > On Tue, 5 Nov 2019, Paolo Abeni wrote: > >> On Mon, 2019-11-04 at 21:26 -0800, Peter Krystad wrote: >>> It was not necessary to add a family field to mptcp_sock as it is >>> a wrapper around a struct sock, and sk_family is set correctly when >>> the msk is created as a result of a socket() call. >>> >>> squashto: Associate MPTCP context with TCP socket >>> mptcp: Implement basic path manager >>> >>> Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com> >> >> LGTM, nice cleanup, thanks! >> >> It's unclear to me if I should update patchwork status, too ("Under >> review"? would that help?) >> > > Looks good to me, too. Thank you for the patch and the review! - 7c4096766c23: "squashed" part 1 in "mptcp: Associate MPTCP context with TCP socket" - already has the signed-off - f9b323be35cf: conflict in t/mptcp-Handle-MP_CAPABLE-options-for-outgoing-connections - ad05f6b594bc: conflict in t/mptcp-Add-key-generation-and-token-tree - 94ddaeb75bd3: conflict in t/mptcp-Implement-MPTCP-receive-path - d1db9d0195b3: conflict in t/mptcp-Add-handling-of-outgoing-MP_JOIN-requests - 55b5be5a8eea: conflict in t/mptcp-implement-and-use-MPTCP-level-retransmission - b8de8670bd8c: "squashed" part 2 in "mptcp: Implement basic path manager" - 3b6112deb337..1b8d767c5872: result > For handling patchwork status, I went to the upcoming meeting page to > create a proposal - and found that Matthieu has already done it :) :) Yes we can talk about that tomorrow. I will apply the other patches tomorrow. Cheers, Matt
diff --git a/net/mptcp/basic.c b/net/mptcp/basic.c index 67a93aff500e..03afb1263f3d 100644 --- a/net/mptcp/basic.c +++ b/net/mptcp/basic.c @@ -185,6 +185,7 @@ static void announce_addr_worker(struct work_struct *work) struct mptcp_pm_data *pm = container_of(work, struct mptcp_pm_data, addr_work); struct mptcp_sock *msk = container_of(pm, struct mptcp_sock, pm); + struct sock *sk = (struct sock *)msk; struct basic_pernet *pernet; pernet = net_generic(sock_net((struct sock *)msk), basic_pernet_id); @@ -193,11 +194,11 @@ static void announce_addr_worker(struct work_struct *work) * When the listening socket can accept connections from both * families this restriction may be removed. */ - if (pernet->has_announce_v4 && msk->family == AF_INET) + if (pernet->has_announce_v4 && sk->sk_family == AF_INET) mptcp_pm_announce_addr(pm->token, 1, &pernet->announce_v4_addr); #if IS_ENABLED(CONFIG_IPV6) - else if (pernet->has_announce_v6 && msk->family == AF_INET6) + else if (pernet->has_announce_v6 && sk->sk_family == AF_INET6) mptcp_pm_announce_addr6(pm->token, 1, &pernet->announce_v6_addr); #endif diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 3af5f121af9e..c2b29f8d0377 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1091,7 +1091,6 @@ static struct socket *mptcp_socket_create_get(struct mptcp_sock *msk) } msk->subflow = ssock; - msk->family = ssock->sk->sk_family; subflow = mptcp_subflow_ctx(msk->subflow->sk); subflow->request_mptcp = 1; /* @@ if MPTCP enabled */ subflow->request_version = 0; /* currently only v0 supported */ diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 8fe5f9383d38..791f2c19cfb8 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -133,7 +133,6 @@ struct mptcp_sock { u32 token; unsigned long flags; u16 dport; - sa_family_t family; struct work_struct rtx_work; struct list_head conn_list; struct list_head rtx_queue;
It was not necessary to add a family field to mptcp_sock as it is a wrapper around a struct sock, and sk_family is set correctly when the msk is created as a result of a socket() call. squashto: Associate MPTCP context with TCP socket mptcp: Implement basic path manager Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com> --- net/mptcp/basic.c | 5 +++-- net/mptcp/protocol.c | 1 - net/mptcp/protocol.h | 1 - 3 files changed, 3 insertions(+), 4 deletions(-)