diff mbox series

drivers/net: fix log type string

Message ID 20181009115238.91288-1-ferruh.yigit@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series drivers/net: fix log type string | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ferruh Yigit Oct. 9, 2018, 11:52 a.m. UTC
Syntax for log type string is "pmd.<subsystem>.<driver>[.<pmd_local>]"

Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type")
Fixes: d7f4562ab10a ("net/bonding: convert to dynamic logging")
Fixes: 6086ab3bb3d2 ("net/vdev_netvsc: introduce Hyper-V platform driver")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bnxt/bnxt_ethdev.c         | 2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
 drivers/net/vdev_netvsc/vdev_netvsc.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Stephen Hemminger Oct. 9, 2018, 3:07 p.m. UTC | #1
On Tue,  9 Oct 2018 12:52:38 +0100
Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> Syntax for log type string is "pmd.<subsystem>.<driver>[.<pmd_local>]"
> 
> Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type")
> Fixes: d7f4562ab10a ("net/bonding: convert to dynamic logging")
> Fixes: 6086ab3bb3d2 ("net/vdev_netvsc: introduce Hyper-V platform driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  drivers/net/bnxt/bnxt_ethdev.c         | 2 +-
>  drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
>  drivers/net/vdev_netvsc/vdev_netvsc.c  | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 88e026c7d..858e65d00 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -3569,7 +3569,7 @@ bool is_bnxt_supported(struct rte_eth_dev *dev)
>  
>  RTE_INIT(bnxt_init_log)
>  {
> -	bnxt_logtype_driver = rte_log_register("pmd.bnxt.driver");
> +	bnxt_logtype_driver = rte_log_register("pmd.net.bnxt.driver");
>  	if (bnxt_logtype_driver >= 0)
>  		rte_log_set_level(bnxt_logtype_driver, RTE_LOG_INFO);
>  }
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index a7b592eed..544e0cde4 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -3598,7 +3598,7 @@ int bond_logtype;
>  
>  RTE_INIT(bond_init_log)
>  {
> -	bond_logtype = rte_log_register("pmd.net.bon");
> +	bond_logtype = rte_log_register("pmd.net.bond");
>  	if (bond_logtype >= 0)
>  		rte_log_set_level(bond_logtype, RTE_LOG_NOTICE);
>  }
> diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
> index 48717f2f0..16303ef5e 100644
> --- a/drivers/net/vdev_netvsc/vdev_netvsc.c
> +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
> @@ -789,7 +789,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_vdev_netvsc,
>  /** Initialize driver log type. */
>  RTE_INIT(vdev_netvsc_init_log)
>  {
> -	vdev_netvsc_logtype = rte_log_register("pmd.vdev_netvsc");
> +	vdev_netvsc_logtype = rte_log_register("pmd.net.vdev_netvsc");
>  	if (vdev_netvsc_logtype >= 0)
>  		rte_log_set_level(vdev_netvsc_logtype, RTE_LOG_NOTICE);
>  }

Thanks for making drivers consistent.
Did you check the documentation?

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit Oct. 9, 2018, 4:31 p.m. UTC | #2
On 10/9/2018 4:07 PM, Stephen Hemminger wrote:
> On Tue,  9 Oct 2018 12:52:38 +0100
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
>> Syntax for log type string is "pmd.<subsystem>.<driver>[.<pmd_local>]"
>>
>> Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type")
>> Fixes: d7f4562ab10a ("net/bonding: convert to dynamic logging")
>> Fixes: 6086ab3bb3d2 ("net/vdev_netvsc: introduce Hyper-V platform driver")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>>  drivers/net/bnxt/bnxt_ethdev.c         | 2 +-
>>  drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
>>  drivers/net/vdev_netvsc/vdev_netvsc.c  | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
>> index 88e026c7d..858e65d00 100644
>> --- a/drivers/net/bnxt/bnxt_ethdev.c
>> +++ b/drivers/net/bnxt/bnxt_ethdev.c
>> @@ -3569,7 +3569,7 @@ bool is_bnxt_supported(struct rte_eth_dev *dev)
>>  
>>  RTE_INIT(bnxt_init_log)
>>  {
>> -	bnxt_logtype_driver = rte_log_register("pmd.bnxt.driver");
>> +	bnxt_logtype_driver = rte_log_register("pmd.net.bnxt.driver");
>>  	if (bnxt_logtype_driver >= 0)
>>  		rte_log_set_level(bnxt_logtype_driver, RTE_LOG_INFO);
>>  }
>> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
>> index a7b592eed..544e0cde4 100644
>> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
>> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
>> @@ -3598,7 +3598,7 @@ int bond_logtype;
>>  
>>  RTE_INIT(bond_init_log)
>>  {
>> -	bond_logtype = rte_log_register("pmd.net.bon");
>> +	bond_logtype = rte_log_register("pmd.net.bond");
>>  	if (bond_logtype >= 0)
>>  		rte_log_set_level(bond_logtype, RTE_LOG_NOTICE);
>>  }
>> diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
>> index 48717f2f0..16303ef5e 100644
>> --- a/drivers/net/vdev_netvsc/vdev_netvsc.c
>> +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
>> @@ -789,7 +789,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_vdev_netvsc,
>>  /** Initialize driver log type. */
>>  RTE_INIT(vdev_netvsc_init_log)
>>  {
>> -	vdev_netvsc_logtype = rte_log_register("pmd.vdev_netvsc");
>> +	vdev_netvsc_logtype = rte_log_register("pmd.net.vdev_netvsc");
>>  	if (vdev_netvsc_logtype >= 0)
>>  		rte_log_set_level(vdev_netvsc_logtype, RTE_LOG_NOTICE);
>>  }
> 
> Thanks for making drivers consistent.
> Did you check the documentation?

Description seems correct:
http://doc.dpdk.org/guides/contributing/coding_style.html#dynamic-logging

But "1.9.1. Specializations" needs an update, I will send a new version.

> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 88e026c7d..858e65d00 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3569,7 +3569,7 @@  bool is_bnxt_supported(struct rte_eth_dev *dev)
 
 RTE_INIT(bnxt_init_log)
 {
-	bnxt_logtype_driver = rte_log_register("pmd.bnxt.driver");
+	bnxt_logtype_driver = rte_log_register("pmd.net.bnxt.driver");
 	if (bnxt_logtype_driver >= 0)
 		rte_log_set_level(bnxt_logtype_driver, RTE_LOG_INFO);
 }
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index a7b592eed..544e0cde4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3598,7 +3598,7 @@  int bond_logtype;
 
 RTE_INIT(bond_init_log)
 {
-	bond_logtype = rte_log_register("pmd.net.bon");
+	bond_logtype = rte_log_register("pmd.net.bond");
 	if (bond_logtype >= 0)
 		rte_log_set_level(bond_logtype, RTE_LOG_NOTICE);
 }
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 48717f2f0..16303ef5e 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -789,7 +789,7 @@  RTE_PMD_REGISTER_PARAM_STRING(net_vdev_netvsc,
 /** Initialize driver log type. */
 RTE_INIT(vdev_netvsc_init_log)
 {
-	vdev_netvsc_logtype = rte_log_register("pmd.vdev_netvsc");
+	vdev_netvsc_logtype = rte_log_register("pmd.net.vdev_netvsc");
 	if (vdev_netvsc_logtype >= 0)
 		rte_log_set_level(vdev_netvsc_logtype, RTE_LOG_NOTICE);
 }