On 12/17/21 10:38 AM, Paolo Abeni wrote:
> On Thu, 2021-12-16 at 17:23 -0500, Kishen Maloor wrote:
>> This change allows userspace PM implementations to reissue ADD_ADDR
>> announcements (if necessary) based on their chosen policy.
>>
>> Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
>> ---
>> net/mptcp/pm_netlink.c | 12 ++++++++++--
>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
>> index d57e2f825728..1adaf5d14f87 100644
>> --- a/net/mptcp/pm_netlink.c
>> +++ b/net/mptcp/pm_netlink.c
>> @@ -452,8 +452,16 @@ static bool mptcp_pm_alloc_anno_list(struct mptcp_sock *msk,
>>
>> lockdep_assert_held(&msk->pm.lock);
>>
>> - if (mptcp_lookup_anno_list_by_saddr(msk, &entry->addr))
>> - return false;
>> + add_entry = mptcp_lookup_anno_list_by_saddr(msk, &entry->addr);
>> +
>> + if (add_entry) {
>> + if (READ_ONCE(msk->pm.pm_type) == MPTCP_PM_TYPE_KERNEL)
>> + return false;
>> +
>> + sk_reset_timer(sk, &add_entry->add_timer,
>> + jiffies + mptcp_get_add_addr_timeout(net));
>> + return true;
>> + }
>
> I'm unsure I understand correctly the goal here ?!? retransmission on
> timeout of the announced address are already implmeneted by the
> existing code. What kind of different behaviour do you want to obtain
> here?
>
Yes, existing code retransmits unacknowledged ADD_ADDR messages.
This change is separate and allows userspace PMs to re-issue ADD_ADDR messages at a
later time. Section 3.4.1 in RFC 8684 mentions scenarios where address advertisements
may be "refreshed" (periodically, or otherwise). The in-kernel PM has no such policy,
but this change allows userspace PMs to refresh ADD_ADDR information should they choose
to.
> Thanks!
>
> Paolo
>