ChangeSet 1.2229.1.13, 2005/03/18 10:43:40-08:00, [EMAIL PROTECTED]
[NET]: Kill dst_pmtu/dst_path_metric
This would have been the patch that removed dst->path. But
ip_append_data got in the way :)
However, using dst->path is only needed rarely and should always
require a bit of deliberation. So let's get rid of dst_pmtu
and dst_path_metric and use dst_mtu and dst_metric directly.
Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
include/net/dst.h | 17 +----------------
net/ipv4/ip_output.c | 2 +-
net/ipv6/ip6_output.c | 2 +-
3 files changed, 3 insertions(+), 18 deletions(-)
diff -Nru a/include/net/dst.h b/include/net/dst.h
--- a/include/net/dst.h 2005-03-18 14:10:56 -08:00
+++ b/include/net/dst.h 2005-03-18 14:10:56 -08:00
@@ -110,21 +110,6 @@
return dst->metrics[metric-1];
}
-static inline u32
-dst_path_metric(const struct dst_entry *dst, int metric)
-{
- return dst->path->metrics[metric-1];
-}
-
-static inline u32
-dst_pmtu(const struct dst_entry *dst)
-{
- u32 mtu = dst_path_metric(dst, RTAX_MTU);
- /* Yes, _exactly_. This is paranoia. */
- barrier();
- return mtu;
-}
-
static inline u32 dst_mtu(const struct dst_entry *dst)
{
u32 mtu = dst_metric(dst, RTAX_MTU);
@@ -138,7 +123,7 @@
static inline u32
dst_allfrag(const struct dst_entry *dst)
{
- int ret = dst_path_metric(dst, RTAX_FEATURES) & RTAX_FEATURE_ALLFRAG;
+ int ret = dst_metric(dst->path, RTAX_FEATURES) & RTAX_FEATURE_ALLFRAG;
/* Yes, _exactly_. This is paranoia. */
barrier();
return ret;
diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
--- a/net/ipv4/ip_output.c 2005-03-18 14:10:56 -08:00
+++ b/net/ipv4/ip_output.c 2005-03-18 14:10:56 -08:00
@@ -746,7 +746,7 @@
inet->cork.addr = ipc->addr;
}
dst_hold(&rt->u.dst);
- inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst);
+ inet->cork.fragsize = mtu = dst_mtu(rt->u.dst.path);
inet->cork.rt = rt;
inet->cork.length = 0;
sk->sk_sndmsg_page = NULL;
diff -Nru a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
--- a/net/ipv6/ip6_output.c 2005-03-18 14:10:56 -08:00
+++ b/net/ipv6/ip6_output.c 2005-03-18 14:10:56 -08:00
@@ -850,7 +850,7 @@
np->cork.rt = rt;
inet->cork.fl = *fl;
np->cork.hop_limit = hlimit;
- inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst);
+ inet->cork.fragsize = mtu = dst_mtu(rt->u.dst.path);
if (dst_allfrag(&rt->u.dst))
inet->cork.flags |= IPCORK_ALLFRAG;
inet->cork.length = 0;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html