From patchwork Tue Oct 1 12:53:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 60335 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA6615B3E; Tue, 1 Oct 2019 14:53:43 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9C91D37B4; Tue, 1 Oct 2019 14:53:41 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EFE20300DA6E; Tue, 1 Oct 2019 12:53:40 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB641100194E; Tue, 1 Oct 2019 12:53:39 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , cian.ferriter@intel.com, stable@dpdk.org Date: Tue, 1 Oct 2019 13:53:07 +0100 Message-Id: <20191001125315.6191-2-ktraynor@redhat.com> In-Reply-To: <20191001125315.6191-1-ktraynor@redhat.com> References: <20191001125315.6191-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 01 Oct 2019 12:53:41 +0000 (UTC) Subject: [dpdk-dev] [PATCH 1/9] net/pcap: fix argument checks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Previously rx/tx_queues were passed into eth_from_pcaps_common() as ptrs and were checked for being NULL. In commit da6ba28f0540 ("net/pcap: use a struct to pass user options") that changed to pass in a ptr to a pmd_devargs_all which contains the rx/tx_queues. The parameter checking was not updated as part of that commit and coverity caught that there was still a check if rx/tx_queues were NULL, apparently after they had been dereferenced. Fix that by checking the pmd_devargs_all ptr and removing the NULL checks on rx/tx_queues. 1231 struct pmd_devargs *rx_queues = &devargs_all->rx_queues; 1232 struct pmd_devargs *tx_queues = &devargs_all->tx_queues; 1233 const unsigned int nb_rx_queues = rx_queues->num_of_queue; deref_ptr: Directly dereferencing pointer tx_queues. 1234 const unsigned int nb_tx_queues = tx_queues->num_of_queue; 1235 unsigned int i; 1236 1237 /* do some parameter checking */ CID 345004: Dereference before null check (REVERSE_INULL) [select issue] 1238 if (rx_queues == NULL && nb_rx_queues > 0) 1239 return -1; CID 345029 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking tx_queues suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 1240 if (tx_queues == NULL && nb_tx_queues > 0) 1241 return -1; Coverity issue: 345029 Coverity issue: 345044 Fixes: da6ba28f0540 ("net/pcap: use a struct to pass user options") Cc: cian.ferriter@intel.com Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Acked-by: Cian Ferriter --- drivers/net/pcap/rte_eth_pcap.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 5489010b6..7cf00306e 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -1229,16 +1229,19 @@ eth_from_pcaps_common(struct rte_vdev_device *vdev, { struct pmd_process_private *pp; - struct pmd_devargs *rx_queues = &devargs_all->rx_queues; - struct pmd_devargs *tx_queues = &devargs_all->tx_queues; - const unsigned int nb_rx_queues = rx_queues->num_of_queue; - const unsigned int nb_tx_queues = tx_queues->num_of_queue; + struct pmd_devargs *rx_queues; + struct pmd_devargs *tx_queues; + unsigned int nb_rx_queues; + unsigned int nb_tx_queues; unsigned int i; - /* do some parameter checking */ - if (rx_queues == NULL && nb_rx_queues > 0) - return -1; - if (tx_queues == NULL && nb_tx_queues > 0) + if (devargs_all == NULL) return -1; + rx_queues = &devargs_all->rx_queues; + tx_queues = &devargs_all->tx_queues; + + nb_rx_queues = rx_queues->num_of_queue; + nb_tx_queues = tx_queues->num_of_queue; + if (pmd_init_internals(vdev, nb_rx_queues, nb_tx_queues, internals, eth_dev) < 0) From patchwork Tue Oct 1 13:03:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 60336 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0472E5B3A; Tue, 1 Oct 2019 15:04:15 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5DD6137B4; Tue, 1 Oct 2019 15:04:13 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A6166BCFE2; Tue, 1 Oct 2019 13:04:12 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D0A15C223; Tue, 1 Oct 2019 13:04:11 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , ndabilpuram@marvell.com, stable@dpdk.org Date: Tue, 1 Oct 2019 14:03:58 +0100 Message-Id: <20191001130405.7076-1-ktraynor@redhat.com> In-Reply-To: <20191001125315.6191-1-ktraynor@redhat.com> References: <20191001125315.6191-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 01 Oct 2019 13:04:12 +0000 (UTC) Subject: [dpdk-dev] [PATCH 2/9] crypto/octeontx: fix possible NULL deference X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Coverity complains that ctrl_flags is set to NULL at the start of the function and it may not have been set before there is a jump to fc_success and it is dereferenced. Check for NULL before dereference. 312fc_success: CID 344983 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)7. var_deref_op: Dereferencing null pointer ctrl_flags. 313 *ctrl_flags = rte_cpu_to_be_64(*ctrl_flags); Coverity issue: 344983 Fixes: 6cc54096520d ("crypto/octeontx: add supported sessions") Cc: ndabilpuram@marvell.com Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Reviewed-by: David Marchand --- There may be further rework needed to set it to the correct value, but for now at least prevent the NULL dereference. --- drivers/common/cpt/cpt_ucode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h index 7d9c31e17..fad978c6e 100644 --- a/drivers/common/cpt/cpt_ucode.h +++ b/drivers/common/cpt/cpt_ucode.h @@ -311,5 +311,6 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, const uint8_t *key, fc_success: - *ctrl_flags = rte_cpu_to_be_64(*ctrl_flags); + if (ctrl_flags != NULL) + *ctrl_flags = rte_cpu_to_be_64(*ctrl_flags); success: From patchwork Tue Oct 1 13:03:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 60337 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 712A94C8D; Tue, 1 Oct 2019 15:04:22 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id E92B61B94A; Tue, 1 Oct 2019 15:04:19 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5155980F6D; Tue, 1 Oct 2019 13:04:19 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEEE55C1D4; Tue, 1 Oct 2019 13:04:16 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , lance.richardson@broadcom.com, stable@dpdk.org Date: Tue, 1 Oct 2019 14:03:59 +0100 Message-Id: <20191001130405.7076-2-ktraynor@redhat.com> In-Reply-To: <20191001130405.7076-1-ktraynor@redhat.com> References: <20191001125315.6191-1-ktraynor@redhat.com> <20191001130405.7076-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 01 Oct 2019 13:04:19 +0000 (UTC) Subject: [dpdk-dev] [PATCH 3/9] net/bnxt: remove logically dead code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If rc contains a non-zero return code from bnxt_hwrm_send_message(), HWRM_CHECK_RESULT_SILENT() will return. Just after that code, there is an 'if (!rc) {...} else {...}'. Coverity is complaining that this if else statement is dead code as rc will always be 0 if that code is reached. 4309 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); cond_const: Condition rc, taking false branch. Now the value of rc is equal to 0. 4310 HWRM_CHECK_RESULT_SILENT(); 4311 const: At condition rc, the value of rc must be equal to 0. dead_error_condition: The condition !rc must be true. 4312 if (!rc) { [snip] 4373 } else { CID 343450 (#1 of 1): Logically dead code (DEADCODE)dead_error_line: Execution cannot reach this statement: rc = 0;. 4374 rc = 0; 4375 } Coverity issue: 343450 Fixes: f8168ca0e690 ("net/bnxt: support thor controller") Cc: lance.richardson@broadcom.com Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Acked-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 118 +++++++++++++++++------------------ 1 file changed, 56 insertions(+), 62 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 9883fb506..5378e3e9c 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -4298,5 +4298,7 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp) struct hwrm_func_backing_store_qcaps_output *resp = bp->hwrm_cmd_resp_addr; - int rc; + struct bnxt_ctx_pg_info *ctx_pg; + struct bnxt_ctx_mem_info *ctx; + int rc, total_alloc_len, i; if (!BNXT_CHIP_THOR(bp) || @@ -4310,68 +4312,60 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp) HWRM_CHECK_RESULT_SILENT(); - if (!rc) { - struct bnxt_ctx_pg_info *ctx_pg; - struct bnxt_ctx_mem_info *ctx; - int total_alloc_len; - int i; + total_alloc_len = sizeof(*ctx); + ctx = rte_malloc("bnxt_ctx_mem", total_alloc_len, + RTE_CACHE_LINE_SIZE); + if (!ctx) { + rc = -ENOMEM; + goto ctx_err; + } + memset(ctx, 0, total_alloc_len); - total_alloc_len = sizeof(*ctx); - ctx = rte_malloc("bnxt_ctx_mem", total_alloc_len, - RTE_CACHE_LINE_SIZE); - if (!ctx) { - rc = -ENOMEM; - goto ctx_err; - } - memset(ctx, 0, total_alloc_len); + ctx_pg = rte_malloc("bnxt_ctx_pg_mem", + sizeof(*ctx_pg) * BNXT_MAX_Q, + RTE_CACHE_LINE_SIZE); + if (!ctx_pg) { + rc = -ENOMEM; + goto ctx_err; + } + for (i = 0; i < BNXT_MAX_Q; i++, ctx_pg++) + ctx->tqm_mem[i] = ctx_pg; - ctx_pg = rte_malloc("bnxt_ctx_pg_mem", - sizeof(*ctx_pg) * BNXT_MAX_Q, - RTE_CACHE_LINE_SIZE); - if (!ctx_pg) { - rc = -ENOMEM; - goto ctx_err; - } - for (i = 0; i < BNXT_MAX_Q; i++, ctx_pg++) - ctx->tqm_mem[i] = ctx_pg; + bp->ctx = ctx; + ctx->qp_max_entries = rte_le_to_cpu_32(resp->qp_max_entries); + ctx->qp_min_qp1_entries = + rte_le_to_cpu_16(resp->qp_min_qp1_entries); + ctx->qp_max_l2_entries = + rte_le_to_cpu_16(resp->qp_max_l2_entries); + ctx->qp_entry_size = rte_le_to_cpu_16(resp->qp_entry_size); + ctx->srq_max_l2_entries = + rte_le_to_cpu_16(resp->srq_max_l2_entries); + ctx->srq_max_entries = rte_le_to_cpu_32(resp->srq_max_entries); + ctx->srq_entry_size = rte_le_to_cpu_16(resp->srq_entry_size); + ctx->cq_max_l2_entries = + rte_le_to_cpu_16(resp->cq_max_l2_entries); + ctx->cq_max_entries = rte_le_to_cpu_32(resp->cq_max_entries); + ctx->cq_entry_size = rte_le_to_cpu_16(resp->cq_entry_size); + ctx->vnic_max_vnic_entries = + rte_le_to_cpu_16(resp->vnic_max_vnic_entries); + ctx->vnic_max_ring_table_entries = + rte_le_to_cpu_16(resp->vnic_max_ring_table_entries); + ctx->vnic_entry_size = rte_le_to_cpu_16(resp->vnic_entry_size); + ctx->stat_max_entries = + rte_le_to_cpu_32(resp->stat_max_entries); + ctx->stat_entry_size = rte_le_to_cpu_16(resp->stat_entry_size); + ctx->tqm_entry_size = rte_le_to_cpu_16(resp->tqm_entry_size); + ctx->tqm_min_entries_per_ring = + rte_le_to_cpu_32(resp->tqm_min_entries_per_ring); + ctx->tqm_max_entries_per_ring = + rte_le_to_cpu_32(resp->tqm_max_entries_per_ring); + ctx->tqm_entries_multiple = resp->tqm_entries_multiple; + if (!ctx->tqm_entries_multiple) + ctx->tqm_entries_multiple = 1; + ctx->mrav_max_entries = + rte_le_to_cpu_32(resp->mrav_max_entries); + ctx->mrav_entry_size = rte_le_to_cpu_16(resp->mrav_entry_size); + ctx->tim_entry_size = rte_le_to_cpu_16(resp->tim_entry_size); + ctx->tim_max_entries = rte_le_to_cpu_32(resp->tim_max_entries); - bp->ctx = ctx; - ctx->qp_max_entries = rte_le_to_cpu_32(resp->qp_max_entries); - ctx->qp_min_qp1_entries = - rte_le_to_cpu_16(resp->qp_min_qp1_entries); - ctx->qp_max_l2_entries = - rte_le_to_cpu_16(resp->qp_max_l2_entries); - ctx->qp_entry_size = rte_le_to_cpu_16(resp->qp_entry_size); - ctx->srq_max_l2_entries = - rte_le_to_cpu_16(resp->srq_max_l2_entries); - ctx->srq_max_entries = rte_le_to_cpu_32(resp->srq_max_entries); - ctx->srq_entry_size = rte_le_to_cpu_16(resp->srq_entry_size); - ctx->cq_max_l2_entries = - rte_le_to_cpu_16(resp->cq_max_l2_entries); - ctx->cq_max_entries = rte_le_to_cpu_32(resp->cq_max_entries); - ctx->cq_entry_size = rte_le_to_cpu_16(resp->cq_entry_size); - ctx->vnic_max_vnic_entries = - rte_le_to_cpu_16(resp->vnic_max_vnic_entries); - ctx->vnic_max_ring_table_entries = - rte_le_to_cpu_16(resp->vnic_max_ring_table_entries); - ctx->vnic_entry_size = rte_le_to_cpu_16(resp->vnic_entry_size); - ctx->stat_max_entries = - rte_le_to_cpu_32(resp->stat_max_entries); - ctx->stat_entry_size = rte_le_to_cpu_16(resp->stat_entry_size); - ctx->tqm_entry_size = rte_le_to_cpu_16(resp->tqm_entry_size); - ctx->tqm_min_entries_per_ring = - rte_le_to_cpu_32(resp->tqm_min_entries_per_ring); - ctx->tqm_max_entries_per_ring = - rte_le_to_cpu_32(resp->tqm_max_entries_per_ring); - ctx->tqm_entries_multiple = resp->tqm_entries_multiple; - if (!ctx->tqm_entries_multiple) - ctx->tqm_entries_multiple = 1; - ctx->mrav_max_entries = - rte_le_to_cpu_32(resp->mrav_max_entries); - ctx->mrav_entry_size = rte_le_to_cpu_16(resp->mrav_entry_size); - ctx->tim_entry_size = rte_le_to_cpu_16(resp->tim_entry_size); - ctx->tim_max_entries = rte_le_to_cpu_32(resp->tim_max_entries); - } else { - rc = 0; - } ctx_err: HWRM_UNLOCK(); From patchwork Tue Oct 1 13:04:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 60338 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2FE1F1BE91; Tue, 1 Oct 2019 15:04:27 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 32B531BE8D; Tue, 1 Oct 2019 15:04:25 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8801B300CA4B; Tue, 1 Oct 2019 13:04:24 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 23D485C1D4; Tue, 1 Oct 2019 13:04:20 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , rosen.xu@intel.com, stable@dpdk.org Date: Tue, 1 Oct 2019 14:04:00 +0100 Message-Id: <20191001130405.7076-3-ktraynor@redhat.com> In-Reply-To: <20191001130405.7076-1-ktraynor@redhat.com> References: <20191001125315.6191-1-ktraynor@redhat.com> <20191001130405.7076-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 01 Oct 2019 13:04:24 +0000 (UTC) Subject: [dpdk-dev] [PATCH 4/9] net/ipn3ke: fix incorrect commit check logic X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Coverity is complaining about identical code regardless of which branch of the if else is taken. Functionally it means an error will always be returned if this if else is hit. Remove the else branch. CID 337928 (#1 of 1): Identical code for different branches (IDENTICAL_BRANCHES)identical_branches: The same code is executed regardless of whether n->level != IPN3KE_TM_NODE_LEVEL_COS || n->n_children != 0U is true, because the 'then' and 'else' branches are identical. Should one of the branches be modified, or the entire 'if' statement replaced? 1506 if (n->level != IPN3KE_TM_NODE_LEVEL_COS || 1507 n->n_children != 0) { 1508 return -rte_tm_error_set(error, 1509 EINVAL, 1510 RTE_TM_ERROR_TYPE_UNSPECIFIED, 1511 NULL, 1512 rte_strerror(EINVAL)); else_branch: The else branch, identical to the then branch. 1513 } else { 1514 return -rte_tm_error_set(error, 1515 EINVAL, 1516 RTE_TM_ERROR_TYPE_UNSPECIFIED, 1517 NULL, 1518 rte_strerror(EINVAL)); 1519 } Coverity issue: 337928 Fixes: c820468ac99c ("net/ipn3ke: support TM") Cc: rosen.xu@intel.com Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Reviewed-by: Rosen Xu Reviewed-by: Rosen Xu Reviewed-by: Rosen Xu --- drivers/net/ipn3ke/ipn3ke_tm.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c b/drivers/net/ipn3ke/ipn3ke_tm.c index adf02c157..a93145d59 100644 --- a/drivers/net/ipn3ke/ipn3ke_tm.c +++ b/drivers/net/ipn3ke/ipn3ke_tm.c @@ -1511,10 +1511,4 @@ ipn3ke_tm_hierarchy_commit_check(struct rte_eth_dev *dev, NULL, rte_strerror(EINVAL)); - } else { - return -rte_tm_error_set(error, - EINVAL, - RTE_TM_ERROR_TYPE_UNSPECIFIED, - NULL, - rte_strerror(EINVAL)); } } From patchwork Tue Oct 1 13:04:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 60339 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 22F711BE9F; Tue, 1 Oct 2019 15:04:31 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 080071BE9C; Tue, 1 Oct 2019 15:04:30 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 776DB2A09D8; Tue, 1 Oct 2019 13:04:29 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C4B35C1D4; Tue, 1 Oct 2019 13:04:26 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , rosen.xu@intel.com, stable@dpdk.org Date: Tue, 1 Oct 2019 14:04:01 +0100 Message-Id: <20191001130405.7076-4-ktraynor@redhat.com> In-Reply-To: <20191001130405.7076-1-ktraynor@redhat.com> References: <20191001125315.6191-1-ktraynor@redhat.com> <20191001130405.7076-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 01 Oct 2019 13:04:29 +0000 (UTC) Subject: [dpdk-dev] [PATCH 5/9] net/ipn3ke: remove useless if statement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Coverity complains that this statement is not needed as the goto label is on the next line anyway. Remove the if statement. 653 ret = ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name); CID 337930 (#1 of 1): Identical code for different branches (IDENTICAL_BRANCHES)identical_branches: The same code is executed when the condition ret is true or false, because the code in the if-then branch and after the if statement is identical. Should the if statement be removed? 654 if (ret) 655 goto end; implicit_else: The code from the above if-then branch is identical to the code after the if statement. 656end: Coverity issue: 337930 Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver") Cc: rosen.xu@intel.com Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Reviewed-by: David Marchand Reviewed-by: Rosen Xu Reviewed-by: Rosen Xu --- drivers/net/ipn3ke/ipn3ke_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c index c226d6313..282295f49 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c @@ -652,6 +652,5 @@ ipn3ke_cfg_probe(struct rte_vdev_device *dev) ret = ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name); - if (ret) - goto end; + end: if (kvlist) From patchwork Tue Oct 1 13:04:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 60340 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0F2E71BEAE; Tue, 1 Oct 2019 15:04:34 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 3433B1BEA8; Tue, 1 Oct 2019 15:04:33 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7EB7136961; Tue, 1 Oct 2019 13:04:32 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD98D5C223; Tue, 1 Oct 2019 13:04:30 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , rosen.xu@intel.com, stable@dpdk.org Date: Tue, 1 Oct 2019 14:04:02 +0100 Message-Id: <20191001130405.7076-5-ktraynor@redhat.com> In-Reply-To: <20191001130405.7076-1-ktraynor@redhat.com> References: <20191001125315.6191-1-ktraynor@redhat.com> <20191001130405.7076-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 01 Oct 2019 13:04:32 +0000 (UTC) Subject: [dpdk-dev] [PATCH 6/9] net/ipn3ke: remove commented out code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" These struct members and variable were commented out. Remove them. Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver") Fixes: c820468ac99c ("net/ipn3ke: support TM") Cc: rosen.xu@intel.com Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Reviewed-by: David Marchand Reviewed-by: Rosen Xu Reviewed-by: Rosen Xu --- drivers/net/ipn3ke/ipn3ke_ethdev.h | 7 ------- drivers/net/ipn3ke/ipn3ke_tm.c | 1 - 2 files changed, 8 deletions(-) diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h b/drivers/net/ipn3ke/ipn3ke_ethdev.h index c7b336bbd..0d71dcd64 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.h +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h @@ -97,18 +97,11 @@ struct ipn3ke_tm_node { struct ipn3ke_tm_hierarchy { struct ipn3ke_tm_node *port_node; - /*struct ipn3ke_tm_node_list vt_node_list;*/ - /*struct ipn3ke_tm_node_list cos_node_list;*/ - uint32_t n_shaper_profiles; - /*uint32_t n_shared_shapers;*/ uint32_t n_tdrop_profiles; uint32_t n_vt_nodes; uint32_t n_cos_nodes; - struct ipn3ke_tm_node *port_commit_node; struct ipn3ke_tm_node_list vt_commit_node_list; struct ipn3ke_tm_node_list cos_commit_node_list; - - /*uint32_t n_tm_nodes[IPN3KE_TM_NODE_LEVEL_MAX];*/ }; diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c b/drivers/net/ipn3ke/ipn3ke_tm.c index a93145d59..5a16c5f96 100644 --- a/drivers/net/ipn3ke/ipn3ke_tm.c +++ b/drivers/net/ipn3ke/ipn3ke_tm.c @@ -1088,5 +1088,4 @@ ipn3ke_tm_node_add_check_mount(uint32_t tm_id, struct rte_tm_error *error) { - /*struct ipn3ke_tm_internals *tm = IPN3KE_DEV_PRIVATE_TO_TM(dev);*/ uint32_t node_index; uint32_t parent_index; From patchwork Tue Oct 1 13:04:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 60341 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8970D1BE9C; Tue, 1 Oct 2019 15:04:40 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9101B1BE89; Tue, 1 Oct 2019 15:04:38 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 106CC10CC20B; Tue, 1 Oct 2019 13:04:38 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0F305C224; Tue, 1 Oct 2019 13:04:35 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , ssahu@marvell.com, stable@dpdk.org Date: Tue, 1 Oct 2019 14:04:03 +0100 Message-Id: <20191001130405.7076-6-ktraynor@redhat.com> In-Reply-To: <20191001130405.7076-1-ktraynor@redhat.com> References: <20191001125315.6191-1-ktraynor@redhat.com> <20191001130405.7076-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Tue, 01 Oct 2019 13:04:38 +0000 (UTC) Subject: [dpdk-dev] [PATCH 7/9] compress/octeontx: remove commented out code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This code is commented out. Remove it. Fixes: 43e610bb8565 ("compress/octeontx: introduce octeontx zip PMD") Cc: ssahu@marvell.com Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Reviewed-by: David Marchand --- drivers/compress/octeontx/include/zip_regs.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/compress/octeontx/include/zip_regs.h b/drivers/compress/octeontx/include/zip_regs.h index 04c3d75e9..96e538bb7 100644 --- a/drivers/compress/octeontx/include/zip_regs.h +++ b/drivers/compress/octeontx/include/zip_regs.h @@ -37,5 +37,4 @@ typedef union { #endif /* Word 0 - End */ } s; - /* struct zip_vqx_ena_s cn; */ } zip_vqx_ena_t; @@ -65,5 +64,4 @@ typedef union { #endif /* Word 0 - End */ } s; - /* struct zip_vqx_sbuf_addr_s cn; */ } zip_vqx_sbuf_addr_t; @@ -85,5 +83,4 @@ typedef union { #endif /* Word 0 - End */ } s; - /* struct zip_quex_doorbell_s cn; */ } zip_quex_doorbell_t; @@ -105,5 +102,4 @@ union zip_nptr_s { #endif /* Word 0 - End */ } s; - /* struct zip_nptr_s_s cn83xx; */ }; @@ -198,5 +194,4 @@ union zip_inst_s { /** Beginning of file */ uint64_t bf : 1; - // uint64_t reserved_3_4 : 2; /** Comp/decomp operation */ uint64_t op : 2; @@ -211,5 +206,4 @@ union zip_inst_s { uint64_t dg : 1; uint64_t ds : 1; - //uint64_t reserved_3_4 : 2; uint64_t op : 2; uint64_t bf : 1; @@ -616,6 +610,4 @@ union zip_zres_s { #endif /* Word 7 - End */ } /** ZIP Result Structure */s; - - /* struct zip_zres_s_s cn83xx; */ }; From patchwork Tue Oct 1 13:04:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 60342 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9FABC1BEB9; Tue, 1 Oct 2019 15:04:43 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 64D3B1BEB4; Tue, 1 Oct 2019 15:04:42 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4BBF10CC209; Tue, 1 Oct 2019 13:04:41 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1656D5C223; Tue, 1 Oct 2019 13:04:39 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , liang.j.ma@intel.com, stable@dpdk.org Date: Tue, 1 Oct 2019 14:04:04 +0100 Message-Id: <20191001130405.7076-7-ktraynor@redhat.com> In-Reply-To: <20191001130405.7076-1-ktraynor@redhat.com> References: <20191001125315.6191-1-ktraynor@redhat.com> <20191001130405.7076-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Tue, 01 Oct 2019 13:04:41 +0000 (UTC) Subject: [dpdk-dev] [PATCH 8/9] event/opdl: remove commented out code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Some variables are commented out. Remove them. Fixes: d548ef513cd7 ("event/opdl: add unit tests") Cc: liang.j.ma@intel.com Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Acked-by: Liang Ma --- drivers/event/opdl/opdl_test.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/event/opdl/opdl_test.c b/drivers/event/opdl/opdl_test.c index 5868ec1be..e7a32fbd3 100644 --- a/drivers/event/opdl/opdl_test.c +++ b/drivers/event/opdl/opdl_test.c @@ -696,7 +696,4 @@ static int single_link(struct test *t) { - /* const uint8_t rx_port = 0; */ - /* const uint8_t w1_port = 1; */ - /* const uint8_t w3_port = 3; */ const uint8_t tx_port = 2; int err; From patchwork Tue Oct 1 13:04:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 60343 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 212F91BE8D; Tue, 1 Oct 2019 15:04:58 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 0A1CC1BEBC; Tue, 1 Oct 2019 15:04:48 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7CE3E30A7FC2; Tue, 1 Oct 2019 13:04:47 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 391025C1D4; Tue, 1 Oct 2019 13:04:45 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , ajit.khaparde@broadcom.com, stable@dpdk.org Date: Tue, 1 Oct 2019 14:04:05 +0100 Message-Id: <20191001130405.7076-8-ktraynor@redhat.com> In-Reply-To: <20191001130405.7076-1-ktraynor@redhat.com> References: <20191001125315.6191-1-ktraynor@redhat.com> <20191001130405.7076-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 01 Oct 2019 13:04:47 +0000 (UTC) Subject: [dpdk-dev] [PATCH 9/9] net/bnxt: remove commented out code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This commented out todo and code is old. Remove it. Fixes: b7435d660a8c ("net/bnxt: add ntuple filtering support") Cc: ajit.khaparde@broadcom.com Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Acked-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 6685ee7d9..318d49857 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2239,7 +2239,4 @@ parse_ntuple_filter(struct bnxt *bp, } - //TODO Priority - //nfilter->priority = (uint8_t)filter->priority; - bfilter->enables = en; return 0;