mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 13:43:51 +00:00
mptcp: use MPTCP_SUBFLOW_NODATA
Set subflow->data_avail with the enum value MPTCP_SUBFLOW_NODATA, instead of using 0 directly. Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Geliang Tang <geliang.tang@suse.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0eb4e7ee16
commit
ea56dcb43c
@ -1104,7 +1104,7 @@ static bool subflow_check_data_avail(struct sock *ssk)
|
||||
struct sk_buff *skb;
|
||||
|
||||
if (!skb_peek(&ssk->sk_receive_queue))
|
||||
WRITE_ONCE(subflow->data_avail, 0);
|
||||
WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
|
||||
if (subflow->data_avail)
|
||||
return true;
|
||||
|
||||
@ -1169,7 +1169,7 @@ static bool subflow_check_data_avail(struct sock *ssk)
|
||||
subflow->reset_transient = 0;
|
||||
subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
|
||||
tcp_send_active_reset(ssk, GFP_ATOMIC);
|
||||
WRITE_ONCE(subflow->data_avail, 0);
|
||||
WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1182,7 +1182,7 @@ static bool subflow_check_data_avail(struct sock *ssk)
|
||||
subflow->reset_transient = 0;
|
||||
subflow->reset_reason = MPTCP_RST_EMPTCP;
|
||||
tcp_send_active_reset(ssk, GFP_ATOMIC);
|
||||
WRITE_ONCE(subflow->data_avail, 0);
|
||||
WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1204,7 +1204,7 @@ bool mptcp_subflow_data_available(struct sock *sk)
|
||||
if (subflow->map_valid &&
|
||||
mptcp_subflow_get_map_offset(subflow) >= subflow->map_data_len) {
|
||||
subflow->map_valid = 0;
|
||||
WRITE_ONCE(subflow->data_avail, 0);
|
||||
WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
|
||||
|
||||
pr_debug("Done with mapping: seq=%u data_len=%u",
|
||||
subflow->map_subflow_seq,
|
||||
|
Loading…
Reference in New Issue
Block a user