Hi, > -----Original Message----- > From: Dariusz Sosnowski <dsosnow...@nvidia.com> > Sent: Wednesday, May 17, 2023 11:36 PM > To: Ori Kam <or...@nvidia.com>; Suanming Mou <suanmi...@nvidia.com>; > Matan Azrad <ma...@nvidia.com>; Slava Ovsiienko > <viachesl...@nvidia.com>; Jiawei(Jonny) Wang <jiaw...@nvidia.com> > Cc: dev@dpdk.org; sta...@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: suanmi...@nvidia.com > Cc: viachesl...@nvidia.com > Cc: jiaw...@nvidia.com > Cc: sta...@dpdk.org > > Signed-off-by: Dariusz Sosnowski <dsosnow...@nvidia.com> > Acked-by: Viacheslav Ovsiienko <viachesl...@nvidia.com>
Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh