Re: [PATCH net-next v2] net: dsa: yt921x: Add ACL support

From: Qingfang Deng

Date: Tue May 19 2026 - 23:09:00 EST


On Wed, 20 May 2026 at 10:22:36 +0800, David Yang wrote:
> Enable filtering of incoming traffics. Note that custom filters are yet
> to be utilized, and thus not all flow dissectors are implemented.
>
> Tested-by: hong son Nguyen <hongson.hn@xxxxxxxxx>
> Signed-off-by: David Yang <mmyangfl@xxxxxxxxx>
> ---
> v1: https://lore.kernel.org/r/20260514192140.3468543-1-mmyangfl@xxxxxxxxx
> - fix issue reported by test robot

The always-false comparison is still there:

> + if (match.mask->ip_proto) {
> + enum yt921x_l4_type type = YT921X_L4_TYPE_OTHER;
> +
> + if (match.mask->ip_proto == ~0)

../drivers/net/dsa/yt921x.c:1821:29: warning: result of comparison of constant -1 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
1821 | if (match.mask->ip_proto == ~0)
| ~~~~~~~~~~~~~~~~~~~~ ^ ~~
1 warning generated.

> + switch (match.key->ip_proto) {
> + case IPPROTO_TCP:
> + type = YT921X_L4_TYPE_TCP;