DPDK patches and discussions
 help / color / mirror / Atom feed
From: wenxu <wenxu@ucloud.cn>
To: dev@dpdk.org, asafp@nvidia.com
Subject: [dpdk-dev] How to enable VF LAG with switchdev mode for mlx5 in the dpdk
Date: Mon, 24 May 2021 14:36:59 +0800 (GMT+08:00)	[thread overview]
Message-ID: <AEsAyAD-FMm5FuWoKID3H4pa.1.1621838219805.Hmail.wenxu@ucloud.cn> (raw)

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











                 reply	other threads:[~2021-05-24  6:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AEsAyAD-FMm5FuWoKID3H4pa.1.1621838219805.Hmail.wenxu@ucloud.cn \
    --to=wenxu@ucloud.cn \
    --cc=asafp@nvidia.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).