patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/4] net/bnxt: fix mismatched type comparison
       [not found] <1619813653-5161-1-git-send-email-ajit.khaparde@broadcom.com>
@ 2021-04-30 20:14 ` Ajit Khaparde
  2021-04-30 20:14 ` [dpdk-stable] [PATCH 2/4] net/bnxt: fix unchecked return value Ajit Khaparde
  2021-04-30 20:14 ` [dpdk-stable] [PATCH 3/4] net/bnxt: fix mismatched comparison Ajit Khaparde
  2 siblings, 0 replies; 3+ messages in thread
From: Ajit Khaparde @ 2021-04-30 20:14 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Ajit Khaparde, stable

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

dev_info.max_mac_addrs is of type uint32_t. But the counter i is
of type uint16_t. This mismatch may cause the loop condition may
always be true. Change the loop counter variable to uint32_t.

Fixes: b02f1573cd07 ("net/bnxt: restore MAC filters during reset recovery")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index dba5b9f..6dfb33c 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3959,7 +3959,7 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
 	struct rte_ether_addr *addr;
 	uint64_t pool_mask;
 	uint32_t pool = 0;
-	uint16_t i;
+	uint32_t i;
 	int rc;
 
 	if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 2/4] net/bnxt: fix unchecked return value
       [not found] <1619813653-5161-1-git-send-email-ajit.khaparde@broadcom.com>
  2021-04-30 20:14 ` [dpdk-stable] [PATCH 1/4] net/bnxt: fix mismatched type comparison Ajit Khaparde
@ 2021-04-30 20:14 ` Ajit Khaparde
  2021-04-30 20:14 ` [dpdk-stable] [PATCH 3/4] net/bnxt: fix mismatched comparison Ajit Khaparde
  2 siblings, 0 replies; 3+ messages in thread
From: Ajit Khaparde @ 2021-04-30 20:14 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Ajit Khaparde, stable

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

Return value where return value of rte_pci_read_config was not checked.
Fix it.

Coverity issue: 349919
Fixes: 9d0cbaecc91a ("net/bnxt: support periodic FW health monitoring")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6dfb33c..4068271 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4129,13 +4129,17 @@ uint32_t bnxt_read_fw_status_reg(struct bnxt *bp, uint32_t index)
 	struct bnxt_error_recovery_info *info = bp->recovery_info;
 	uint32_t reg = info->status_regs[index];
 	uint32_t type, offset, val = 0;
+	int ret = 0;
 
 	type = BNXT_FW_STATUS_REG_TYPE(reg);
 	offset = BNXT_FW_STATUS_REG_OFF(reg);
 
 	switch (type) {
 	case BNXT_FW_STATUS_REG_TYPE_CFG:
-		rte_pci_read_config(bp->pdev, &val, sizeof(val), offset);
+		ret = rte_pci_read_config(bp->pdev, &val, sizeof(val), offset);
+		if (ret < 0)
+			PMD_DRV_LOG(ERR, "Failed to read PCI offset %#x",
+				    offset);
 		break;
 	case BNXT_FW_STATUS_REG_TYPE_GRC:
 		offset = info->mapped_status_regs[index];
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 3/4] net/bnxt: fix mismatched comparison
       [not found] <1619813653-5161-1-git-send-email-ajit.khaparde@broadcom.com>
  2021-04-30 20:14 ` [dpdk-stable] [PATCH 1/4] net/bnxt: fix mismatched type comparison Ajit Khaparde
  2021-04-30 20:14 ` [dpdk-stable] [PATCH 2/4] net/bnxt: fix unchecked return value Ajit Khaparde
@ 2021-04-30 20:14 ` Ajit Khaparde
  2 siblings, 0 replies; 3+ messages in thread
From: Ajit Khaparde @ 2021-04-30 20:14 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Ajit Khaparde, stable

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]

Fix comparison between uint16_t and uint32_t types.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 7179c6c..2ef4115 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1042,7 +1042,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 
 	/* Attempt to alloc Rx buf in case of a previous allocation failure. */
 	if (alloc_failed) {
-		uint16_t cnt;
+		int cnt;
 
 		rx_raw_prod = RING_NEXT(rx_raw_prod);
 		for (cnt = 0; cnt < nb_rx_pkts + nb_rep_rx_pkts; cnt++) {
-- 
1.8.3.1


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

end of thread, other threads:[~2021-04-30 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1619813653-5161-1-git-send-email-ajit.khaparde@broadcom.com>
2021-04-30 20:14 ` [dpdk-stable] [PATCH 1/4] net/bnxt: fix mismatched type comparison Ajit Khaparde
2021-04-30 20:14 ` [dpdk-stable] [PATCH 2/4] net/bnxt: fix unchecked return value Ajit Khaparde
2021-04-30 20:14 ` [dpdk-stable] [PATCH 3/4] net/bnxt: fix mismatched comparison Ajit Khaparde

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git