[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <39f1ff89-787a-489d-8ff5-9b90897afd28@nvidia.com>
Date: Tue, 22 Apr 2025 11:14:04 +0300
From: Mark Bloch <mbloch@...dia.com>
To: Qiyu Yan <yanqiyu17@...ls.ucas.ac.cn>, Saeed Mahameed
<saeedm@...dia.com>, Tariq Toukan <tariqt@...dia.com>
Cc: netdev@...r.kernel.org, Ivan Vecera <ivecera@...hat.com>,
Jiri Pirko <jiri@...nulli.us>
Subject: Re: [?bug] Can't get switchdev mode work on ConnectX-4 Card
On 22/04/2025 10:15, Qiyu Yan wrote:
> Thank you for your reply!
>
> 在 2025/4/22 14:42, Mark Bloch 写道:
>> It’s likely that the issue stems from cx4-lx not supporting metadata
>> matching, which in turn prevents the driver from enabling bridge
>> offloads.
>>
>> Could you please confirm this by checking the output of the following
>> command?
>> # devlink dev param show pci/0000:c1:00.0 name esw_port_metadata
>
> $ sudo devlink dev param show pci/0000:c1:00.0 name esw_port_metadata
> pci/0000:c1:00.0:
> name esw_port_metadata type driver-specific
> values:
> cmode runtime value false
>
> I guess the "value false" here means not supported.
Yes
>> A better approach might be to check for metadata matching support
>> ahead of time and avoid registering for bridge offloads if it's not
>> supported.
> Just wondering what is the penalty of not having such offload?
>
> The reason I am trying to enable switchdev is that I wanted to tag multiple vlans for a single VF. I see there is something called VGT+ in the document of OFED driver but the same function don't seem to exist in the mainline driver, so I considered to use the switchdev. But if the performance penalty of switchdev can be high I might want to switch to OFED driver instead.
>
OFED is unrelated to upstream.
so you want to do QinQ (not sure cx4-lx supports qinq)
or just different vlans based on the traffic?
I don't think cx4-lx supports vlan push offloads.
You can still use software push vlan action using regular tc rules,
something like this:
tc filter add dev pf0vf0_rep protocol ip parent ffff: flower skip_hw dst_mac 50:6b:4b:b4:ac:0a src_mac 8a:ee:f9:37:bb:ef action vlan push id 100 action mirred egress redirect dev uplink0_rep
Mark
>> This way the driver won't offload the bridge but
>> it will also won't prevent users from adding the reps to bridge.
>> Could you try the diff below and let me know if it resolves
>> the issue for you?
> Will try but this will take some time for me to do so.
> Best,
> Qiyu
>
Powered by blists - more mailing lists