From: Soheil Hassas Yeganeh <soheil@google.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, netdev <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next 3/3] tcp: remove unneeded code from tcp_stream_alloc_skb()
Date: Mon, 25 Oct 2021 19:09:54 -0400 [thread overview]
Message-ID: <CACSApva-YtkNDw7a=zJ1QuFdhv8tiLsavfbNp6+93yW62k0g2A@mail.gmail.com> (raw)
In-Reply-To: <20211025221342.806029-4-eric.dumazet@gmail.com>
On Mon, Oct 25, 2021 at 6:13 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> From: Eric Dumazet <edumazet@google.com>
>
> Aligning @size argument to 4 bytes is not needed.
>
> The header alignment has nothing to do with @size.
>
> It really depends on skb->head alignment and MAX_TCP_HEADER.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
> ---
> net/ipv4/tcp.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 121400557fde898283a8eae3b09d93479c4a089e..0a27b7ef1a9db8aea8d98cff4b8ab7092994febd 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -861,9 +861,6 @@ struct sk_buff *tcp_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp,
> {
> struct sk_buff *skb;
>
> - /* The TCP header must be at least 32-bit aligned. */
> - size = ALIGN(size, 4);
> -
> if (unlikely(tcp_under_memory_pressure(sk)))
> sk_mem_reclaim_partial(sk);
>
> --
> 2.33.0.1079.g6e70778dc9-goog
>
next prev parent reply other threads:[~2021-10-25 23:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 22:13 [PATCH net-next 0/3] tcp: tcp_stream_alloc_skb() changes Eric Dumazet
2021-10-25 22:13 ` [PATCH net-next 1/3] tcp: rename sk_stream_alloc_skb Eric Dumazet
2021-10-25 23:10 ` Soheil Hassas Yeganeh
2021-10-25 22:13 ` [PATCH net-next 2/3] tcp: use MAX_TCP_HEADER in tcp_stream_alloc_skb Eric Dumazet
2021-10-25 23:09 ` Soheil Hassas Yeganeh
2021-10-25 22:13 ` [PATCH net-next 3/3] tcp: remove unneeded code from tcp_stream_alloc_skb() Eric Dumazet
2021-10-25 23:09 ` Soheil Hassas Yeganeh [this message]
2021-10-26 14:00 ` [PATCH net-next 0/3] tcp: tcp_stream_alloc_skb() changes patchwork-bot+netdevbpf
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='CACSApva-YtkNDw7a=zJ1QuFdhv8tiLsavfbNp6+93yW62k0g2A@mail.gmail.com' \
--to=soheil@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).