summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQi Zhang <qi.z.zhang@intel.com>2019-03-25 13:44:49 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-29 17:25:31 +0100
commit182dda1e8812a9f57984b7f0186487c494e24cbf (patch)
tree21053ac9803b9633b9220d6d303f854b496ef90e /drivers
parent65a9131f9e8797b9d9566e6ce5ed7ebc8112d0dd (diff)
downloaddpdk-next-eventdev-182dda1e8812a9f57984b7f0186487c494e24cbf.zip
dpdk-next-eventdev-182dda1e8812a9f57984b7f0186487c494e24cbf.tar.gz
dpdk-next-eventdev-182dda1e8812a9f57984b7f0186487c494e24cbf.tar.xz
net/ice/base: fix minor issues
1. clean flow entry's action structure after remove it. 2. initialized priority when add a new flow entry 3. remove RSS configuration before deleting the flow profile. Fixes: aa1cd410fa64 ("net/ice/base: add flow module") Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module") Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ice/base/ice_flex_pipe.c2
-rw-r--r--drivers/net/ice/base/ice_flow.c13
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index c9d8730..e4d0b8c 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -2467,7 +2467,7 @@ ice_find_prof_id(struct ice_hw *hw, enum ice_block blk,
for (i = 0; i < es->count; i++) {
off = i * es->fvw;
- if (memcmp(&es->t[off], fv, es->fvw * 2))
+ if (memcmp(&es->t[off], fv, es->fvw * sizeof(*fv)))
continue;
*prof_id = i;
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 428002c..98727cf 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -910,8 +910,11 @@ ice_flow_rem_entry_sync(struct ice_hw *hw, struct ice_flow_entry *entry)
if (entry->entry)
ice_free(hw, entry->entry);
- if (entry->acts)
+ if (entry->acts) {
ice_free(hw, entry->acts);
+ entry->acts = NULL;
+ entry->acts_cnt = 0;
+ }
ice_free(hw, entry);
@@ -1306,6 +1309,7 @@ ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
e->id = entry_id;
e->vsi_handle = vsi_handle;
e->prof = prof;
+ e->priority = prio;
switch (blk) {
case ICE_BLK_RSS:
@@ -1852,11 +1856,14 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
if (status)
goto out;
+ /* Remove RSS configuration from VSI context before deleting
+ * the flow profile.
+ */
+ ice_rem_rss_cfg_vsi_ctx(hw, vsi_handle, prof);
+
if (!ice_is_any_bit_set(prof->vsis, ICE_MAX_VSI))
status = ice_flow_rem_prof_sync(hw, blk, prof);
- ice_rem_rss_cfg_vsi_ctx(hw, vsi_handle, prof);
-
out:
ice_free(hw, segs);
return status;