From: Antoine Tenart <atenart@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 0/4] net: tcp: make txhash use consistent for IPv4
Date: Thu, 11 May 2023 13:55:23 +0200 [thread overview]
Message-ID: <168380612338.9448.16859771930497024762@kwain> (raw)
In-Reply-To: <CANn89iJ8Jvi2wk5fOGvkreqcUVN_qs=MJ3mYxtqUGC=jnCgLnw@mail.gmail.com>
Quoting Eric Dumazet (2023-05-11 12:24:15)
> On Thu, May 11, 2023 at 11:35 AM Antoine Tenart <atenart@kernel.org> wrote:
> >
> > Series is divided in two parts. First two commits make the txhash (used
> > for the skb hash in TCP) to be consistent for all IPv4/TCP packets (IPv6
> > doesn't have the same issue). Last two commits improve doc/comment
> > hash-related parts.
> >
> > One example is when using OvS with dp_hash, which uses skb->hash, to
> > select a path. We'd like packets from the same flow to be consistent, as
> > well as the hash being stable over time when using net.core.txrehash=0.
> > Same applies for kernel ECMP which also can use skb->hash.
> >
>
> SGTM, thanks.
>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
>
> FYI while reviewing your patches, I found that I have to send this fix:
>
> I suggest we hold your patch series a bit before this reaches net-next tree,
> to avoid merge conflicts.
Sure, no problem. Thanks for the review!
> Bug was added in commit f6c0f5d209fa ("tcp: honor SO_PRIORITY in
> TIME_WAIT state")
>
>
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 39bda2b1066e1d607a59fb79c6305d0ca30cb28d..06d2573685ca993a3a0a89807f09d7b5c153cc72
> 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -829,6 +829,9 @@ static void tcp_v4_send_reset(const struct sock
> *sk, struct sk_buff *skb)
> inet_twsk(sk)->tw_priority : sk->sk_priority;
> transmit_time = tcp_transmit_time(sk);
> xfrm_sk_clone_policy(ctl_sk, sk);
> + } else {
> + ctl_sk->sk_mark = 0;
> + ctl_sk->sk_priority = 0;
> }
> ip_send_unicast_reply(ctl_sk,
> skb, &TCP_SKB_CB(skb)->header.h4.opt,
> @@ -836,7 +839,6 @@ static void tcp_v4_send_reset(const struct sock
> *sk, struct sk_buff *skb)
> &arg, arg.iov[0].iov_len,
> transmit_time);
>
> - ctl_sk->sk_mark = 0;
> xfrm_sk_free_policy(ctl_sk);
> sock_net_set(ctl_sk, &init_net);
> __TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
> @@ -935,7 +937,6 @@ static void tcp_v4_send_ack(const struct sock *sk,
> &arg, arg.iov[0].iov_len,
> transmit_time);
>
> - ctl_sk->sk_mark = 0;
> sock_net_set(ctl_sk, &init_net);
> __TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
> local_bh_enable();
>
next prev parent reply other threads:[~2023-05-11 11:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 9:34 [PATCH net-next 0/4] net: tcp: make txhash use consistent for IPv4 Antoine Tenart
2023-05-11 9:34 ` [PATCH net-next 1/4] net: tcp: make the txhash available in TIME_WAIT sockets for IPv4 too Antoine Tenart
2023-05-11 9:34 ` [PATCH net-next 2/4] net: ipv4: use consistent txhash in TIME_WAIT and SYN_RECV Antoine Tenart
2023-05-11 9:34 ` [PATCH net-next 3/4] Documentation: net: net.core.txrehash is not specific to listening sockets Antoine Tenart
2023-05-11 9:34 ` [PATCH net-next 4/4] net: skbuff: fix l4_hash comment Antoine Tenart
2023-05-11 12:10 ` Dumitru Ceara
2023-05-11 12:33 ` Eric Dumazet
2023-05-11 13:00 ` Dumitru Ceara
2023-05-11 17:54 ` Ilya Maximets
2023-05-11 20:50 ` Dumitru Ceara
2023-05-15 8:12 ` Antoine Tenart
2023-05-15 18:23 ` Ilya Maximets
2023-05-16 7:36 ` Antoine Tenart
2023-05-16 21:25 ` Ilya Maximets
2023-05-17 12:05 ` Antoine Tenart
2023-05-17 23:00 ` Ilya Maximets
2023-05-23 15:25 ` Antoine Tenart
2023-05-11 10:24 ` [PATCH net-next 0/4] net: tcp: make txhash use consistent for IPv4 Eric Dumazet
2023-05-11 11:55 ` Antoine Tenart [this message]
2023-05-11 11:59 ` Ilya Maximets
-- strict thread matches above, loose matches on Subject: below --
2023-04-27 13:45 Antoine Tenart
2023-04-27 15:15 ` Eric Dumazet
2023-04-27 15:44 ` Antoine Tenart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=168380612338.9448.16859771930497024762@kwain \
--to=atenart@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox