By default Mellanox interfaces are set as “switchports” which is to allow L2 communication. To change to routed only port, you have to disable L2 functionality.
Relevant Configuration
Disable L2 functionality
Switch (config) # interface ethernet ¼
Switch (config-int) no switchport force
Give an interface an IP address
switch (config) # interface ethernet 1/14 ip address 192.168.75.1/31
primary
Show Commands to Validate Functionality
show ethernet interface IFACE
Expected Results