From patchwork Tue Dec 26 09:42:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504854 X-Patchwork-Delegate: kuba@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 1DADF4D581 for ; Tue, 26 Dec 2023 09:43:09 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eNa/a31B" 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=1703583788; 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; bh=JZxsk+Jzb07h2zuZtmSvZ0zyWEXPJHnNQin19esIT5o=; b=eNa/a31B2+Tvl3x5TdZ+1l5iF9uhme41x+em/lthqENyNR5zztGqw/1yvZk7Lo5dNBiXb8 5h4JKBfpcTMd1EuzLCW8EzpZA9MMbPhkNvoVaTwBEyXRN6x/iNdAZSqcRthIpmsaN22JPD TfMJWyMsCH4R8VybN845OZhdkVd+YEA= 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 01/14] netfilter: cleanup enum nft_set_class Date: Tue, 26 Dec 2023 17:42:42 +0800 Message-Id: <20231226094255.77911-1-dongtai.guo@linux.dev> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Correct comments for nlpid, family, udlen and udata in struct nft_table, and afinfo is no longer a member of enum nft_set_class. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index b157c5cafd14..18ec566cbc34 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -351,9 +351,9 @@ struct nft_set_desc { /** * enum nft_set_class - performance class * - * @NFT_LOOKUP_O_1: constant, O(1) - * @NFT_LOOKUP_O_LOG_N: logarithmic, O(log N) - * @NFT_LOOKUP_O_N: linear, O(N) + * @NFT_SET_CLASS_O_1: constant, O(1) + * @NFT_SET_CLASS_O_LOG_N: logarithmic, O(log N) + * @NFT_SET_CLASS_O_N: linear, O(N) */ enum nft_set_class { NFT_SET_CLASS_O_1, From patchwork Tue Dec 26 09:42:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504855 X-Patchwork-Delegate: kuba@kernel.org Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 5B3974D582 for ; Tue, 26 Dec 2023 09:43:18 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="dp8HSrzc" 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=1703583796; 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=diijefPyY+JAZzp1OGOF2cMFgVmbS72RFlbawZuCE1c=; b=dp8HSrzcJ/Yz8WS07pSPfa5Q9frvRpO3tPNLUQv3Gis/rmb06edDTVOZvmdORsdtROE3vl Wqi7xdYIoh8yCGykebcOal75r1hwZYkZrofv/+2PA72xQCtJYVRh5AnPkIepY8RTmeVbHA 3uk4sI/rvl5GS4P4S7xKfYKopFMuVjE= 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 02/14] netfilter: cleanup struct nft_set_elem Date: Tue, 26 Dec 2023 17:42:43 +0800 Message-Id: <20231226094255.77911-2-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comment for data in struct nft_set_elem. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 18ec566cbc34..82eda4c65ae4 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -282,6 +282,7 @@ struct nft_elem_priv { }; * * @key: element key * @key_end: closing element key + * @data: element data * @priv: element private data and extensions */ struct nft_set_elem { From patchwork Tue Dec 26 09:42:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504856 X-Patchwork-Delegate: kuba@kernel.org Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (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 2AA144D13D for ; Tue, 26 Dec 2023 09:43:25 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="K2qOaIsv" 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=1703583804; 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=IpGgCvekvQc7bdKvRP+sUzLtpSdphIQ4D71t1O0iu/o=; b=K2qOaIsvvbc3RQnM7y3T9Hi7PCrnioH33+nU/C/ysEAGXf6zRiC4Bjc1Xy3hyN0s+72o8f MOTCqXyd3ehhgvhu2zxPQgL+XQLS1VFwU6TZk9Paj6eY1xo5nIsWpiIZIxkKkNZ0jft9Yd 7dJ9DxQlfKOw0LoyC+kAlvkIMeanUsE= 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 03/14] netfilter: cleanup struct nft_ctx Date: Tue, 26 Dec 2023 17:42:44 +0800 Message-Id: <20231226094255.77911-3-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comment for flags in struct nft_ctx. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 82eda4c65ae4..adabddc4b0b9 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -205,6 +205,7 @@ static inline void nft_data_copy(u32 *dst, const struct nft_data *src, * @nla: netlink attributes * @portid: netlink portID of the original message * @seq: netlink sequence number + * @flags: modifiers to new request * @family: protocol family * @level: depth of the chains * @report: notify via unicast netlink message From patchwork Tue Dec 26 09:42:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504857 X-Patchwork-Delegate: kuba@kernel.org Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (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 1DB8D4D13B for ; Tue, 26 Dec 2023 09:43:31 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="bn3Ta8PK" 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=1703583810; 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=EwZQLx2dP6eCcL8bAS0PoU4Q4fVzMb/S1zk9b9IjiLU=; b=bn3Ta8PKwrV7zwu4K1uWwNhYe1/cdQ+l1iqiPLL0NPYWnZHgcBuVZ62MnGVEaBxHZCQK7k ZL8t5ciSb5ucRuTbSX9N3QhMCMWC7nieem57zNf30/Yf3GXJxz6WIbyzXTa1wGdXt37jpP MqY7MT0ZvVHuYmcMfYSNgxOPk64T/Rc= 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 04/14] netfilter: cleanup struct nft_set_iter Date: Tue, 26 Dec 2023 17:42:45 +0800 Message-Id: <20231226094255.77911-4-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comments for timeout in struct nft_set_iter, and flags is not a member of struct nft_set_iter, remove the comment for it. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index adabddc4b0b9..a8243cf32e29 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -327,10 +327,10 @@ struct nft_set_iter { * @dtype: data type * @dlen: data length * @objtype: object type - * @flags: flags * @size: number of set elements * @policy: set policy * @gc_int: garbage collector interval + * @timeout: element timeout * @field_len: length of each field in concatenation, bytes * @field_count: number of concatenated fields in element * @expr: set must support for expressions From patchwork Tue Dec 26 09:42:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504858 X-Patchwork-Delegate: kuba@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 D1C2B4EB35 for ; Tue, 26 Dec 2023 09:43:38 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="tf7Jdrzn" 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=1703583817; 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=P/WuOHRAYvaP7I2DX531nPKJwXne70nh/3fxHOzzGiA=; b=tf7JdrznhaN4E6fQRw7ouq2L5O1nTsVhLkIdmtYaog/D+ujk1eSf8Yh6ICqpQHF0XMgnb9 PQsUw4eNCwwYPljUcEoKFOO9agWl7mcJcPyE2T9o93FpNSmps2dHudxLttkkVicp5ozUex qDVv1SLocvaHp8pCfURxIYvLEdRyi5I= 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 05/14] netfilter: cleanup struct nft_set_ops Date: Tue, 26 Dec 2023 17:42:46 +0800 Message-Id: <20231226094255.77911-5-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comments for commit, abort, estimate and gc_init in struct nft_set_ops. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index a8243cf32e29..1e24db91a37e 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -424,9 +424,13 @@ struct nft_set_ext; * @remove: remove element from set * @walk: iterate over all set elements * @get: get set elements + * @commit: commit set elements + * @abort: abort set elements * @privsize: function to return size of set private data + * @estimate: estimate the required memory size and the lookup complexity class * @init: initialize private data of new set instance * @destroy: destroy private data of set instance + * @gc_init: initialize garbage collection * @elemsize: element private size * * Operations lookup, update and delete have simpler interfaces, are faster From patchwork Tue Dec 26 09:42:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504860 X-Patchwork-Delegate: kuba@kernel.org Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (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 49E274EB33 for ; Tue, 26 Dec 2023 09:43:45 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CJ/u/Yoc" 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=1703583823; 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=HGLhO5Ou1/1sy5iMfPRnAioEor7eJGTaCFhyISDdmuA=; b=CJ/u/YocoRH87w7XAkDO5W7pMkoLV+bxFqEqGej2CADiGdDvhuGaCluJSIZzOOQCC52gzn 7feu7abBgBDpuImPkJDQt6a66b9Bz0rG94Dvp2yrniFyOPY/eJuk421VZxyfk4s4bduhIu lEneILhFX9q2md3kWR83Uwn01fLesEo= 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 06/14] netfilter: cleanup struct nft_set Date: Tue, 26 Dec 2023 17:42:47 +0800 Message-Id: <20231226094255.77911-6-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comments for pending_update, num_exprs, exprs and catchall_list in struct nft_set. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 1e24db91a37e..91a1cb6fadf1 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -546,13 +546,16 @@ struct nft_set_elem_expr { * @policy: set parameterization (see enum nft_set_policies) * @udlen: user data length * @udata: user data - * @expr: stateful expression + * @pending_update: list of pending update set element * @ops: set ops * @flags: set flags * @dead: set will be freed, never cleared * @genmask: generation mask * @klen: key length * @dlen: data length + * @num_exprs: numbers of exprs + * @exprs: stateful expression + * @catchall_list: list of catch-all set element * @data: private set data */ struct nft_set { From patchwork Tue Dec 26 09:42:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504861 X-Patchwork-Delegate: kuba@kernel.org Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 11DD14F21F for ; Tue, 26 Dec 2023 09:43:50 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="LZkpNINK" 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=1703583829; 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=tY2JULd1vhiqapQurVNxnnqdDvA2GDjfHUC555PpUGc=; b=LZkpNINKMbbt/SUKeNFXhOyD8V+tcoK7X+16Ut5EKTzEck/pZ9ZGOA27NsyxSQ5fz/NsmC bzeuaZbvE4p1kFFP2smiJLDMnk1pxuRn5Cr5oSyD6HxaBYBC/bJ0fU+oiS/h2nvRtiZeL1 uLRCnxWXKKYIdg9Ct4zMH+jW2AZuqkE= 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 07/14] netfilter: cleanup struct nft_set_ext_tmpl Date: Tue, 26 Dec 2023 17:42:48 +0800 Message-Id: <20231226094255.77911-7-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comment for ext_len in struct nft_set_ext_tmpl. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 91a1cb6fadf1..55f1b3c7dc1f 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -701,6 +701,7 @@ extern const struct nft_set_ext_type nft_set_ext_types[]; * * @len: length of extension area * @offset: offsets of individual extension types + * @ext_len: length of the expected extension(used to sanity check) */ struct nft_set_ext_tmpl { u16 len; From patchwork Tue Dec 26 09:42:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504862 X-Patchwork-Delegate: kuba@kernel.org Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 DBE374E1BB for ; Tue, 26 Dec 2023 09:43:57 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="V1ADvl9p" 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=1703583836; 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=H13iUT2LC2IVV8agCsIZaf3XhkP8F5t9KpuQnr3FssU=; b=V1ADvl9p+Wx0L58Qqnk9ZJU2xjF1DwXEeOkAy0uS7k1WYpW+rpg+ReDCGJ5YVmxHX0y5mD L1CdrwG41Ps89IuI83uForrO7Iphhhqn1jVjfWJXKhmTp98LFZE/zkFY3nBUO3rXQozQOZ wJ+HiOkK9zJbm489Pq84iXsSIIRjUg4= 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 08/14] netfilter: cleanup struct nft_expr_type Date: Tue, 26 Dec 2023 17:42:49 +0800 Message-Id: <20231226094255.77911-8-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comment for inner_ops in struct nft_expr_type. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 55f1b3c7dc1f..65c41dcdd4be 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -850,6 +850,7 @@ struct nft_expr_ops; * @select_ops: function to select nft_expr_ops * @release_ops: release nft_expr_ops * @ops: default ops, used when no select_ops functions is present + * @inner_ops: inner ops, used for inner packet operation * @list: used internally * @name: Identifier * @owner: module reference 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: 13504863 X-Patchwork-Delegate: kuba@kernel.org Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 4AB784F8BB for ; Tue, 26 Dec 2023 09:44:02 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="m1VmFSIP" 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org 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 { From patchwork Tue Dec 26 09:42:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504864 X-Patchwork-Delegate: kuba@kernel.org Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 25E4D51C41 for ; Tue, 26 Dec 2023 09:44:14 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Q+AjtJxf" 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=1703583853; 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=Enz7PIMkFIUCxVHWnXh2ChdEcuA703jE9iFHAc9Olsk=; b=Q+AjtJxfY7CCNw7T2vnYRNb5fwHPpw2Oul1ENY5/az67MsHW8Z7p5hHblbGk7j0BL6eRhy NGvetNGRzqtvLtjXWFW5JkDCBcax3BUM/UR14sIf/KigKM9s+3oL9gYVar1Qt5LKA/erPl ca4sbqwQ2PZAPHdmZvOUgdmCkBUGsZE= 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 10/14] netfilter: cleanup struct nft_chain Date: Tue, 26 Dec 2023 17:42:51 +0800 Message-Id: <20231226094255.77911-10-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comments for blob_gen_0, blob_gen_1, bound, genmask, udlen, udata, blob_next in struct nft_chain. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 208cfedb083c..2ee906429cc9 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -1060,14 +1060,21 @@ struct nft_rule_blob { /** * struct nft_chain - nf_tables chain * + * @blob_gen_0: rule blob pointer to the current generation + * @blob_gen_1: rule blob pointer to the future generation * @rules: list of rules in the chain * @list: used internally * @rhlhead: used internally * @table: table that this chain belongs to * @handle: chain handle * @use: number of jump references to this chain - * @flags: bitmask of enum nft_chain_flags + * @flags: bitmask of enum NFTA_CHAIN_FLAGS + * @bound: bind or not + * @genmask: generation mask * @name: name of the chain + * @udlen: user data length + * @udata: user data in the chain + * @blob_next: rule blob pointer to the next in the chain */ struct nft_chain { struct nft_rule_blob __rcu *blob_gen_0; From patchwork Tue Dec 26 09:42:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504865 X-Patchwork-Delegate: kuba@kernel.org Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 A3F73524CA for ; Tue, 26 Dec 2023 09:44:19 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="VA9m+0eT" 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=1703583858; 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=WtCODN2ut5B36lflwZvDOFc9jG0uUJhY+OWc+SFFpyQ=; b=VA9m+0eTMeq6v2h6MbhM82UcediuFgMYcymAM2n9ve5kzqpP+KQ5RO88USUHON17J/Wv/z wDmmt8vQsGg1Arlt2Jxqy7LJeH5bCYg9TyMSE2VKNE71FTcyRiud3UMeEBBwMrOcujeJI7 hgU95zeDOovWqAdbJ7uC1wQNYhm1kGI= 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 11/14] netfilter: cleanup struct nft_base_chain Date: Tue, 26 Dec 2023 17:42:52 +0800 Message-Id: <20231226094255.77911-11-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comment for flags in struct nft_base_chain. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 2ee906429cc9..526332bde1b4 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -1172,6 +1172,7 @@ struct nft_hook { * @hook_list: list of netfilter hooks (for NFPROTO_NETDEV family) * @type: chain type * @policy: default policy + * @flags: indicate the base chain disabled or not * @stats: per-cpu chain stats * @chain: the chain * @flow_block: flow block (for hardware offload) From patchwork Tue Dec 26 09:42:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504866 X-Patchwork-Delegate: kuba@kernel.org Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (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 5C121539EC for ; Tue, 26 Dec 2023 09:44:25 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="uHPnSNt7" 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=1703583863; 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=AmRdlIlTFvsGqdkNb3BKpWuB8bJE73vQSHmgBrz+694=; b=uHPnSNt7jI7Wkji8vG7Fm5kd70eP4RgIvmULyn+cjC0V3T2nOZtkzpmB8gOLI1x8pnfv08 b9CvhHgnSM9rszSMhXohQjzM+q/JySMwzCLkKul0mN+SHJZAavuxQ2NgOJ6y0/laMoLFwx qhAK6NO+pz4QsYitaO9ltx7rkLoSV+s= 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 12/14] netfilter: cleanup struct nft_object Date: Tue, 26 Dec 2023 17:42:53 +0800 Message-Id: <20231226094255.77911-12-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comments for udlen, udata in struct nft_object. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 526332bde1b4..dab1727f3487 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -1301,11 +1301,13 @@ struct nft_object_hash_key { * struct nft_object - nf_tables stateful object * * @list: table stateful object list node - * @key: keys that identify this object * @rhlhead: nft_objname_ht node + * @key: keys that identify this object * @genmask: generation mask * @use: number of references to this stateful object * @handle: unique object handle + * @udlen: length of user data + * @udata: user data * @ops: object operations * @data: object data, layout depends on type */ From patchwork Tue Dec 26 09:42:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504867 X-Patchwork-Delegate: kuba@kernel.org Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (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 D33C554277 for ; Tue, 26 Dec 2023 09:44:29 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="C0sepe7v" 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=1703583867; 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=hp/0/EtTdpMsUAddj6nOU9DQyFHJ3X7EwlFVc6kkPQM=; b=C0sepe7vQ9c5pa4c+/WXMOeWpUbZkmkRIj+cyjmF00LtSuB7V9z7cSw2LMSb+Em/YHM9CT IFz5sFodVtvDBEur4UMSEJUbpsarcaS0JPz2ZX9gdLjZR/X1IrDxX3Gcn6JM2RCE25g87g eSvxnxwHjZRmJr3+wbyF5zesOdpHijw= 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 13/14] netfilter: cleanup struct nft_object_ops Date: Tue, 26 Dec 2023 17:42:54 +0800 Message-Id: <20231226094255.77911-13-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comment for type in struct nft_object_ops. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index dab1727f3487..505128d10073 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -1373,6 +1373,7 @@ struct nft_object_type { * @destroy: release existing stateful object * @dump: netlink dump stateful object * @update: update stateful object + * @type: pointer to object type */ struct nft_object_ops { void (*eval)(struct nft_object *obj, From patchwork Tue Dec 26 09:42:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13504868 X-Patchwork-Delegate: kuba@kernel.org Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 785205466B for ; Tue, 26 Dec 2023 09:44:33 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="jcZJD8fA" 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=1703583872; 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=OLqrcEqlQDuXOmtMoD41DhPaHHKeGyUrjqKv3FgY7JM=; b=jcZJD8fASaNXDquW+AXlv17kgtzk/MAMMST3c01jyYwDTPW8vbVbKmgeGdMg27PVJRqwtP 3L7K7OkWooSRnOOQRZmfjzSLtgoP171Jz4oAVdj8a3cMfSZiybw7tSmIvhlEnaCGvLRogf BEvSqJzM3OTW/loYXqjAca5eRT7TysE= 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 14/14] netfilter: cleanup struct nft_flowtable Date: Tue, 26 Dec 2023 17:42:55 +0800 Message-Id: <20231226094255.77911-14-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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Patchwork-Delegate: kuba@kernel.org From: George Guo Add comment for hook_list in struct nft_flowtable, and remove comments for dev_name and ops which are not members of struct nft_flowtable. Signed-off-by: George Guo --- include/net/netfilter/nf_tables.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 505128d10073..a880e9439cc2 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -1409,9 +1409,8 @@ void nft_unregister_obj(struct nft_object_type *obj_type); * @genmask: generation mask * @use: number of references to this flow table * @handle: unique object handle - * @dev_name: array of device names + * @hook_list: hook list for hooks per net_device in flowtables * @data: rhashtable and garbage collector - * @ops: array of hooks */ struct nft_flowtable { struct list_head list;