DPDK patches and discussions
 help / color / mirror / Atom feed
From: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <bluca@debian.org>,
	<luoxianjun@huawei.com>, <luoxingyu@huawei.com>,
	<zhouguoyang@huawei.com>, <xuanziyang2@huawei.com>,
	<shahar.belkar@huawei.com>, <yin.yinshi@huawei.com>,
	Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
Subject: [dpdk-dev] [PATCH v3 2/2] net/hinic/base: optimize log style
Date: Wed, 1 Apr 2020 17:30:01 +0800	[thread overview]
Message-ID: <2f02499e5f83a09788f67022a7dc59b4b7a685cf.1585731196.git.cloud.wangxiaoyun@huawei.com> (raw)
In-Reply-To: <cover.1585731196.git.cloud.wangxiaoyun@huawei.com>

The patch adds space between descriptors and variables in log files.

Signed-off-by: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_hwdev.c  | 4 ++--
 drivers/net/hinic/base/hinic_pmd_hwif.c   | 4 ++--
 drivers/net/hinic/base/hinic_pmd_mgmt.c   | 2 +-
 drivers/net/hinic/base/hinic_pmd_niccfg.c | 3 +--
 drivers/net/hinic/hinic_pmd_ethdev.c      | 8 ++++----
 drivers/net/hinic/hinic_pmd_flow.c        | 5 ++---
 6 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index fc11ecd..cc42076 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -298,7 +298,7 @@ void dma_pool_destroy(struct dma_pool *pool)
 		return;
 
 	if (rte_atomic32_read(&pool->inuse) != 0) {
-		PMD_DRV_LOG(ERR, "Leak memory, dma_pool:%s, inuse_count:%d",
+		PMD_DRV_LOG(ERR, "Leak memory, dma_pool: %s, inuse_count: %d",
 			    pool->name, rte_atomic32_read(&pool->inuse));
 	}
 
@@ -1068,7 +1068,7 @@ int hinic_l2nic_reset(struct hinic_hwdev *hwdev)
 		watchdog_info->is_overflow, watchdog_info->stack_top,
 		watchdog_info->stack_bottom);
 
