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)
Tue, Apr 16, 3:48 PM
Unknown Object (File)
Dec 23 2023, 12:30 AM
Unknown Object (File)
Oct 30 2023, 10:47 PM
Unknown Object (File)
Sep 30 2023, 7:11 PM
Unknown Object (File)
Sep 21 2023, 10:16 PM
Unknown Object (File)
Aug 28 2023, 6:21 PM
Unknown Object (File)
Jul 7 2023, 1:22 AM
Unknown Object (File)
Jun 12 2023, 1:46 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