[PATCH] net/mlx5: fix drop action attribute validation

Raslan Darawsheh rasland at nvidia.com
Sun May 28 14:17:49 CEST 2023


Hi,

> -----Original Message-----
> From: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Sent: Wednesday, May 17, 2023 11:36 PM
> To: Ori Kam <orika at nvidia.com>; Suanming Mou <suanmingm at nvidia.com>;
> Matan Azrad <matan at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; Jiawei(Jonny) Wang <jiaweiw at nvidia.com>
> Cc: dev at dpdk.org; stable at dpdk.org
> Subject: [PATCH] net/mlx5: fix drop action attribute validation
> 
> Before this patch, DROP flow action was rejected for all egress
> flow rules, which was not correct for all cases.
> 
> When Verbs flow engine is used (dv_flow_en=0) DROP flow action
> is implemented using IBV_FLOW_SPEC_ACTION_DROP IBV action.
> This action is supported on ingress only.
> This patch amends the DROP flow action validation to allow it only on
> ingress.
> 
> When DV flow engine is used (dv_flow_en=1) there are 2 implementation
> options for DROP flow action:
> 
> - DR drop action (allocated through mlx5dv_dr_action_create_drop() API),
> - dedicated drop queue.
> 
> When flow rules are created on non-root flow tables DR drop action can
> be used on all steering domains. On root flow table however, this action
> ca be used if and only if it is supported by rdma-core and kernel
> drivers. mlx5 PMD dynamically checks if DR drop action is supported
> on root tables during device probing
> (it is checked in mlx5_flow_discover_dr_action_support()).
> If DR drop action is not supported on root table, then dedicated
> drop queue must be used and as a result, DROP flow action on root
> is supported only for ingress flow rules.
> This patch amends the DROP flow action validation with this logic
> for DV flow engine.
> 
> This patch also renames the dr_drop_action_en field in device's private
> data to dr_root_drop_action_en to align the name with field's meaning.
> 
> Fixes: 3c4338a42134 ("net/mlx5: optimize device spawn time with
> representors")
> Fixes: 45633c460c22 ("net/mlx5: workaround drop action with old kernel")
> Fixes: da845ae9d7c1 ("net/mlx5: fix drop action for Direct Rules/Verbs")
> Cc: suanmingm at nvidia.com
> Cc: viacheslavo at nvidia.com
> Cc: jiaweiw at nvidia.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the stable mailing list