Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp312424lqs; Thu, 13 Jun 2024 10:39:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXoZP4nBISQMO47D80s/5lcc4O4KUBcXkhCXlurHSIDnUeMcoSVVUsPaF5Oy/cweU1FQMnOSWI6ioA56126zrQTsDAyUI8Q0kERytC9kA== X-Google-Smtp-Source: AGHT+IHqNC5ZrjoSFBsONYmms2JVe1uZH3A/aUYSqG4TUka6+KyfHxzICQNS3qmjAZGtB+Uc3JQV X-Received: by 2002:a05:6a20:841d:b0:1af:7646:fc14 with SMTP id adf61e73a8af0-1bae7bace30mr656004637.0.1718300349804; Thu, 13 Jun 2024 10:39:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718300349; cv=pass; d=google.com; s=arc-20160816; b=DCWwYNmfyzwHNI8YSfzw2QOkR9IbB0bJbWoZZj035Vc7plRXwO2wjwaVvpmMZJi4ZG CADo3/YYvkIAQt5NlxGCOb08/sQmyoEYor9E0ih+Oe2AW4JBEHu1dwNvTwsHYMQVHCkx 5tJzPeFeVnmvshyRtQ0bcSCNOylXjruypWjKkh7Cj4+htuCeFsHS443c8Vm8OLFcaSlQ r1Kjz+en0mCaE/2RlQGnOCEB83Kb2PO4tUJ3QsUo0qlvBgWKiKkw9zrXl0Pa62CkOWrr tZVfW6Q6Cwy/mNmiGYgar493ttHMdPnoUTfhLCaBvkTR9+4da1fWoSdooux6NB9ah8fS /Scw== 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=LIocziUKFcmXNMxlh280ONDO1OMl2ptJuemZ88v6b5M=; fh=5y8C9sjemVHiXjSxdm/u3oPNjPCn9CU73CqkBfN/B/8=; b=N9uwq63zX3F6aNLEEEMZoQhQCG6Aj/vvvgUohb2haQIuMB6igezU+5xgXyVNa7YdBb 5sdoNoPkQEHCcmSfSJTjKA1rZBtSzzdy6nGCaLimZMWMcWcgEm/Mi1wTI5e1dS0jVr6T PeLlfrcDcZKRAGAScbBD5B7EPq8QQ1rclDVNOGWGmIAc0RhoqrJ2IxbEJHZnz5bJD8H1 nvjCggdqvVaP0O/T4p2+ijTzXtyW9g1rWMjBKMwufS/AsTz+nQCDyoewO9duVeay+fqw OmprXEOT7WALeJC8BTArrZwS/ygGHx2vEmbHrV8OLtdWDG+jlXBA6xtftLPghtz5IGXV 7hqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fiberby.net header.s=202008 header.b=NtzwmtRz; 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-213759-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213759-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fiberby.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fedd4f3f62si1805634a12.18.2024.06.13.10.39.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 10:39:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213759-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@fiberby.net header.s=202008 header.b=NtzwmtRz; 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-213759-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213759-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 61F8FB22F38 for ; Thu, 13 Jun 2024 17:38:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E37614A4D0; Thu, 13 Jun 2024 17:38:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="NtzwmtRz" 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 9ADED433A4; Thu, 13 Jun 2024 17:38:37 +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=1718300321; cv=none; b=eAIycD8BhKfBRQF2R5yTkUjEMHhVLHoqxCZKYla3rZ9gUVYkH2floR+uRSoeDZ1S5GPjEsik8rppY4WrEOHBz1AgT8F0XcVJVY5j0uJycBTmEfghgB+DS0E16CZgK9HY21b4D2EA7yWIkYa887Sn8+Yi36o5fIeCqwy8mhSJ/GQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718300321; c=relaxed/simple; bh=iHrGBdCbZI2bStSbB8zQUHcxeTKog1kQOycxa6OEd14=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QTzV9AZlwSvpdaOoLJ0XRBj0QBbo8QT20BsYluuI/0GMPYhu5Le18kBAS6nVzkAblA9O/46x88jZbLagabzCEYw62NBUJEMVW4OyopD8w2MTlINHZdbHPHrZvd12Xn5Lxz5h4u52pkwl7aWL2K1ZGM7rPsnuT4zJApGjE50DxC8= 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=NtzwmtRz; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1718300308; bh=iHrGBdCbZI2bStSbB8zQUHcxeTKog1kQOycxa6OEd14=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=NtzwmtRzXbCIGztjkGdDShXjrZTC/Ly0c8lotFu2MjMLQqolth5maGlsYhHgYY6Cm i/xFL1Dx5aUezuTk7dASqlDjEf+QuLx8RHz1DGU3LzqAkmtctrSmkPBJrxr41jzKKp lbX3DaolNUJ/+koLsSqUKYFZA5IQftzXkTt6KJWrkirXqQezSnRdocS846urwocawl 9ogJKPsL20k6HxWW6QLZUOEbfjkAOhsLctQWpcxozb3B/ymKIz/pXu8j3ta+wUCJNg MtlYOpvnRPM8Wi+lPcdl7SYcbN2EEvYpjTzWIGe4UPjjQRLx33lmAkB0kfN3KeQa19 MCodr9xvFjGiw== Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 9FD2060079; Thu, 13 Jun 2024 17:38:21 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by x201s (Postfix) with ESMTP id 2C001201EC1; Thu, 13 Jun 2024 17:38:18 +0000 (UTC) Message-ID: <711d788e-14e4-41fe-99ea-4c50be008018@fiberby.net> Date: Thu, 13 Jun 2024 17:38:17 +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: [PATCH net-next 0/5] net: flower: validate encapsulation control flags To: Jakub Kicinski Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Edward Cree , Martin Habets , linux-net-drivers@amd.com, Saeed Mahameed , Leon Romanovsky , Tariq Toukan , linux-rdma@vger.kernel.org, Jesse Brandeburg , Tony Nguyen , intel-wired-lan@lists.osuosl.org, Louis Peens , oss-drivers@corigine.com, linux-kernel@vger.kernel.org, Davide Caratti , i.maximets@ovn.org References: <20240609173358.193178-1-ast@fiberby.net> <20240612180419.391f584d@kernel.org> Content-Language: en-US From: =?UTF-8?Q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= In-Reply-To: <20240612180419.391f584d@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Jakub, On 6/13/24 1:04 AM, Jakub Kicinski wrote: > On Sun, 9 Jun 2024 17:33:50 +0000 Asbjørn Sloth Tønnesen wrote: >> Now that all drivers properly rejects unsupported flower control flags >> used with FLOW_DISSECTOR_KEY_CONTROL, then time has come to add similar >> checks to the drivers supporting FLOW_DISSECTOR_KEY_ENC_CONTROL. > > Thanks for doing this work! Thank you, for maintaining the tree! > Do you have any more of such series left? Not at the moment, I only stumbled upon this, because I read the code with an eye on adding a new IS_JUMBO_FRAME flag (patches for which are almost ready). Once this[1] currently RFC patch goes in, I might try to move all control flags in under FLOW_DIS_F_*, to get rid of the then FLOW_DIS_(IS_FRAGMENT|FIRST_FRAG|ENCAPSULATION|F_*). [1] [RFC PATCH net-next 1/9] net/sched: flower: define new tunnel flags https://lore.kernel.org/netdev/20240611235355.177667-2-ast@fiberby.net/ > Could we perhaps consider > recording the driver support somewhere in struct net_device and do > the rejecting in the core? Sure, it could work for the control flags, and used_keys validation, but I am not sure if it is worth it, as most of the validation is very specific to the limitations of the different hardware. An easy first step in that direction would be to move the used_keys checks behind a helper, and possibly storing used_keys in struct net_device. > That's much easier to extend when adding > new flags than updating all the drivers. That's how it is now, with the new helpers, as all flags are unsupported, unless the driver specifically supports it. Any new flag only needs to be added to the core, and drivers only needs to be updated when they implement offloading support for a flag. > This series I think may not be a great first candidate as IIUC all > drivers would reject so the flag would be half-dead... Correct. I don't know if there is any hardware support planned for the tunnel-related encapsulation control flags. -- Best regards Asbjørn Sloth Tønnesen Network Engineer Fiberby - AS42541