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;