Distinguish input set mask for inner/outer. Add outer input set
mask check.

Signed-off-by: Zhirun Yan <zhirun....@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c  | 3 ++-
 drivers/net/ice/ice_generic_flow.c | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c 
b/drivers/net/ice/ice_fdir_filter.c
index 76e0a8df38..2d2b261368 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -2020,7 +2020,8 @@ ice_fdir_parse(struct ice_adapter *ad,
        if (ret)
                goto error;
        input_set = filter->input_set | filter->outer_input_set;
-       if (!input_set || input_set & ~item->input_set_mask) {
+       if (!input_set || filter->input_set & ~item->input_set_mask ||
+           filter->outer_input_set & ~item->input_set_mask_f) {
                rte_flow_error_set(error, EINVAL,
                                   RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
                                   pattern,
diff --git a/drivers/net/ice/ice_generic_flow.c 
b/drivers/net/ice/ice_generic_flow.c
index 1429cbc3b6..6c20b070c7 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -2088,6 +2088,8 @@ ice_search_pattern_match_item(const struct rte_flow_item 
pattern[],
                                        items)) {
                        pattern_match_item->input_set_mask =
                                array[i].input_set_mask;
+                       pattern_match_item->input_set_mask_f =
+                               array[i].input_set_mask_f;
                        pattern_match_item->pattern_list =
                                array[i].pattern_list;
                        pattern_match_item->meta = array[i].meta;
-- 
2.25.1

Reply via email to