patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 35/53] net/qede/base: fix API return types
       [not found] <1505785903-1741-1-git-send-email-rasesh.mody@cavium.com>
@ 2017-09-19  1:51 ` Rasesh Mody
  2017-09-19  1:51 ` [dpdk-stable] [PATCH 40/53] net/qede/base: fix number of app table entries Rasesh Mody
  1 sibling, 0 replies; 2+ messages in thread
From: Rasesh Mody @ 2017-09-19  1:51 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: Rasesh Mody, Dept-EngDPDKDev, stable

- Turn ecore_ptt_get_hw_addr() into static
- Convert ecore_dcbx_get_operational_params() to void since we don't
  care about the return value

Fixes: 26ae839d06e9 ("qede: add DCBX support")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_dcbx.c |    6 ++----
 drivers/net/qede/base/ecore_hw.c   |    2 +-
 drivers/net/qede/base/ecore_hw.h   |    9 ---------
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c
index 25ae21c..212b733 100644
--- a/drivers/net/qede/base/ecore_dcbx.c
+++ b/drivers/net/qede/base/ecore_dcbx.c
@@ -570,7 +570,7 @@ static bool ecore_dcbx_iwarp_tlv(struct ecore_hwfn *p_hwfn, u32 app_info_bitmap,
 	params->remote.valid = true;
 }
 
-static enum _ecore_status_t
+static void
 ecore_dcbx_get_operational_params(struct ecore_hwfn *p_hwfn,
 				  struct ecore_dcbx_get *params)
 {
@@ -593,7 +593,7 @@ static bool ecore_dcbx_iwarp_tlv(struct ecore_hwfn *p_hwfn, u32 app_info_bitmap,
 		p_operational->enabled = enabled;
 		p_operational->valid = false;
 		DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "Dcbx is disabled\n");
-		return ECORE_INVAL;
+		return;
 	}
 
 	p_feat = &p_hwfn->p_dcbx_info->operational.features;
@@ -626,8 +626,6 @@ static bool ecore_dcbx_iwarp_tlv(struct ecore_hwfn *p_hwfn, u32 app_info_bitmap,
 	p_operational->err = err;
 	p_operational->enabled = enabled;
 	p_operational->valid = true;
-
-	return ECORE_SUCCESS;
 }
 
 static void  ecore_dcbx_get_dscp_params(struct ecore_hwfn *p_hwfn,
diff --git a/drivers/net/qede/base/ecore_hw.c b/drivers/net/qede/base/ecore_hw.c
index 36457ac..d6217d8 100644
--- a/drivers/net/qede/base/ecore_hw.c
+++ b/drivers/net/qede/base/ecore_hw.c
@@ -136,7 +136,7 @@ void ecore_ptt_release(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
 	OSAL_SPIN_UNLOCK(&p_hwfn->p_ptt_pool->lock);
 }
 
-u32 ecore_ptt_get_hw_addr(struct ecore_ptt *p_ptt)
+static u32 ecore_ptt_get_hw_addr(struct ecore_ptt *p_ptt)
 {
 	/* The HW is using DWORDS and we need to translate it to Bytes */
 	return OSAL_LE32_TO_CPU(p_ptt->pxp.offset) << 2;
diff --git a/drivers/net/qede/base/ecore_hw.h b/drivers/net/qede/base/ecore_hw.h
index 0f3e88b..392351a 100644
--- a/drivers/net/qede/base/ecore_hw.h
+++ b/drivers/net/qede/base/ecore_hw.h
@@ -100,15 +100,6 @@ void ecore_gtt_init(struct ecore_hwfn *p_hwfn,
 void ecore_ptt_pool_free(struct ecore_hwfn *p_hwfn);
 
 /**
- * @brief ecore_ptt_get_hw_addr - Get PTT's GRC/HW address
- *
- * @param p_ptt
- *
- * @return u32
- */
-u32 ecore_ptt_get_hw_addr(struct ecore_ptt *p_ptt);
-
-/**
  * @brief ecore_ptt_get_bar_addr - Get PPT's external BAR address
  *
  * @param p_hwfn
-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-stable] [PATCH 40/53] net/qede/base: fix number of app table entries
       [not found] <1505785903-1741-1-git-send-email-rasesh.mody@cavium.com>
  2017-09-19  1:51 ` [dpdk-stable] [PATCH 35/53] net/qede/base: fix API return types Rasesh Mody
@ 2017-09-19  1:51 ` Rasesh Mody
  1 sibling, 0 replies; 2+ messages in thread
From: Rasesh Mody @ 2017-09-19  1:51 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: Rasesh Mody, Dept-EngDPDKDev, stable

Configure only the available/requested number of app entries rather
than max entries (DCBX_MAX_APP_PROTOCOL) in ecore_dcbx_get_app_data().
Also, fixed a minor issue where incorrect size value is being passed for
memcpy().

Fixes: 26ae839d06e9 ("qede: add DCBX support")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c
index 889d91a..22525df 100644
--- a/drivers/net/qede/base/ecore_dcbx.c
+++ b/drivers/net/qede/base/ecore_dcbx.c
@@ -417,7 +417,7 @@ static bool ecore_dcbx_iwarp_tlv(struct ecore_hwfn *p_hwfn, u32 app_info_bitmap,
 	p_params->app_error = GET_MFW_FIELD(p_app->flags, DCBX_APP_ERROR);
 	p_params->num_app_entries = GET_MFW_FIELD(p_app->flags,
 						  DCBX_APP_NUM_ENTRIES);
-	for (i = 0; i < DCBX_MAX_APP_PROTOCOL; i++) {
+	for (i = 0; i < p_params->num_app_entries; i++) {
 		entry = &p_params->app_entry[i];
 		if (ieee) {
 			u8 sf_ieee;
@@ -1071,7 +1071,7 @@ enum _ecore_status_t ecore_dcbx_query_params(struct ecore_hwfn *p_hwfn,
 	p_app->flags |= (u32)p_params->num_app_entries <<
 			DCBX_APP_NUM_ENTRIES_OFFSET;
 
-	for (i = 0; i < DCBX_MAX_APP_PROTOCOL; i++) {
+	for (i = 0; i < p_params->num_app_entries; i++) {
 		entry = &p_app->app_pri_tbl[i].entry;
 		*entry = 0;
 		if (ieee) {
@@ -1273,7 +1273,7 @@ enum _ecore_status_t ecore_dcbx_get_config_params(struct ecore_hwfn *p_hwfn,
 	p_hwfn->p_dcbx_info->set.enabled = dcbx_info->operational.enabled;
 	OSAL_MEMCPY(&p_hwfn->p_dcbx_info->set.config.params,
 		    &dcbx_info->operational.params,
-		    sizeof(struct ecore_dcbx_admin_params));
+		    sizeof(p_hwfn->p_dcbx_info->set.config.params));
 	p_hwfn->p_dcbx_info->set.config.valid = true;
 
 	OSAL_MEMCPY(params, &p_hwfn->p_dcbx_info->set,
-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-19  1:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1505785903-1741-1-git-send-email-rasesh.mody@cavium.com>
2017-09-19  1:51 ` [dpdk-stable] [PATCH 35/53] net/qede/base: fix API return types Rasesh Mody
2017-09-19  1:51 ` [dpdk-stable] [PATCH 40/53] net/qede/base: fix number of app table entries Rasesh Mody

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).