Mellanox MCX516A-CCAT ConnectX®-5 support enabling or disabling function for rx port?

Trying to control the rx/tx of the card in code-level or Linux. Let me know if you have any features that apply. Thank you.

I am not clear on your request though features/functionalities/settings are either hard/soft coded (HW/FW/driver) and the code(s) are proprietary to Nvidia.
However, depending on what you are looking for, there are some settings/features that can be enabled/disabled/modified at the OS/MLNX_OFED, FW level.
You can reference to our MLNX_OFED UM (ethtool, mlxconfig, echo etc…) though no code-level related.