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: 183291 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp769119dyb; Tue, 26 Dec 2023 01:43:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUqfp5EvI+OY2xkmGaZ6pwrA6H3B6fNXqeKzPk26V0rcmjEooDSdqgB6Ipjp9gjINFfHef X-Received: by 2002:ac2:4d13:0:b0:50e:697c:5ec8 with SMTP id r19-20020ac24d13000000b0050e697c5ec8mr1533298lfi.6.1703583814338; Tue, 26 Dec 2023 01:43:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703583814; cv=none; d=google.com; s=arc-20160816; b=fNLqYmCb6Up9Chi2ZHXt09NmbSl73ZPuMi+af22vNJpmU5tqocbDbRUR4yKOEVW1NS 9U5Q3xMnMoOliU7fb7JXD/j8ANK88QRGBuhGYfyfKP+gZghxXG9NBTpSsHo1aClWXr1o Jf05WlULgJXmTOMQNPd9ubkcGe+wkhmWJr0Z6n6+lp4zwx9sftjPAII40T3E5pUJW89X KhMbVvLabVItANIy0DpxcO7Yjo5yNWResAgVJ9LHPonlvz13sQfppYIqKewwCSeQtgzK 3WcAWDD5j9DNMoM2vheDNiei9mbT9/uqJl+LjmAJaDH7xNwGbxSxW+JIIOivC1SFv0TK 686Q== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=JZxsk+Jzb07h2zuZtmSvZ0zyWEXPJHnNQin19esIT5o=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=vHM/C/iPh1Yv6LGSm3Qfg2s1MFhUqb75rZRdhdvxnHW5abUQWf26aWm3ogcKiZ5Snh ppNUKBKiOh/BRdDY5cvuxXiU8/RD7fkXXKsASimIXQrC1MThXTCpd/1yX/lwk2/T5/KF goCTpl90i8e6ubPOdcioA8B07K3YMIAmJHw356WcEdQOEQHm+p36gY9DED1PRChcqDNC nabslVR5vcn5jhtzX8yuRcbjad/1QRpha/j2Vp/beaUNBwneMcBNRuHJv+KP0JH0pSRX agDmtF16PEEV+DLdfwxSgM6/pGmculqN3phe+Hcniz7Ppx8OLkbjdpB0UI9fc70LqImb VmgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="eNa/a31B"; spf=pass (google.com: domain of linux-kernel+bounces-11449-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11449-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z67-20020a509e49000000b0055307054082si5244410ede.176.2023.12.26.01.43.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:43:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11449-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="eNa/a31B"; spf=pass (google.com: domain of linux-kernel+bounces-11449-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11449-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 am.mirrors.kernel.org (Postfix) with ESMTPS id E9C991F21CF5 for ; Tue, 26 Dec 2023 09:43:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84E8D4D581; Tue, 26 Dec 2023 09:43:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eNa/a31B" X-Original-To: linux-kernel@vger.kernel.org Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (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 1F5DC4D582 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 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: 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: 1786337101760316037 X-GMAIL-MSGID: 1786337101760316037 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: 183292 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp769294dyb; Tue, 26 Dec 2023 01:44:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEXv4PJuRTPPyG338nJPuGyBN9bn5g/dKTD5FhQcyq016GpCohT+UQAWISWiwq/Swf5Joyc X-Received: by 2002:a50:d4ce:0:b0:553:a693:af09 with SMTP id e14-20020a50d4ce000000b00553a693af09mr4346990edj.7.1703583847097; Tue, 26 Dec 2023 01:44:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703583847; cv=none; d=google.com; s=arc-20160816; b=nvQckeTywmPZHsYMhO+S5MxRoMkSOnxGFKYDu0jbImaSerJyu+1VgXPb/dTQ3C+Mpk xFJg4PepebEn7THvtctJIFS9iSSxmjQqJMFx9uYkECjXsRyyAEZ3HfWmiBdvxtO/Bajv HEfLONYJJFPRbWpxxFUSrMuUOq9QAiyDAJDP1tp0EdA+wnpKvMJb00PzOCNmPGrZTFof 3gJ97EllTBSWekz2rwBx+Pz6TujmsTxurLLaZCZcBkWkjkhrpzbz7IX6UNaTpkyvg+Ld mF9Mx1PtCFLkCcmel6U/3X1feW9euimVW6LrAodASDOEfW719s4PDlY34XHfrgRz66OI 5qGw== 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=diijefPyY+JAZzp1OGOF2cMFgVmbS72RFlbawZuCE1c=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=ptb62skOU8thRf4tQgqwO8ipk/UUXLQooXq7PyBFxeLIFB5Hc307ZGe0yw6ilS7Llq 0p54WFi7cjuNSUjj5dT27RifT6EF0iW63ZHERMBbVpmZQqrbI/CKvLE0Ny2LNsNGJRwi gOIZpfuqmCKfsVPfqnuq01eFyg2e9L5uA3+JXFE3wPgLnEM4Eu+SpqVaOj2qcUD7ljX/ umg4dX4hTQfMJg/GeYFBsi6N9tDY0KmznJnVnanAkczFZWR/WuyYIuGSGOHzMvHdGqJI jHmf7/yAOR2G8DTQyRlG12fSnFWv2Wxaz3C0ntDlnvCAkEU83NCW0aHuf8hvOOjLCBi4 /jvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dp8HSrzc; spf=pass (google.com: domain of linux-kernel+bounces-11450-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11450-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cm7-20020a0564020c8700b00555105e259csi749669edb.625.2023.12.26.01.44.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:44:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11450-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dp8HSrzc; spf=pass (google.com: domain of linux-kernel+bounces-11450-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11450-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B67631F226A4 for ; Tue, 26 Dec 2023 09:44:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 330404E1D5; Tue, 26 Dec 2023 09:43:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="dp8HSrzc" X-Original-To: linux-kernel@vger.kernel.org Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (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 7989F4D5A5 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 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: 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: 1786337136083689463 X-GMAIL-MSGID: 1786337136083689463 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: 183294 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp769523dyb; Tue, 26 Dec 2023 01:44:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IELnzHL8whDCJdWZx8EZQIzl2/4VQPF4R9NWxsENydTpc+qRvsOXTa6oJDf6dc2muvpfrJ8 X-Received: by 2002:a05:6808:140f:b0:3bb:6dfc:c0ba with SMTP id w15-20020a056808140f00b003bb6dfcc0bamr9148395oiv.10.1703583895804; Tue, 26 Dec 2023 01:44:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703583895; cv=none; d=google.com; s=arc-20160816; b=l4tcUubAGujOZlBYnl9C5S/rON6Vw/b1OkWQ+92d05qNxRToNYpnlKbFVfT5ulCVD9 ntvaJKeS3BOhT/7U0387Z4ZeOEQ0N2tiAJsW8/lzEXZUtP1hxAkfAkaoRS6Fm6mIu3+T DQlsqU/amjA4gV+mMuRLtD5L88TmwPQadIvtdECGAPP0ZxLlrsgxRkyVXmsnCfJqkCBv JqSwKSEL0X2o2UABfbHULCyqNR4AkFe/axbrBnvrQo1msZsSTk4jgF/FBTfDkPQiR68s eJKZHL86inkebpb6V7QL7eOVmzPj8Zbpj5ytU4mvHF34vcd+1+WXTV569letB2G3fzIT uAfw== 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=IpGgCvekvQc7bdKvRP+sUzLtpSdphIQ4D71t1O0iu/o=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=f8zrYkGIygGbkHtVaHN2Huy2hvhz4tF8I9/+iNl1Si9LSXB2OXKYGG6RlOgWZniN+0 ouThh7LaqMOzBYMobE8Jl7GGlsUdrubrKUvWSsK/cUhYX4CcsPsiv7K5fZdMVyrAAWIf 11KnvcIYnecDmZEdRb11gR4NGnKRaaW2n4lSlqpZQ4cQXGwe47wdoueXXSlnUkgZfJzl z1M7CMwMWm7lXTUXTyxmdbz3e1Np3eNVnTq6UpQRgF3FB8uPi7Da7IvxiENnEBSRjma3 nearkqK9anWXXiK0hkZJBmqIdnWQgRjntLIdT2+Zd9wpBnimW+tG1+sOk4h8dHt0VUcd qusA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=K2qOaIsv; spf=pass (google.com: domain of linux-kernel+bounces-11452-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11452-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v6-20020a62a506000000b006d93e48a82esi5471408pfm.221.2023.12.26.01.44.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:44:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11452-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=K2qOaIsv; spf=pass (google.com: domain of linux-kernel+bounces-11452-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11452-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E4DD6B21E61 for ; Tue, 26 Dec 2023 09:44:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4388E4E618; Tue, 26 Dec 2023 09:43:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="K2qOaIsv" X-Original-To: linux-kernel@vger.kernel.org Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) (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 203FD4D13B 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 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: 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: 1786337187374296989 X-GMAIL-MSGID: 1786337187374296989 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: 183293 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp769509dyb; Tue, 26 Dec 2023 01:44:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGU8I5o8JLPQMGpKFnirJI8yX7ge+hpH5RFccQ4w4rt0dtu1KNXNnJUbxHk2s7s4P1KOR+x X-Received: by 2002:a37:de0d:0:b0:780:e4b3:7cd8 with SMTP id h13-20020a37de0d000000b00780e4b37cd8mr8336450qkj.102.1703583893151; Tue, 26 Dec 2023 01:44:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703583893; cv=none; d=google.com; s=arc-20160816; b=IBJVjGQaB87UIuQoDYYoVNzNMMJ6SH6puuxOacwFYamJW7nY+I1vP85mdADAzJbHQB 9A0ET355fni08XxRk/A0sDXliGH8N3WNrO5ZlqSSGUscx7g4iV707o/lLfvmVBVIxWsY jOksR2xPJ5EleTCuygm2CBJjSAVYM1Szs0fAzOeDHWxzYE1FnZGJ7UT80myNCiNcKXAG EtXC81gQ0y+/SGPHgW6N0T8LHOt+AAeKquiDrnKJmP0Xb8V9GzGwxm4/qkT1MYlvDu8K RUzuH0g9Wm71uBD/t0Cp0eechEJQnTMTlVIB6ATVBSOwxSdFCNNmDmQ3cIqDThxWECbz SMyA== 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=EwZQLx2dP6eCcL8bAS0PoU4Q4fVzMb/S1zk9b9IjiLU=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=A7LJLQeoGptEo5h7QjWdAtoF7XbGK85ueMwJnLvBx0ARCyj3yn5v3qBFj5VW7AM82N Z+EzbIxME6cNxKhDSK0aV18dEGcI8tRJ8DfCRpnQ+9gpgQIzz9F2VSKLYtPrJi3Mcd69 NVD6ZCBi5RWgmmPpKskl1fE3vRnpzkEfySJsc8f+k3OwahuC44nu+vT4zXhfy1rx3MPr iBZsOjMooGKQZSMNOSxYhPYEYdQaDN7RnJSgxAjLuwuob9irDpRANe4tijelus9nD3yi ZHCFGzkoyakLbGM3iMclVVtcTVS2Os/DNVwz0NqJzBvefWqv1Lytp34g1piLGpf7+YWo C76Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=bn3Ta8PK; spf=pass (google.com: domain of linux-kernel+bounces-11453-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11453-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x23-20020a05620a0b5700b007811ecc0cf1si10987541qkg.497.2023.12.26.01.44.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:44:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11453-ouuuleilei=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; dkim=pass header.i=@linux.dev header.s=key1 header.b=bn3Ta8PK; spf=pass (google.com: domain of linux-kernel+bounces-11453-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11453-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EB0CD1C208CF for ; Tue, 26 Dec 2023 09:44:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA7634EB2A; Tue, 26 Dec 2023 09:43:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="bn3Ta8PK" X-Original-To: linux-kernel@vger.kernel.org Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (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 E083D4E621 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 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: 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: 1786337184416507324 X-GMAIL-MSGID: 1786337184416507324 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: 183295 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp769661dyb; Tue, 26 Dec 2023 01:45:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMdIfY67H1jZqrFHenHVGVG/YIYJMgfq/a6DxyV3oLZkC50n/Ot9tsQo80CSu8g4tZzpoj X-Received: by 2002:a17:902:e749:b0:1d4:6b2c:fc41 with SMTP id p9-20020a170902e74900b001d46b2cfc41mr1396679plf.1.1703583919619; Tue, 26 Dec 2023 01:45:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703583919; cv=none; d=google.com; s=arc-20160816; b=Xsrh3Xx0ubdTaZxAdQ7euOVQFocQUPEZGipwkzNbKf7adc+ZPQ0Jyh1l1lD4fumeNb 0gqgI+QmdKmrQPXoM5YDb+mAkMRCZ2+fIikuIl/q+3l+RI5FtPT/QUzIh/kbdFmhtRgO FKe671pvFzlc/mcZ1DQwGwxVnVyfu1APiVBhOafgJJtyOaC6luNrX+digWu7+f3y6AC7 w2+Ffl3gj5xQd0UzKeGPD3xhI3Tdjp2OcjymnyP6HTd1h0KME9AtcimZCDuf16nxFJ8F XAjG5nTfUQQl8Ad2N2PmQx8P/sOZhtddRyIdqAZelr2opogJXeYW5Hnamvl6kr768vyl ZoVg== 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=P/WuOHRAYvaP7I2DX531nPKJwXne70nh/3fxHOzzGiA=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=KXu5ik3mx1MRvrXdfwyJ1dTg6YjF77/57T7hTqnAUW7Nc0UCqpFaMw6pW+W9Cx/9HK RsCD542Hk2itC5rsog2Qa2OtvGCQwMXHp8pxmekHSlr8FbSuayyWmPZJ7C+zp58gJ+tt 5wAJD+qbZePBdIwitfudK19rhh8I6OMKn1qGQVW993nq9e1oOht+dxmB9p1bRss5FOSb yYaa7E8cFmn0CSN93sjWCPZSgsol1K3ndWvY2S/0diceOMvRXVJvkfayfLoSo2yDAhxl gzRpcIkDR9E85CnUsWoWTtTT1lyapSCHvmB0OSsGVVMyPPaYNiMYgVhy35xq1Y5YFXlx uAWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tf7Jdrzn; spf=pass (google.com: domain of linux-kernel+bounces-11454-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11454-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 b21-20020a170902ed1500b001d42d539569si6034202pld.235.2023.12.26.01.45.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:45:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11454-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=tf7Jdrzn; spf=pass (google.com: domain of linux-kernel+bounces-11454-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11454-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 63916282EBA for ; Tue, 26 Dec 2023 09:45:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F9FB4F1E0; Tue, 26 Dec 2023 09:43:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="tf7Jdrzn" X-Original-To: linux-kernel@vger.kernel.org Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) (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 AED0C4EB33 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 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: 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: 1786337211748824012 X-GMAIL-MSGID: 1786337211748824012 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: 183296 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp769759dyb; Tue, 26 Dec 2023 01:45:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IGd+LTOBDMmLSNy+KAg9Q2/qQtuHeytQtbxP6sO3Z4vGdtwVvU2nMaw4l7Jg9OLPvSQABXm X-Received: by 2002:ac8:5915:0:b0:423:83a1:7bbe with SMTP id 21-20020ac85915000000b0042383a17bbemr10742340qty.54.1703583942804; Tue, 26 Dec 2023 01:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703583942; cv=none; d=google.com; s=arc-20160816; b=ntWuf/+kM5HfgRVGYNtvUgFgWtjZE4P4Wj1Ox8+Y+yb4+5yevKkTVvdO7epkucpDlU JR9Iz13YkIQxGpd25qlgyRbK8jPVqL3rvLHNOGndVa8MulJ7c69qT3/ZV686e08slSwY /WayyWSBi9mngV6wK5FxP7UegnwX8j4BaF/W/FPFxn4Qhx6IdPcjZQcJocmTxZj5iBd/ qY/SRiUg1WM0cn/YZj5tOcU2avhonEhH87RkJ1QwAJpnUgYqIfJlvxjT1eCGIeO8nFQ0 oEEppIO+YRBwRRHxdamc62cIheF51AEpkJNfrGm7kUNTGziuAk8/DiW1X5PNUX2LedIS OM0g== 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=HGLhO5Ou1/1sy5iMfPRnAioEor7eJGTaCFhyISDdmuA=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=Qibl9vnyj60KgGx/nWfXK26HtAG1Jr5DhL0vFzLQB023d9CfWJKjoVqKt88SVunIeF Kqcy9wXLXWzHcYQHDHChuQXicY5yIHvcLvQKeoxuMPwsn9Deq35RuQuhMFSgVItO315R /pt2w3ZTu0PuwbvbnUsgHMJZL76pIi2pwZtsBf4VYtpYKTFhNstAuEGeu7cGW2BxkHzV VjkRQJVzcthhoONsyWbZ/Zn73TXE1UQTAhWVEj/2NEwaZdNXBek9+/dCdcBKL3kMYqxN YHssN1cTONQ3QtD95/J+uqOZQMmVUPMsIiSSXv3pUhcjrZveZcBBLeTppL6iF9C2jFJy Gc5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="CJ/u/Yoc"; spf=pass (google.com: domain of linux-kernel+bounces-11455-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11455-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z22-20020a05622a029600b004275276a4d4si11888912qtw.18.2023.12.26.01.45.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:45:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11455-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="CJ/u/Yoc"; spf=pass (google.com: domain of linux-kernel+bounces-11455-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11455-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9979F1C21D78 for ; Tue, 26 Dec 2023 09:45:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D0D64F214; Tue, 26 Dec 2023 09:43:49 +0000 (UTC) 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-Original-To: linux-kernel@vger.kernel.org Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (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 5A8D34F1E4 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 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: 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: 1786337236258931353 X-GMAIL-MSGID: 1786337236258931353 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: 183297 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp769838dyb; Tue, 26 Dec 2023 01:46:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFT8z5LTc7R7+zGAA2wQO4qhCtQDSCfKrVh0zim63p0dI11xA52PcnSxVpduApyBvdUJX+B X-Received: by 2002:a05:6214:184b:b0:67f:998b:bfa5 with SMTP id d11-20020a056214184b00b0067f998bbfa5mr8612403qvy.114.1703583963896; Tue, 26 Dec 2023 01:46:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703583963; cv=none; d=google.com; s=arc-20160816; b=uCsSLVfsumu9/MWsY3tctV1It3cUbNmA1FsKoPanq5HO7Miv3UOv1GP2Kjbt5eREPD iEpxrD9cXxwVZDKuu/UKnNJA4QIqCqTwLKmkjqk2bFWFE1yuq/ecW821ctM4PXVwqUZx MOvNQztZz1TBf5mc1VjXj7obeScnM8sOFKl4mQFEIVoyfW8725Z+CUEiyr0UTqh7MfYx HZ770Cdlz2Ux2m7tv3sV+jcIj5ZZhbj1aahcbtuS1x+ASfp/oM0aNEEvUBSPeNe3oiwo Qgbsy/JNnPy/hg5ySLuK+ZBA+7jQMYimEC9z51DO0lAQLCOQmYcLNyQzCdvi6dzHa6/q D81g== 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=tY2JULd1vhiqapQurVNxnnqdDvA2GDjfHUC555PpUGc=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=yuYc32eAGGJY31J4MHn2soU2BBxe7WTzMvwgcHR8nYTTFMu25VpdGFGguIN3AGAGeo L7/zOtqTCIf+yIs3oSsPNmmcAAoQERBIjyWeYNd/MS/qQhcSzAp5McK3mb+liic1L6wE 1eZREXLlosrkLRHo3RJFj0RZcrKZ7bSBDeL9vf5kR3qaiEJxY+BfZKANOLI7YZD3N30U f+rSiaNOFPNYUgsFpzUHyGznVow0PZfhLX81nwllSXiF+nFs+xztLXzLKmTViCnkF3ko ev6lWv1g6+Px6G6r/ppeXAUOnjMOLBTP06jIj0qEmuBlSWFM7dYNtj0zF2lqmWJ/2QR+ 1fGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=LZkpNINK; spf=pass (google.com: domain of linux-kernel+bounces-11456-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11456-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s16-20020a0cb310000000b0067f94610e71si7977741qve.561.2023.12.26.01.46.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:46:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11456-ouuuleilei=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; dkim=pass header.i=@linux.dev header.s=key1 header.b=LZkpNINK; spf=pass (google.com: domain of linux-kernel+bounces-11456-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11456-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AEA9E1C21E1C for ; Tue, 26 Dec 2023 09:46:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1CFD4F616; Tue, 26 Dec 2023 09:43:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="LZkpNINK" X-Original-To: linux-kernel@vger.kernel.org Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) (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 E2D854F215; 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 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: 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: 1786337258682718819 X-GMAIL-MSGID: 1786337258682718819 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: 183298 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp770010dyb; Tue, 26 Dec 2023 01:46:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoujDPbcE8hj2n5zJ5DFrFtilS8W/5S6RdgOKAkaIQr/C2nyL1EGcKJtq7MUz5tEdM53tu X-Received: by 2002:a05:6e02:1989:b0:35f:deea:1c86 with SMTP id g9-20020a056e02198900b0035fdeea1c86mr13426009ilf.3.1703583997468; Tue, 26 Dec 2023 01:46:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703583997; cv=none; d=google.com; s=arc-20160816; b=qtSRSHZ8059Cb3UrVY5IbarroviT1HeFCcJ2I/VEmfmtOkbv2agrXWBprB1EwAFKZ1 5BYLahMD/dLUDaCKbc5mMtBYFQcXKpvwM+DydEpOGVwjkA/mFcY7BPC0KBD4wop8LmWC /0Ou4s4SBOpwiwo1dxdVC6jAuvk05Blpov6imJRlPY40kkFzvWm2Z/24VVi+RMDRbb3k nG9/fDgfWrcdGaAPRfoMiFDL9oYgg88FCCYOQVVrZBqq6IWxqWMXYW0ZpM6VYfMX21dv vXaEGz9cISoFi1diwKKiso/UDlJqilMm7hv0tq21YoWorOkwAhA61RBHAy7URPYLewY8 F5ow== 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=H13iUT2LC2IVV8agCsIZaf3XhkP8F5t9KpuQnr3FssU=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=fEGohoSE5cDnsaJ1jmaFNdB4fpVBwQ2BNPvUkxeH8D+Wimg7D6R/6oEsT7NlaXP/qh CpFJAXSJvoRIdho7+Ko2MFykaptKLLm7daEkkr0hMaLnth1Dbf93ybactRFfG8Xhhx7+ SuRN+yWaEcCk4Rh+birDso0unVL95rKTHiWjXjdnGX8f5tFx6VXnSN68aygdDf4JmhTL 54LvlcBR6sISUoRlPCAFd4nb7epzqL8hMMXom5fcBNvuALKSsLOXqNWqfzz6PK0rcGqn cytBsfx3IdCXIPOTEKfhE2JYDQVmTMvXwTqslBDfLkeRzZNQ+slRz1dWxjDe6fAnGNYM pJBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=V1ADvl9p; spf=pass (google.com: domain of linux-kernel+bounces-11457-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11457-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id x29-20020a63171d000000b005bdbeb537bcsi9101588pgl.37.2023.12.26.01.46.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:46:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11457-ouuuleilei=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=@linux.dev header.s=key1 header.b=V1ADvl9p; spf=pass (google.com: domain of linux-kernel+bounces-11457-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11457-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DAC9AB21D95 for ; Tue, 26 Dec 2023 09:46:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B03324F89A; Tue, 26 Dec 2023 09:44:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="V1ADvl9p" X-Original-To: linux-kernel@vger.kernel.org Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (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 D46134D109 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 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: 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: 1786337293608548428 X-GMAIL-MSGID: 1786337293608548428 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: 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 { 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: 183300 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp770159dyb; Tue, 26 Dec 2023 01:47:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6OgdFawMqbk5Lq+3FYXS0UebALIpntfhWKI0i+5lv71nrrZC1mpNMfMROj69KhFnqwD9i X-Received: by 2002:a05:620a:1491:b0:781:240a:4061 with SMTP id w17-20020a05620a149100b00781240a4061mr6966621qkj.70.1703584028203; Tue, 26 Dec 2023 01:47:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703584028; cv=none; d=google.com; s=arc-20160816; b=tg6XGSrhmAQhmSpNAfLUEFhTKwTtC8RkBQcSrvCkR3zKqLWvuxlHM/J4RLgXMmciul YfBGc54IKiJ+ApKATedDXk0M5+GcoRkLRHPYdVrjhuq3UMbq77AebXGurJqw76gSIaAi ayzkWTH0o3RBx/baHslZ2RXZevP5eJJ1s/ahDn7tYdVSqrucft3oWT1VTx75m8hXgCX5 ziUKwQw7UTnhPHX2dZuDoxOGyvkEqZ47fxnLd8d6tFYVwbPVBxisDGpET0IeC8rU4Zkk a/PjoCeCiX/v6VQaQtTTbJ9BP7c8Bzff3uR1c1todDPJEPrDl/8bAW2gUCOxRy2GVIjb 0gtQ== 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=Enz7PIMkFIUCxVHWnXh2ChdEcuA703jE9iFHAc9Olsk=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=tkxgxR4YKrTanv8AtZ/NZ15IH1zQTFaf8a0UHztb+MR3Tf3YIAwoIxgR5/JhJbVauG NGh4eCQacsPu4JVNpXzYSgQWdnjtVtqjCYkPgKrHO40CcSXZ1sqHAbgAfesM8oXUZgdg Rsha0cKXeLUm3KO30eA32ZuNmgi1M2dOI8UnA2luWA1rOJh4ICKgY4E/+JHo5y/eSwZ1 v2wuFnVZSYtwtr1wECujCdvkz7jYdGCbYSf07e6DsxZvk91f1TB5NSKkB1Qum65W/XCo FAPJySO2AZcUB+1mF8n2oZVg1ZKkp4zY8GzsOZTwcZt8Xx4p+y27Fc3g1z6kxMt/3FBH F8ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Q+AjtJxf; spf=pass (google.com: domain of linux-kernel+bounces-11459-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11459-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m18-20020a05622a055200b004239a83db71si11777698qtx.634.2023.12.26.01.47.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:47:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11459-ouuuleilei=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; dkim=pass header.i=@linux.dev header.s=key1 header.b=Q+AjtJxf; spf=pass (google.com: domain of linux-kernel+bounces-11459-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11459-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 030CD1C21E3F for ; Tue, 26 Dec 2023 09:47:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6706524A2; Tue, 26 Dec 2023 09:44:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Q+AjtJxf" X-Original-To: linux-kernel@vger.kernel.org Received: from out-175.mta1.migadu.com (out-175.mta1.migadu.com [95.215.58.175]) (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 0D15F51C3E 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 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: 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: 1786337326159292575 X-GMAIL-MSGID: 1786337326159292575 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: 183301 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp770317dyb; Tue, 26 Dec 2023 01:47:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEfW8B8tnJfEScIfT3yzl/bQxZDRClna4+MVB+zpWuJz9y5Y3irJeQpICOU+z1cGCd96kt X-Received: by 2002:a05:6358:6f8f:b0:16b:9653:a40d with SMTP id s15-20020a0563586f8f00b0016b9653a40dmr6235217rwn.13.1703584059056; Tue, 26 Dec 2023 01:47:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703584059; cv=none; d=google.com; s=arc-20160816; b=cC0fobSSx75X45yzLlK3s0LiXO00CXfJxjRMVyrA4dmdjEDMbb+hnSvLP2BVfacGUY 2UbCDIyOe3GtoHrnKkTrKBn6GzC5mH4Tl/bnUW7QtJpGCYZW8EYAUJYedeB+bt/ezN5X f5L8PyQuevQBardzLkqe73xy02xiI/vGOLgaM6C16jJPCfXE3sWRaxnCipKRwhUfwYUc xe0xMbDYpeM8zOfFRR9ame7/kYAD5YAcELcPxf76m7wZg3658/2uH8fLn7fJp3OGPJ28 VymFPAVIYMGH+Ctlzig5UAVyXbMK8nafLhvfRRNxdan8qqTJiPSKaLEWtO0yQa3aIxk2 ntVw== 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=WtCODN2ut5B36lflwZvDOFc9jG0uUJhY+OWc+SFFpyQ=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=N5YpnNAg6wzbLsgHyASUzwGSyW9s8YyigJVtASC9EYpSvANmBKfNFE4nuXV+txBt3D Q//uAihpWaKumNd+Fi3rahYesAQmYFVAtiQ8r/2uKZoSRP7DdPD3e8Pprbdos7tL3cTt 9BVYVFsVjN48onzPRSZBFL6PMsgVocQ7NaAHnkddV5XCTb9WP/sozJmnBrzEbs9T14lK JqAvk6zHWX3FtrG+K2i90OfPSjBV7Cc0BiHiCeSC+9+MJ85ad5ubbsezdjJVGmQT6ttD 8leh+b8TJJjYJD/I4HGrNA7L4y9N6YuHSKa83YlX2cOlDGxtvUWo4oHwGmuJ0AQKG/aD HEDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=VA9m+0eT; spf=pass (google.com: domain of linux-kernel+bounces-11460-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11460-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u10-20020a63f64a000000b005cdec4c81e8si7837225pgj.514.2023.12.26.01.47.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:47:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11460-ouuuleilei=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=@linux.dev header.s=key1 header.b=VA9m+0eT; spf=pass (google.com: domain of linux-kernel+bounces-11460-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11460-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 65516B21DEB for ; Tue, 26 Dec 2023 09:47:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C5A94D13D; Tue, 26 Dec 2023 09:44:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="VA9m+0eT" X-Original-To: linux-kernel@vger.kernel.org Received: from out-184.mta1.migadu.com (out-184.mta1.migadu.com [95.215.58.184]) (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 BD715524D2 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 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: 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: 1786337358185979382 X-GMAIL-MSGID: 1786337358185979382 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: 183302 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp770369dyb; Tue, 26 Dec 2023 01:47:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHq/07fSWToSxXl7Lzn9hE4fNgUx6ZAink+36QPTQL44OBGmV8Gu0XgFVixavw47+WBi7qm X-Received: by 2002:a05:6e02:350c:b0:360:a97:930b with SMTP id bu12-20020a056e02350c00b003600a97930bmr2302200ilb.94.1703584070750; Tue, 26 Dec 2023 01:47:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703584070; cv=none; d=google.com; s=arc-20160816; b=GyCfYhPoSvTzkI98EnbdWlVCQdZ/cjeSFgkyb90o0+bJVGiwS+1SDxWOTlrdO3J+AG f4TLE+YuQAt8gUdNBF5Lgoz0CrGrCc9f0uuHB+yuUtI7nb9fVMKB2peu5F23mXxYeEue W3OOVu0DUt2jnWpnudYn7PFcPKPD2HKYL3HWFBxg7jnpYW29iz3rdgDrK3ZRIMTZS+XL lC6ikJc2N4EJvwDZ3w39yq13w2Dn/ylnBiR7WzIeOnMqTf5wMqRq4U0vOtb1Lzty5Xeg 11gZbMAzj+NE4f27RGcotXP5CQz6ugOcX32ZzoECrIXZXQ6WnglJWDUVG+34C/1lfFYJ b9FQ== 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=AmRdlIlTFvsGqdkNb3BKpWuB8bJE73vQSHmgBrz+694=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=drcdeMHC7WBxDQNfeD/aWApjEEur5aQWSLAYDhi3IF/PHrXWDu2RpNsD+DR3i5e7Uy RndWKZymgzktRjxeGjfxvf0JgefcPkwi0s4VsLR9GQSC6LzqROit6YwkkbnSLY+nDD6l z8S/FgrYuArT3Yaouyh9foe2eMF8ung870tAQewyOI2k6bTpvB6vRkyzIp2Ky1n6kg2J GXKOS+XZ1j35SWkqmiIgdL1x6B+XTQOCfd8rVVoUkTcR5bseedtfhbDEgwI3ytCQIJ/8 eJYWyFZi4pPLKLbh23E4HCcvdXTfJrFr0hp00h4GxjXLDzZpiCmMXVmz04QxGtZYShDC jlPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=uHPnSNt7; spf=pass (google.com: domain of linux-kernel+bounces-11461-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11461-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 v62-20020a632f41000000b005cdb0648eb8si9154096pgv.508.2023.12.26.01.47.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:47:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11461-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=uHPnSNt7; spf=pass (google.com: domain of linux-kernel+bounces-11461-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11461-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 8369D2830F8 for ; Tue, 26 Dec 2023 09:47:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 08D3553E38; Tue, 26 Dec 2023 09:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="uHPnSNt7" X-Original-To: linux-kernel@vger.kernel.org Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) (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 4E47A539E2 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 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: 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: 1786337370635559357 X-GMAIL-MSGID: 1786337370635559357 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: 183303 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp770470dyb; Tue, 26 Dec 2023 01:48:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVOgHTtfSksl5sVH7AETnubbqlMZmvA3HI86+6Ea1hNml935Tu5crGkCMntezap+6StpXu X-Received: by 2002:a50:ee90:0:b0:54c:b24d:a3b6 with SMTP id f16-20020a50ee90000000b0054cb24da3b6mr4289433edr.20.1703584093407; Tue, 26 Dec 2023 01:48:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703584093; cv=none; d=google.com; s=arc-20160816; b=SMCIW+/C+4wkgdtYtCOxjRshSlSXmw3pL8+tXcKxwCLfQq2MoqMDKaOV2b0regDaTg pmvYoLxP24MYdYVpGSBVKRDYLT/YJ7HMGZEcF3dfNKk1H42RARnzeoxh2Hp+q17b1BBi waBz9EoIk35inrhfMBlnO68n8fguE+2v2tNYJu0qmG/bmxL4TjKu3cvfD1F2Z+aWPuRg seIE8NEOtMgTnQmAicAcEPvzjbdf7JHcRADlz+CV0n9cni6V5+Qg8P0xJ5c52rrJDB51 MEKPCSGcgkvNjBuFCPJs0qAvsipvBqPa6v5FGWmxmVlD2xN8rKI+Rj9X+VqMCLp5j6aE OFsg== 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=hp/0/EtTdpMsUAddj6nOU9DQyFHJ3X7EwlFVc6kkPQM=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=ke2ji+rgu6fdcowqKv6BEa9YluOnccEGTxyYtPcpPwUxMPK156KbSqpq0+NpyVnlUb +JLYIdEhLDPmDkPeZdu1zhX6cUvSRiZrL2797KHCa1FAIVq3jTeJGZtpJXfIlZs9RGxZ a5pHHRawTVumNBnkTqKjkFAtEzQzO6KOswa6flfxVmm4JdRK/e5NRSEsl5OMnh4AH9Kn /fvhRs3xxPdfbL7X3wQdCBr/JDCT5eBRR5Khcsz//CLX2NyUIQk1FAE+cBudmSkHv1w9 GXc+Wyu4z++EUwCXIUl2+T1HI2EN43TS0JvPEp4NcUY2o/jCGjqWD6b+pOc4bv8O4QoW 2eow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=C0sepe7v; spf=pass (google.com: domain of linux-kernel+bounces-11462-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11462-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f19-20020a50a6d3000000b005522a1302a4si5332739edc.677.2023.12.26.01.48.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:48:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11462-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=C0sepe7v; spf=pass (google.com: domain of linux-kernel+bounces-11462-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11462-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 091621F22922 for ; Tue, 26 Dec 2023 09:48:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 565C75467B; Tue, 26 Dec 2023 09:44:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="C0sepe7v" X-Original-To: linux-kernel@vger.kernel.org Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (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 84EC653E3E 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 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: 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: 1786337394311595341 X-GMAIL-MSGID: 1786337394311595341 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: 183304 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp770571dyb; Tue, 26 Dec 2023 01:48:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmc+v+VGu5g501GpepPlDX7YXSrHGvuQMLtiX8wCrmnB7ya4TnzTAw2IeCBhnOwq/AjDxD X-Received: by 2002:ae9:c215:0:b0:77f:acac:2017 with SMTP id j21-20020ae9c215000000b0077facac2017mr7618553qkg.48.1703584113246; Tue, 26 Dec 2023 01:48:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703584113; cv=none; d=google.com; s=arc-20160816; b=qRlFFS2AbORJgys1DYixAro8gMGaClQPmO6HnmoFBKW48IxjZ7EN3wTsAYOnApdg2Y KyMjPlULlJqpC6uLBS9o6SuVPbYTu3fuqsSGCvrDblWbCJn+7gw/1/oQxnHiy37sedVD l7Ood0xntsdwyxkTVFTpoOSrziUbPvalwkUQpZFespzf8JV37EAHqLp84OMHo19CjGwU 97W4voEgbScquXI8qbOeF+dOJ9i4i0hg91Nx6DcN9rzWBIeJoDop43bMSTCbXlkOL92E 46c/U1I/wmRMwS1czBdCx6Ra6b1HZgMmx+4756xSlWmoQG0Acc/XWma3yOTAzxE5C3vM 8KHQ== 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=OLqrcEqlQDuXOmtMoD41DhPaHHKeGyUrjqKv3FgY7JM=; fh=xJ4MGWUfLIY6kC5wtXQrQqroeNPseZURI9Z+Z0OAFDg=; b=ibflMEeIKl/Sie8HRtTwlZO8Fk49fHErfENQpPdZtjV8neEC+VAgdd9fusSRZlT5os HRMtyhd5XQSvi0KAzJTY2DC1HBfBZ1mdAcaOnhlG/FEKXWyZ4tAQDeeoEjWlmvkcMLnW KyginE6iyftJ9Al8etPGR1f8pDwkYay69N77gVFnmuxSB5v+97+gL2SusvxJHNacnEvW 3Q/opws+hZ3Xu63p//OnAh0QhQZg/D9yz+EykLPD85+XL6zsvQI4UulO8DCDB5jhxfcS MSZvz/x11pnrfn05soWDn/PUgKK9uqnAOsY63Qf0YO7cdP2IMtTrIVn1OJDMr1B3gwsR uLHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=jcZJD8fA; spf=pass (google.com: domain of linux-kernel+bounces-11463-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11463-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x22-20020ae9e916000000b007815999244bsi184458qkf.22.2023.12.26.01.48.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:48:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11463-ouuuleilei=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; dkim=pass header.i=@linux.dev header.s=key1 header.b=jcZJD8fA; spf=pass (google.com: domain of linux-kernel+bounces-11463-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11463-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0623D1C21E84 for ; Tue, 26 Dec 2023 09:48:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67E524E625; Tue, 26 Dec 2023 09:44:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="jcZJD8fA" X-Original-To: linux-kernel@vger.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 7887D5467D 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 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: 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: 1786337415521473164 X-GMAIL-MSGID: 1786337415521473164 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;