> -----Original Message-----
> From: Bing Zhao <bi...@nvidia.com>
> Sent: Wednesday, February 26, 2025 6:29 PM
> To: Suanming Mou <suanmi...@nvidia.com>; Dariusz Sosnowski
> <dsosnow...@nvidia.com>; Slava Ovsiienko <viachesl...@nvidia.com>; Ori
> Kam <or...@nvidia.com>; Matan Azrad <ma...@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasl...@nvidia.com>; Alex Vesker
> <va...@nvidia.com>
> Subject: RE: [PATCH 1/3] net/mlx5/hws: support jump FDB Rx
>
> Hi Suanming,
>
> PSB
>
> > -----Original Message-----
> > From: Suanming Mou <suanmi...@nvidia.com>
> > Sent: Tuesday, February 25, 2025 8:45 AM
> > To: Dariusz Sosnowski <dsosnow...@nvidia.com>; Slava Ovsiienko
> > <viachesl...@nvidia.com>; Bing Zhao <bi...@nvidia.com>; Ori Kam
> > <or...@nvidia.com>; Matan Azrad <ma...@nvidia.com>
> > Cc: dev@dpdk.org; Raslan Darawsheh <rasl...@nvidia.com>; Alex Vesker
> > <va...@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 <suanmi...@nvidia.com>
> > Signed-off-by: Alex Vesker <va...@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]