From: Andrei Vagin <avagin@gmail.com>
To: dccp@vger.kernel.org
Subject: Re: [PATCH RESEND net-next v4 1/3] net: Add a bhash2 table hashed by port and address
Date: Mon, 11 Sep 2023 23:36:55 +0000 [thread overview]
Message-ID: <ZP+kl4/UuTaQTGPT@google.com> (raw)
On Mon, Aug 22, 2022 at 11:10:21AM -0700, Joanne Koong wrote:
>
> +static bool inet_use_bhash2_on_bind(const struct sock *sk)
> +{
> +#if IS_ENABLED(CONFIG_IPV6)
> + if (sk->sk_family = AF_INET6) {
> + int addr_type = ipv6_addr_type(&sk->sk_v6_rcv_saddr);
> +
> + return addr_type != IPV6_ADDR_ANY &&
> + addr_type != IPV6_ADDR_MAPPED;
>
Why do we return false to all mapped addresses? Should it be
(addr_type != IPV6_ADDR_MAPPED || sk->sk_rcv_saddr != htonl(INADDR_ANY))
>
> + }
> +#endif
> + return sk->sk_rcv_saddr != htonl(INADDR_ANY);
> +}
> +
>
Thanks,
Andrei
WARNING: multiple messages have this Message-ID (diff)
From: Andrei Vagin <avagin@gmail.com>
To: Joanne Koong <joannelkoong@gmail.com>, kuniyu@amazon.com
Cc: netdev@vger.kernel.org, edumazet@google.com, kafai@fb.com,
kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com,
dccp@vger.kernel.org
Subject: Re: [PATCH RESEND net-next v4 1/3] net: Add a bhash2 table hashed by port and address
Date: Mon, 11 Sep 2023 16:36:55 -0700 [thread overview]
Message-ID: <ZP+kl4/UuTaQTGPT@google.com> (raw)
In-Reply-To: <20220822181023.3979645-2-joannelkoong@gmail.com>
On Mon, Aug 22, 2022 at 11:10:21AM -0700, Joanne Koong wrote:
>
> +static bool inet_use_bhash2_on_bind(const struct sock *sk)
> +{
> +#if IS_ENABLED(CONFIG_IPV6)
> + if (sk->sk_family == AF_INET6) {
> + int addr_type = ipv6_addr_type(&sk->sk_v6_rcv_saddr);
> +
> + return addr_type != IPV6_ADDR_ANY &&
> + addr_type != IPV6_ADDR_MAPPED;
>
Why do we return false to all mapped addresses? Should it be
(addr_type != IPV6_ADDR_MAPPED || sk->sk_rcv_saddr != htonl(INADDR_ANY))
>
> + }
> +#endif
> + return sk->sk_rcv_saddr != htonl(INADDR_ANY);
> +}
> +
>
Thanks,
Andrei
next reply other threads:[~2023-09-11 23:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 23:36 Andrei Vagin [this message]
2023-09-11 23:36 ` [PATCH RESEND net-next v4 1/3] net: Add a bhash2 table hashed by port and address Andrei Vagin
2023-09-12 0:06 ` Iwashima, Kuniyuki
2023-09-12 0:06 ` Iwashima, Kuniyuki
-- strict thread matches above, loose matches on Subject: below --
2022-08-22 18:10 [PATCH RESEND net-next v4 3/3] selftests/net: Add sk_bind_sendto_listen and sk_connect_zero_addr Joanne Koong
2022-08-22 18:10 ` Joanne Koong
2022-08-22 18:10 [PATCH RESEND net-next v4 2/3] selftests/net: Add test for timing a bind request to a port with a po Joanne Koong
2022-08-22 18:10 ` [PATCH RESEND net-next v4 2/3] selftests/net: Add test for timing a bind request to a port with a populated bhash entry Joanne Koong
2022-08-22 18:10 [PATCH RESEND net-next v4 1/3] net: Add a bhash2 table hashed by port and address Joanne Koong
2022-08-22 18:10 ` Joanne Koong
2022-08-22 18:10 [PATCH RESEND net-next v4 0/3] Add a second bind " Joanne Koong
2022-08-22 18:10 ` Joanne Koong
2022-08-25 2:40 ` patchwork-bot+netdevbpf
2022-08-25 2:40 ` 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=ZP+kl4/UuTaQTGPT@google.com \
--to=avagin@gmail.com \
--cc=dccp@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.