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 2527786269; Tue, 9 Apr 2024 11:31:27 +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=1712662291; cv=none; b=KnEhCaJq8a/+5gcuz7jS4EIguHXlGOoMuwunkVakUfLdpyo6Tqd3Mzu/BRxgjxSPzfp/CuFtEbNxfAmKxMVSJVzJERkVav+AkORZp4dsZvP75+uQDcuRlHY2QZHwBXH/TicxvfpOnXO84Zo05EzjPwTCYtQf4k7UeEG1yCEbmA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712662291; c=relaxed/simple; bh=rm1QdbQ5uW835B6nce57jWAfuuDhA8pehQI5461e4TY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qSrQnEIvxn3Zs18/3u+tB4l2Z9cUf6+9sX7ygBFajBB9lfMipOqCI0fd4vz7ljczZfnM44r2e8X9Vn1A51bbTAHs/f5ffVz16fFQcWcFLRrsY33qDkj2Gtm+BfLauYFIG/Pp86DHrFjLWPbtArnR0w7ItcV6OL8zGUtffhRBEro= 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=GP/brSoG; 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="GP/brSoG" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id C05EC600A2; Tue, 9 Apr 2024 11:31:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1712662285; bh=rm1QdbQ5uW835B6nce57jWAfuuDhA8pehQI5461e4TY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=GP/brSoGAVzWjHUe8MJi8zpoKrisXc08/3+hy2vQPPUfi+I5zfcEuo6JO9N0MEFPe D1JIINqniu2Uncb8PgN7LNGtuaMmdW9ove/C6tIfomDTfELZq7l0Vez64C9mDajdHS S8Ihi+DhBQCEeViefdnWXGu0uuiAJAva2htLvBaQlnSAOewPdL9PSPj3dnm+fhxCLR siST75q+UdxAN8dFgNdSzYU+ot2iaGKl5r1UM+TkBXjrJXjI3Qr3hH/29192EDRrV7 uJKQWxhx1Dwo5WCeDwik9a6z4Yq5cK/FyCCPHldfIw0IQusq51sSUEN7TVl6s23Y3l FEW+pZKBhDuKw== Received: from [127.0.0.1] (localhost [127.0.0.1]) by x201s (Postfix) with ESMTP id 2CC7C200221; Tue, 09 Apr 2024 11:31:16 +0000 (UTC) Message-ID: Date: Tue, 9 Apr 2024 11:31:15 +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: [PATCH net-next 3/6] flow_offload: add flow_rule_no_control_flags() To: Baowen Zheng , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Louis Peens , Taras Chornyi , Woojung Huh , "UNGLinuxDriver@microchip.com" Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yanguo Li , oss-drivers , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Edward Cree , Jamal Hadi Salim , Cong Wang , Jiri Pirko References: <20240408130927.78594-1-ast@fiberby.net> <20240408130927.78594-4-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 Baowen, On 4/9/24 2:09 AM, Baowen Zheng wrote: > On April 8, 2024 9:09 PM, Asbjørn wrote: > >> This helper can be used by drivers, that doesn't support any control flags, to >> reject any attempt to install rules with control flags. >> >> This is aimed at drivers, which uses flow_rule_match_control(), but doesn't >> implement any control flags. >> >> Only compile-tested. >> >> Signed-off-by: Asbjørn Sloth Tønnesen >> --- >> include/net/flow_offload.h | 13 +++++++++++++ >> 1 file changed, 13 insertions(+) >> >> diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h index >> c1317b14da08c..415d225204a1f 100644 >> --- a/include/net/flow_offload.h >> +++ b/include/net/flow_offload.h >> @@ -471,6 +471,19 @@ static inline bool >> flow_rule_no_unsupp_control_flags(const u32 supp_flags, >> return false; >> } >> >> +/** >> + * flow_rule_no_control_flags() - check for presence of any control >> +flags >> + * @flags: flags present in rule >> + * @extack: The netlink extended ACK for reporting errors. >> + * >> + * Returns true if no control flags are set, false otherwise. >> + */ >> +static inline bool flow_rule_no_control_flags(const u32 flags, >> + struct netlink_ext_ack *extack) { >> + return flow_rule_no_unsupp_control_flags(0, flags, extack); } >> + > How about to squash this change with series I patch since they have similar functions for driver to use. Do you have a link to the series, couldn't find it on the netdev list. -- Best regards Asbjørn Sloth Tønnesen Network Engineer Fiberby - AS42541