net: Rename net/nexthop.h net/rtnh.h
authorDavid Ahern <dsahern@gmail.com>
Sat, 20 Apr 2019 16:28:20 +0000 (09:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Apr 2019 04:47:25 +0000 (21:47 -0700)
The header contains rtnh_ macros so rename the file accordingly.
Allows a later patch to use the nexthop.h name for the new
nexthop code.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/nexthop.h [deleted file]
include/net/rtnh.h [new file with mode: 0644]
net/core/lwtunnel.c
net/decnet/dn_fib.c
net/ipv4/fib_semantics.c
net/ipv4/ipmr.c
net/ipv6/route.c
net/mpls/af_mpls.c

diff --git a/include/net/nexthop.h b/include/net/nexthop.h
deleted file mode 100644 (file)
index 902ff38..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __NET_NEXTHOP_H
-#define __NET_NEXTHOP_H
-
-#include <linux/rtnetlink.h>
-#include <net/netlink.h>
-
-static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining)
-{
-       return remaining >= (int)sizeof(*rtnh) &&
-              rtnh->rtnh_len >= sizeof(*rtnh) &&
-              rtnh->rtnh_len <= remaining;
-}
-
-static inline struct rtnexthop *rtnh_next(const struct rtnexthop *rtnh,
-                                         int *remaining)
-{
-       int totlen = NLA_ALIGN(rtnh->rtnh_len);
-
-       *remaining -= totlen;
-       return (struct rtnexthop *) ((char *) rtnh + totlen);
-}
-
-static inline struct nlattr *rtnh_attrs(const struct rtnexthop *rtnh)
-{
-       return (struct nlattr *) ((char *) rtnh + NLA_ALIGN(sizeof(*rtnh)));
-}
-
-static inline int rtnh_attrlen(const struct rtnexthop *rtnh)
-{
-       return rtnh->rtnh_len - NLA_ALIGN(sizeof(*rtnh));
-}
-
-#endif
diff --git a/include/net/rtnh.h b/include/net/rtnh.h
new file mode 100644 (file)
index 0000000..aa2cfc5
--- /dev/null
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __NET_RTNH_H
+#define __NET_RTNH_H
+
+#include <linux/rtnetlink.h>
+#include <net/netlink.h>
+
+static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining)
+{
+       return remaining >= (int)sizeof(*rtnh) &&
+              rtnh->rtnh_len >= sizeof(*rtnh) &&
+              rtnh->rtnh_len <= remaining;
+}
+
+static inline struct rtnexthop *rtnh_next(const struct rtnexthop *rtnh,
+                                         int *remaining)
+{
+       int totlen = NLA_ALIGN(rtnh->rtnh_len);
+
+       *remaining -= totlen;
+       return (struct rtnexthop *) ((char *) rtnh + totlen);
+}
+
+static inline struct nlattr *rtnh_attrs(const struct rtnexthop *rtnh)
+{
+       return (struct nlattr *) ((char *) rtnh + NLA_ALIGN(sizeof(*rtnh)));
+}
+
+static inline int rtnh_attrlen(const struct rtnexthop *rtnh)
+{
+       return rtnh->rtnh_len - NLA_ALIGN(sizeof(*rtnh));
+}
+
+#endif
index 19b557b..a8018aa 100644 (file)
@@ -26,7 +26,7 @@
 #include <net/lwtunnel.h>
 #include <net/rtnetlink.h>
 #include <net/ip6_fib.h>
-#include <net/nexthop.h>
+#include <net/rtnh.h>
 
 #ifdef CONFIG_MODULES
 
index 6cd3737..7e47ffd 100644 (file)
@@ -42,7 +42,7 @@
 #include <net/dn_fib.h>
 #include <net/dn_neigh.h>
 #include <net/dn_dev.h>
-#include <net/nexthop.h>
+#include <net/rtnh.h>
 
 #define RT_MIN_TABLE 1
 
index 779d2be..b5230c4 100644 (file)
@@ -43,7 +43,7 @@
 #include <net/ip_fib.h>
 #include <net/ip6_fib.h>
 #include <net/netlink.h>
-#include <net/nexthop.h>
+#include <net/rtnh.h>
 #include <net/lwtunnel.h>
 #include <net/fib_notifier.h>
 #include <net/addrconf.h>
index 9a3f13e..a8eb977 100644 (file)
@@ -66,7 +66,7 @@
 #include <net/netlink.h>
 #include <net/fib_rules.h>
 #include <linux/netconf.h>
-#include <net/nexthop.h>
+#include <net/rtnh.h>
 
 #include <linux/nospec.h>
 
index e8c73b7..844b16d 100644 (file)
@@ -59,7 +59,7 @@
 #include <net/xfrm.h>
 #include <net/netevent.h>
 #include <net/netlink.h>
-#include <net/nexthop.h>
+#include <net/rtnh.h>
 #include <net/lwtunnel.h>
 #include <net/ip_tunnels.h>
 #include <net/l3mdev.h>
index 8120e04..e321a5f 100644 (file)
@@ -23,7 +23,7 @@
 #include <net/ipv6.h>
 #endif
 #include <net/ipv6_stubs.h>
-#include <net/nexthop.h>
+#include <net/rtnh.h>
 #include "internal.h"
 
 /* max memory we will use for mpls_route */