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>,
	ferruh.yigit@intel.com, Dept-EngDPDKDev@cavium.com,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH 7/8] net/qede/base: fix division by zero
Date: Tue,  7 Nov 2017 00:34:24 -0800	[thread overview]
Message-ID: <1510043665-8160-8-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1510043665-8160-1-git-send-email-rasesh.mody@cavium.com>

Fix division by zero in calculating the regpair elements per page
Remove unused API ecore_cxt_free_proto_ilt()

Coverity issue: 1379423, 1379428
Fixes: 22d07d939c3c ("net/qede/base: update")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/qede/base/ecore_cxt.c b/drivers/net/qede/base/ecore_cxt.c
index b47eac2..50bd66d 100644
--- a/drivers/net/qede/base/ecore_cxt.c
+++ b/drivers/net/qede/base/ecore_cxt.c
@@ -66,6 +66,7 @@
 
 /* TYPE-1 task context - ROCE */
 union type1_task_context {
+	struct regpair reserved; /* @DPDK */
 };
 
 struct src_ent {
@@ -2220,34 +2221,3 @@ enum _ecore_status_t
 
 	return ECORE_SUCCESS;
 }
-
-enum _ecore_status_t ecore_cxt_free_proto_ilt(struct ecore_hwfn *p_hwfn,
-					      enum protocol_type proto)
-{
-	enum _ecore_status_t rc;
-	u32 cid;
-
-	/* Free Connection CXT */
-	rc = ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_CXT,
-				      ecore_cxt_get_proto_cid_start(p_hwfn,
-								    proto),
-				      ecore_cxt_get_proto_cid_count(p_hwfn,
-								    proto,
-								    &cid));
-
-	if (rc)
-		return rc;
-
-	/* Free Task CXT */
-	rc = ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_TASK, 0,
-				      ecore_cxt_get_proto_tid_count(p_hwfn,
-								    proto));
-	if (rc)
-		return rc;
-
-	/* Free TSDM CXT */
-	rc = ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_SRQ, 0,
-				      ecore_cxt_get_srq_count(p_hwfn));
-
-	return rc;
-}
-- 
1.7.10.3

  parent reply	other threads:[~2017-11-07  8:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07  8:34 [dpdk-dev] [PATCH 0/8] net/qede: coverity issue fixes and bug fixes Rasesh Mody
2017-11-07  8:34 ` [dpdk-dev] [PATCH 1/8] net/qede: fix to disable per-VF Tx switching feature Rasesh Mody
2017-11-08  0:53   ` Thomas Monjalon
2017-11-08  1:34     ` Patil, Harish
2017-11-08  1:44       ` Thomas Monjalon
2017-11-08  2:34         ` Patil, Harish
2017-11-07  8:34 ` [dpdk-dev] [PATCH 2/8] net/qede: fix vxlan filter deletion Rasesh Mody
2017-11-07  8:34 ` [dpdk-dev] [PATCH 3/8] net/qede: fix to update device link structure Rasesh Mody
2017-11-07  8:34 ` [dpdk-dev] [PATCH 4/8] net/qede: remove duplicate includes Rasesh Mody
2017-11-07  8:34 ` [dpdk-dev] [PATCH 5/8] net/qede: fix to release the acquired ptt Rasesh Mody
2017-11-07  8:34 ` [dpdk-dev] [PATCH 6/8] net/qede/base: fix to initialize filter API return code Rasesh Mody
2017-11-07  8:34 ` Rasesh Mody [this message]
2017-11-07  8:34 ` [dpdk-dev] [PATCH 8/8] net/qede: fix null pointer dereferences Rasesh Mody
2017-11-07 22:53 ` [dpdk-dev] [PATCH 0/8] net/qede: coverity issue fixes and bug fixes Ferruh Yigit

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=1510043665-8160-8-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).