netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: remove unimplemented RTNH_F_PERVASIVE
@ 2016-04-02  8:43 Quentin Armitage
  2016-04-02 16:04 ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Quentin Armitage @ 2016-04-02  8:43 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy, netdev
  Cc: Quentin Armitage

Linux 2.1.68 introduced RTNH_F_PERVASIVE, but it had no implementation
and couldn't be enabled since the required config parameter wasn't in
any Kconfig file (see commit d088dde7b).

This commit removes all remaining references to RTNH_F_PERVASIVE.
Although this will cause userspace applications that were using the
flag to fail to build, they will be alerted to the fact that using
RTNH_F_PERVASIVE was not achieving anything.

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
---
 include/uapi/linux/rtnetlink.h |    2 +-
 net/decnet/dn_fib.c            |    2 +-
 net/ipv4/fib_semantics.c       |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index ca764b5..58e6ba0 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -339,7 +339,7 @@ struct rtnexthop {
 /* rtnh_flags */
 
 #define RTNH_F_DEAD		1	/* Nexthop is dead (used by multipath)	*/
-#define RTNH_F_PERVASIVE	2	/* Do recursive gateway lookup	*/
+					/* 2 was RTNH_F_PERVASIVE (never implemented) */
 #define RTNH_F_ONLINK		4	/* Gateway is forced on link	*/
 #define RTNH_F_OFFLOAD		8	/* offloaded route */
 #define RTNH_F_LINKDOWN		16	/* carrier-down on nexthop */
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index df48034..f5660c6 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -243,7 +243,7 @@ out:
 	} else {
 		struct net_device *dev;
 
-		if (nh->nh_flags&(RTNH_F_PERVASIVE|RTNH_F_ONLINK))
+		if (nh->nh_flags&RTNH_F_ONLINK)
 			return -EINVAL;
 
 		dev = __dev_get_by_index(&init_net, nh->nh_oif);
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index d97268e..3883860 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -803,7 +803,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
 	} else {
 		struct in_device *in_dev;
 
-		if (nh->nh_flags & (RTNH_F_PERVASIVE | RTNH_F_ONLINK))
+		if (nh->nh_flags & RTNH_F_ONLINK)
 			return -EINVAL;
 
 		rcu_read_lock();
-- 
1.7.7.6

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

* Re: [PATCH] net: remove unimplemented RTNH_F_PERVASIVE
  2016-04-02  8:43 [PATCH] net: remove unimplemented RTNH_F_PERVASIVE Quentin Armitage
@ 2016-04-02 16:04 ` Sergei Shtylyov
  2016-04-02 16:51   ` [PATCH v2] " Quentin Armitage
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2016-04-02 16:04 UTC (permalink / raw)
  To: Quentin Armitage, David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy, netdev

Hello.

On 4/2/2016 11:43 AM, Quentin Armitage wrote:

> Linux 2.1.68 introduced RTNH_F_PERVASIVE, but it had no implementation
> and couldn't be enabled since the required config parameter wasn't in
> any Kconfig file (see commit d088dde7b).

    scripts/checkpatch.pl now enforces certain commit citing format, your 
doesn't match it, i.e. you need 12-digit SHA1 and ("<commit summary") after that.

> This commit removes all remaining references to RTNH_F_PERVASIVE.
> Although this will cause userspace applications that were using the
> flag to fail to build, they will be alerted to the fact that using
> RTNH_F_PERVASIVE was not achieving anything.
>
> Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
[...]

> diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
> index df48034..f5660c6 100644
> --- a/net/decnet/dn_fib.c
> +++ b/net/decnet/dn_fib.c
> @@ -243,7 +243,7 @@ out:
>   	} else {
>   		struct net_device *dev;
>
> -		if (nh->nh_flags&(RTNH_F_PERVASIVE|RTNH_F_ONLINK))
> +		if (nh->nh_flags&RTNH_F_ONLINK)

    Please enclose & into spaces like below.

> diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
> index d97268e..3883860 100644
> --- a/net/ipv4/fib_semantics.c
> +++ b/net/ipv4/fib_semantics.c
> @@ -803,7 +803,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
>   	} else {
>   		struct in_device *in_dev;
>
> -		if (nh->nh_flags & (RTNH_F_PERVASIVE | RTNH_F_ONLINK))
> +		if (nh->nh_flags & RTNH_F_ONLINK)
>   			return -EINVAL;
>
>   		rcu_read_lock();

MBR, Sergei

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

* [PATCH v2] net: remove unimplemented RTNH_F_PERVASIVE
  2016-04-02 16:04 ` Sergei Shtylyov
@ 2016-04-02 16:51   ` Quentin Armitage
  2016-04-05 23:57     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Quentin Armitage @ 2016-04-02 16:51 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy, netdev
  Cc: Quentin Armitage

Linux 2.1.68 introduced RTNH_F_PERVASIVE, but it had no implementation
and couldn't be enabled since the required config parameter wasn't in
any Kconfig file (see commit d088dde7b196 ("ipv4: obsolete config in
kernel source (IP_ROUTE_PERVASIVE)")).

This commit removes all remaining references to RTNH_F_PERVASIVE.
Although this will cause userspace applications that were using the
flag to fail to build, they will be alerted to the fact that using
RTNH_F_PERVASIVE was not achieving anything.

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
---
 include/uapi/linux/rtnetlink.h |    2 +-
 net/decnet/dn_fib.c            |    2 +-
 net/ipv4/fib_semantics.c       |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index ca764b5..58e6ba0 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -339,7 +339,7 @@ struct rtnexthop {
 /* rtnh_flags */
 
 #define RTNH_F_DEAD		1	/* Nexthop is dead (used by multipath)	*/
-#define RTNH_F_PERVASIVE	2	/* Do recursive gateway lookup	*/
+					/* 2 was RTNH_F_PERVASIVE (never implemented) */
 #define RTNH_F_ONLINK		4	/* Gateway is forced on link	*/
 #define RTNH_F_OFFLOAD		8	/* offloaded route */
 #define RTNH_F_LINKDOWN		16	/* carrier-down on nexthop */
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index df48034..c53aa74 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -243,7 +243,7 @@ out:
 	} else {
 		struct net_device *dev;
 
-		if (nh->nh_flags&(RTNH_F_PERVASIVE|RTNH_F_ONLINK))
+		if (nh->nh_flags & RTNH_F_ONLINK)
 			return -EINVAL;
 
 		dev = __dev_get_by_index(&init_net, nh->nh_oif);
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index d97268e..3883860 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -803,7 +803,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
 	} else {
 		struct in_device *in_dev;
 
-		if (nh->nh_flags & (RTNH_F_PERVASIVE | RTNH_F_ONLINK))
+		if (nh->nh_flags & RTNH_F_ONLINK)
 			return -EINVAL;
 
 		rcu_read_lock();
-- 
1.7.7.6

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

* Re: [PATCH v2] net: remove unimplemented RTNH_F_PERVASIVE
  2016-04-02 16:51   ` [PATCH v2] " Quentin Armitage
@ 2016-04-05 23:57     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-04-05 23:57 UTC (permalink / raw)
  To: quentin; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev

From: Quentin Armitage <quentin@armitage.org.uk>
Date: Sat,  2 Apr 2016 17:51:28 +0100

> Linux 2.1.68 introduced RTNH_F_PERVASIVE, but it had no implementation
> and couldn't be enabled since the required config parameter wasn't in
> any Kconfig file (see commit d088dde7b196 ("ipv4: obsolete config in
> kernel source (IP_ROUTE_PERVASIVE)")).
> 
> This commit removes all remaining references to RTNH_F_PERVASIVE.
> Although this will cause userspace applications that were using the
> flag to fail to build, they will be alerted to the fact that using
> RTNH_F_PERVASIVE was not achieving anything.
> 
> Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>

Can't really delete values like this from user visible headers.  It
can break the build.

What if some library or tool has a table translating RTNH_F_* values
into strings to display to the user?  Those sources will stop building
if I apply your changes.

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

end of thread, other threads:[~2016-04-05 23:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-02  8:43 [PATCH] net: remove unimplemented RTNH_F_PERVASIVE Quentin Armitage
2016-04-02 16:04 ` Sergei Shtylyov
2016-04-02 16:51   ` [PATCH v2] " Quentin Armitage
2016-04-05 23:57     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).