Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2973815lqt; Tue, 23 Apr 2024 07:14:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8EoTczIucm5D1ZxPjPNzg0vg0HXsNxX5RYE1ZnRkE+Sd8kymKv/k/eRKXY3uuU5WFA7C7iEIJjTnV1MNAXJT3Tjr586g/+5hnqE+8/Q== X-Google-Smtp-Source: AGHT+IFLgjM/Q6G7rxwh5NfZb/sd2wW1pmmEh6Tklrz1rwg0LxioDpB1/icVF5YClo2OTv0vzy8a X-Received: by 2002:a17:903:124c:b0:1e1:a54:1fe8 with SMTP id u12-20020a170903124c00b001e10a541fe8mr14874014plh.53.1713881659165; Tue, 23 Apr 2024 07:14:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713881659; cv=pass; d=google.com; s=arc-20160816; b=u0w9BhyMqtv6ff8cjeJS24vKmfwPkcXD8vXLU1knO9tOazGs1SsNQk/2wHkcsXfM/5 pnhVXj/t46m9SXuszcXVLu6AOiHXe0vaBY+DgiVn4Ic0rOEa2yHQDFUjpYifkcNOSHHk VZGMorvj3R+jN2pULjhNF3dp3i812cZSf3zZyAuKLRE0wdymozhIouxtSsTGxpPPMxAs c2alLv9OoI5TPpPF4lyqJ+LQg2ywsfL69F2G0B9fiGw4JQtQ+R8+JZGZR6tanpFUtiLU 4Q+ULkyI7uiv4BPJ2H9sG2ZY6GPjZKMrEw9fGql5GIL/T+EANatC1XcvaSroyGieNCG1 8h2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zYeAlMW1SsjV5lzQvuhmib9w9fZnmxBE5X2T4UP4XKM=; fh=oIins7MzVRiY8Mk4nvfwCUGnlxnZLo6wwFvltSJzTdM=; b=wEszTC8X0jtVu6RqF8wHHCV6QWlhW+2rJ03m4V53whvIspQGnBfLM4VvSOkV2jEPMU /UiaOyBgI9+dAcxNXJee1L+ievngrquYFh1UFF+03aZxFFrUKW8DyDSFDH1RgjOJRa5e LhKN6zaW+wiULA6t/dn1AHHOGmtbKSWiMHDDp76j8ZYi9zGGS+7fGKyB3Ns4N1cJ+g65 5P8LADdaFzb8uTGdYWtFq07V/NMVHuAb0pzrj5MIFDvN/MWm4Gpu6J3NcA6iBOqZKis7 QUgi6uJJge/HQ9QYRS9psuBsy8f43vQKHV2Ub2jEhu1VaQGpBtfjsy29fvCYKz3n/PAn 8evQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=J6wdU5rW; arc=pass (i=1 dkim=pass dkdomain=resnulli-us.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-155108-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155108-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id be6-20020a170902aa0600b001e85dc64073si9481328plb.436.2024.04.23.07.14.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 07:14:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155108-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=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=J6wdU5rW; arc=pass (i=1 dkim=pass dkdomain=resnulli-us.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-155108-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155108-linux.lists.archive=gmail.com@vger.kernel.org" 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 4106EB2558E for ; Tue, 23 Apr 2024 12:04:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5B3413CF9B; Tue, 23 Apr 2024 11:53:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b="J6wdU5rW" Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 434C11292EC for ; Tue, 23 Apr 2024 11:52:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713873181; cv=none; b=QWf+xCiXBwbn2vaRk2bpBTHPxFo4yIyyIlBFUEo0DrayijYm57FxDd7xTVbr1JtpXQ/O29d4KpBWY+dz+WJrUgYEGz1DG0bgFvSXtZrBJNjjo1ko2ay0KjEQQ8dLYYYbAab7xnTUd1GZWlfCVRwNzNNoO309KBl2tQaz9R7DBnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713873181; c=relaxed/simple; bh=zYeAlMW1SsjV5lzQvuhmib9w9fZnmxBE5X2T4UP4XKM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QACXpgW8VS85F5D4bTtqNnF5B+h6xobiabYD46gvEsOcoCw8MCn+UJgwbQofkTJSkv5uMlVRE7iB0/9eC1i6fFh2TWz/zg5qeoAQIwVeHytwqeEVNM3L1mr7nYtQxhTLO8mNEItuRuhXsWTBJ70cf6Ni4jF0NUctap7OKPhtJPQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us; spf=none smtp.mailfrom=resnulli.us; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b=J6wdU5rW; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=resnulli.us Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-34b3374ae22so1753014f8f.0 for ; Tue, 23 Apr 2024 04:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1713873177; x=1714477977; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=zYeAlMW1SsjV5lzQvuhmib9w9fZnmxBE5X2T4UP4XKM=; b=J6wdU5rWu1sYt7DIjHtoJzMw4dG3bEXwc/OYsQtCrZCkQOxlFhW5UeIELWi/Y3dBzf DdXDvgYEQYIj/WgVVgx8zvrf0lpFhG9r1TAGLPaKzjEh/vE7PE79rXWIItWDszAnZc6p +eT7/Z9vZr8BCXkQLev5eHdJuKp9ZoIO/EcWaSui7tzF520jZiNXcUaWdP0O0RxiD0oA fobYl9b7URaCeoKUBkD9nRXBDI30AYMRvA3eSSqa3ffDaI4M2qahv3pltC8SGdpfAaRE XnHzV/iEwQIsRSooB0NIAS0eyrRl4f8El1LJM/lfOPtIeoeABZ6gaWqcl4doIKVW6DRa TGtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713873177; x=1714477977; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zYeAlMW1SsjV5lzQvuhmib9w9fZnmxBE5X2T4UP4XKM=; b=bwps+WirZ8iHhsDTSVWdOyMa3GcbIuWHb4BjvNQ7hHYX02OQoTxcgQVdXzH+R3MDeu MvIhqLajNymSWkxlojlVzaEupKtPSstB8/2sLFg1q1i8G9SIJtVPFr8UDq12h0v/LhC3 tzfcS9JIrcXd4U8m6wof5D7s70rVaxUaz9qFzHK+cJTNThC7A9UqXlu843tql0F6RODg qo/EtQKvjAXkApF9xS2aogkijtNtu2BE2jP5Gq9EeiUvkb7bEG2tizHA0nP2ojT+6LFU YaPkGIVpC6XPA2P9atqVIHunFFd5t6qHOwXKfutxwUWA9vRatDqzR8+MeeT6C0SeKIW4 fJjA== X-Forwarded-Encrypted: i=1; AJvYcCUmulTnQ4iacCK9omOQoP29elsCmoPblvCTf7HNP/U/8afTgVikLos4CaYUyYH9BWaJDVw2eu/nQbbzxsdaiyjaGVWxc8fCsHuBwuy2 X-Gm-Message-State: AOJu0Yy1BJ3GCDPqYEU/bjvfVfORh1Xng+aBJersk7HeCGY2nHgEeIXm ftG0uDTB4owQb06inuyYTy6L6fnPxz5e2enAAV4w1Eos0Fovu0K787iRB6kBQ8U= X-Received: by 2002:a05:6000:905:b0:33e:c528:c900 with SMTP id cw5-20020a056000090500b0033ec528c900mr9913946wrb.55.1713873177417; Tue, 23 Apr 2024 04:52:57 -0700 (PDT) Received: from localhost (78-80-105-131.customers.tmcz.cz. [78.80.105.131]) by smtp.gmail.com with ESMTPSA id q4-20020adffec4000000b00347f6b5bb6dsm14382274wrs.30.2024.04.23.04.52.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 04:52:56 -0700 (PDT) Date: Tue, 23 Apr 2024 13:52:55 +0200 From: Jiri Pirko To: =?iso-8859-1?Q?Asbj=F8rn_Sloth_T=F8nnesen?= Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yisen Zhuang , Salil Mehta , Jijie Shao Subject: Re: [PATCH net-next] net: hns3: flower: validate control flags Message-ID: References: <20240422152717.175659-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240422152717.175659-1-ast@fiberby.net> Mon, Apr 22, 2024 at 05:27:16PM CEST, ast@fiberby.net wrote: >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. > >Also propagate extack to hclge_get_cls_key_ip(), and convert it to >return error code. > >Only compile-tested. > >Signed-off-by: Asbj?rn Sloth T?nnesen Reviewed-by: Jiri Pirko