Skip to content

Commit

Permalink
mptcp: add rm_list_rx in mptcp_pm_data
Browse files Browse the repository at this point in the history
This patch added a new member rm_list_rx for struct mptcp_pm_data as an
list of the removing address ids on the incoming direction. Initialized
its nr field to zero in mptcp_pm_data_init.

In mptcp_pm_rm_addr_received, set it as the input rm_list.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Geliang Tang authored and David S. Miller committed Mar 13, 2021
1 parent 5c4a824 commit b5c55f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mptcp/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void mptcp_pm_rm_addr_received(struct mptcp_sock *msk,

spin_lock_bh(&pm->lock);
mptcp_pm_schedule_work(msk, MPTCP_PM_RM_ADDR_RECEIVED);
pm->rm_id = rm_list->ids[0];
pm->rm_list_rx = *rm_list;
spin_unlock_bh(&pm->lock);
}

Expand Down Expand Up @@ -300,6 +300,7 @@ void mptcp_pm_data_init(struct mptcp_sock *msk)
msk->pm.local_addr_used = 0;
msk->pm.subflows = 0;
msk->pm.rm_list_tx.nr = 0;
msk->pm.rm_list_rx.nr = 0;
WRITE_ONCE(msk->pm.work_pending, false);
WRITE_ONCE(msk->pm.addr_signal, 0);
WRITE_ONCE(msk->pm.accept_addr, false);
Expand Down
1 change: 1 addition & 0 deletions net/mptcp/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ struct mptcp_pm_data {
u8 subflows;
u8 status;
struct mptcp_rm_list rm_list_tx;
struct mptcp_rm_list rm_list_rx;
u8 rm_id;
};

Expand Down

0 comments on commit b5c55f3

Please sign in to comment.