Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp398970lqd; Wed, 24 Apr 2024 06:04:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUrz5+aLp+O+yq4t6L0w5AB7i/sdZL9/ZU0m2NENAAZfOCIVvTmCgNvKmImtRma6294cLizpzDzm3XHqA9gaPabj8RC7xlPAqXRS+innA== X-Google-Smtp-Source: AGHT+IFv2izaQxIwwVAeNrhsfSLTpPa1PFc9JfHq4lnwOR7omLEzSpARaJ9kttnM8olDaSMMPEgK X-Received: by 2002:a05:622a:5d2:b0:434:feb7:9d77 with SMTP id d18-20020a05622a05d200b00434feb79d77mr2624383qtb.32.1713963875675; Wed, 24 Apr 2024 06:04:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713963875; cv=pass; d=google.com; s=arc-20160816; b=eRqIGNWhLK5aDHnaj5vwu/Ji4FslrFfzUcryVanhCiimqBQ+NN7jJaTfIcMU1WVT4l F14eYkMPCm4B0DHtz/5rP4sQ+zup3L1vHh59c/zUIe/Vj6k+TWmyCXwcg+m1xyGPQC8I dw2rB4tPkOD0psfGFbcIxMucihgpZe2wkkEmUY0L17yqEHuk7H59kzK1ltnsdvOEx2qp 2TybIV17PMDSAypcKuRGcfF5N7uqaEhy+kqxRA+73gJDNvpncYNrXsxQesOmnHW1yk+K 1DqDNQJT+nJ755mNLDO2jAaFgNNBBv7H/03WU5FS2D2XVVGGFufkMv8HdonPnVSl59QW INBA== 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:references:to:subject:cc :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=apjz49t/OeffXH166b76VyqGkW44Vc0v5uVQrC0o0po=; fh=obpC3ZlMnrR0bqZSughtNb7t9mS+Rg8wpjHPTmBJ04A=; b=b6/H1qCDnlOanYoiwQcV4XHmajZ5T+itIA6TGNI04Tn8TyjFFmTmmG/PRsMSjFcuJl rit4mRHwNu6OLCgetep6rf5JxBlQA+gmP5DqMNRQwHSLB3sPZGSQz5PptwlQx8n89L0t hurme8M2+jrLc/ZdSzAKBgORhk6zcibJoRvVJIj+P6r/PCoHoNQGRgYz1GjdRJ492Z2h u0a7qI4sk0eEGgr/Iilg+9kASH/+9lJhy29PVHot7HKOcS8KIzh8aQmZS80gzOWuHu78 1j0owimneT9YYIcGJm7vYQkM+qvD/w+2QOftZ7UUddnCwS6S6RAkJcmDWzpazPoiRDbW 6TzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-156919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ew11-20020a05622a514b00b00437c0ce6da1si13540014qtb.694.2024.04.24.06.04.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 06:04:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156919-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; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-156919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 6529A1C23106 for ; Wed, 24 Apr 2024 13:04:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F95B15B158; Wed, 24 Apr 2024 13:04:26 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 BE18315B12E; Wed, 24 Apr 2024 13:04:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713963866; cv=none; b=j92/oBexSYUzUm9DRdCOzPK7WuayWHao/lJveOv0ynLgOvcbXcfZGvHiffOceqBuL++bGf0Z4gTJErDjJDMYv01U6Z9wZUcfkkT8tu85qMnQWgp8F0qM8WmBC08TC+Qq3xyWd1zClLNRsMd9Ri4RHqBYZ1m1XSNc4MJIiIxWSVk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713963866; c=relaxed/simple; bh=apjz49t/OeffXH166b76VyqGkW44Vc0v5uVQrC0o0po=; h=Message-ID:Date:MIME-Version:CC:Subject:To:References:From: In-Reply-To:Content-Type; b=OqMWiD6nT5Kjvxnom//TYYlcKkRYq7pFCqCS/Fgu6MYLVWzwIQF2nimKqJwi+LO+0Q6mkcczAAGwT/Bv+j3i/CfdkX09vj2b5ypIL5Sf31VHg5H5UNO70+SZ2owAyZYyWyk2INDjPdlfyLlq6mjl15RygE1hAo1857H+btS+rWI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4VPfLF1zT7z1HBjj; Wed, 24 Apr 2024 21:03:17 +0800 (CST) Received: from kwepemm600007.china.huawei.com (unknown [7.193.23.208]) by mail.maildlp.com (Postfix) with ESMTPS id BAA9618005F; Wed, 24 Apr 2024 21:04:18 +0800 (CST) Received: from [10.67.120.192] (10.67.120.192) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 24 Apr 2024 21:04:18 +0800 Message-ID: <3d245976-6509-4260-b232-04637c644350@huawei.com> Date: Wed, 24 Apr 2024 21:04:17 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird CC: , , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yisen Zhuang , Salil Mehta Subject: Re: [PATCH net-next] net: hns3: flower: validate control flags To: =?UTF-8?Q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , References: <20240422152717.175659-1-ast@fiberby.net> From: Jijie Shao In-Reply-To: <20240422152717.175659-1-ast@fiberby.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600007.china.huawei.com (7.193.23.208) on 2024/4/22 23:27, Asbjørn Sloth Tønnesen 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 > --- Thanks, Tested-by: Jijie Shao