Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1960534lqm; Fri, 3 May 2024 11:08:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW+m/GKYt/V1X4gRNUnttRfAkVim6aGTPWttghr79kf0LV04P3zLCa2sy+oqFM0jWzYd0PRNQ5qebIFGRJS4PurIQr3TDBcptF+jGPmvg== X-Google-Smtp-Source: AGHT+IGlncJPb+EeiBEjfwFe5rSHQL2i78vzoUwPt57p+ipdpmJL96UxnjJlx4brSzrCpIq7N6n9 X-Received: by 2002:a05:622a:1a29:b0:439:d07d:e25f with SMTP id f41-20020a05622a1a2900b00439d07de25fmr5904529qtb.16.1714759718894; Fri, 03 May 2024 11:08:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714759718; cv=pass; d=google.com; s=arc-20160816; b=h1+aCzsFkV420qQTs8Rglcg97OthUazc0zz6quTos7YhPd9PcLvsxk9k8vFymZys+r NwcF+faL8g2wKv3aflcWl/wkDLFtpO5xMQlToaPcSh5uRXvdkhEuG7JngzFogmXhyiDx hSCLEzd4iPJE2fOpT85TTrLWy6DW/uWA/dSaBx7/BX+vj1J8Rd5G3Jg+bvcTEc4mytWo 4O5mvlZOtQgkBfX+7ufBIY/IprqMzUlrJroy1VwSouEbvaCTQAFUlB5NXz6Py/6lLGhI tImHGW4O1RCIBCtm1wlnZD77SGTo69Jn/1MYLXvhUv/O7rUA9+kXOm5nmcako39Jrm+s OJJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=7krJSqa8wuLXGsELKd69ZwXPLKfylvjCfsQDlS3hK/Y=; fh=H79u43TzuMhl24RYVr7aZHBoXeZW13jkN/TMPgIo4fA=; b=DTyNWgW2mjvxJL9UE01i5FhivFwJojy+6zA/sR2tzR6AOFziHL0mxKbeCOqQfvcJjP 0bFslGowU5aYPNcNuLJOgngNiicRST9Egnf3eeN0K37vXnWjwJgFTgJu4dPFIvTfJh43 SAJLY+PsczS/z0wqpTWHaB8Me6yfSOpoil7bOAJrftbGCYiut5Xiz7Kuwjc30Vbo6dWc uXFqvriNFg9cpxggvpIxyvlMgeDVJiZFsTbaARz60Kd6OhSYUxg3YuXGaEJiqAQ7ykVn RHKrQYpoHiIq/bIij0r8Hj6AHoaUbmFS7zxq0kD1lkDVUm0UJx+bxcVG6pMgP7cgkZzK LK4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fiberby.net header.s=202008 header.b=Nm2drleW; arc=pass (i=1 spf=pass spfdomain=fiberby.net dkim=pass dkdomain=fiberby.net dmarc=pass fromdomain=fiberby.net); spf=pass (google.com: domain of linux-kernel+bounces-168008-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168008-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fiberby.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ea14-20020a05622a5b0e00b0043ade35ba8fsi929707qtb.791.2024.05.03.11.08.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 11:08:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168008-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@fiberby.net header.s=202008 header.b=Nm2drleW; arc=pass (i=1 spf=pass spfdomain=fiberby.net dkim=pass dkdomain=fiberby.net dmarc=pass fromdomain=fiberby.net); spf=pass (google.com: domain of linux-kernel+bounces-168008-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168008-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fiberby.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 90E741C231FF for ; Fri, 3 May 2024 18:08:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50BAF1586F4; Fri, 3 May 2024 18:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="Nm2drleW" 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 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: linux-kernel@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