-	PMD_DRV_LOG(ERR, "Mgmt pc: 0x%08x, lr: 0x%08x, cpsr:0x%08x",
+	PMD_DRV_LOG(ERR, "Mgmt pc: 0x%08x, lr: 0x%08x, cpsr: 0x%08x",
 		watchdog_info->pc, watchdog_info->lr, watchdog_info->cpsr);
 
 	PMD_DRV_LOG(ERR, "Mgmt register info");
diff --git a/drivers/net/hinic/base/hinic_pmd_hwif.c b/drivers/net/hinic/base/hinic_pmd_hwif.c
index 0fced5b..63fba0d 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwif.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwif.c
@@ -450,8 +450,8 @@ static void hinic_parse_hwif_attr(struct hinic_hwdev *hwdev)
 	struct hinic_hwif *hwif = hwdev->hwif;
 
 	PMD_DRV_LOG(INFO, "Device %s hwif attribute:", hwdev->pcidev_hdl->name);
-	PMD_DRV_LOG(INFO, "func_idx:%u, p2p_idx:%u, pciintf_idx:%u, "
-		    "vf_in_pf:%u, ppf_idx:%u, global_vf_id:%u, func_type:%u",
+	PMD_DRV_LOG(INFO, "func_idx: %u, p2p_idx: %u, pciintf_idx: %u, "
+		    "vf_in_pf: %u, ppf_idx: %u, global_vf_id: %u, func_type: %u",
 		    hwif->attr.func_global_idx,
 		    hwif->attr.port_to_port_idx, hwif->attr.pci_intf_idx,
 		    hwif->attr.vf_in_pf, hwif->attr.ppf_idx,
diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
index 06c9b68..94bc45f 100644
--- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
+++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
@@ -470,7 +470,7 @@ static void hinic_pf_to_mgmt_free(struct hinic_hwdev *hwdev)
 			       recv_msg->msg_len);
 			*out_size = recv_msg->msg_len;
 		} else {
-			PMD_DRV_LOG(ERR, "Mgmt rsp's msg len:%u overflow.",
+			PMD_DRV_LOG(ERR, "Mgmt rsp's msg len: %u overflow.",
 				recv_msg->msg_len);
 			err = -ERANGE;
 		}
diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.c b/drivers/net/hinic/base/hinic_pmd_niccfg.c
index 0899a9c..c5663df 100644
--- a/drivers/net/hinic/base/hinic_pmd_niccfg.c
+++ b/drivers/net/hinic/base/hinic_pmd_niccfg.c
@@ -1610,8 +1610,7 @@ int hinic_set_link_status_follow(void *hwdev,
 		return 0;
 
 	if (status >= HINIC_LINK_FOLLOW_STATUS_MAX) {
-		PMD_DRV_LOG(ERR,
-			"Invalid link follow status: %d", status);
+		PMD_DRV_LOG(ERR, "Invalid link follow status: %d", status);
 		return -EINVAL;
 	}
 
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 239a78c..4091cf1 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -477,7 +477,7 @@ static int hinic_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	/* alloc rx_cqe and prepare rq_wqe */
 	rc = hinic_setup_rx_resources(rxq);
 	if (rc) {
-		PMD_DRV_LOG(ERR, "Setup rxq[%d] rx_resources failed, dev_name:%s",
+		PMD_DRV_LOG(ERR, "Setup rxq[%d] rx_resources failed, dev_name: %s",
 			    queue_idx, dev->data->name);
 		goto setup_rx_res_err;
 	}
@@ -1014,7 +1014,7 @@ static int hinic_dev_start(struct rte_eth_dev *dev)
 	/* init txq and rxq context */
 	rc = hinic_init_qp_ctxts(nic_dev->hwdev);
 	if (rc) {
-		PMD_DRV_LOG(ERR, "Initialize qp context failed, dev_name:%s",
+		PMD_DRV_LOG(ERR, "Initialize qp context failed, dev_name: %s",
 			    name);
 		goto init_qp_fail;
 	}
@@ -1056,7 +1056,7 @@ static int hinic_dev_start(struct rte_eth_dev *dev)
 	/* open physical port and start packet receiving */
 	rc = hinic_set_port_enable(nic_dev->hwdev, true);
 	if (rc) {
-		PMD_DRV_LOG(ERR, "Enable physical port failed, dev_name:%s",
+		PMD_DRV_LOG(ERR, "Enable physical port failed, dev_name: %s",
 			    name);
 		goto en_port_fail;
 	}
@@ -1203,7 +1203,7 @@ static void hinic_dev_stop(struct rte_eth_dev *dev)
 
 	rc = hinic_set_vport_enable(nic_dev->hwdev, false);
 	if (rc)
-		PMD_DRV_LOG(WARNING, "Disable vport failed, error: %d, dev_name:%s, port_id:%d",
+		PMD_DRV_LOG(WARNING, "Disable vport failed, error: %d, dev_name: %s, port_id: %d",
 			  rc, name, port_id);
 
 	/* Clear recorded link status */
diff --git a/drivers/net/hinic/hinic_pmd_flow.c b/drivers/net/hinic/hinic_pmd_flow.c
index c1f86ef..e620df0 100644
--- a/drivers/net/hinic/hinic_pmd_flow.c
+++ b/drivers/net/hinic/hinic_pmd_flow.c
@@ -2285,8 +2285,7 @@ static int hinic_add_del_ntuple_filter(struct rte_eth_dev *dev,
 			case RTE_ETHER_TYPE_SLOW:
 				(void)hinic_clear_fdir_tcam(nic_dev->hwdev,
 								TCAM_PKT_LACP);
-				PMD_DRV_LOG(INFO,
-					"Del lacp tcam succeed");
+				PMD_DRV_LOG(INFO, "Del lacp tcam succeed");
 				break;
 			default:
 				break;
@@ -2935,7 +2934,7 @@ static int hinic_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
 		}
 		break;
 	default:
-		PMD_DRV_LOG(WARNING, "Filter type (%d) not supported",
+		PMD_DRV_LOG(WARNING, "Filter type (%d) is not supported",
 			filter_type);
 		ret = -EINVAL;
 		break;
-- 
1.8.3.1


      parent reply	other threads:[~2020-04-01  9:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01  9:29 [dpdk-dev] [PATCH v3 0/2] bug fixes Xiaoyun wang
2020-04-01  9:30 ` [dpdk-dev] [PATCH v3 1/2] net/hinic/base: fix FW hotactive problem Xiaoyun wang
2020-04-01  9:28   ` Kevin Traynor
2020-04-03 17:24   ` Ferruh Yigit
2020-04-10  8:40     ` Wangxiaoyun (Cloud)
2020-04-01  9:30 ` Xiaoyun wang [this message]

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=2f02499e5f83a09788f67022a7dc59b4b7a685cf.1585731196.git.cloud.wangxiaoyun@huawei.com \
    --to=cloud.wangxiaoyun@huawei.com \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=luoxianjun@huawei.com \
    --cc=luoxingyu@huawei.com \
    --cc=shahar.belkar@huawei.com \
    --cc=xuanziyang2@huawei.com \
    --cc=yin.yinshi@huawei.com \
    --cc=zhouguoyang@huawei.com \
    /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).