* [MPTCP][PATCH mptcp-next] Squash to "mptcp: MP_FAIL suboption sending"
@ 2021-07-28 11:13 Geliang Tang
2021-07-28 17:08 ` Paolo Abeni
2021-07-29 0:23 ` Mat Martineau
0 siblings, 2 replies; 3+ messages in thread
From: Geliang Tang @ 2021-07-28 11:13 UTC (permalink / raw)
To: mptcp, geliangtang; +Cc: Geliang Tang, Paolo Abeni
From: Geliang Tang <geliangtang@xiaomi.com>
Drop the use_ack check, and add a likely tag.
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Geliang Tang <geliangtang@xiaomi.com>
---
net/mptcp/options.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 2b15063c8009..6db24cf72ac0 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -788,7 +788,7 @@ static bool mptcp_established_options_mp_fail(struct sock *sk,
{
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
- if (!subflow->send_mp_fail)
+ if (likely(!subflow->send_mp_fail))
return false;
if (remaining < TCPOLEN_MPTCP_FAIL)
@@ -835,12 +835,10 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,
ret = true;
else if (mptcp_established_options_dss(sk, skb, snd_data_fin, &opt_size, remaining, opts)) {
ret = true;
- if (opts->ext_copy.use_ack) {
- if (mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts)) {
- *size += opt_size;
- remaining -= opt_size;
- return true;
- }
+ if (mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts)) {
+ *size += opt_size;
+ remaining -= opt_size;
+ return true;
}
}
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [MPTCP][PATCH mptcp-next] Squash to "mptcp: MP_FAIL suboption sending"
2021-07-28 11:13 [MPTCP][PATCH mptcp-next] Squash to "mptcp: MP_FAIL suboption sending" Geliang Tang
@ 2021-07-28 17:08 ` Paolo Abeni
2021-07-29 0:23 ` Mat Martineau
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Abeni @ 2021-07-28 17:08 UTC (permalink / raw)
To: Geliang Tang, mptcp; +Cc: Geliang Tang
On Wed, 2021-07-28 at 19:13 +0800, Geliang Tang wrote:
> From: Geliang Tang <geliangtang@xiaomi.com>
>
> Drop the use_ack check, and add a likely tag.
>
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Geliang Tang <geliangtang@xiaomi.com>
> ---
> net/mptcp/options.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index 2b15063c8009..6db24cf72ac0 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -788,7 +788,7 @@ static bool mptcp_established_options_mp_fail(struct sock *sk,
> {
> struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
>
> - if (!subflow->send_mp_fail)
> + if (likely(!subflow->send_mp_fail))
> return false;
>
> if (remaining < TCPOLEN_MPTCP_FAIL)
> @@ -835,12 +835,10 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,
> ret = true;
> else if (mptcp_established_options_dss(sk, skb, snd_data_fin, &opt_size, remaining, opts)) {
> ret = true;
> - if (opts->ext_copy.use_ack) {
> - if (mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts)) {
> - *size += opt_size;
> - remaining -= opt_size;
> - return true;
> - }
> + if (mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts)) {
> + *size += opt_size;
> + remaining -= opt_size;
> + return true;
> }
> }
LGTM, thanks!
/P
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [MPTCP][PATCH mptcp-next] Squash to "mptcp: MP_FAIL suboption sending"
2021-07-28 11:13 [MPTCP][PATCH mptcp-next] Squash to "mptcp: MP_FAIL suboption sending" Geliang Tang
2021-07-28 17:08 ` Paolo Abeni
@ 2021-07-29 0:23 ` Mat Martineau
1 sibling, 0 replies; 3+ messages in thread
From: Mat Martineau @ 2021-07-29 0:23 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp, Geliang Tang, Paolo Abeni
On Wed, 28 Jul 2021, Geliang Tang wrote:
> From: Geliang Tang <geliangtang@xiaomi.com>
>
> Drop the use_ack check, and add a likely tag.
>
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Geliang Tang <geliangtang@xiaomi.com>
> ---
> net/mptcp/options.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index 2b15063c8009..6db24cf72ac0 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -788,7 +788,7 @@ static bool mptcp_established_options_mp_fail(struct sock *sk,
> {
> struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
>
> - if (!subflow->send_mp_fail)
> + if (likely(!subflow->send_mp_fail))
> return false;
>
> if (remaining < TCPOLEN_MPTCP_FAIL)
> @@ -835,12 +835,10 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,
> ret = true;
> else if (mptcp_established_options_dss(sk, skb, snd_data_fin, &opt_size, remaining, opts)) {
> ret = true;
> - if (opts->ext_copy.use_ack) {
> - if (mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts)) {
> - *size += opt_size;
> - remaining -= opt_size;
> - return true;
> - }
> + if (mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts)) {
> + *size += opt_size;
> + remaining -= opt_size;
> + return true;
> }
> }
>
> --
> 2.31.1
This looks fine. Please include in future MP_FAIL revs.
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-29 0:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 11:13 [MPTCP][PATCH mptcp-next] Squash to "mptcp: MP_FAIL suboption sending" Geliang Tang
2021-07-28 17:08 ` Paolo Abeni
2021-07-29 0:23 ` Mat Martineau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).