提交 794785bf 编写于 作者: D David S. Miller

net: Don't report route RTT metric value in cache dumps.

We don't maintain it dynamically any longer, so reporting it would
be extremely misleading.  Report zero instead.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 51c5d0c4
...@@ -1812,12 +1812,11 @@ static int dn_rt_cache_seq_show(struct seq_file *seq, void *v) ...@@ -1812,12 +1812,11 @@ static int dn_rt_cache_seq_show(struct seq_file *seq, void *v)
char buf1[DN_ASCBUF_LEN], buf2[DN_ASCBUF_LEN]; char buf1[DN_ASCBUF_LEN], buf2[DN_ASCBUF_LEN];
seq_printf(seq, "%-8s %-7s %-7s %04d %04d %04d\n", seq_printf(seq, "%-8s %-7s %-7s %04d %04d %04d\n",
rt->dst.dev ? rt->dst.dev->name : "*", rt->dst.dev ? rt->dst.dev->name : "*",
dn_addr2asc(le16_to_cpu(rt->rt_daddr), buf1), dn_addr2asc(le16_to_cpu(rt->rt_daddr), buf1),
dn_addr2asc(le16_to_cpu(rt->rt_saddr), buf2), dn_addr2asc(le16_to_cpu(rt->rt_saddr), buf2),
atomic_read(&rt->dst.__refcnt), atomic_read(&rt->dst.__refcnt),
rt->dst.__use, rt->dst.__use, 0);
(int) dst_metric(&rt->dst, RTAX_RTT));
return 0; return 0;
} }
......
...@@ -423,18 +423,16 @@ static int rt_cache_seq_show(struct seq_file *seq, void *v) ...@@ -423,18 +423,16 @@ static int rt_cache_seq_show(struct seq_file *seq, void *v)
int len; int len;
seq_printf(seq, "%s\t%08X\t%08X\t%8X\t%d\t%u\t%d\t" seq_printf(seq, "%s\t%08X\t%08X\t%8X\t%d\t%u\t%d\t"
"%08X\t%d\t%u\t%u\t%02X\t%d\t%1d\t%08X%n", "%08X\t%d\t%u\t%u\t%02X\t%d\t%1d\t%08X%n",
r->dst.dev ? r->dst.dev->name : "*", r->dst.dev ? r->dst.dev->name : "*",
(__force u32)r->rt_dst, (__force u32)r->rt_dst,
(__force u32)r->rt_gateway, (__force u32)r->rt_gateway,
r->rt_flags, atomic_read(&r->dst.__refcnt), r->rt_flags, atomic_read(&r->dst.__refcnt),
r->dst.__use, 0, (__force u32)r->rt_src, r->dst.__use, 0, (__force u32)r->rt_src,
dst_metric_advmss(&r->dst) + 40, dst_metric_advmss(&r->dst) + 40,
dst_metric(&r->dst, RTAX_WINDOW), dst_metric(&r->dst, RTAX_WINDOW), 0,
(int)((dst_metric(&r->dst, RTAX_RTT) >> 3) + r->rt_key_tos,
dst_metric(&r->dst, RTAX_RTTVAR)), -1, 0, 0, &len);
r->rt_key_tos,
-1, 0, 0, &len);
seq_printf(seq, "%*s\n", 127 - len, ""); seq_printf(seq, "%*s\n", 127 - len, "");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册