On Tue, 2021-04-13 at 13:21 -0700, Jakub Kicinski wrote:
> On Tue, 13 Apr 2021 12:29:51 -0700 Saeed Mahameed wrote:
> > Currently each packet inserted in eswitch is tagged with a internal
> > metadata to indicate source vport. Metadata tagging is not always
> > needed. Metadata insertion is needed for multi-port RoCE, failover
> > between representors and stacked devices. In many other cases,
> > metadata enablement is not needed.
> > 
> > Metadata insertion slows down the packet processing rate.
> 
> Can you share example numbers?

I remember it was substantial, i don't know the exact numbers. it might
depend on the use case: Parav, do you know ?

> 
> > Hence, allow user to disable metadata using driver specific devlink
> > parameter.
> > 
> > Example to show and disable metadata before changing eswitch mode:
> > $ devlink dev param show pci/0000:06:00.0 name esw_port_metadata
> > pci/0000:06:00.0:
> >   name esw_port_metadata type driver-specific
> >     values:
> >       cmode runtime value true
> > 
> > $ devlink dev param set pci/0000:06:00.0 \
> >           name esw_port_metadata value false cmode runtime
> > 
> > $ devlink dev eswitch set pci/0000:06:00.0 mode switchdev
> 
> Is this something that only gets enabled when device is put into
> switchdev mode? That needs to be clarified in the documentation IMO 
> to give peace of mind to all users who don't enable switchdev.

Currently this is always enabled when switchdev is turned on, it
affects the whole operation mode of the FDB and the offloaded flows so
it can't be dynamic, it must be decided before user enables switchdev,
it is needed only to allow LAG use cases, hence we add a disable knob
for those who don't want LAG and could use some more packet rate.

Some documentation was pushed as part of this patch:
please let me know if it needs improvement. (maybe we should add the
benefit of packet rate ?)


 .../device_drivers/ethernet/mellanox/mlx5.rst | 23 +++++++

+esw_port_metadata: Eswitch port metadata state
+----------------------------------------------
+Eswitch port metadata state controls whether to internally tag packet
with metadata or not.
+Metadata tagging must be enabled for multi-port RoCE, failover between
representors and stacked devices.
+By default metadata is enabled on the supported devices. When metadata
usage is not needed,
+user can disable metadata tagging before moving the eswitch to
switchdev mode.

Reply via email to