[PATCH net-next 1/1] driver: ipvlan: Use NF_IP_PRI_LAST as hook priority instead of INT_MAX

Subsystems: networking drivers, the rest

STALE3539d

3 messages, 2 authors, 2016-11-27 · open the first message on its own page

[PATCH net-next 1/1] driver: ipvlan: Use NF_IP_PRI_LAST as hook priority instead of INT_MAX

From: <hidden>
Date: 2016-11-27 10:24:51

From: Gao Feng <redacted>

It is better to use NF_IP_PRI_LAST instead of INT_MAX as hook priority.
The former is good at readability and easier to maintain.

Signed-off-by: Gao Feng <redacted>
---
 drivers/net/ipvlan/ipvlan_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index ab90b22..d70d245 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -16,13 +16,13 @@
 		.hook     = ipvlan_nf_input,
 		.pf       = NFPROTO_IPV4,
 		.hooknum  = NF_INET_LOCAL_IN,
-		.priority = INT_MAX,
+		.priority = NF_IP_PRI_LAST,
 	},
 	{
 		.hook     = ipvlan_nf_input,
 		.pf       = NFPROTO_IPV6,
 		.hooknum  = NF_INET_LOCAL_IN,
-		.priority = INT_MAX,
+		.priority = NF_IP_PRI_LAST,
 	},
 };
 
-- 
1.9.1

Re: [PATCH net-next 1/1] driver: ipvlan: Use NF_IP_PRI_LAST as hook priority instead of INT_MAX

From: kbuild test robot <hidden>
Date: 2016-11-27 11:11:12

Hi Gao,

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/fgao-ikuai8-com/driver-ipvlan-Use-NF_IP_PRI_LAST-as-hook-priority-instead-of-INT_MAX/20161127-182724
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):
quoted
drivers/net/ipvlan/ipvlan_main.c:19:15: error: 'NF_IP_PRI_LAST' undeclared here (not in a function)
      .priority = NF_IP_PRI_LAST,
                  ^~~~~~~~~~~~~~

vim +/NF_IP_PRI_LAST +19 drivers/net/ipvlan/ipvlan_main.c

    13	
    14	static struct nf_hook_ops ipvl_nfops[] __read_mostly = {
    15		{
    16			.hook     = ipvlan_nf_input,
    17			.pf       = NFPROTO_IPV4,
    18			.hooknum  = NF_INET_LOCAL_IN,
  > 19			.priority = NF_IP_PRI_LAST,
    20		},
    21		{
    22			.hook     = ipvlan_nf_input,

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Re: [PATCH net-next 1/1] driver: ipvlan: Use NF_IP_PRI_LAST as hook priority instead of INT_MAX

From: Gao Feng <hidden>
Date: 2016-11-27 11:20:21

On Sun, Nov 27, 2016 at 7:17 PM, kbuild test robot [off-list ref] wrote:
Hi Gao,

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/fgao-ikuai8-com/driver-ipvlan-Use-NF_IP_PRI_LAST-as-hook-priority-instead-of-INT_MAX/20161127-182724
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64

All errors (new ones prefixed by >>):
quoted
quoted
drivers/net/ipvlan/ipvlan_main.c:19:15: error: 'NF_IP_PRI_LAST' undeclared here (not in a function)
      .priority = NF_IP_PRI_LAST,
                  ^~~~~~~~~~~~~~

vim +/NF_IP_PRI_LAST +19 drivers/net/ipvlan/ipvlan_main.c

    13
    14  static struct nf_hook_ops ipvl_nfops[] __read_mostly = {
    15          {
    16                  .hook     = ipvlan_nf_input,
    17                  .pf       = NFPROTO_IPV4,
    18                  .hooknum  = NF_INET_LOCAL_IN,
  > 19                  .priority = NF_IP_PRI_LAST,
    20          },
    21          {
    22                  .hook     = ipvlan_nf_input,

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Sorry, it broke the build.
I add the header file, but forget to commit, so that this patch does
not contain header file

Now I have sent the v2 patch.

Regards
Feng
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help