summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQi Zhang <qi.z.zhang@intel.com>2019-03-25 13:44:47 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-29 17:25:31 +0100
commitbf36ae6b8540c147d8d81ae3ab967043edc563f3 (patch)
treea4c299ce57f6fd34f3090182111720a0330b3136 /drivers
parentbd984f155f49d014dcd82f41730350a4ff18aa51 (diff)
downloaddpdk-next-eventdev-bf36ae6b8540c147d8d81ae3ab967043edc563f3.zip
dpdk-next-eventdev-bf36ae6b8540c147d8d81ae3ab967043edc563f3.tar.gz
dpdk-next-eventdev-bf36ae6b8540c147d8d81ae3ab967043edc563f3.tar.xz
net/ice/base: change profile priority for RSS reply
1. Add call to replay RSS configurations 2. Add RSS configurations to end of list and not the head to avoid inversion on replay. Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com> 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_common.c5
-rw-r--r--drivers/net/ice/base/ice_flow.c3
-rw-r--r--drivers/net/ice/base/ice_osdep.h16
3 files changed, 22 insertions, 2 deletions
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 425f76e..74f925c 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -3854,7 +3854,10 @@ enum ice_status ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle)
if (status)
return status;
}
-
+ /* Replay per VSI all RSS configurations */
+ status = ice_replay_rss_cfg(hw, vsi_handle);
+ if (status)
+ return status;
/* Replay per VSI all filters */
status = ice_replay_vsi_all_fltr(hw, vsi_handle);
if (!status)
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 03a324d..428002c 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -1672,7 +1672,8 @@ ice_add_rss_vsi_ctx(struct ice_hw *hw, u16 vsi_handle,
rss_cfg->hashed_flds = prof->segs[prof->segs_cnt - 1].match;
rss_cfg->packet_hdr = prof->segs[prof->segs_cnt - 1].hdrs;
- LIST_ADD(&rss_cfg->l_entry, &hw->vsi_ctx[vsi_handle]->rss_list_head);
+ LIST_ADD_TAIL(&rss_cfg->l_entry,
+ &hw->vsi_ctx[vsi_handle]->rss_list_head);
return ICE_SUCCESS;
}
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index 252c8f4..560e36c 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -462,6 +462,22 @@ LIST_HEAD(ice_list_head, ice_list_entry);
#define LIST_ADD(entry, list_head) LIST_INSERT_HEAD(list_head, entry, next)
#define LIST_ADD_AFTER(entry, list_entry) \
LIST_INSERT_AFTER(list_entry, entry, next)
+
+static inline void list_add_tail(struct ice_list_entry *entry,
+ struct ice_list_head *head)
+{
+ struct ice_list_entry *tail = head->lh_first;
+
+ if (tail == NULL) {
+ LIST_INSERT_HEAD(head, entry, next);
+ return;
+ }
+ while (tail->next.le_next != NULL)
+ tail = tail->next.le_next;
+ LIST_INSERT_AFTER(tail, entry, next);
+}
+
+#define LIST_ADD_TAIL(entry, head) list_add_tail(entry, head)
#define LIST_FOR_EACH_ENTRY(pos, head, type, member) \
for ((pos) = (head)->lh_first ? \
container_of((head)->lh_first, struct type, member) : \