DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@cavium.com>
To: <dev@dpdk.org>
Cc: Rasesh Mody <rasesh.mody@cavium.com>, <Dept-EngDPDKDev@cavium.com>
Subject: [dpdk-dev] [PATCH 01/21] net/qede/base: fix incorrect typecasting of flag
Date: Sun, 26 Feb 2017 23:51:43 -0800	[thread overview]
Message-ID: <1488181923-9649-1-git-send-email-rasesh.mody@cavium.com> (raw)

dcbx-update-flag is incorrectly converted to boolean before assigining
it to ramrod data, fix this typecasting. Also, added more debug
messages in the dcbx code paths.

Fixes: 26ae839d06e9 ("qede: add DCBX support")

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

diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c
index 9fbddec..7380fd8 100644
--- a/drivers/net/qede/base/ecore_dcbx.c
+++ b/drivers/net/qede/base/ecore_dcbx.c
@@ -100,7 +100,7 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 void
 ecore_dcbx_set_params(struct ecore_dcbx_results *p_data,
 		      struct ecore_hwfn *p_hwfn,
-		      bool enable, bool update, u8 prio, u8 tc,
+		      bool enable, u8 prio, u8 tc,
 		      enum dcbx_protocol_type type,
 		      enum ecore_pci_personality personality)
 {
@@ -140,7 +140,7 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 static void
 ecore_dcbx_update_app_info(struct ecore_dcbx_results *p_data,
 			   struct ecore_hwfn *p_hwfn,
-			   bool enable, bool update, u8 prio, u8 tc,
+			   bool enable, u8 prio, u8 tc,
 			   enum dcbx_protocol_type type)
 {
 	enum ecore_pci_personality personality;
@@ -157,7 +157,7 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 		personality = ecore_dcbx_app_update[i].personality;
 		name = ecore_dcbx_app_update[i].name;
 
-		ecore_dcbx_set_params(p_data, p_hwfn, enable, update,
+		ecore_dcbx_set_params(p_data, p_hwfn, enable,
 				      prio, tc, type, personality);
 	}
 }
@@ -227,7 +227,9 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 	enum _ecore_status_t rc = ECORE_SUCCESS;
 	int i;
 
-	DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "Num APP entries = %d\n", count);
+	DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
+		   "Num APP entries = %d pri_tc_tbl = 0x%x dcbx_version = %u\n",
+		   count, pri_tc_tbl, dcbx_version);
 
 	ieee = (dcbx_version == DCBX_CONFIG_VERSION_IEEE);
 	/* Parse APP TLV */
@@ -236,6 +238,8 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 						  DCBX_APP_PROTOCOL_ID);
 		priority_map = ECORE_MFW_GET_FIELD(p_tbl[i].entry,
 						   DCBX_APP_PRI_MAP);
+		DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "Id = 0x%x pri_map = %u\n",
+			   protocol_id, priority_map);
 		rc = ecore_dcbx_get_app_priority(priority_map, &priority);
 		if (rc == ECORE_INVAL) {
 			DP_ERR(p_hwfn, "Invalid priority\n");
@@ -254,7 +258,7 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 			 */
 			enable = !(type == DCBX_PROTOCOL_ETH);
 
-			ecore_dcbx_update_app_info(p_data, p_hwfn, enable, true,
+			ecore_dcbx_update_app_info(p_data, p_hwfn, enable,
 						   priority, tc, type);
 		}
 	}
@@ -271,7 +275,7 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 			continue;
 
 		enable = (type == DCBX_PROTOCOL_ETH) ? false : !!dcbx_version;
-		ecore_dcbx_update_app_info(p_data, p_hwfn, enable, true,
+		ecore_dcbx_update_app_info(p_data, p_hwfn, enable,
 					   priority, tc, type);
 	}
 
@@ -473,8 +477,9 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 	p_params->pfc.prio[7] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_7);
 
 	DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
