All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf-next] netfilter: nf_tables: add stubs for readonly expressions
@ 2022-03-11 10:54 Florian Westphal
  2022-03-11 17:39 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Florian Westphal @ 2022-03-11 10:54 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

None of these write to a register, so there is no need to cancel
tracking.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 net/netfilter/nft_cmp.c        | 1 +
 net/netfilter/nft_ct.c         | 1 +
 net/netfilter/nft_dup_netdev.c | 7 +++++++
 net/netfilter/nft_fwd_netdev.c | 8 ++++++++
 net/netfilter/nft_log.c        | 7 +++++++
 net/netfilter/nft_masq.c       | 7 +++++++
 net/netfilter/nft_nat.c        | 8 ++++++++
 net/netfilter/nft_range.c      | 7 +++++++
 8 files changed, 46 insertions(+)

diff --git a/net/netfilter/nft_cmp.c b/net/netfilter/nft_cmp.c
index 9ec5cb0e6331..f46a47ccd0b8 100644
--- a/net/netfilter/nft_cmp.c
+++ b/net/netfilter/nft_cmp.c
@@ -368,6 +368,7 @@ const struct nft_expr_ops nft_cmp16_fast_ops = {
 	.init		= nft_cmp16_fast_init,
 	.dump		= nft_cmp16_fast_dump,
 	.offload	= nft_cmp16_fast_offload,
+	.reduce		= nft_cmp_reduce,
 };
 
 static const struct nft_expr_ops *
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index 66ee49045d8e..eb0dae5bef6d 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -776,6 +776,7 @@ static const struct nft_expr_ops nft_ct_set_zone_ops = {
 	.init		= nft_ct_set_init,
 	.destroy	= nft_ct_set_destroy,
 	.dump		= nft_ct_set_dump,
+	.reduce		= nft_ct_set_reduce,
 };
 #endif
 
diff --git a/net/netfilter/nft_dup_netdev.c b/net/netfilter/nft_dup_netdev.c
index 5b5c607fbf83..9476658c97b7 100644
--- a/net/netfilter/nft_dup_netdev.c
+++ b/net/netfilter/nft_dup_netdev.c
@@ -72,6 +72,12 @@ static bool nft_dup_netdev_offload_action(const struct nft_expr *expr)
 	return true;
 }
 
