[PATCH 1/3] net/mlx5/hws: support jump FDB Rx

Suanming Mou suanmingm at nvidia.com
Wed Feb 26 14:31:33 CET 2025



> -----Original Message-----
> From: Bing Zhao <bingz at nvidia.com>
> Sent: Wednesday, February 26, 2025 6:29 PM
> To: Suanming Mou <suanmingm at nvidia.com>; Dariusz Sosnowski
> <dsosnowski at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>; Ori
> Kam <orika at nvidia.com>; Matan Azrad <matan at nvidia.com>
> Cc: dev at dpdk.org; Raslan Darawsheh <rasland at nvidia.com>; Alex Vesker
> <valex at nvidia.com>
> Subject: RE: [PATCH 1/3] net/mlx5/hws: support jump FDB Rx
> 
> Hi Suanming,
> 
> PSB
> 
> > -----Original Message-----
> > From: Suanming Mou <suanmingm at nvidia.com>
> > Sent: Tuesday, February 25, 2025 8:45 AM
> > To: Dariusz Sosnowski <dsosnowski at nvidia.com>; Slava Ovsiienko
> > <viacheslavo at nvidia.com>; Bing Zhao <bingz at nvidia.com>; Ori Kam
> > <orika at nvidia.com>; Matan Azrad <matan at nvidia.com>
> > Cc: dev at dpdk.org; Raslan Darawsheh <rasland at nvidia.com>; Alex Vesker
> > <valex at nvidia.com>
> > Subject: [PATCH 1/3] net/mlx5/hws: support jump FDB Rx
> >
> > Before FW introduced the JUMP_FDB_RX action feature, jump from FDB Tx
> > to Rx is not allowed. JUMP_FDB_RX feature introduces the internal
> > loopback for Tx case and allow the REG C0 C1 B be preserved as well.
> >
> > This commit adds the JUMP_FDB_RX cap bit check and use JUMP_FDB_RX
> > instead of FT for dest table FDB Rx case.
> >
> > Signed-off-by: Suanming Mou <suanmingm at nvidia.com>
> > Signed-off-by: Alex Vesker <valex at nvidia.com>
> > ---
> >  drivers/common/mlx5/mlx5_prm.h        |  9 ++++++++-
> >  drivers/net/mlx5/hws/mlx5dr_action.c  | 26
> +++++++++++++++++++++-----
> > drivers/net/mlx5/hws/mlx5dr_action.h  |  4 ++++
> >  drivers/net/mlx5/hws/mlx5dr_cmd.c     |  9 +++++++++
> >  drivers/net/mlx5/hws/mlx5dr_cmd.h     |  2 ++
> >  drivers/net/mlx5/hws/mlx5dr_context.c | 17 +++++++++++++++++
> > drivers/net/mlx5/hws/mlx5dr_context.h |  2 ++
> >  7 files changed, 63 insertions(+), 6 deletions(-)
> >
[snip]
> MLX5_IFC_STC_ACTION_TYPE_JUMP_FLOW_TABLE_FDB_RX_BIT_INDEX)
> > &&
> > +		    action->dest_tbl.type == MLX5DR_TABLE_TYPE_FDB_RX)
> > +			attr->action_type =
> > MLX5_IFC_STC_ACTION_TYPE_JUMP_TO_FLOW_TABLE_FDB_RX;
> > +		else
> > +			attr->action_type =
> MLX5_IFC_STC_ACTION_TYPE_JUMP_TO_FT;
> 
> Fix the long line warnings, same as other places.
> Also mlx5dr_context_cap_stc() seems to contain some calculation inside. If
> the context and the CAP will not be changed during the runtime on a specific
> port. Can this CAP BIT checking be done only once and saved for later usage?
> Since the code is used in the flow insertion.WDYT?

Ack for the line. But mlx5dr_context_cap_stc() is planned as get other caps based on the bit as well. And meanwhile that function is called by action creation, the jump action creation is done inside table creation, it is not in the flow insertion routine, so we are OK here.

> 
> > +
> > +		break;
[snip]


More information about the dev mailing list