Page MenuHomeFreeBSD

Add rib_action() and make rtsock use it.
ClosedPublic

Authored by melifaro on Jun 8 2020, 8:00 PM.

Details

Summary

Switch rtsock code to using newly-create rib_action() KPI call.

This simplifies the code and allows to further split rtentry and nexthop, removing one of the blockers for multipath code introduction, described in D24141.

Test Plan
divert:ipdivert_ip_input_local_success  ->  passed  [3.263s]
divert:ipdivert_ip_output_remote_success  ->  passed  [0.751s]
fibs_test:arpresolve_checks_interface_fib  ->  skipped: Required configuration property 'fibs' not defined  [0.001s]
fibs_test:default_route_with_multiple_fibs_on_same_subnet  ->  skipped: Required configuration property 'fibs' not defined  [0.003s]
fibs_test:default_route_with_multiple_fibs_on_same_subnet_inet6  ->  skipped: Required configuration property 'fibs' not defined  [0.002s]
fibs_test:loopback_and_network_routes_on_nondefault_fib  ->  skipped: Required configuration property 'fibs' not defined  [0.001s]
fibs_test:loopback_and_network_routes_on_nondefault_fib_inet6  ->  skipped: Required configuration property 'fibs' not defined  [0.002s]
fibs_test:same_ip_multiple_ifaces  ->  skipped: Required configuration property 'fibs' not defined  [0.001s]
fibs_test:same_ip_multiple_ifaces_fib0  ->  skipped: Required configuration property 'fibs' not defined  [0.002s]
fibs_test:same_ip_multiple_ifaces_inet6  ->  skipped: Required configuration property 'fibs' not defined  [0.002s]
fibs_test:slaac_on_nondefault_fib6  ->  skipped: Required configuration property 'allow_sysctl_side_effects' not defined  [0.002s]
fibs_test:subnet_route_with_multiple_fibs_on_same_subnet  ->  skipped: Required configuration property 'fibs' not defined  [0.001s]
fibs_test:subnet_route_with_multiple_fibs_on_same_subnet_inet6  ->  skipped: Required configuration property 'fibs' not defined  [0.001s]
fibs_test:udp_dontroute  ->  skipped: Required configuration property 'fibs' not defined  [0.001s]
fibs_test:udp_dontroute6  ->  skipped: Required configuration property 'fibs' not defined  [0.006s]
forward:fwd_ip_icmp_gw_fast_success  ->  passed  [0.770s]
forward:fwd_ip_icmp_gw_slow_success  ->  passed  [0.725s]
forward:fwd_ip_icmp_iface_fast_success  ->  passed  [0.758s]
forward:fwd_ip_icmp_iface_slow_success  ->  passed  [0.778s]
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.016s]
output:output_raw_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.018s]
output:output_raw_success  ->  passed  [0.082s]
output:output_tcp_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.017s]
output:output_tcp_setup_success  ->  passed  [0.141s]
output:output_udp_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.034s]
output:output_udp_setup_success  ->  passed  [1.229s]
redirect:valid_redirect  ->  passed  [0.795s]
so_reuseport_lb_test:basic_ipv4  ->  passed  [0.632s]
so_reuseport_lb_test:basic_ipv6  ->  passed  [0.736s]
socket_afinet:socket_afinet  ->  passed  [0.004s]
socket_afinet:socket_afinet_bind_ok  ->  passed  [0.004s]
socket_afinet:socket_afinet_bind_zero  ->  skipped: doesn't work when mac_portacl(4) loaded (bug238781)  [0.004s]

Results file id is usr_tests_sys_netinet.20200608-200411-494564
Results saved to /home/melifaro/.kyua/store/results.usr_tests_sys_netinet.20200608-200411-494564.db

