#
aa4ac90d |
|
11-Apr-2024 |
Tariq Toukan <tariqt@nvidia.com> |
net/mlx5: SD, Handle possible devcom ERR_PTR Check if devcom holds an error pointer and return immediately. This fixes Smatch static checker warning: drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c:221 sd_register() error: 'devcom' dereferencing possible ERR_PTR() Enhance mlx5_devcom_register_component() so it stops returning NULL, making it easier for its callers. Fixes: d3d057666090 ("net/mlx5: SD, Implement devcom communication and primary election") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/all/f09666c8-e604-41f6-958b-4cc55c73faf9@gmail.com/T/ Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Gal Pressman <gal@nvidia.com> Link: https://lore.kernel.org/r/20240411115444.374475-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
4375130b |
|
14-Feb-2024 |
Tariq Toukan <tariqt@nvidia.com> |
net/mlx5: SD, Add debugfs Add debugfs entries that describe the Socket-Direct group. Example: $ grep -H . /sys/kernel/debug/mlx5/0000\:08\:00.0/multi-pf/* /sys/kernel/debug/mlx5/0000:08:00.0/multi-pf/group_id:0x00000101 /sys/kernel/debug/mlx5/0000:08:00.0/multi-pf/primary:0000:08:00.0 vhca 0x0 /sys/kernel/debug/mlx5/0000:08:00.0/multi-pf/secondary_0:0000:09:00.0 vhca 0x2 Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
|
#
ae40550e |
|
14-Feb-2024 |
Tariq Toukan <tariqt@nvidia.com> |
net/mlx5: SD, Add informative prints in kernel log Print to kernel log when an SD group moves from/to ready state. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
|
#
f218179b |
|
14-Feb-2024 |
Tariq Toukan <tariqt@nvidia.com> |
net/mlx5: SD, Implement steering for primary and secondaries Implement the needed SD steering adjustments for the primary and secondaries. While the SD multiple PFs are used to avoid cross-numa memory, when it comes to chip level all traffic goes only through the primary device. The secondaries are forced to silent mode, to guarantee they are not involved in any unexpected ingress/egress traffic. In RX, secondary devices will not have steering objects. Traffic will be steered from the primary device to the RQs of a secondary device using advanced cross-vhca RX steering capabilities. In TX, the primary creates a new TX flow table, which is aliased by the secondaries. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
|
#
d3d05766 |
|
14-Feb-2024 |
Tariq Toukan <tariqt@nvidia.com> |
net/mlx5: SD, Implement devcom communication and primary election Use devcom to communicate between the different devices. Add a new devcom component type for this. Each device registers itself to the devcom component <SD, group ID>. Once all devices of a component are registered, the component becomes ready, and a primary device is elected. In principle, any of the devices can act as a primary, they are all capable, and a random election would've worked. However, we aim to achieve predictability and consistency, hence each group always choses the same device, with the lowest PCI BUS number, as primary. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
|
#
678eb448 |
|
14-Feb-2024 |
Tariq Toukan <tariqt@nvidia.com> |
net/mlx5: SD, Implement basic query and instantiation Add implementation for querying the MPIR register for Socket-Direct attributes, and instantiating a SD struct accordingly. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
|
#
75a54396 |
|
14-Feb-2024 |
Tariq Toukan <tariqt@nvidia.com> |
net/mlx5: SD, Introduce SD lib Add Socket-Direct API with empty/minimal implementation. We fill-in the implementation gradually in downstream patches. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Gal Pressman <gal@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
|