All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Bloch <mbloch@nvidia.com>
To: Qiyu Yan <yanqiyu17@mails.ucas.ac.cn>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>
Cc: netdev@vger.kernel.org, Ivan Vecera <ivecera@redhat.com>,
	Jiri Pirko <jiri@resnulli.us>
Subject: Re: [?bug] Can't get switchdev mode work on ConnectX-4 Card
Date: Tue, 22 Apr 2025 11:14:04 +0300	[thread overview]
Message-ID: <39f1ff89-787a-489d-8ff5-9b90897afd28@nvidia.com> (raw)
In-Reply-To: <90e40d18-ad31-4408-95e8-0cbe4fb12786@mails.ucas.ac.cn>



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
> 


  reply	other threads:[~2025-04-22  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21  9:07 [?bug] Can't get switchdev mode work on ConnectX-4 Card Qiyu Yan
2025-04-22  6:42 ` Mark Bloch
2025-04-22  7:15   ` Qiyu Yan
2025-04-22  8:14     ` Mark Bloch [this message]
2025-04-22  8:45       ` Qiyu Yan
2025-04-22  8:50         ` Mark Bloch

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=39f1ff89-787a-489d-8ff5-9b90897afd28@nvidia.com \
    --to=mbloch@nvidia.com \
    --cc=ivecera@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=yanqiyu17@mails.ucas.ac.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.