34/34 passed (0 failed)
divert:ipdivert_ip6_output_remote_success  ->  passed  [2.774s]
forward6:fwd_ip6_gu_icmp_gw_gu_fast_success  ->  passed  [2.824s]
forward6:fwd_ip6_gu_icmp_gw_gu_slow_success  ->  passed  [2.355s]
forward6:fwd_ip6_gu_icmp_gw_ll_fast_success  ->  passed  [2.387s]
forward6:fwd_ip6_gu_icmp_gw_ll_slow_success  ->  passed  [2.328s]
forward6:fwd_ip6_gu_icmp_iface_fast_success  ->  passed  [2.601s]
forward6:fwd_ip6_gu_icmp_iface_slow_success  ->  passed  [2.698s]
mld:mldraw01  ->  passed  [3.790s]
output6:output6_raw_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.021s]
output6:output6_raw_success  ->  passed  [1.696s]
output6:output6_tcp_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.026s]
output6:output6_tcp_setup_success  ->  passed  [1.885s]
output6:output6_udp_flowid_mpath_success  ->  skipped: This test requires ROUTE_MPATH enabled  [0.025s]
output6:output6_udp_setup_success  ->  passed  [3.289s]
redirect:valid_redirect  ->  passed  [2.733s]
scapyi386:scapyi386  ->  passed  [3.877s]

Results file id is usr_tests_sys_netinet6.20200608-200425-461628
Results saved to /root/.kyua/store/results.usr_tests_sys_netinet6.20200608-200425-461628.db

16/16 passed (0 failed)
test_rtsock_l3:rtm_add_v4_gu_ifa_ordered_success  ->  passed  [0.007s]
test_rtsock_l3:rtm_add_v4_gw_direct_success  ->  passed  [0.008s]
test_rtsock_l3:rtm_add_v4_temporal1_success  ->  passed  [0.017s]
test_rtsock_l3:rtm_add_v6_gu_gw_gu_direct_success  ->  passed  [0.010s]
test_rtsock_l3:rtm_add_v6_gu_ifa_hostroute_success  ->  passed  [0.005s]
test_rtsock_l3:rtm_add_v6_gu_ifa_ordered_success  ->  passed  [0.007s]
test_rtsock_l3:rtm_add_v6_gu_ifa_prefixroute_success  ->  passed  [0.005s]
test_rtsock_l3:rtm_add_v6_temporal1_success  ->  passed  [0.007s]
test_rtsock_l3:rtm_del_v4_gu_ifa_prefixroute_success  ->  passed  [0.018s]
test_rtsock_l3:rtm_del_v4_prefix_nogw_success  ->  passed  [0.009s]
test_rtsock_l3:rtm_del_v6_gu_ifa_hostroute_success  ->  passed  [0.007s]
test_rtsock_l3:rtm_del_v6_gu_ifa_prefixroute_success  ->  passed  [0.008s]
test_rtsock_l3:rtm_del_v6_gu_prefix_nogw_success  ->  passed  [0.007s]
test_rtsock_l3:rtm_get_v4_empty_dst_failure  ->  passed  [0.003s]
test_rtsock_l3:rtm_get_v4_exact_success  ->  passed  [0.007s]
test_rtsock_l3:rtm_get_v4_hostbits_failure  ->  passed  [0.008s]
test_rtsock_l3:rtm_get_v4_lpm_success  ->  passed  [0.008s]
test_rtsock_lladdr:rtm_add_v4_gu_lle_success  ->  passed  [0.006s]
test_rtsock_lladdr:rtm_add_v6_gu_lle_success  ->  passed  [0.004s]
test_rtsock_lladdr:rtm_add_v6_ll_lle_success  ->  passed  [0.005s]
test_rtsock_lladdr:rtm_del_v4_gu_lle_success  ->  passed  [0.019s]
test_rtsock_lladdr:rtm_del_v6_gu_lle_success  ->  passed  [0.004s]
test_rtsock_lladdr:rtm_del_v6_ll_lle_success  ->  passed  [0.003s]

Results file id is usr_tests_sys_net_routing.20200608-200502-772702
Results saved to /home/melifaro/.kyua/store/results.usr_tests_sys_net_routing.20200608-200502-772702.db

23/23 passed (0 failed)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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.

Make field order consistent across rib* functions.

sys/net/rtsock.c
908 ↗(On Diff #72838)

It looks unneeded now.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 10 2020, 7:46 AM
This revision was automatically updated to reflect the committed changes.