All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] Re: [MPTCP][RFC PATCH mptcp-next 4/6] mptcp: send out MP_PRIO before RM_ADDR
@ 2020-11-10  2:07 Mat Martineau
  0 siblings, 0 replies; 3+ messages in thread
From: Mat Martineau @ 2020-11-10  2:07 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1804 bytes --]

On Thu, 5 Nov 2020, Geliang Tang wrote:

> Before sending the RM_ADDR suboption, we also send the MP_PRIO suboption
> to change the related subflow's priority as backup. So here invoke
> mptcp_pm_mp_prio_send_ack from mptcp_pm_remove_anno_addr to send the
> MP_PRIO suboption and check whether the subflow's backup value is changed.
>

Geliang,

I also think this patch is not needed. The part of RFC 8684 that mentions 
using the backup flag before a close is assuming a much longer period of 
time between the ACK that changes priority and the REMOVE_ADDR. It will be 
up to the path manager to coordinate the timing on that.


Thanks,

Mat


> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> ---
> net/mptcp/pm_netlink.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index a243017c4892..f80ebd4f6a29 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -491,6 +491,7 @@ void mptcp_pm_nl_rm_addr_received(struct mptcp_sock *msk)
> 		if (msk->pm.rm_id != subflow->remote_id)
> 			continue;
>
> +		WARN_ON_ONCE(!subflow->backup);
> 		spin_unlock_bh(&msk->pm.lock);
> 		mptcp_subflow_shutdown(sk, ssk, how);
> 		__mptcp_close_ssk(sk, ssk, subflow);
> @@ -830,6 +831,7 @@ static bool mptcp_pm_remove_anno_addr(struct mptcp_sock *msk,
> 	ret = remove_anno_list_by_saddr(msk, addr);
> 	if (ret || force) {
> 		spin_lock_bh(&msk->pm.lock);
> +		mptcp_pm_mp_prio_send_ack(msk, addr, 1);
> 		mptcp_pm_remove_addr(msk, addr->id);
> 		spin_unlock_bh(&msk->pm.lock);
> 	}
> -- 
> 2.26.2
> _______________________________________________
> mptcp mailing list -- mptcp(a)lists.01.org
> To unsubscribe send an email to mptcp-leave(a)lists.01.org
>

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [MPTCP] Re: [MPTCP][RFC PATCH mptcp-next 4/6] mptcp: send out MP_PRIO before RM_ADDR
@ 2020-11-10 23:24 Mat Martineau
  0 siblings, 0 replies; 3+ messages in thread
From: Mat Martineau @ 2020-11-10 23:24 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 2492 bytes --]

On Tue, 10 Nov 2020, Geliang Tang wrote:

> Hi Mat,
>
> Thanks for your suggestions. It's very helpful.
>
> Mat Martineau <mathew.j.martineau(a)linux.intel.com> 于2020年11月10日周二 上午10:07写道:
>>
>> On Thu, 5 Nov 2020, Geliang Tang wrote:
>>
>>> Before sending the RM_ADDR suboption, we also send the MP_PRIO suboption
>>> to change the related subflow's priority as backup. So here invoke
>>> mptcp_pm_mp_prio_send_ack from mptcp_pm_remove_anno_addr to send the
>>> MP_PRIO suboption and check whether the subflow's backup value is changed.
>>>
>>
>> Geliang,
>>
>> I also think this patch is not needed. The part of RFC 8684 that mentions
>> using the backup flag before a close is assuming a much longer period of
>> time between the ACK that changes priority and the REMOVE_ADDR. It will be
>> up to the path manager to coordinate the timing on that.
>>
>
> If we drop this patch, when should we trigger the MP_PRIO sending? In which
> case does mptcp_pm_mp_prio_send_ack need to be called?
>
> Should we use the PM netlink to trigger it? Use the MPTCP_PM_ADDR_FLAG_BACKUP
> flag or something?

Yes, I think netlink is the way to trigger it. Maybe 
mptcp_nl_cmd_add_addr() could check for and modify an existing entry to 
change the 'backup' setting?


Mat


