Thread (6 messages) 6 messages, 2 authors, 21d ago

Re: [PATCH v2 2/3] net: stmmac: fix l3l4 filter rejecting unsupported offload requests

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-06-10 00:43:20
Also in: lkml

On Fri,  5 Jun 2026 02:01:13 -0700
muhammad.nazim.amirul.nazle.asmade@altera.com 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@altera.com
-- 
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help