]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
make lacp's use_numa hashing aware of send tags
authorgallatin <gallatin@FreeBSD.org>
Mon, 9 Mar 2020 13:44:51 +0000 (13:44 +0000)
committergallatin <gallatin@FreeBSD.org>
Mon, 9 Mar 2020 13:44:51 +0000 (13:44 +0000)
commit3ea844b1da3f287b59141a9acb13ebed50efbb42
tree57465d363fcd219ecb1cc2d093a1465046d22318
parent11fcae0558b640a8916d95659b8bbd76e19f9c3c
make lacp's use_numa hashing aware of send tags

When I did the use_numa support, I missed the fact that there is
a separate hash function for send tag nic selection. So when
use_numa is enabled, ktls offload does not work properly, as it
does not reliably allocate a send tag on the proper egress nic
since different egress nics are selected for send-tag allocation
and packet transmit. To fix this, this change:

- refectors lacp_select_tx_port_by_hash() and
     lacp_select_tx_port() to make lacp_select_tx_port_by_hash()
     always called by lacp_select_tx_port()

-   pre-shifts flowids to convert them to hashes when calling lacp_select_tx_port_by_hash()

-   adds a numa_domain field to if_snd_tag_alloc_params

-   plumbs the numa domain into places where we allocate send tags

In testing with NIC TLS setup on a NUMA machine, I see thousands
of output errors before the change when enabling
kern.ipc.tls.ifnet.permitted=1. After the change, I see no
errors, and I see the NIC sysctl counters showing active TLS
offload sessions.

Reviewed by: rrs, hselasky, jhb
Sponsored by: Netflix
sys/kern/uipc_ktls.c
sys/net/ieee8023ad_lacp.c
sys/net/ieee8023ad_lacp.h
sys/net/if_lagg.c
sys/net/if_var.h
sys/netinet/in_pcb.c
sys/netinet/tcp_ratelimit.c