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 19b557bd294bec9777acd58c7c0d017822e32294..a8018aa5b7987d95c3924eefd86c3e764c80d363 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 6cd3737593a6b63c01b8e2bc2096e9924d15d978..7e47ffdd1412dea99cc9ef7ca6bff56c7d8b7dae 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 779d2be2b1356d3e61d47a3b544fb40464b6fdb3..b5230c4a1c16e2903472ef017456ea7f2a234227 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 9a3f13edc98e18fa7d2a7574423624d722c888d0..a8eb97777c0ac1517bd0ad168584b9e511b3f7b8 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 e8c73b7782cdc5a2c4ca5ef50aca4c8d8556c7be..844b16d8d6e8b42d5d6983240052748b3ea469d3 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 8120e04f15e44f5df586de9e959c6d0cec39af63..e321a5fafb8790c59537ad9e9242ab249a1112bd 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 */