From patchwork Tue Dec 26 09:42:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 183299 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp770051dyb; Tue, 26 Dec 2023 01:46:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGH/nzb7yO7M1TjenchavRJ7m6Eu1HaQTppfIGIWKVgF8x0XJ4mOxFOqkdgFFiOqEoKlK3z X-Received: by 2002:a17:902:ea06:b0:1d3:a9bc:96ec with SMTP id s6-20020a170902ea0600b001d3a9bc96ecmr8466655plg.22.1703584006443; Tue, 26 Dec 2023 01:46:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703584006; cv=none; d=google.com; s=arc-20160816; b=moTFXoaiCVBial6yzcbn1EzJFPrucNUBStSwNuh5a8b/ebcvG/KHV4SpSecjBDaxGr Rkqb5gGKG98sfNjc+cihyt8l2x6/aG6JqpapkTXznvZBZJ/ZYjwVJVHrpebDwWZ8kL6H X9ZvLRnWUZXhfyDLNWzH3Caea7b7eZtmocik/I+1SJDk7NXMT5P8pPaPCwU6RkakekvI KHHeI+CHrB+qdcUNbr8tWEiw7P8Di46rk9mZwzxhlmdKFG8f/ZQmv2Mj2ELIVDCe/4em jMcGPFL5sKjAN2aAJdta3VeRSyQHHiUAUgqqJeBKu3oQ9d/TMCjO77dDsBO2Gb4i739D We2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0IDZtbG4v2D/3gzZBAnMhXPdGFBE/PiGd8NWFLJcQ2o=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=TnmCD3lAkdZ+7lSoudv6Q8pc0m/dduLfnnQGm7zrUVz//Sz9r94VJP/ricMvYGjHo7 mMyNmPikBuWn5WEKG6StQ4RytNwezANpMu8ugE5YC1uRBBWbAZTqPGNV2QcPy4TEl1Xv 0v9GJGJ1lBxLDfP9MzPtM15fwNEJ/AdScULh6crCCipnuoW8ro2Om8ZJ/4AN2KIsHIxQ 8B/NcvcZchQcAVS7u4jKmETAG/j5sUL1z1KzDeoOONNMvmKeGpV+GpLLP99Ao1m1u0er M244o9v432TWVZczkzs84eUE2vqqqa5mXzZMsC2udjMmBtOSrMmKD5k+AHdBHOFbQDcn ZeiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=m1VmFSIP; spf=pass (google.com: domain of linux-kernel+bounces-11458-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11458-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u8-20020a170902a60800b001d43896a9d7si5329750plq.407.2023.12.26.01.46.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:46:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11458-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=m1VmFSIP; spf=pass (google.com: domain of linux-kernel+bounces-11458-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11458-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3CF12282FDF for ; Tue, 26 Dec 2023 09:46:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E90051009; Tue, 26 Dec 2023 09:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="m1VmFSIP" X-Original-To: linux-kernel@vger.kernel.org Received: from out-185.mta1.migadu.com (out-185.mta1.migadu.com [95.215.58.185]) (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 3C10E4F8B7 for ; Tue, 26 Dec 2023 09:44:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1703583840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0IDZtbG4v2D/3gzZBAnMhXPdGFBE/PiGd8NWFLJcQ2o=; b=m1VmFSIPCMZXkXzuvhyam10aXz9xdCdqT28CAdMEESVSM+XFsNpmxgeCXNrxPkzkyuBbQo nWKrmaQnlFJfCg2iWHt7daKDptR0HMNrlMfK241CVmYB3imjIbigjfFYL4f4mdiQx71CRk DIzApJcx+sOKDWeBa9ja4bJu69/7S+I= From: George Guo To: horms@kernel.org, pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, George Guo Subject: [PATCH 09/14] netfilter: cleanup struct nft_expr_ops Date: Tue, 26 Dec 2023 17:42:50 +0800 Message-Id: <20231226094255.77911-9-dongtai.guo@linux.dev> In-Reply-To: <20231226094255.77911-1-dongtai.guo@linux.dev> References: <20231226094255.77911-1-dongtai.guo@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786337303214473826 X-GMAIL-MSGID: 1786337303214473826 From: George Guo Add comments for clone, destroy_clone, reduce, gc, offload, offload_action, offload_stats in struct nft_expr_ops. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 65c41dcdd4be..208cfedb083c 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -892,14 +892,22 @@ struct nft_offload_ctx; * struct nft_expr_ops - nf_tables expression operations * * @eval: Expression evaluation function + * @clone: Expression clone function * @size: full expression size, including private data size * @init: initialization function * @activate: activate expression in the next generation * @deactivate: deactivate expression in next generation * @destroy: destruction function, called after synchronize_rcu + * @destroy_clone: destruction clone function * @dump: function to dump parameters - * @type: expression type * @validate: validate expression, called during loop detection + * @reduce: reduce expression + * @gc: garbage collection expression + * @offload: hardware offload expression + * @offload_action: function to report true/false to allocate one slot or not in the flow + * offload array + * @offload_stats: function to synchronize hardware stats via updating the counter expression + * @type: expression type * @data: extra data to attach to this expression operation */ struct nft_expr_ops {