Re: [PATCH 0/5] Long term PMTU/redirect storage in ipv4.

Julian Anastasov
2012-07-17T22:06:59Z

Hello,

On Tue, 17 Jul 2012, David Miller wrote:

> > IIRC, struct fib_info was shared by different
> > prefixes. It saves a lot of memory when thousands of
> > routes are created to same GW. Now if we end up with 1 or
> > 2 fib_info structures for default routes, the nh_exceptions list
> > can become very long. May be fib_info is not a good place
> > to hide such data.
>
> Your analysis of what fib_info is and how it's intended to
> work is accurate.
>
> But we don't use a linked list for the exceptions in the final
> version, we use a reclaiming RCU'd hash table like we use for TCP
> metrics.
>
> See the updated version of patch #5 and what I actually committed to
> net-next.

Aha, I see. Something around fnhe_oldest() and its
daddr arg does not look good. If the goal is to hijack
some entry, probably for another daddr and comparing it with
tcpm_new(), may be we should remove this daddr arg and fully
reset all parameters such as fnhe_pmtu, fnhe_gw, fnhe_expires
because the find_or_create_fnhe() callers modify only specific
fields, we should not end up with wrong gateway inherited from
another daddr, for example.

Regards

--
Julian Anastasov <ja@ssi.bg>