From: Mat Martineau <mathew.j.martineau at linux.intel.com>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [MPTCP][PATCH v9 mptcp-next 1/9] mptcp: create the listening socket for new port
Date: Mon, 11 Jan 2021 15:47:37 -0800 [thread overview]
Message-ID: <b9ea178a-d973-38b2-56bf-7fdb27c7478d@linux.intel.com> (raw)
In-Reply-To: CA+WQbwvmAxA9sf-tsnMifb1CTrQrz7HVD_KAMbft1Rn2rS+tbA@mail.gmail.com
[-- Attachment #1: Type: text/plain, Size: 2337 bytes --]
On Sat, 9 Jan 2021, Geliang Tang wrote:
> Hi Mat,
>
> Mat Martineau <mathew.j.martineau(a)linux.intel.com> 于2021年1月9日周六 上午6:56写道:
>>
>> On Tue, 5 Jan 2021, Geliang Tang wrote:
>>
>>> This patch created a listening socket when an address with a port-number
>>> is added by PM netlink. Then binded the new port to the socket, and
>>> listened for the connection.
>>>
>>> When the address is removed or the addresses are flushed by PM netlink,
>>> release the listening socket.
>>>
>>> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
>>> ---
>>> net/mptcp/pm_netlink.c | 96 +++++++++++++++++++++++++++++++++++++++++-
>>> net/mptcp/protocol.c | 2 +-
>>> net/mptcp/protocol.h | 4 ++
>>> net/mptcp/subflow.c | 6 +--
>>> 4 files changed, 102 insertions(+), 6 deletions(-)
...
>>>
>>> @@ -972,6 +1032,38 @@ static int mptcp_nl_remove_subflow_and_signal_addr(struct net *net,
>>> return 0;
>>> }
>>>
>>> +struct addr_entry_release_work {
>>> + struct rcu_work rwork;
>>> + struct mptcp_pm_addr_entry *entry;
>>> +};
>>> +
>>> +static void mptcp_pm_release_addr_entry(struct work_struct *work)
>>> +{
>>> + struct addr_entry_release_work *w;
>>> + struct mptcp_pm_addr_entry *entry;
>>> +
>>> + w = container_of(to_rcu_work(work), struct addr_entry_release_work, rwork);
>>> + entry = w->entry;
>>> + if (entry) {
>>> + if (entry->lsk)
>>> + sock_release(entry->lsk);
>>> + kfree(entry);
>>> + }
>>> + kfree(w);
>>> +}
>>> +
>>> +static void mptcp_pm_free_addr_entry(struct mptcp_pm_addr_entry *entry)
>>> +{
>>> + struct addr_entry_release_work *w;
>>> +
>>> + w = kmalloc(sizeof(*w), GFP_ATOMIC);
>>> + if (w) {
>>> + INIT_RCU_WORK((struct rcu_work *)w, mptcp_pm_release_addr_entry);
>>> + w->entry = entry;
>>> + queue_rcu_work(system_wq, (struct rcu_work *)w);
>>
>> Rather than casting the second arg, please use &w->rwork
>>
>
> May I send a squash-to patch to fix this?
>
Hi Geliang -
Since I'm asking for a rebased version of this series anyway (to get rid
of all the 'git am' conflicts in the pending patch sets), please include
this change in v10.
Thanks,
--
Mat Martineau
Intel
next reply other threads:[~2021-01-11 23:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 23:47 Mat Martineau [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-01-09 2:09 [MPTCP] Re: [MPTCP][PATCH v9 mptcp-next 1/9] mptcp: create the listening socket for new port Geliang Tang
2021-01-08 22:56 Mat Martineau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9ea178a-d973-38b2-56bf-7fdb27c7478d@linux.intel.com \
--to=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox