From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1.fiberby.net (mail1.fiberby.net [193.104.135.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 378B715820E; Fri, 3 May 2024 18:08:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.104.135.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714759707; cv=none; b=F5yQUq6QIznQlENvf1pEm1TTgg8XOvqjuAez80178ExRpUNNlfDDeQt3XVZoE1shcamvLwEcCns9GT+j6AXABMsbMEYmjHzBhFDLoY1gtG9xe7TDzFharg1/XDNPVuKPQzUB7I7hrV6jN49o031EGwWapNPSE8e3mvdE0SJTTZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714759707; c=relaxed/simple; bh=lpjffUs0KsD4f1OIdu+oOs418PzFZ7RJRguA69+8Ufg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pyN/TCJki3tQVdoIVIe8kfqiqyaHcXkpDIJRvVQwV6DtJfVus5H4IP8Fesb6PWdi8Lq7CiwmG7+030zTTHZ2wbewvtF8G5xx02D7RVlMbVNyMEcXf17wApE1OeE1OIceZFc7N5NMBSny7oikuzpre3ByjHDb8/Vw+ShhiZuMNkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fiberby.net; spf=pass smtp.mailfrom=fiberby.net; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b=Nm2drleW; arc=none smtp.client-ip=193.104.135.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fiberby.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fiberby.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="Nm2drleW" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id C234D600A2; Fri, 3 May 2024 18:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1714759701; bh=lpjffUs0KsD4f1OIdu+oOs418PzFZ7RJRguA69+8Ufg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Nm2drleWzUli4rPVRzHIxWXPNsM1P7Lh/mZEVcqcpPgnUhoWJdBr/p0F7y3LbVz+a 4T3o8u8ds+dMOu9SiMtVXNN6U1M/8dna+PH56Vj/GFcwvHK5HmU8BAxhDVnR0/pfg3 77htbJMnUJyvVyvAKBaAgzTaohiq+SZDxHhec75OsZ2QVs+MOxOZTBCwCG/yknxwT6 xwemhYv+LxkMeCbLbtVa3UO/P+L0/M+1foLt37LqEcfu4p4YZG/99PZ+hHWt/1M+/2 sqVqoRuDnKJMkAkDzHfP3hf2Zj6pDZmpquWoDm3YwcjjXAP3UbzdzYu8qDDqhXssLG 5uQpZiVHj2voQ== Received: from [127.0.0.1] (localhost [127.0.0.1]) by x201s (Postfix) with ESMTP id 5823420146D; Fri, 03 May 2024 18:08:04 +0000 (UTC) Message-ID: <80089193-33e8-4601-bdbc-71d10ff1ab58@fiberby.net> Date: Fri, 3 May 2024 18:08:04 +0000 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Intel-wired-lan] [PATCH iwl-next] ice: flower: validate control flags To: "Buvaneswaran, Sujai" Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Eric Dumazet , "Nguyen, Anthony L" , Jakub Kicinski , Paolo Abeni , "David S. Miller" , "intel-wired-lan@lists.osuosl.org" References: <20240416144331.15336-1-ast@fiberby.net> Content-Language: en-US From: =?UTF-8?Q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Sujai, On 5/3/24 5:57 AM, Buvaneswaran, Sujai wrote: >> -----Original Message----- >> From: Intel-wired-lan On Behalf Of >> Asbjørn Sloth Tønnesen >> Sent: Tuesday, April 16, 2024 8:14 PM >> To: intel-wired-lan@lists.osuosl.org >> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Eric Dumazet >> ; Nguyen, Anthony L >> ; Asbjørn Sloth Tønnesen ; >> Jakub Kicinski ; Paolo Abeni ; >> David S. Miller >> Subject: [Intel-wired-lan] [PATCH iwl-next] ice: flower: validate control flags >> >> This driver currently doesn't support any control flags. >> >> Use flow_rule_has_control_flags() to check for control flags, such as can be >> set through `tc flower ... ip_flags frag`. >> >> In case any control flags are masked, flow_rule_has_control_flags() sets a NL >> extended error message, and we return -EOPNOTSUPP. >> >> Only compile-tested. >> >> Signed-off-by: Asbjørn Sloth Tønnesen >> --- >> drivers/net/ethernet/intel/ice/ice_tc_lib.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> > > Hi, > > I have tested this patch in upstream kernel - 6.9.0-rc5+ and observing no effect while adding tc flow rule with control flags. > 'Not supported' error is not shown while adding the below tc rule. > > [root@cbl-mariner ~]# tc qdisc add dev ens5f0np0 ingress > [root@cbl-mariner ~]# > [root@cbl-mariner ~]# tc filter add dev ens5f0np0 ingress protocol ip flower ip_flags frag/firstfrag action drop Thank you for testing! I think the issue you are observing, is because you are missing "skip_sw": tc filter add dev ens5f0np0 ingress protocol ip flower skip_sw \ ip_flags frag/firstfrag action drop Without skip_sw, then the hardware offload is opportunistic, and therefore the error in hardware offloading doesn't bubble through to user space. Without skip_sw, you should still be able to observe a change in `tc filter show dev ens5f0np0 ingress`. Without the patch you should see "in_hw", and with it you should see "not_in_hw". With skip_sw, then the error in hardware offloading causes the tc command to fail, with the -EOPNOTSUPP error and associated extended Netlink error message. Also see Ido's testing for mlxsw in this other thread: https://lore.kernel.org/netdev/ZiABPNMbOOYGiHCq@shredder/#t -- Best regards Asbjørn Sloth Tønnesen Network Engineer Fiberby - AS42541