How to Configuring MAC Loopback or Switch Loopback for Mellanox CX7 Adapter

Dear NVIDIA Technical Support Team,

I hope this message finds you well. I am writing to seek your expert guidance on configuring MAC loopback or switch loopback (internal loopback) for the Mellanox CX7 network adapter (model: MT4129) for testing purposes.

Objective

I aim to perform loopback testing between two Physical Functions (PFs) on the same adapter:

  • Sender Interface: ens25f0np0 (PF0)
  • Receiver Interface: ens25f1np1 (PF1)

The goal is to send packets (e.g., using scapy ) from ens25f0np0 and receive them on ens25f1np1 without external physical connections, leveraging internal loopback capabilities.

Environment Details

  • Adapter: Mellanox CX7 (MT4129)
  • Ports: Dual-port (ens25f0np0 and ens25f1np1)
  • OS: Linux (RHEL/CentOS)
  • Tools Installed: Mellanox Firmware Tools (MFT), mlxconfig , ethtool
  • Current Status:
    • Physical links show NO-CARRIER (using internal loopback, so no physical cables connected).
    • Interfaces are enabled (UP state) but loopback testing fails (no packets received on the target interface).

What is the recommended method to enable MAC-level internal loopback (e.g., SERDES or MAC loopback) for the CX7 adapter? Are there specific mlxconfig parameters (e.g., LOOPBACK_MODE , INTERNAL_LOOPBACK_ENABLE ) or ethtool commands to achieve this?