Re: [PATCH v2 2/3] net: stmmac: fix l3l4 filter rejecting unsupported offload requests
From: Jakub Kicinski
Date: Tue Jun 09 2026 - 20:43:38 EST
On Fri, 5 Jun 2026 02:01:13 -0700
muhammad.nazim.amirul.nazle.asmade@xxxxxxxxxx wrote:
> + /* Both network proto and transport proto not present in the key */
> + if (!match.mask || !(match.mask->n_proto || match.mask->ip_proto))
> + return -EOPNOTSUPP;
> +
> + /* If the proto is present in the key and is not full mask */
> + if ((match.mask->n_proto && match.mask->n_proto != ETHER_TYPE_FULL_MASK) ||
> + (match.mask->ip_proto && match.mask->ip_proto != IP_PROTO_FULL_MASK))
> + return -EOPNOTSUPP;
> +
> + /* Network proto is present in the key and is not IPv4 */
> + if (match.mask->n_proto && match.key->n_proto != cpu_to_be16(ETH_P_IP))
> + return -EOPNOTSUPP;
> +
> + /* Transport proto is present in the key and is not TCP or UDP */
> + if (match.mask->ip_proto &&
> + match.key->ip_proto != IPPROTO_TCP &&
> + match.key->ip_proto != IPPROTO_UDP)
> + return -EOPNOTSUPP;
Please add extack messages to let user know which part of the match is
unsupported. Extack pointer is somewhere inside struct flow_cls_offload
FWIW Sashiko points out a bunch of other potential issues, not sure if
they matter
https://sashiko.dev/#/patchset/20260605090114.16028-2-muhammad.nazim.amirul.nazle.asmade@xxxxxxxxxx
--
pw-bot: cr