Re: [PATCH net-next 1/5] net: gro: remove is_ipv6 from napi_gro_cb
From: Richard Gobert
Date: Mon Aug 18 2025 - 07:42:49 EST
Willem de Bruijn wrote:
> Richard Gobert wrote:
>> Remove is_ipv6 from napi_gro_cb and use sk->sk_family instead.
>> This frees up space for another ip_fixedid bit that will be added
>> in the next commit.
>>
>> udp_sock_create always creates either a AP_INET or a AF_INET6 socket,
>> so using sk->sk_family is reliable.
>
> In general, IPv6 socket can accept IPv4 packets. See also
> cfg->ipv6_v6only in udp_sock_create6.
>
> Not sure about fou, but are we sure that such AF_INET6 sockets
> cannot receive flows with !is_ipv6.
>
FOU sets cfg->ipv6_v6only for IPv6 sockets in parse_nl_config.
I'll clarify this in v2.
>> Signed-off-by: Richard Gobert <richardbgobert@xxxxxxxxx>