Page MenuHomeFreeBSD

mlx5en: Add sysctl variable mapping driver name to IF name
ClosedPublic

Authored by vag.singh_oneconvergence.com on Sep 28 2021, 1:24 PM.
Tags
None
Referenced Files
F172227675: D32183.id186861.diff
Thu, Sep 17, 1:14 AM
Unknown Object (File)
Sun, Sep 13, 4:53 PM
Unknown Object (File)
Tue, Sep 8, 6:24 PM
Unknown Object (File)
Sat, Sep 5, 9:13 AM
Unknown Object (File)
Sat, Sep 5, 1:04 AM
Unknown Object (File)
Fri, Sep 4, 11:52 PM
Unknown Object (File)
Fri, Sep 4, 10:42 PM
Unknown Object (File)
Fri, Sep 4, 12:53 PM

Details

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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

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

This revision was not accepted when it landed; it landed in state Needs Review.Wed, Sep 16, 2:13 PM
This revision was automatically updated to reflect the committed changes.