-		   "PFC params: willing %d, pfc_bitmap %d\n",
-		   p_params->pfc.willing, pfc_map);
+		   "PFC params: willing %d, pfc_bitmap %u max_tc = %u enabled = %d\n",
+		   p_params->pfc.willing, pfc_map, p_params->pfc.max_tc,
+		   p_params->pfc.enabled);
 }
 
 static void
@@ -493,10 +498,10 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 	p_params->max_ets_tc = ECORE_MFW_GET_FIELD(p_ets->flags,
 						   DCBX_ETS_MAX_TCS);
 	DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
-		   "ETS params: willing %d, ets_cbs %d pri_tc_tbl_0 %x"
-		   " max_ets_tc %d\n",
-		   p_params->ets_willing, p_params->ets_cbs,
-		   p_ets->pri_tc_tbl[0], p_params->max_ets_tc);
+		   "ETS params: willing %d, enabled = %d ets_cbs %d pri_tc_tbl_0 %x max_ets_tc %d\n",
+		   p_params->ets_willing, p_params->ets_enabled,
+		   p_params->ets_cbs, p_ets->pri_tc_tbl[0],
+		   p_params->max_ets_tc);
 
 	/* 8 bit tsa and bw data corresponding to each of the 8 TC's are
 	 * encoded in a type u32 array of size 2.
@@ -582,6 +587,7 @@ static bool ecore_dcbx_default_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 	if (!enabled) {
 		p_operational->enabled = enabled;
 		p_operational->valid = false;
+		DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "Dcbx is disabled\n");
 		return ECORE_INVAL;
 	}
 
@@ -927,7 +933,7 @@ void ecore_dcbx_set_pf_update_params(struct ecore_dcbx_results *p_src,
 				     struct pf_update_ramrod_data *p_dest)
 {
 	struct protocol_dcb_data *p_dcb_data;
-	bool update_flag = false;
+	u8 update_flag;
 
 	p_dest->pf_id = p_src->pf_id;
 
@@ -1038,6 +1044,12 @@ enum _ecore_status_t ecore_dcbx_query_params(struct ecore_hwfn *p_hwfn,
 		p_ets->tc_bw_tbl[i] = OSAL_CPU_TO_BE32(p_ets->tc_bw_tbl[i]);
 		p_ets->tc_tsa_tbl[i] = OSAL_CPU_TO_BE32(p_ets->tc_tsa_tbl[i]);
 	}
+
+	DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
+		   "flags = 0x%x pri_tc = 0x%x tc_bwl[] = {0x%x, 0x%x} tc_tsa = {0x%x, 0x%x}\n",
+		   p_ets->flags, p_ets->pri_tc_tbl[0], p_ets->tc_bw_tbl[0],
+		   p_ets->tc_bw_tbl[1], p_ets->tc_tsa_tbl[0],
+		   p_ets->tc_tsa_tbl[1]);
 }
 
 static void
@@ -1109,6 +1121,8 @@ enum _ecore_status_t ecore_dcbx_query_params(struct ecore_hwfn *p_hwfn,
 		*entry |= ((u32)(p_params->app_entry[i].prio) <<
 				DCBX_APP_PRI_MAP_SHIFT);
 	}
+
+	DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "flags = 0x%x\n", p_app->flags);
 }
 
 static enum _ecore_status_t
@@ -1171,6 +1185,8 @@ enum _ecore_status_t ecore_dcbx_query_params(struct ecore_hwfn *p_hwfn,
 
 	p_hwfn->p_dcbx_info->dscp_nig_update = true;
 
+	DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "flags = 0x%x\n", p_dscp_map->flags);
+
 	return ECORE_SUCCESS;
 }
 
-- 
1.7.10.3

             reply	other threads:[~2017-02-27  7:52 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27  7:51 Rasesh Mody [this message]
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   ` [dpdk-dev] [PATCH v2 04/21] net/qede/base: fix TM block ILT initialization Rasesh Mody
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=1488181923-9649-1-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=dev@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).