DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@cavium.com>
To: <dev@dpdk.org>, <ferruh.yigit@intel.com>
Cc: Rasesh Mody <rasesh.mody@cavium.com>, <stable@dpdk.org>,
	<Dept-EngDPDKDev@cavium.com>
Subject: [dpdk-dev] [PATCH v2 04/21] net/qede/base: fix TM block ILT initialization
Date: Fri, 17 Mar 2017 23:50:18 -0700	[thread overview]
Message-ID: <1489819823-13025-3-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <2152c44b-3013-b709-16c0-cdef9c20fce2@intel.com>

Fix Timer(TM) block Internal Lookup Table(or ILT for logical to
physical address translation) initialization for SRIOV's coexistence
with other protocols.

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_cxt.c |   17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/net/qede/base/ecore_cxt.c b/drivers/net/qede/base/ecore_cxt.c
index b73a6ac..2635030 100644
--- a/drivers/net/qede/base/ecore_cxt.c
+++ b/drivers/net/qede/base/ecore_cxt.c
@@ -276,14 +276,24 @@ struct ecore_tm_iids {
 static OSAL_INLINE void ecore_cxt_tm_iids(struct ecore_cxt_mngr *p_mngr,
 					  struct ecore_tm_iids *iids)
 {
+	bool tm_vf_required = false;
+	bool tm_required = false;
 	u32 i, j;
 
 	for (i = 0; i < MAX_CONN_TYPES; i++) {
 		struct ecore_conn_type_cfg *p_cfg = &p_mngr->conn_cfg[i];
 
-		if (tm_cid_proto(i)) {
+		if (tm_cid_proto(i) || tm_required) {
+			if (p_cfg->cid_count)
+				tm_required = true;
+
 			iids->pf_cids += p_cfg->cid_count;
-			iids->per_vf_cids += p_cfg->cids_per_vf;
+		}
+
+		if (tm_cid_proto(i) || tm_vf_required) {
+			if (p_cfg->cids_per_vf)
+				tm_vf_required = true;
+
 		}
 
 		if (tm_tid_proto(i)) {
@@ -718,12 +728,11 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct ecore_hwfn *p_hwfn)
 		ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
 				       ILT_CLI_TM);
 
+		p_cli->vf_total_lines = curr_line - p_blk->start_line;
 		for (i = 1; i < p_mngr->vf_count; i++) {
 			ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
 					       ILT_CLI_TM);
 		}
-
-		p_cli->vf_total_lines = curr_line - p_blk->start_line;
 	}
 
 	/* TSDM (SRQ CONTEXT) */
-- 
1.7.10.3

  parent reply	other threads:[~2017-03-18  6:51 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27  7:51 [dpdk-dev] [PATCH 01/21] net/qede/base: fix incorrect typecasting of flag Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 02/21] net/qede/base: fix to set pointers to NULL after freeing Rasesh Mody
2017-03-02 13:05   ` Ferruh Yigit
2017-03-18  7:02     ` Mody, Rasesh
2017-02-27  7:51 ` [dpdk-dev] [PATCH 03/21] net/qede/base: fix forcing driver default resc allocation Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 04/21] net/qede/base: fix TM block ILT initialization Rasesh Mody
2017-03-02 13:05   ` Ferruh Yigit
2017-02-27  7:51 ` [dpdk-dev] [PATCH 05/21] net/qede/base: fix printout Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 06/21] net/qede/base: fix VF init after malicious VF FLR Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 07/21] net/qede/base: fix numbering l2 VF queues Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 08/21] net/qede/base: fix printing incorrect index for multi-bit attentions Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 09/21] dev/qede/base: fix to prevent VF promisc Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 10/21] net/qede/base: add attention bits for CHIP_NUM_AH_xxx Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 11/21] net/qede/base: fix printout Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 12/21] net/qede/base: fix DORQ attention mask Rasesh Mody
2017-03-02 13:06   ` Ferruh Yigit
2017-02-27  7:51 ` [dpdk-dev] [PATCH 13/21] net/qede/base: fix out-of-bound memory access Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 14/21] net/qede/base: fix to remove redundant memset Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 15/21] net/qede/base: fix remove the unneeded convertion to LE Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 16/21] net/qede/base: fix first VF index calculation Rasesh Mody
2017-02-27  7:51 ` [dpdk-dev] [PATCH 17/21] net/qede/base: fix typo Rasesh Mody
2017-02-27  7:52 ` [dpdk-dev] [PATCH 18/21] net/qede/base: semantic fix Rasesh Mody
2017-03-02 13:06   ` Ferruh Yigit
2017-02-27  7:52 ` [dpdk-dev] [PATCH 19/21] net/qede/base: fix sriov typo Rasesh Mody
2017-02-27  7:52 ` [dpdk-dev] [PATCH 20/21] net/qede/base: fix the value of RESOURCE_DUMP to 0 Rasesh Mody
2017-03-02 13:07   ` Ferruh Yigit
2017-02-27  7:52 ` [dpdk-dev] [PATCH 21/21] net/qede/base: fix to use NULL pointer Rasesh Mody
2017-03-02 13:04 ` [dpdk-dev] [PATCH 01/21] net/qede/base: fix incorrect typecasting of flag Ferruh Yigit
2017-03-06 20:02   ` Mody, Rasesh
2017-03-18  6:48   ` [dpdk-dev] [PATCH v2 " Rasesh Mody
2017-03-20 17:15     ` Ferruh Yigit
2017-03-18  6:50   ` [dpdk-dev] [PATCH v2 02/21] net/qede/base: fix to set pointers to NULL after freeing Rasesh Mody
2017-03-18  6:50   ` [dpdk-dev] [PATCH v2 03/21] net/qede/base: fix forcing driver default resc allocation Rasesh Mody
2017-03-18  6:50   ` Rasesh Mody [this message]
2017-03-18  6:50   ` [dpdk-dev] [PATCH v2 05/21] net/qede/base: fix printout Rasesh Mody
2017-03-18  6:50   ` [dpdk-dev] [PATCH v2 06/21] net/qede/base: fix VF init after malicious VF FLR Rasesh Mody
2017-03-18  6:50   ` [dpdk-dev] [PATCH v2 07/21] net/qede/base: fix numbering L2 VF queues Rasesh Mody
2017-03-18  6:50   ` [dpdk-dev] [PATCH v2 08/21] net/qede/base: fix index printing of multi-bit attentions Rasesh Mody
2017-03-18  6:50   ` [dpdk-dev] [PATCH v2 09/21] net/qede/base: fix to prevent VF promisc config Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 10/21] net/qede/base: add attention bits for AH chip Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 11/21] net/qede/base: fix printout Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 12/21] net/qede/base: fix DORQ attention mask Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 13/21] net/qede/base: fix out-of-bound memory access Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 14/21] net/qede/base: fix to remove redundant memset Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 15/21] net/qede/base: fix remove the unneeded conversion to LE Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 16/21] net/qede/base: fix first VF index calculation Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 17/21] net/qede/base: fix typo Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 18/21] net/qede/base: refactor return path Rasesh Mody
2017-03-18  6:53   ` [dpdk-dev] [PATCH v2 19/21] net/qede/base: fix sriov typo Rasesh Mody
2017-03-18  6:57   ` [dpdk-dev] [PATCH v2 20/21] net/qede/base: fix resource lock minimum value Rasesh Mody
2017-03-18  6:57   ` [dpdk-dev] [PATCH v2 21/21] net/qede/base: fix to use NULL pointer Rasesh Mody

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1489819823-13025-3-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).