Hi, > -----Original Message----- > From: Alex Vesker <va...@nvidia.com> > Sent: Sunday, July 9, 2023 5:20 PM > To: Alex Vesker <va...@nvidia.com>; Slava Ovsiienko > <viachesl...@nvidia.com>; NBU-Contact-Thomas Monjalon (EXTERNAL) > <tho...@monjalon.net>; Suanming Mou <suanmi...@nvidia.com>; Matan > Azrad <ma...@nvidia.com>; Ori Kam <or...@nvidia.com> > Cc: dev@dpdk.org > Subject: [PATCH] net/mlx5/hws: add support for multi pattern > > When creating an action it can contain a bulk of objects, but the objects are > fixed to a specific pattern and cannot be reused. This can lead to inefficient > usage of the HW resources, This support allows creating multiple patterns over > a single mlx5dr action. > > Signed-off-by: Alex Vesker <va...@nvidia.com> > Reviewed-by: Erez Shitrit <ere...@nvidia.com> > Acked-by: Matan Azrad <ma...@nvidia.com> > --- .... > > @@ -503,10 +518,10 @@ mlx5dr_action_create_reformat(struct > mlx5dr_context *ctx, > * > * @param[in] ctx > * The context in which the new action will be created. > - * @param[in] pattern_sz > - * Byte size of the pattern array. > - * @param[in] pattern > - * PRM format modify pattern action array. > + * @param[in] num_of_patterns > + * Number of provided patterns in "patterns" array. Fixed an issue with the wrong indentation usage of space
> + * @param[in] patterns > + * Patterns array containing pattern information. > * @param[in] log_bulk_size > * Number of unique values used with this pattern. > * @param[in] flags > @@ -515,8 +530,8 @@ mlx5dr_action_create_reformat(struct .... > +static int > +mlx5dr_action_create_modify_header_hws(struct mlx5dr_action *action, > + uint8_t num_of_patterns, > + struct mlx5dr_action_mh_pattern > *pattern, > + uint32_t log_bulk_size) > +{ > + struct mlx5dr_devx_obj *pat_obj, *arg_obj = NULL; > + struct mlx5dr_context *ctx = action->ctx; > + uint16_t max_mh_actions = 0; > + int i, ret; > + > + /* Caclulate maximum number of mh actions for shared arg allocation Fixed a typo Caclulate =-> Calculate. .... Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh