Page MenuHomeFreeBSD

mlx5en: Add sysctl variable mapping driver name to IF name
Needs ReviewPublic

Authored by vag.singh_oneconvergence.com on Sep 28 2021, 1:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 12, 7:05 PM
Unknown Object (File)
Oct 8 2024, 1:14 PM
Unknown Object (File)
Oct 5 2024, 8:54 AM
Unknown Object (File)
Oct 5 2024, 4:42 AM
Unknown Object (File)
Oct 4 2024, 6:41 AM
Unknown Object (File)
Oct 3 2024, 8:35 PM
Unknown Object (File)
Oct 3 2024, 6:40 PM
Unknown Object (File)
Oct 3 2024, 1:59 PM

Details

Reviewers
kib
hselasky
Summary

[PATCH 09/31] FreeBSD OFED support for DPDK MLX5 PMD

HyperV is not enabling ROCE by default causing the OFED to
not create few SYSCTL variables that publish kernel interface
name. Due to this MLX5 PMD is not able to read kernel
interface name to get MAC address.

Added new sysctl variable in MLX5_EN driver to map the device
name to the interface name.

Test Plan

Tested on KVM, ESXi, and HyperV/Azure Hypervisors with FreeBSD 14.0-CURRENT and FreeBSD12.1-STABLE.

iperf
DPDK MLX5 PMD/testpmd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/dev/mlx5/mlx5_en/mlx5_en_main.c
4638

Why can't SYSCTL_ADD_STRING() be used here?

Hi,

The "if_name" array should be added to the mlx5e_priv, because the "ifp" is destroyed before the SYSCTL is destroyed, which may lead to a use-after-free situation.

char if_name[IFNAMSIZ];

--HPS