How to Bond two ConnectX-6 port?

Hi,

I have a ConnectX-6 multi-port 25Gbps Ethernet card (mlx5_0, mlx5_1) on ubuntu20.04 with the PCIe addresses:
84:00.0 Ethernet controller: Mellanox Technologies MT2894 Family [ConnectX-6 Lx]
84:00.1 Ethernet controller: Mellanox Technologies MT2894 Family [ConnectX-6 Lx]

I would like to bind the two ports on this card together to create an RDMA network port with a maximum bandwidth of 50Gbps for SPDK usage. Is it possible to achieve this?

I also would like to know if the two CX6 network card on BlueField-2 supports link aggregation and how to do this?

Thank you

Hello,

In order to bond two ports together, you can use the standard linux method for interface bonding.
This depends whether you need LACP or not. If so, you must also have a switch that supports and is configured for LACP.
If LACP is not required and you simply wish to bond the two ports together, please use the below:

ip link set dev bond0 type bond mode balance-rr 
ip link set <1st net interface name> down
ip link set <2nd net interface name> down
ip link set <1st net interface name> master bond0
ip link set <2nd net interface name> master bond0
ip link set bond0 up
ip address add <choose any ip/mask address> dev bond0
ifconfig <1st net interface> mtu 9000
ifconfig <2nd net interface> mtu 9000
ifconfig bond0 mtu 9000

For LACP, you will need to change the bond mode to 802.3ad and there are several more configurations.

Run cat /proc/net/bonding/bond0 to make sure the bond was created properly.

I hope this helps.
If you still have some questions or issues, please open a case at: enterprisesupport@nvidia.com, and it will be handled according to entitlement.

Best Regards,
Jonathan.