From patchwork Tue Jun 19 21:30:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 41287 X-Patchwork-Delegate: ferruh.yigit@amd.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 0374E1B44A; Tue, 19 Jun 2018 23:31:46 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id BC1571B05E for ; Tue, 19 Jun 2018 23:31:09 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 3129A30C064; Tue, 19 Jun 2018 14:31:06 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 3129A30C064 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1529443866; bh=F3ra/gFjRStqTHaJOSyvtanMgVlacVKLeeqazN0b5q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pu9JLguzV70lGpIp8nEDY3NAt8L03nv3WH1QM9SguoSu0KETEIR1iCOwu6KutTg1Y cz+JhtEiLplvf7/QADvJDRgIYmS6g7VjFIzKUGq2Xs+bhv3zOiBAJePn3ODx7tC7kg NQ5YBcvMW2u7uWGoxuJzL7NpJJlrj96RKZEig4jM= Received: from C02VPB22HTD6.dhcp.broadcom.net (c02vpb22htd6.dhcp.broadcom.net [10.136.50.120]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 14FFFAC06AD; Tue, 19 Jun 2018 14:31:06 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Scott Branden Date: Tue, 19 Jun 2018 14:30:42 -0700 Message-Id: <20180619213058.12273-16-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: <20180619213058.12273-1-ajit.khaparde@broadcom.com> References: <20180619213058.12273-1-ajit.khaparde@broadcom.com> Subject: [dpdk-dev] [PATCH 15/31] net/bnxt: code cleanup style of bnxt txq 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" From: Scott Branden Cleanup alignment, brackets, debug string style of bnxt_txq Signed-off-by: Scott Branden Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_txq.c | 24 ++++++++++++++---------- drivers/net/bnxt/bnxt_txq.h | 9 +++++---- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index b9b975e4c..677bb9692 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -74,10 +74,10 @@ void bnxt_tx_queue_release_op(void *tx_queue) } int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, - uint16_t queue_idx, - uint16_t nb_desc, - unsigned int socket_id, - const struct rte_eth_txconf *tx_conf) + uint16_t queue_idx, + uint16_t nb_desc, + unsigned int socket_id, + const struct rte_eth_txconf *tx_conf) { struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; struct bnxt_tx_queue *txq; @@ -91,7 +91,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, } if (!nb_desc || nb_desc > MAX_TX_DESC_CNT) { - PMD_DRV_LOG(ERR, "nb_desc %d is invalid", nb_desc); + PMD_DRV_LOG(ERR, "nb_desc %d is invalid\n", nb_desc); rc = -EINVAL; goto out; } @@ -106,7 +106,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, txq = rte_zmalloc_socket("bnxt_tx_queue", sizeof(struct bnxt_tx_queue), RTE_CACHE_LINE_SIZE, socket_id); if (!txq) { - PMD_DRV_LOG(ERR, "bnxt_tx_queue allocation failed!"); + PMD_DRV_LOG(ERR, "bnxt_tx_queue allocation failed!\n"); rc = -ENOMEM; goto out; } @@ -122,16 +122,20 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, txq->port_id = eth_dev->data->port_id; /* Allocate TX ring hardware descriptors */ - if (bnxt_alloc_rings(bp, queue_idx, txq, NULL, txq->cp_ring, - "txr")) { - PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for tx_ring failed!"); + if (bnxt_alloc_rings(bp, + queue_idx, + txq, + NULL, + txq->cp_ring, + "txr")) { + PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for tx_ring failed!\n"); bnxt_tx_queue_release_op(txq); rc = -ENOMEM; goto out; } if (bnxt_init_one_tx_ring(txq)) { - PMD_DRV_LOG(ERR, "bnxt_init_one_tx_ring failed!"); + PMD_DRV_LOG(ERR, "bnxt_init_one_tx_ring failed!\n"); bnxt_tx_queue_release_op(txq); rc = -ENOMEM; goto out; diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h index f2c712a75..9da8f39d8 100644 --- a/drivers/net/bnxt/bnxt_txq.h +++ b/drivers/net/bnxt/bnxt_txq.h @@ -40,8 +40,9 @@ void bnxt_free_txq_stats(struct bnxt_tx_queue *txq); void bnxt_free_tx_mbufs(struct bnxt *bp); void bnxt_tx_queue_release_op(void *tx_queue); int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, - uint16_t queue_idx, - uint16_t nb_desc, - unsigned int socket_id, - const struct rte_eth_txconf *tx_conf); + uint16_t queue_idx, + uint16_t nb_desc, + unsigned int socket_id, + const struct rte_eth_txconf *tx_conf); + #endif