ethdev: introduce representor type
[dpdk.git] / drivers / net / ice / base / ice_flow.c
index ad31856..d123206 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2020 Intel Corporation
+ * Copyright(c) 2001-2021 Intel Corporation
  */
 
 #include "ice_common.h"
@@ -1795,9 +1795,14 @@ ice_flow_acl_free_act_cntr(struct ice_hw *hw, struct ice_flow_action *acts,
                if (acts[i].type == ICE_FLOW_ACT_CNTR_PKT ||
                    acts[i].type == ICE_FLOW_ACT_CNTR_BYTES ||
                    acts[i].type == ICE_FLOW_ACT_CNTR_PKT_BYTES) {
-                       struct ice_acl_cntrs cntrs;
+                       struct ice_acl_cntrs cntrs = { 0 };
                        enum ice_status status;
 
+                       /* amount is unused in the dealloc path but the common
+                        * parameter check routine wants a value set, as zero
+                        * is invalid for the check. Just set it.
+                        */
+                       cntrs.amount = 1;
                        cntrs.bank = 0; /* Only bank0 for the moment */
                        cntrs.first_cntr =
                                        LE16_TO_CPU(acts[i].data.acl_act.value);
@@ -2396,7 +2401,7 @@ ice_flow_acl_check_actions(struct ice_hw *hw, struct ice_flow_action *acts,
                if (acts[i].type == ICE_FLOW_ACT_CNTR_PKT ||
                    acts[i].type == ICE_FLOW_ACT_CNTR_BYTES ||
                    acts[i].type == ICE_FLOW_ACT_CNTR_PKT_BYTES) {
-                       struct ice_acl_cntrs cntrs;
+                       struct ice_acl_cntrs cntrs = { 0 };
                        enum ice_status status;
 
                        cntrs.amount = 1;