Override the metrics with rt_pmtu
Signed-off-by: Julian Anastasov <ja@ssi.bg>
---
Is this patch still useful if routing cache is removed?
net/ipv4/route.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
@@ -2909,6 +2909,7 @@ static int rt_fill_info(struct net *net,structnlmsghdr*nlh;unsignedlongexpires=0;u32error;+u32metrics[RTAX_MAX];nlh=nlmsg_put(skb,pid,seq,event,sizeof(*r),flags);if(nlh==NULL)
@@ -2953,7 +2954,10 @@ static int rt_fill_info(struct net *net,nla_put_be32(skb,RTA_GATEWAY,rt->rt_gateway))gotonla_put_failure;-if(rtnetlink_put_metrics(skb,dst_metrics_ptr(&rt->dst))<0)+memcpy(metrics,dst_metrics_ptr(&rt->dst),sizeof(metrics));+if(rt->rt_pmtu)+metrics[RTAX_MTU-1]=rt->rt_pmtu;+if(rtnetlink_put_metrics(skb,metrics)<0)gotonla_put_failure;if(rt->rt_mark&&
Is this patch still useful if routing cache is removed?
It is, since this function still gets used for rtnetlink route
queries. So I'll apply this, thanks Julian!
Which reminds me that we don't have way to inspect the new TCP metrics
cache. Would someone like to work on that?
Is this patch still useful if routing cache is removed?
It is, since this function still gets used for rtnetlink route
queries. So I'll apply this, thanks Julian!
Which reminds me that we don't have way to inspect the new TCP metrics
cache. Would someone like to work on that?
I'll try this weekend to reorganize the seqlock
usage in tcp_metrics.c and to provide method to feed
rt_fill_info with values from this cache.
Regards
--
Julian Anastasov [off-list ref]
I'll try this weekend to reorganize the seqlock
usage in tcp_metrics.c and to provide method to feed
rt_fill_info with values from this cache.
Wouldn't it be better to just export the TCP metrics via it's own
file or netlink facility?
They keying of the TCP metrics is completely different from how routes
are key'd. So I see little value in creating the illusion that these
two things live in the same keying domain.
The routing cache will be completely gone and /proc/net/rt_cache will
be an empty file.
I'll try this weekend to reorganize the seqlock
usage in tcp_metrics.c and to provide method to feed
rt_fill_info with values from this cache.
Wouldn't it be better to just export the TCP metrics via it's own
file or netlink facility?
They keying of the TCP metrics is completely different from how routes
are key'd. So I see little value in creating the illusion that these
two things live in the same keying domain.
The routing cache will be completely gone and /proc/net/rt_cache will
be an empty file.
OK, then I'll try it in this way. When I have some
plan I'll be back for comments before implementing it.
Regards
--
Julian Anastasov [off-list ref]