+static bool nft_dup_reduce(struct nft_regs_track *track,
+                           const struct nft_expr *expr)
+{
+	return false;
+}
+
 static struct nft_expr_type nft_dup_netdev_type;
 static const struct nft_expr_ops nft_dup_netdev_ops = {
 	.type		= &nft_dup_netdev_type,
@@ -81,6 +87,7 @@ static const struct nft_expr_ops nft_dup_netdev_ops = {
 	.dump		= nft_dup_netdev_dump,
 	.offload	= nft_dup_netdev_offload,
 	.offload_action	= nft_dup_netdev_offload_action,
+	.reduce		= nft_dup_reduce,
 };
 
 static struct nft_expr_type nft_dup_netdev_type __read_mostly = {
diff --git a/net/netfilter/nft_fwd_netdev.c b/net/netfilter/nft_fwd_netdev.c
index 619e394a91de..b76a4084a6a0 100644
--- a/net/netfilter/nft_fwd_netdev.c
+++ b/net/netfilter/nft_fwd_netdev.c
@@ -209,6 +209,12 @@ static int nft_fwd_validate(const struct nft_ctx *ctx,
 						    (1 << NF_NETDEV_EGRESS));
 }
 
+static bool nft_fwd_reduce(struct nft_regs_track *track,
+                           const struct nft_expr *expr)
+{
+	return false;
+}
+
 static struct nft_expr_type nft_fwd_netdev_type;
 static const struct nft_expr_ops nft_fwd_neigh_netdev_ops = {
 	.type		= &nft_fwd_netdev_type,
@@ -217,6 +223,7 @@ static const struct nft_expr_ops nft_fwd_neigh_netdev_ops = {
 	.init		= nft_fwd_neigh_init,
 	.dump		= nft_fwd_neigh_dump,
 	.validate	= nft_fwd_validate,
+	.reduce		= nft_fwd_reduce,
 };
 
 static const struct nft_expr_ops nft_fwd_netdev_ops = {
@@ -228,6 +235,7 @@ static const struct nft_expr_ops nft_fwd_netdev_ops = {
 	.validate	= nft_fwd_validate,
 	.offload	= nft_fwd_netdev_offload,
 	.offload_action	= nft_fwd_netdev_offload_action,
+	.reduce		= nft_fwd_reduce,
 };
 
 static const struct nft_expr_ops *
diff --git a/net/netfilter/nft_log.c b/net/netfilter/nft_log.c
index 54f6c2035e84..27dbf7d7beed 100644
--- a/net/netfilter/nft_log.c
+++ b/net/netfilter/nft_log.c
@@ -282,12 +282,19 @@ static int nft_log_dump(struct sk_buff *skb, const struct nft_expr *expr)
 	return -1;
 }
 
+static bool nft_log_reduce(struct nft_regs_track *track,
+			   const struct nft_expr *expr)
+{
+	return false;
+}
+
 static struct nft_expr_type nft_log_type;
 static const struct nft_expr_ops nft_log_ops = {
 	.type		= &nft_log_type,
 	.size		= NFT_EXPR_SIZE(sizeof(struct nft_log)),
 	.eval		= nft_log_eval,
 	.init		= nft_log_init,
+	.reduce		= nft_log_reduce,
 	.destroy	= nft_log_destroy,
 	.dump		= nft_log_dump,
 };
diff --git a/net/netfilter/nft_masq.c b/net/netfilter/nft_masq.c
index 9953e8053753..48a3a711fa1a 100644
--- a/net/netfilter/nft_masq.c
+++ b/net/netfilter/nft_masq.c
@@ -221,6 +221,12 @@ nft_masq_inet_destroy(const struct nft_ctx *ctx, const struct nft_expr *expr)
 	nf_ct_netns_put(ctx->net, NFPROTO_INET);
 }
 
+static bool nft_masq_reduce(struct nft_regs_track *track,
+			    const struct nft_expr *expr)
+{
+	return false;
+}
+
 static struct nft_expr_type nft_masq_inet_type;
 static const struct nft_expr_ops nft_masq_inet_ops = {
 	.type		= &nft_masq_inet_type,
@@ -230,6 +236,7 @@ static const struct nft_expr_ops nft_masq_inet_ops = {
 	.destroy	= nft_masq_inet_destroy,
 	.dump		= nft_masq_dump,
 	.validate	= nft_masq_validate,
+	.reduce		= nft_masq_reduce,
 };
 
 static struct nft_expr_type nft_masq_inet_type __read_mostly = {
diff --git a/net/netfilter/nft_nat.c b/net/netfilter/nft_nat.c
index be1595d6979d..81c1be454378 100644
--- a/net/netfilter/nft_nat.c
+++ b/net/netfilter/nft_nat.c
@@ -308,6 +308,12 @@ nft_nat_destroy(const struct nft_ctx *ctx, const struct nft_expr *expr)
 	nf_ct_netns_put(ctx->net, priv->family);
 }
 
+static bool nft_nat_reduce(struct nft_regs_track *track,
+			    const struct nft_expr *expr)
+{
+	return false;
+}
+
 static struct nft_expr_type nft_nat_type;
 static const struct nft_expr_ops nft_nat_ops = {
 	.type           = &nft_nat_type,
@@ -317,6 +323,7 @@ static const struct nft_expr_ops nft_nat_ops = {
 	.destroy        = nft_nat_destroy,
 	.dump           = nft_nat_dump,
 	.validate	= nft_nat_validate,
+	.reduce		= nft_nat_reduce,
 };
 
 static struct nft_expr_type nft_nat_type __read_mostly = {
@@ -346,6 +353,7 @@ static const struct nft_expr_ops nft_nat_inet_ops = {
 	.destroy        = nft_nat_destroy,
 	.dump           = nft_nat_dump,
 	.validate	= nft_nat_validate,
+	.reduce		= nft_nat_reduce,
 };
 
 static struct nft_expr_type nft_inet_nat_type __read_mostly = {
diff --git a/net/netfilter/nft_range.c b/net/netfilter/nft_range.c
index e4a1c44d7f51..bfd692a5e527 100644
--- a/net/netfilter/nft_range.c
+++ b/net/netfilter/nft_range.c
@@ -134,12 +134,19 @@ static int nft_range_dump(struct sk_buff *skb, const struct nft_expr *expr)
 	return -1;
 }
 
+static bool nft_range_reduce(struct nft_regs_track *track,
+			     const struct nft_expr *expr)
+{
+	return false;
+}
+
 static const struct nft_expr_ops nft_range_ops = {
 	.type		= &nft_range_type,
 	.size		= NFT_EXPR_SIZE(sizeof(struct nft_range_expr)),
 	.eval		= nft_range_eval,
 	.init		= nft_range_init,
 	.dump		= nft_range_dump,
+	.reduce		= nft_range_reduce,
 };
 
 struct nft_expr_type nft_range_type __read_mostly = {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH nf-next] netfilter: nf_tables: add stubs for readonly expressions
  2022-03-11 10:54 [PATCH nf-next] netfilter: nf_tables: add stubs for readonly expressions Florian Westphal
@ 2022-03-11 17:39 ` kernel test robot
  2022-03-11 22:44 ` kernel test robot
  2022-03-12  3:19 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-03-11 17:39 UTC (permalink / raw)
  To: Florian Westphal, netfilter-devel; +Cc: kbuild-all, Florian Westphal

Hi Florian,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20220310]
[cannot apply to nf-next/master nf/master linus/master v5.17-rc7 v5.17-rc6 v5.17-rc5 v5.17-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-nf_tables-add-stubs-for-readonly-expressions/20220311-185613
base:    71941773e143369a73c9c4a3b62fbb60736a1182
config: powerpc64-buildonly-randconfig-r003-20220310 (https://download.01.org/0day-ci/archive/20220312/202203120145.fZ2sQ2qv-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/a0cb27794354ccba36b882731b93fdda090f2003
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Florian-Westphal/netfilter-nf_tables-add-stubs-for-readonly-expressions/20220311-185613
        git checkout a0cb27794354ccba36b882731b93fdda090f2003
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash net/netfilter/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> net/netfilter/nft_cmp.c:363:27: error: 'nft_cmp_reduce' undeclared here (not in a function); did you mean 'nft_cmp_dump'?
     363 |         .reduce         = nft_cmp_reduce,
         |                           ^~~~~~~~~~~~~~
         |                           nft_cmp_dump


vim +363 net/netfilter/nft_cmp.c

   354	
   355	
   356	const struct nft_expr_ops nft_cmp16_fast_ops = {
   357		.type		= &nft_cmp_type,
   358		.size		= NFT_EXPR_SIZE(sizeof(struct nft_cmp16_fast_expr)),
   359		.eval		= NULL,	/* inlined */
   360		.init		= nft_cmp16_fast_init,
   361		.dump		= nft_cmp16_fast_dump,
   362		.offload	= nft_cmp16_fast_offload,
 > 363		.reduce		= nft_cmp_reduce,
   364	};
   365	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH nf-next] netfilter: nf_tables: add stubs for readonly expressions
  2022-03-11 10:54 [PATCH nf-next] netfilter: nf_tables: add stubs for readonly expressions Florian Westphal
  2022-03-11 17:39 ` kernel test robot
@ 2022-03-11 22:44 ` kernel test robot
  2022-03-12  3:19 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-03-11 22:44 UTC (permalink / raw)
  To: Florian Westphal, netfilter-devel; +Cc: llvm, kbuild-all, Florian Westphal

Hi Florian,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20220310]
[cannot apply to nf-next/master nf/master linus/master v5.17-rc7 v5.17-rc6 v5.17-rc5 v5.17-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-nf_tables-add-stubs-for-readonly-expressions/20220311-185613
base:    71941773e143369a73c9c4a3b62fbb60736a1182
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20220312/202203120618.2FZ2VXaE-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/a0cb27794354ccba36b882731b93fdda090f2003
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Florian-Westphal/netfilter-nf_tables-add-stubs-for-readonly-expressions/20220311-185613
        git checkout a0cb27794354ccba36b882731b93fdda090f2003
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/panel/ net/netfilter/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> net/netfilter/nft_cmp.c:363:13: error: use of undeclared identifier 'nft_cmp_reduce'; did you mean 'nft_cmp_dump'?
           .reduce         = nft_cmp_reduce,
                             ^~~~~~~~~~~~~~
                             nft_cmp_dump
   net/netfilter/nft_cmp.c:99:12: note: 'nft_cmp_dump' declared here
   static int nft_cmp_dump(struct sk_buff *skb, const struct nft_expr *expr)
              ^
>> net/netfilter/nft_cmp.c:363:13: error: incompatible function pointer types initializing 'bool (*)(struct nft_regs_track *, const struct nft_expr *)' (aka '_Bool (*)(struct nft_regs_track *, const struct nft_expr *)') with an expression of type 'int (struct sk_buff *, const struct nft_expr *)' [-Werror,-Wincompatible-function-pointer-types]
           .reduce         = nft_cmp_reduce,
                             ^~~~~~~~~~~~~~
   2 errors generated.


vim +363 net/netfilter/nft_cmp.c

   354	
   355	
   356	const struct nft_expr_ops nft_cmp16_fast_ops = {
   357		.type		= &nft_cmp_type,
   358		.size		= NFT_EXPR_SIZE(sizeof(struct nft_cmp16_fast_expr)),
   359		.eval		= NULL,	/* inlined */
   360		.init		= nft_cmp16_fast_init,
   361		.dump		= nft_cmp16_fast_dump,
   362		.offload	= nft_cmp16_fast_offload,
 > 363		.reduce		= nft_cmp_reduce,
   364	};
   365	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH nf-next] netfilter: nf_tables: add stubs for readonly expressions
  2022-03-11 10:54 [PATCH nf-next] netfilter: nf_tables: add stubs for readonly expressions Florian Westphal
  2022-03-11 17:39 ` kernel test robot
  2022-03-11 22:44 ` kernel test robot
@ 2022-03-12  3:19 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-03-12  3:19 UTC (permalink / raw)
  To: Florian Westphal, netfilter-devel; +Cc: kbuild-all, Florian Westphal

Hi Florian,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20220310]
[cannot apply to nf-next/master nf/master linus/master v5.17-rc7 v5.17-rc6 v5.17-rc5 v5.17-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-nf_tables-add-stubs-for-readonly-expressions/20220311-185613
base:    71941773e143369a73c9c4a3b62fbb60736a1182
config: m68k-defconfig (https://download.01.org/0day-ci/archive/20220312/202203121116.d70Q3u7w-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/a0cb27794354ccba36b882731b93fdda090f2003
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Florian-Westphal/netfilter-nf_tables-add-stubs-for-readonly-expressions/20220311-185613
        git checkout a0cb27794354ccba36b882731b93fdda090f2003
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash net/netfilter/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> net/netfilter/nft_ct.c:732:27: error: 'nft_ct_set_reduce' undeclared here (not in a function); did you mean 'nft_ct_set_dump'?
     732 |         .reduce         = nft_ct_set_reduce,
         |                           ^~~~~~~~~~~~~~~~~
         |                           nft_ct_set_dump


vim +732 net/netfilter/nft_ct.c

   723	
   724	#ifdef CONFIG_NF_CONNTRACK_ZONES
   725	static const struct nft_expr_ops nft_ct_set_zone_ops = {
   726		.type		= &nft_ct_type,
   727		.size		= NFT_EXPR_SIZE(sizeof(struct nft_ct)),
   728		.eval		= nft_ct_set_zone_eval,
   729		.init		= nft_ct_set_init,
   730		.destroy	= nft_ct_set_destroy,
   731		.dump		= nft_ct_set_dump,
 > 732		.reduce		= nft_ct_set_reduce,
   733	};
   734	#endif
   735	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-12  3:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 10:54 [PATCH nf-next] netfilter: nf_tables: add stubs for readonly expressions Florian Westphal
2022-03-11 17:39 ` kernel test robot
2022-03-11 22:44 ` kernel test robot
2022-03-12  3:19 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.