diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 2c6acd551c..f36e72fb89 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -3742,6 +3742,8 @@ flow_get_drv_type(struct rte_eth_dev *dev, const struct rte_flow_attr *attr)
 	 */
 	if (priv->sh->config.dv_flow_en == 2)
 		return MLX5_FLOW_TYPE_HW;
+	if (!attr)
+		return MLX5_FLOW_TYPE_MIN;
 	/* If no OS specific type - continue with DV/VERBS selection */
 	if (attr->transfer && priv->sh->config.dv_esw_en)
 		type = MLX5_FLOW_TYPE_DV;
@@ -8254,8 +8256,9 @@ mlx5_flow_info_get(struct rte_eth_dev *dev,
 		   struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr attr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW)
+	if (flow_get_drv_type(dev, &attr) != MLX5_FLOW_TYPE_HW)
 		return rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8289,8 +8292,9 @@ mlx5_flow_port_configure(struct rte_eth_dev *dev,
 			 struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr attr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW)
+	if (flow_get_drv_type(dev, &attr) != MLX5_FLOW_TYPE_HW)
 		return rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8321,8 +8325,9 @@ mlx5_flow_pattern_template_create(struct rte_eth_dev *dev,
 		struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr fattr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW) {
+	if (flow_get_drv_type(dev, &fattr) != MLX5_FLOW_TYPE_HW) {
 		rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8352,8 +8357,9 @@ mlx5_flow_pattern_template_destroy(struct rte_eth_dev *dev,
 				   struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr attr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW)
+	if (flow_get_drv_type(dev, &attr) != MLX5_FLOW_TYPE_HW)
 		return rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8387,8 +8393,9 @@ mlx5_flow_actions_template_create(struct rte_eth_dev *dev,
 			struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr fattr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW) {
+	if (flow_get_drv_type(dev, &fattr) != MLX5_FLOW_TYPE_HW) {
 		rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8418,8 +8425,9 @@ mlx5_flow_actions_template_destroy(struct rte_eth_dev *dev,
 				   struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr attr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW)
+	if (flow_get_drv_type(dev, &attr) != MLX5_FLOW_TYPE_HW)
 		return rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8459,8 +8467,9 @@ mlx5_flow_table_create(struct rte_eth_dev *dev,
 		       struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr fattr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW) {
+	if (flow_get_drv_type(dev, &fattr) != MLX5_FLOW_TYPE_HW) {
 		rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8496,8 +8505,9 @@ mlx5_flow_table_destroy(struct rte_eth_dev *dev,
 			struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr attr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW)
+	if (flow_get_drv_type(dev, &attr) != MLX5_FLOW_TYPE_HW)
 		return rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8544,8 +8554,9 @@ mlx5_flow_async_flow_create(struct rte_eth_dev *dev,
 			    struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr fattr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW) {
+	if (flow_get_drv_type(dev, &fattr) != MLX5_FLOW_TYPE_HW) {
 		rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8587,8 +8598,9 @@ mlx5_flow_async_flow_destroy(struct rte_eth_dev *dev,
 			     struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr fattr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW)
+	if (flow_get_drv_type(dev, &fattr) != MLX5_FLOW_TYPE_HW)
 		return rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8623,8 +8635,9 @@ mlx5_flow_pull(struct rte_eth_dev *dev,
 	       struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr attr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW)
+	if (flow_get_drv_type(dev, &attr) != MLX5_FLOW_TYPE_HW)
 		return rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
@@ -8652,8 +8665,9 @@ mlx5_flow_push(struct rte_eth_dev *dev,
 	       struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
+	struct rte_flow_attr attr = {0};
 
-	if (flow_get_drv_type(dev, NULL) != MLX5_FLOW_TYPE_HW)
+	if (flow_get_drv_type(dev, &attr) != MLX5_FLOW_TYPE_HW)
 		return rte_flow_error_set(error, ENOTSUP,
 				RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				NULL,
