DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] How to enable VF LAG with switchdev mode for mlx5 in the dpdk
@ 2021-05-24  6:36 wenxu
  0 siblings, 0 replies; only message in thread
From: wenxu @ 2021-05-24  6:36 UTC (permalink / raw)
  To: dev, asafp

Hi mlnx teams,


How can I enable VF LAG with switch mode in the upstrem dpdk?


echo 1 > /sys/class/net/net2/device/sriov_numvfs
echo 1 > /sys/class/net/net3/device/sriov_numvfs
echo 0000:19:00.2 > /sys/bus/pci/drivers/mlx5_core/unbind
echo 0000:19:08.1 > /sys/bus/pci/drivers/mlx5_core/unbind


devlink dev eswitch set pci/0000:19:00.0 mode switchdev encap enable
devlink dev eswitch set pci/0000:19:00.1 mode switchdev encap enable
sleep 2
ip l add dev bond0 type bond mode 802.3ad
ifconfig bond0 172.168.153.50/24 up
echo 1 > /sys/class/net/bond0/bonding/xmit_hash_policy
ifconfig net2 down
ip l set dev net2 master bond0
ifconfig net3 down
ip l set dev net3 master bond0
ifconfig net2 up
ifconfig net3 up


I create one VF on each PF and unbind the VF. Then enable the eswitch mode for each PF.


Then bond the PFs to a lacp linux bond. I can see the lag success.


mlx5_core 0000:19:00.0: modify lag map port 1:1 port 2:1
mlx5_core 0000:19:00.0: modify lag map port 1:1 port 2:2




But I check the dpdk codes in mlx5_device_bond_pci_match, 
The VF lag mode depends on the IB device with bond name.


But in the eswitch mode, There will be no mlx_bond_0 IB device.
The bond IB device will come out only in legacy mode. 


ls /sys/class/infiniband/
mlx5_0  mlx5_1



So Is there some way to enable VF LAG with switchdev mode in dpdk for mlx5?






My enviorment:


# lspci | grep Ether
19:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]
19:00.1 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]



Fw version is 16.30.1004
# ethtool -i net2
driver: mlx5_core
version: 5.12.0-rc7+
firmware-version: 16.30.1004 (MT_0000000080)
expansion-rom-version: 
bus-info: 0000:19:00.0


# ethtool -i net3
driver: mlx5_core
version: 5.12.0-rc7+
firmware-version: 16.30.1004 (MT_0000000080)
expansion-rom-version: 
bus-info: 0000:19:00.1








BR
wenxu











^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-24  6:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24  6:36 [dpdk-dev] How to enable VF LAG with switchdev mode for mlx5 in the dpdk wenxu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).