Page MenuHomeFreeBSD

Convert IP/IPv6 forwarding and ICMP processing to the new routing KPI.

Authored by melifaro on Mar 31 2020, 8:55 PM.



Convert IP/IPv6 forwarding and ICMP processing to the new routing KPI.

This change depends on D24232.

Test Plan
divert:ipdivert_ip6_output_remote_success  ->  passed  [3.103s]
exthdr:exthdr  ->  passed  [102.480s]
forward6:fwd_ip6_gu_icmp_gw_gu_fast_success  ->  passed  [3.015s]
forward6:fwd_ip6_gu_icmp_gw_gu_slow_success  ->  passed  [2.488s]
forward6:fwd_ip6_gu_icmp_gw_ll_fast_success  ->  passed  [2.204s]
forward6:fwd_ip6_gu_icmp_gw_ll_slow_success  ->  passed  [2.759s]
forward6:fwd_ip6_gu_icmp_iface_fast_success  ->  passed  [2.640s]
forward6:fwd_ip6_gu_icmp_iface_slow_success  ->  passed  [2.890s]
mld:mldraw01  ->  passed  [4.067s]
output6:output6_raw_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.016s]
output6:output6_raw_success  ->  passed  [1.659s]
output6:output6_tcp_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.021s]
output6:output6_tcp_setup_success  ->  passed  [1.636s]
output6:output6_udp_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.021s]
output6:output6_udp_setup_success  ->  passed  [3.059s]
redirect:valid_redirect  ->  passed  [3.142s]
scapyi386:scapyi386  ->  passed  [4.244s]
frag6/frag6_01:frag6_01  ->  skipped: Sending IPv6 Jumbograms needs 1 kernel changes and BPF fixes  [0.019s]
frag6/frag6_02:frag6_02  ->  passed  [4.307s]
frag6/frag6_03:frag6_03  ->  passed  [4.471s]
frag6/frag6_04:frag6_04  ->  passed  [4.950s]
frag6/frag6_05:frag6_05_0  ->  passed  [79.899s]
frag6/frag6_05:frag6_05_1  ->  passed  [80.167s]
frag6/frag6_06:frag6_06_0  ->  passed  [4.968s]
frag6/frag6_07:frag6_07  ->  passed  [80.556s]
frag6/frag6_08:frag6_08  ->  passed  [80.705s]
frag6/frag6_09:frag6_09  ->  passed  [79.387s]
frag6/frag6_10:frag6_10  ->  passed  [79.515s]
frag6/frag6_11:frag6_11  ->  passed  [79.311s]
frag6/frag6_12:frag6_12  ->  passed  [79.306s]
frag6/frag6_13:frag6_13  ->  passed  [80.892s]
frag6/frag6_14:frag6_14  ->  passed  [79.529s]
frag6/frag6_15:frag6_15  ->  passed  [4.734s]
frag6/frag6_16:frag6_16  ->  passed  [5.903s]
frag6/frag6_17:frag6_17  ->  passed  [9.146s]
frag6/frag6_18:frag6_18  ->  passed  [9.573s]
frag6/frag6_19:frag6_19  ->  passed  [9.127s]
frag6/frag6_20:frag6_20  ->  passed  [79.477s]

divert:ipdivert_ip_input_local_success  ->  passed  [0.957s]
divert:ipdivert_ip_output_remote_success  ->  passed  [1.034s]
forward:fwd_ip_icmp_gw_fast_success  ->  passed  [1.094s]
forward:fwd_ip_icmp_gw_slow_success  ->  passed  [1.097s]
forward:fwd_ip_icmp_iface_fast_success  ->  passed  [1.056s]
forward:fwd_ip_icmp_iface_slow_success  ->  passed  [1.128s]
ip_reass_test:ip_reass__large_fragment  ->  passed  [0.015s]
ip_reass_test:ip_reass__multiple_last_fragments  ->  passed  [0.032s]
ip_reass_test:ip_reass__zero_length_fragment  ->  passed  [0.021s]
output:output_raw_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.045s]
output:output_raw_success  ->  passed  [0.082s]
output:output_tcp_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.026s]
output:output_tcp_setup_success  ->  passed  [0.146s]
output:output_udp_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.021s]
output:output_udp_setup_success  ->  passed  [1.224s]
redirect:valid_redirect  ->  passed  [1.076s]
so_reuseport_lb_test:basic_ipv4  ->  passed  [0.670s]
so_reuseport_lb_test:basic_ipv6  ->  passed  [0.801s]
socket_afinet:socket_afinet  ->  passed  [0.005s]
socket_afinet:socket_afinet_bind_ok  ->  passed  [0.004s]

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

melifaro edited the test plan for this revision. (Show Details)
melifaro added reviewers: network, ae, bz.

Update diff to account for the committed changes.

1187 ↗(On Diff #70479)

It looks like we can use `sin' that is already initialized.

972 ↗(On Diff #70479)

In another review you told that proper sin_family initialization is not required. Will sa_equal work correctly in this case? Is this structure properly initialized? :)

284 ↗(On Diff #70479)

Does sin6_addr here have embedded scope zone id? LLE lookup did need address with embedded scope zone id. Did you make test when GW address is LLA?

1187 ↗(On Diff #70479)

Good catch! Will update the review shortly.

972 ↗(On Diff #70479)

sin_family initialisation is not required for the lookup. Gateway sockaddr in the nexthop is aways filled in properly. As here src should also be proper sockaddr, I guess it should continue working as is.

284 ↗(On Diff #70479)

Yes, the gateway always have scopeid embedded - exactly for the purpose of passing it to LLE. At some point in time we should just convert LLE layer to accept non-embedded addresses and mark l3+l2 lookups as embed-free

Update to reflect ae@ comments.

This revision is now accepted and ready to land.Apr 14 2020, 10:01 AM