>>
>>> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
>>> ---
>>> net/mptcp/pm_netlink.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
>>> index a243017c4892..f80ebd4f6a29 100644
>>> --- a/net/mptcp/pm_netlink.c
>>> +++ b/net/mptcp/pm_netlink.c
>>> @@ -491,6 +491,7 @@ void mptcp_pm_nl_rm_addr_received(struct mptcp_sock *msk)
>>>               if (msk->pm.rm_id != subflow->remote_id)
>>>                       continue;
>>>
>>> +             WARN_ON_ONCE(!subflow->backup);
>>>               spin_unlock_bh(&msk->pm.lock);
>>>               mptcp_subflow_shutdown(sk, ssk, how);
>>>               __mptcp_close_ssk(sk, ssk, subflow);
>>> @@ -830,6 +831,7 @@ static bool mptcp_pm_remove_anno_addr(struct mptcp_sock *msk,
>>>       ret = remove_anno_list_by_saddr(msk, addr);
>>>       if (ret || force) {
>>>               spin_lock_bh(&msk->pm.lock);
>>> +             mptcp_pm_mp_prio_send_ack(msk, addr, 1);
>>>               mptcp_pm_remove_addr(msk, addr->id);
>>>               spin_unlock_bh(&msk->pm.lock);
>>>       }
>>> --
>>> 2.26.2

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [MPTCP] Re: [MPTCP][RFC PATCH mptcp-next 4/6] mptcp: send out MP_PRIO before RM_ADDR
@ 2020-11-10  7:27 Geliang Tang
  0 siblings, 0 replies; 3+ messages in thread
From: Geliang Tang @ 2020-11-10  7:27 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 2619 bytes --]

Hi Mat,

Thanks for your suggestions. It's very helpful.

Mat Martineau <mathew.j.martineau(a)linux.intel.com> 于2020年11月10日周二 上午10:07写道:
>
> On Thu, 5 Nov 2020, Geliang Tang wrote:
>
> > Before sending the RM_ADDR suboption, we also send the MP_PRIO suboption
> > to change the related subflow's priority as backup. So here invoke
> > mptcp_pm_mp_prio_send_ack from mptcp_pm_remove_anno_addr to send the
> > MP_PRIO suboption and check whether the subflow's backup value is changed.
> >
>
> Geliang,
>
> I also think this patch is not needed. The part of RFC 8684 that mentions
> using the backup flag before a close is assuming a much longer period of
> time between the ACK that changes priority and the REMOVE_ADDR. It will be
> up to the path manager to coordinate the timing on that.
>

If we drop this patch, when should we trigger the MP_PRIO sending? In which
case does mptcp_pm_mp_prio_send_ack need to be called?

Should we use the PM netlink to trigger it? Use the MPTCP_PM_ADDR_FLAG_BACKUP
flag or something?

-Geliang

>
> Thanks,
>
> Mat
>
>
> > Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> > ---
> > net/mptcp/pm_netlink.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> > index a243017c4892..f80ebd4f6a29 100644
> > --- a/net/mptcp/pm_netlink.c
> > +++ b/net/mptcp/pm_netlink.c
> > @@ -491,6 +491,7 @@ void mptcp_pm_nl_rm_addr_received(struct mptcp_sock *msk)
> >               if (msk->pm.rm_id != subflow->remote_id)
> >                       continue;
> >
> > +             WARN_ON_ONCE(!subflow->backup);
> >               spin_unlock_bh(&msk->pm.lock);
> >               mptcp_subflow_shutdown(sk, ssk, how);
> >               __mptcp_close_ssk(sk, ssk, subflow);
> > @@ -830,6 +831,7 @@ static bool mptcp_pm_remove_anno_addr(struct mptcp_sock *msk,
> >       ret = remove_anno_list_by_saddr(msk, addr);
> >       if (ret || force) {
> >               spin_lock_bh(&msk->pm.lock);
> > +             mptcp_pm_mp_prio_send_ack(msk, addr, 1);
> >               mptcp_pm_remove_addr(msk, addr->id);
> >               spin_unlock_bh(&msk->pm.lock);
> >       }
> > --
> > 2.26.2
> > _______________________________________________
> > mptcp mailing list -- mptcp(a)lists.01.org
> > To unsubscribe send an email to mptcp-leave(a)lists.01.org
> >
>
> --
> Mat Martineau
> Intel
> _______________________________________________
> mptcp mailing list -- mptcp(a)lists.01.org
> To unsubscribe send an email to mptcp-leave(a)lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-10 23:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10  2:07 [MPTCP] Re: [MPTCP][RFC PATCH mptcp-next 4/6] mptcp: send out MP_PRIO before RM_ADDR Mat Martineau
2020-11-10  7:27 Geliang Tang
2020-11-10 23:24 Mat Martineau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.