Disable Zero padding in Tx direction by Mellanox ConnectX-5 NIC HW

Is it possible to disable Tx padding (Zero padding to 60B) option in Mellanox NIC? Using mlx5 PMD even if I send a packet of 20B (purposefully generate RUNTS) the MAC seems to be zero padding and make it 60B w/o FCS.

According to the Mellanox Adapters Programmer’s Reference Manual (PRM), Mellanox also pads Ethernet frames if their size is less 64B.
image

According to the above document, there is a capability structure member pad_tx_eth_packet which allow us to control this zero padding option.

image

Is it possible to configure this register?

Hi,

Thanks for your question.
Following to my check it should be possible to control it using this register.

Best Regards,
Anatoly

i tried to configure but output remains padded. Can you pls share a code snippet to control the same?