lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACSApvbQ-Gbi3UOq_=eB3L3-3abruFiN5_7xfCPRJifTzWQZDw@mail.gmail.com>
Date:   Fri, 17 Apr 2020 10:12:04 -0400
From:   Soheil Hassas Yeganeh <soheil@...gle.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH net] tcp: cache line align MAX_TCP_HEADER

On Fri, Apr 17, 2020 at 10:10 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> TCP stack is dumb in how it cooks its output packets.
>
> Depending on MAX_HEADER value, we might chose a bad ending point
> for the headers.
>
> If we align the end of TCP headers to cache line boundary, we
> make sure to always use the smallest number of cache lines,
> which always help.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Soheil Hassas Yeganeh <soheil@...gle.com>

Acked-by: Soheil Hassas Yeganeh <soheil@...gle.com>

Very nice! Thank you!

> ---
>  include/net/tcp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index 5fa9eacd965a4abd6a4dd5262fa0d439aa9fe64e..dcf9a72eeaa6912202e8a1ca6cf800f7401bf517 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -51,7 +51,7 @@ extern struct inet_hashinfo tcp_hashinfo;
>  extern struct percpu_counter tcp_orphan_count;
>  void tcp_time_wait(struct sock *sk, int state, int timeo);
>
> -#define MAX_TCP_HEADER (128 + MAX_HEADER)
> +#define MAX_TCP_HEADER L1_CACHE_ALIGN(128 + MAX_HEADER)
>  #define MAX_TCP_OPTION_SPACE 40
>  #define TCP_MIN_SND_MSS                48
>  #define TCP_MIN_GSO_SIZE       (TCP_MIN_SND_MSS - MAX_TCP_OPTION_SPACE)
> --
> 2.26.1.301.g55bc3eb7cb9-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