From: Saeed Mahameed <saeed@kernel•org>
To: Eric Dumazet <edumazet@google•com>
Cc: Geert Uytterhoeven <geert@linux-m68k•org>,
"David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
Saeed Mahameed <saeedm@nvidia•com>,
netdev@vger•kernel.org, Tariq Toukan <tariqt@nvidia•com>,
Geert Uytterhoeven <geert+renesas@glider•be>,
Matthieu Baerts <matthieu.baerts@tessares•net>,
Jamie Bainbridge <jamie.bainbridge@gmail•com>
Subject: Re: [PATCH net-next] tcp: Fix build break when CONFIG_IPV6=n
Date: Tue, 22 Nov 2022 10:30:05 -0800 [thread overview]
Message-ID: <Y30VLZGDYHAk+lSL@x130.lan> (raw)
In-Reply-To: <CANn89i+1JanTp=HacjfLkKR_nnC4vA4VJz2tMzAqEb+cFn_3tw@mail.gmail.com>
On 22 Nov 08:42, Eric Dumazet wrote:
>On Tue, Nov 22, 2022 at 1:37 AM Geert Uytterhoeven <geert@linux-m68k•org> wrote:
>>
>> Hi Saeed,
>>
>> On Tue, Nov 22, 2022 at 10:31 AM Saeed Mahameed <saeed@kernel•org> wrote:
>> > From: Saeed Mahameed <saeedm@nvidia•com>
>> >
>> > The cited commit caused the following build break when CONFIG_IPV6 was
>> > disabled
>> >
>> > net/ipv4/tcp_input.c: In function ‘tcp_syn_flood_action’:
>> > include/net/sock.h:387:37: error: ‘const struct sock_common’ has no member named ‘skc_v6_rcv_saddr’; did you mean ‘skc_rcv_saddr’?
>> >
>> > Fix by using inet6_rcv_saddr() macro which handles this situation
>> > nicely.
>> >
>> > Fixes: d9282e48c608 ("tcp: Add listening address to SYN flood message")
>> > Signed-off-by: Saeed Mahameed <saeedm@nvidia•com>
>>
>> Thanks for your patch!
>>
>> > --- a/net/ipv4/tcp_input.c
>> > +++ b/net/ipv4/tcp_input.c
>> > @@ -6843,9 +6843,9 @@ static bool tcp_syn_flood_action(const struct sock *sk, const char *proto)
>> >
>> > if (!READ_ONCE(queue->synflood_warned) && syncookies != 2 &&
>> > xchg(&queue->synflood_warned, 1) == 0) {
>> > - if (IS_ENABLED(CONFIG_IPV6) && sk->sk_family == AF_INET6) {
>> > + if (sk->sk_family == AF_INET6) {
>>
>> I think the IS_ENABLED() should stay, to make sure the IPV6-only
>> code is optimized away when IPv6-support is disabled.
>
>Agreed.
sending V2.
but for the record, I don't think such a user exist. Simply if you care
about such micro optimization, then you are serious enough not to disable
IPv6.
next prev parent reply other threads:[~2022-11-22 18:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 9:31 [PATCH net-next] tcp: Fix build break when CONFIG_IPV6=n Saeed Mahameed
2022-11-22 9:37 ` Geert Uytterhoeven
2022-11-22 16:42 ` Eric Dumazet
2022-11-22 18:30 ` Saeed Mahameed [this message]
2022-11-22 19:01 ` Geert Uytterhoeven
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=Y30VLZGDYHAk+lSL@x130.lan \
--to=saeed@kernel$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=geert+renesas@glider$(echo .)be \
--cc=geert@linux-m68k$(echo .)org \
--cc=jamie.bainbridge@gmail$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=matthieu.baerts@tessares$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=saeedm@nvidia$(echo .)com \
--cc=tariqt@nvidia$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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