From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9A8345681 for ; Mon, 25 Mar 2019 06:43:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Mar 2019 22:43:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="128368817" Received: from dpdk51.sh.intel.com ([10.67.110.245]) by orsmga008.jf.intel.com with ESMTP; 24 Mar 2019 22:43:52 -0700 From: Qi Zhang To: wenzhuo.lu@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, paul.m.stillwell.jr@intel.com, ferruh.yigit@intel.com, Qi Zhang , Vignesh Sridhar Date: Mon, 25 Mar 2019 13:44:47 +0800 Message-Id: <20190325054452.2616-34-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190325054452.2616-1-qi.z.zhang@intel.com> References: <20190228055650.25237-1-qi.z.zhang@intel.com> <20190325054452.2616-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v4 33/38] net/ice/base: change profile priority for RSS reply X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 05:43:55 -0000 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 Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang Reviewed-by: Qiming Yang Reviewed-by: Wenzhuo Lu --- drivers/net/ice/base/ice_common.c | 5 ++++- drivers/net/ice/base/ice_flow.c | 3 ++- drivers/net/ice/base/ice_osdep.h | 16 ++++++++++++++++ 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 425f76e8d..74f925c03 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 03a324d49..428002c28 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 252c8f4e7..560e36c1b 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) : \ -- 2.13.6 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 86C18A05D3 for ; Mon, 25 Mar 2019 06:48:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 908081B129; Mon, 25 Mar 2019 06:44:38 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9A8345681 for ; Mon, 25 Mar 2019 06:43:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Mar 2019 22:43:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="128368817" Received: from dpdk51.sh.intel.com ([10.67.110.245]) by orsmga008.jf.intel.com with ESMTP; 24 Mar 2019 22:43:52 -0700 From: Qi Zhang To: wenzhuo.lu@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, paul.m.stillwell.jr@intel.com, ferruh.yigit@intel.com, Qi Zhang , Vignesh Sridhar Date: Mon, 25 Mar 2019 13:44:47 +0800 Message-Id: <20190325054452.2616-34-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190325054452.2616-1-qi.z.zhang@intel.com> References: <20190228055650.25237-1-qi.z.zhang@intel.com> <20190325054452.2616-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v4 33/38] net/ice/base: change profile priority for RSS reply X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190325054447.aIg4t5Ycf5T3cEwn1d6R-nGAEAup5yVd-7EJotspHco@z> 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 Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang Reviewed-by: Qiming Yang Reviewed-by: Wenzhuo Lu --- drivers/net/ice/base/ice_common.c | 5 ++++- drivers/net/ice/base/ice_flow.c | 3 ++- drivers/net/ice/base/ice_osdep.h | 16 ++++++++++++++++ 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 425f76e8d..74f925c03 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 03a324d49..428002c28 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 252c8f4e7..560e36c1b 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) : \ -- 2.13.6