diff options
author | melifaro <melifaro@FreeBSD.org> | 2016-01-03 09:54:03 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2016-01-03 09:54:03 +0000 |
commit | c0fd3127f0f85f34b72f8afdb6c00d7cd19b13f8 (patch) | |
tree | e884e34dd1ce8bf4a790dc8d8f151b1d5d46bde9 /contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp | |
parent | 3260b587db44b4e61fa6c3babe0282054c38ba62 (diff) | |
download | FreeBSD-src-c0fd3127f0f85f34b72f8afdb6c00d7cd19b13f8.zip FreeBSD-src-c0fd3127f0f85f34b72f8afdb6c00d7cd19b13f8.tar.gz |
Handle IPV6_PATHMTU option by spliting ip6_getpmtu_ctl() from ip6_getpmtu().
Add ro_mtu field to 'struct route' to be able to pass lookup MTU back to
the caller.
Currently, ip6_getpmtu() has 2 totally different use cases:
1) control plane (IPV6_PATHMTU req), where we just need to calculate MTU
and return it, w/o any reusability.
2) Actual ip6_output() data path where we (nearly) always use the provided
route lookup data. If this data is not 'valid' we need to perform another
lookup and save the result (which cannot be re-used by ip6_output()).
Given that, handle 1) by calling separate function doing rte lookup itself.
Resulting MTU is calculated by (newly-added) ip6_calcmtu() used by both
ip6_getpmtu_ctl() and ip6_getpmtu().
For 2) instead of storing ref'ed rte, store mtu (the only needed data
from the lookup result) inside newly-added ro_mtu field.
'struct route' was shrinked by 8(or 4 bytes) in r292978. Grow it again
by 4 bytes. New ro_mtu field will be used in other places like
ip/tcp_output (EMSGSIZE handling from output routines).
Reviewed by: ae
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp')
0 files changed, 0 insertions, 0 deletions