# NNT-Linux-driver
**Repository Path**: mirrors_Mellanox/NNT-Linux-driver
## Basic Information
- **Project Name**: NNT-Linux-driver
- **Description**: NNT Linux driver for MFT & MSTFLINT packages
- **Primary Language**: Unknown
- **License**: GPL-2.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2022-03-25
- **Last Updated**: 2026-03-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# NNT-Linux-driver (NVIDIA® networking tools driver)
# This GitHub repository will be removed by July 2026.
This repository is the kernel space part of [MFT](https://network.nvidia.com/products/adapter-software/firmware-tools/) & [MSTFlint](https://github.com/Mellanox/mstflint) packages aimed to provide a stable and well defined interface for NVIDIA® networking devices that are accessed via PCI Memory Mapping or by PCI configuration cycles.
The purpose of this driver is to provide a lightweight interface between kernel and userspace for firmware management and debug tools for NVIDIA® networking devices.
The API is described in section [Access from user space](#access-from-user-space).
This repository is maintained by [Itay Avraham](mailto:itayavr@nvidia.com?subject=[GitHub]%20NNT%20Linux%20driver), please send any comments, suggestions, or questions to the maintainer.
## How to compile and load the driver.
Build the driver by using the "make" command and load the driver by using the "insmod" command:
- Build and load driver for MSTFLint
```
make
insmode insmod nnt_linux_driver.ko
```
- Build and load driver for MFT
```
make
insmod nnt_linux_driver.ko mft_package=1
```
## Requirements
- Userspace packages versions:
- MFT version >=4.20.x
- MSTFlint version >=4.20.x
- The minimal GCC version should be 4.8.x.
## Access from user space
IOCTL system call will be the communication channel between the userspace and the kernel space.
Here is a short explanation regarding the IOCTLS codes:
| IOCTL Code | Explanation |
| ---------------------------------- | :-----------------------------------------------------|
| `NNT_INIT` | Changes the bar number and map the new bar on the fly |
| `NNT_STOP` | Change configuration registers on the fly |
| `NNT_GET_DEVICE_PARAMETERS` | Pulls information about the NVIDIA® networking device |
| `NNT_WRITE` | Writes a block of data to the PCI memory or the configuration space,
Size is expressed as number of unsigned integers |
| `NNT_READ` | Reads a block of data from the PCI memory or the configuration space,
Size is expressed as number of unsigned integers |
| `NNT_VPD_READ` | Reads PCI device VPD |
| `NNT_VPD_WRITE` | Writes PCI device VPD |
| `NNT_GET_DMA_PAGES` | Pins the user space memory into the kernel space for DMA purpose,
User space application should allocate buffer as number of pages |
| `NNT_RELEASE_DMA_PAGES` | Unpin the user space memory |
| `NNT_READ_DWORD_FROM_CONFIG_SPACE` | Reads a dword from the PCI configuation space |
| `NNT_PCI_CONNECTX_WA` | ConnectX ordering workaround |
## FAQ:
- Q: What is the driver major number of the driver?
- A: The driver's major version is allocated dynamically, no fixed number.
- Q: Which communication channel is preferred?
- A: PCI configuration access is slower and less safe than memory access.