]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs.
authorHans Petter Selasky <hselasky@FreeBSD.org>
Fri, 10 Feb 2017 15:22:21 +0000 (15:22 +0000)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Fri, 10 Feb 2017 15:22:21 +0000 (15:22 +0000)
commit2cebcdc7b6e227ae8cff90386f49a54d31e43a76
treeb2cf622eb9032df822e2d8c901dcb1fb2b7674fa
parenta0dedc30343e57b09ec6bf5fd38657a1e939c064
Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs.

Previously, the mlx4 driver queried the firmware in order to get the
number of supported EQs. Under SRIOV, since this was done before the
driver notified the firmware how many VFs it actually needs, the
firmware had to take into account a worst case scenario and always
allocated four EQs per VF, where one was used for events while the
others were used for completions. Now, when the firmware supports the
asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (-->
MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query
the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X
vectors per function. Moreover, when running in the new
firmware/driver mode, the limitation that the number of EQs should be
a power of two is lifted.

Obtained from: Linux (dual BSD/GPLv2 licensed)
Submitted by: Dexuan Cui @ microsoft . com
Differential Revision: https://reviews.freebsd.org/D8867
MFC after: 2 weeks
Sponsored by: Mellanox Technologies
sys/dev/mlx4/device.h
sys/dev/mlx4/mlx4_core/fw.h
sys/dev/mlx4/mlx4_core/mlx4_eq.c
sys/dev/mlx4/mlx4_core/mlx4_fw.c
sys/dev/mlx4/mlx4_core/mlx4_main.c
sys/dev/mlx4/mlx4_core/mlx4_profile.c