net/i40e: fix flow RSS configuration error
[dpdk.git] / drivers / net / i40e / i40e_flow.c
index 9b51905..69d1ba5 100644 (file)
@@ -2851,6 +2851,14 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
                                return -rte_errno;
                        }
 
+                       if (pf->support_multi_driver) {
+                               rte_flow_error_set(error, ENOTSUP,
+                                                  RTE_FLOW_ERROR_TYPE_ITEM,
+                                                  item,
+                                                  "Unsupported flexible payload.");
+                               return -rte_errno;
+                       }
+
                        ret = i40e_flow_check_raw_item(item, raw_spec, error);
                        if (ret < 0)
                                return ret;
@@ -4377,14 +4385,15 @@ i40e_config_rss_filter_set(struct rte_eth_dev *dev,
 {
        struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
        struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+       int ret;
 
        if (conf->queue_region_conf) {
-               i40e_flush_queue_region_all_conf(dev, hw, pf, 1);
+               ret = i40e_flush_queue_region_all_conf(dev, hw, pf, 1);
                conf->queue_region_conf = 0;
        } else {
-               i40e_config_rss_filter(pf, conf, 1);
+               ret = i40e_config_rss_filter(pf, conf, 1);
        }
-       return 0;
+       return ret;
 }
 
 static int
@@ -4537,6 +4546,8 @@ i40e_flow_create(struct rte_eth_dev *dev,
        case RTE_ETH_FILTER_HASH:
                ret = i40e_config_rss_filter_set(dev,
                            &cons_filter.rss_conf);
+               if (ret)
+                       goto free_flow;
                flow->rule = &pf->rss_info;
                break;
        default: