DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] small changes
@ 2015-04-08 17:37 Stephen Hemminger
  2015-04-08 17:37 ` [dpdk-dev] [PATCH 1/2] enic: silence log message Stephen Hemminger
  2015-04-08 17:37 ` [dpdk-dev] [PATCH 2/2] tools: fix comment in bind script Stephen Hemminger
  0 siblings, 2 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-04-08 17:37 UTC (permalink / raw)
  To: dev

These are trivial patches found by review

Stephen Hemminger (2):
  enic: silence log message
  tools: fix comment in bind script

 lib/librte_pmd_enic/enic_main.c | 2 --
 tools/dpdk_nic_bind.py          | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 1/2] enic: silence log message
  2015-04-08 17:37 [dpdk-dev] [PATCH 0/2] small changes Stephen Hemminger
@ 2015-04-08 17:37 ` Stephen Hemminger
  2015-05-19 10:08   ` Bruce Richardson
  2015-07-30 17:03   ` [dpdk-dev] [PATCH v2] enic: silence log message unless debug enabled Stephen Hemminger
  2015-04-08 17:37 ` [dpdk-dev] [PATCH 2/2] tools: fix comment in bind script Stephen Hemminger
  1 sibling, 2 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-04-08 17:37 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

Silence is normal. drivers should speak only when spoken to and not
be chatty.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_pmd_enic/enic_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c
index 0892b3e..508621e 100644
--- a/lib/librte_pmd_enic/enic_main.c
+++ b/lib/librte_pmd_enic/enic_main.c
@@ -1048,8 +1048,6 @@ int enic_probe(struct enic *enic)
 	struct rte_pci_device *pdev = enic->pdev;
 	int err = -1;
 
-	dev_debug(enic, " Initializing ENIC PMD version %s\n", DRV_VERSION);
-
 	enic->bar0.vaddr = (void *)pdev->mem_resource[0].addr;
 	enic->bar0.len = pdev->mem_resource[0].len;
 
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 2/2] tools: fix comment in bind script
  2015-04-08 17:37 [dpdk-dev] [PATCH 0/2] small changes Stephen Hemminger
  2015-04-08 17:37 ` [dpdk-dev] [PATCH 1/2] enic: silence log message Stephen Hemminger
@ 2015-04-08 17:37 ` Stephen Hemminger
  2015-04-15  9:43   ` Bruce Richardson
  1 sibling, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2015-04-08 17:37 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

The function documentation was obviously copied and not updated.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 tools/dpdk_nic_bind.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py
index 8523f82..b7bd877 100755
--- a/tools/dpdk_nic_bind.py
+++ b/tools/dpdk_nic_bind.py
@@ -391,7 +391,7 @@ def unbind_all(dev_list, force=False):
         unbind_one(d, force)
 
 def bind_all(dev_list, driver, force=False):
-    """Unbind method, takes a list of device locations"""
+    """Bind method, takes a list of device locations"""
     global devices
 
     dev_list = map(dev_id_from_dev_name, dev_list)
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] tools: fix comment in bind script
  2015-04-08 17:37 ` [dpdk-dev] [PATCH 2/2] tools: fix comment in bind script Stephen Hemminger
@ 2015-04-15  9:43   ` Bruce Richardson
  2015-08-03 16:38     ` Thomas Monjalon
  0 siblings, 1 reply; 11+ messages in thread
From: Bruce Richardson @ 2015-04-15  9:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Stephen Hemminger

On Wed, Apr 08, 2015 at 10:37:50AM -0700, Stephen Hemminger wrote:
> From: Stephen Hemminger <shemming@brocade.com>
> 
> The function documentation was obviously copied and not updated.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

> ---
>  tools/dpdk_nic_bind.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py
> index 8523f82..b7bd877 100755
> --- a/tools/dpdk_nic_bind.py
> +++ b/tools/dpdk_nic_bind.py
> @@ -391,7 +391,7 @@ def unbind_all(dev_list, force=False):
>          unbind_one(d, force)
>  
>  def bind_all(dev_list, driver, force=False):
> -    """Unbind method, takes a list of device locations"""
> +    """Bind method, takes a list of device locations"""
>      global devices
>  
>      dev_list = map(dev_id_from_dev_name, dev_list)
> -- 
> 2.1.4
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] enic: silence log message
  2015-04-08 17:37 ` [dpdk-dev] [PATCH 1/2] enic: silence log message Stephen Hemminger
@ 2015-05-19 10:08   ` Bruce Richardson
  2015-05-20 16:30     ` Sujith Sankar (ssujith)
  2015-07-30 17:03   ` [dpdk-dev] [PATCH v2] enic: silence log message unless debug enabled Stephen Hemminger
  1 sibling, 1 reply; 11+ messages in thread
From: Bruce Richardson @ 2015-05-19 10:08 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Stephen Hemminger

On Wed, Apr 08, 2015 at 10:37:49AM -0700, Stephen Hemminger wrote:
> From: Stephen Hemminger <shemming@brocade.com>
> 
> Silence is normal. drivers should speak only when spoken to and not
> be chatty.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

> ---
>  lib/librte_pmd_enic/enic_main.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c
> index 0892b3e..508621e 100644
> --- a/lib/librte_pmd_enic/enic_main.c
> +++ b/lib/librte_pmd_enic/enic_main.c
> @@ -1048,8 +1048,6 @@ int enic_probe(struct enic *enic)
>  	struct rte_pci_device *pdev = enic->pdev;
>  	int err = -1;
>  
> -	dev_debug(enic, " Initializing ENIC PMD version %s\n", DRV_VERSION);
> -
>  	enic->bar0.vaddr = (void *)pdev->mem_resource[0].addr;
>  	enic->bar0.len = pdev->mem_resource[0].len;
>  
> -- 
> 2.1.4
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] enic: silence log message
  2015-05-19 10:08   ` Bruce Richardson
@ 2015-05-20 16:30     ` Sujith Sankar (ssujith)
  2015-05-20 17:47       ` Stephen Hemminger
  0 siblings, 1 reply; 11+ messages in thread
From: Sujith Sankar (ssujith) @ 2015-05-20 16:30 UTC (permalink / raw)
  To: Bruce Richardson, Stephen Hemminger; +Cc: dev, Stephen Hemminger



On 19/05/15 3:38 pm, "Bruce Richardson" <bruce.richardson@intel.com> wrote:

>On Wed, Apr 08, 2015 at 10:37:49AM -0700, Stephen Hemminger wrote:
>> From: Stephen Hemminger <shemming@brocade.com>
>> 
>> Silence is normal. drivers should speak only when spoken to and not
>> be chatty.
>> 
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
>Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
>> ---
>>  lib/librte_pmd_enic/enic_main.c | 2 --
>>  1 file changed, 2 deletions(-)
>> 
>> diff --git a/lib/librte_pmd_enic/enic_main.c
>>b/lib/librte_pmd_enic/enic_main.c
>> index 0892b3e..508621e 100644
>> --- a/lib/librte_pmd_enic/enic_main.c
>> +++ b/lib/librte_pmd_enic/enic_main.c
>> @@ -1048,8 +1048,6 @@ int enic_probe(struct enic *enic)
>>  	struct rte_pci_device *pdev = enic->pdev;
>>  	int err = -1;
>>  
>> -	dev_debug(enic, " Initializing ENIC PMD version %s\n", DRV_VERSION);
>> -

It would be good to retain this under RTE_LIBRTE_ENIC_DEBUG.

>>  	enic->bar0.vaddr = (void *)pdev->mem_resource[0].addr;
>>  	enic->bar0.len = pdev->mem_resource[0].len;
>>  
>> -- 
>> 2.1.4
>> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] enic: silence log message
  2015-05-20 16:30     ` Sujith Sankar (ssujith)
@ 2015-05-20 17:47       ` Stephen Hemminger
  2015-05-21  1:52         ` Sujith Sankar (ssujith)
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2015-05-20 17:47 UTC (permalink / raw)
  To: Sujith Sankar (ssujith); +Cc: dev, Stephen Hemminger

Other drivers are quiet, why does this one need to be noisy

On Wed, May 20, 2015 at 9:30 AM, Sujith Sankar (ssujith) <ssujith@cisco.com>
wrote:

>
>
> On 19/05/15 3:38 pm, "Bruce Richardson" <bruce.richardson@intel.com>
> wrote:
>
> >On Wed, Apr 08, 2015 at 10:37:49AM -0700, Stephen Hemminger wrote:
> >> From: Stephen Hemminger <shemming@brocade.com>
> >>
> >> Silence is normal. drivers should speak only when spoken to and not
> >> be chatty.
> >>
> >> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >
> >Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> >
> >> ---
> >>  lib/librte_pmd_enic/enic_main.c | 2 --
> >>  1 file changed, 2 deletions(-)
> >>
> >> diff --git a/lib/librte_pmd_enic/enic_main.c
> >>b/lib/librte_pmd_enic/enic_main.c
> >> index 0892b3e..508621e 100644
> >> --- a/lib/librte_pmd_enic/enic_main.c
> >> +++ b/lib/librte_pmd_enic/enic_main.c
> >> @@ -1048,8 +1048,6 @@ int enic_probe(struct enic *enic)
> >>      struct rte_pci_device *pdev = enic->pdev;
> >>      int err = -1;
> >>
> >> -    dev_debug(enic, " Initializing ENIC PMD version %s\n",
> DRV_VERSION);
> >> -
>
> It would be good to retain this under RTE_LIBRTE_ENIC_DEBUG.
>
> >>      enic->bar0.vaddr = (void *)pdev->mem_resource[0].addr;
> >>      enic->bar0.len = pdev->mem_resource[0].len;
> >>
> >> --
> >> 2.1.4
> >>
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] enic: silence log message
  2015-05-20 17:47       ` Stephen Hemminger
@ 2015-05-21  1:52         ` Sujith Sankar (ssujith)
  0 siblings, 0 replies; 11+ messages in thread
From: Sujith Sankar (ssujith) @ 2015-05-21  1:52 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Stephen Hemminger


Stephen,
The enic debug flag is off by default.  So it is going to print the
version only if the user wants it to.
Isn¹t that fine?

Thanks,
-Sujith 
From:  Stephen Hemminger <stephen@networkplumber.org>
Date:  Wednesday, 20 May 2015 11:17 pm
To:  "Sujith Sankar (ssujith)" <ssujith@cisco.com>
Cc:  Bruce Richardson <bruce.richardson@intel.com>, "dev@dpdk.org"
<dev@dpdk.org>, Stephen Hemminger <shemming@brocade.com>
Subject:  Re: [dpdk-dev] [PATCH 1/2] enic: silence log message


Other drivers are quiet, why does this one need to be noisy


On Wed, May 20, 2015 at 9:30 AM, Sujith Sankar (ssujith)
<ssujith@cisco.com> wrote:



On 19/05/15 3:38 pm, "Bruce Richardson" <bruce.richardson@intel.com> wrote:

>On Wed, Apr 08, 2015 at 10:37:49AM -0700, Stephen Hemminger wrote:
>> From: Stephen Hemminger <shemming@brocade.com>
>>
>> Silence is normal. drivers should speak only when spoken to and not
>> be chatty.
>>
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
>Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
>> ---
>>  lib/librte_pmd_enic/enic_main.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/lib/librte_pmd_enic/enic_main.c
>>b/lib/librte_pmd_enic/enic_main.c
>> index 0892b3e..508621e 100644
>> --- a/lib/librte_pmd_enic/enic_main.c
>> +++ b/lib/librte_pmd_enic/enic_main.c
>> @@ -1048,8 +1048,6 @@ int enic_probe(struct enic *enic)
>>      struct rte_pci_device *pdev = enic->pdev;
>>      int err = -1;
>>
>> -    dev_debug(enic, " Initializing ENIC PMD version %s\n",
>>DRV_VERSION);
>> -

It would be good to retain this under RTE_LIBRTE_ENIC_DEBUG.

>>      enic->bar0.vaddr = (void *)pdev->mem_resource[0].addr;
>>      enic->bar0.len = pdev->mem_resource[0].len;
>>
>> --
>> 2.1.4
>>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH v2] enic: silence log message unless debug enabled
  2015-04-08 17:37 ` [dpdk-dev] [PATCH 1/2] enic: silence log message Stephen Hemminger
  2015-05-19 10:08   ` Bruce Richardson
@ 2015-07-30 17:03   ` Stephen Hemminger
  2015-07-30 19:18     ` Thomas Monjalon
  1 sibling, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2015-07-30 17:03 UTC (permalink / raw)
  To: ssujith; +Cc: dev

This blocks the annoying ENIC driver initialization message unless
debug is enabled. Drivers should speak only when spoken to and not
be chatty.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/enic/enic_compat.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h
index f3598ed..94656c8 100644
--- a/drivers/net/enic/enic_compat.h
+++ b/drivers/net/enic/enic_compat.h
@@ -82,7 +82,11 @@
 #define dev_err(x, args...) dev_printk(ERR, args)
 #define dev_info(x, args...) dev_printk(INFO,  args)
 #define dev_warning(x, args...) dev_printk(WARNING, args)
+#ifdef RTE_LIBRTE_ENIC_DEBUG
 #define dev_debug(x, args...) dev_printk(DEBUG, args)
+#else
+#define dev_debug(x, args...) do { } while(0)
+#endif
 
 #define __le16 u16
 #define __le32 u32
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH v2] enic: silence log message unless debug enabled
  2015-07-30 17:03   ` [dpdk-dev] [PATCH v2] enic: silence log message unless debug enabled Stephen Hemminger
@ 2015-07-30 19:18     ` Thomas Monjalon
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2015-07-30 19:18 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

2015-07-30 10:03, Stephen Hemminger:
> --- a/drivers/net/enic/enic_compat.h
> +++ b/drivers/net/enic/enic_compat.h
> @@ -82,7 +82,11 @@
>  #define dev_err(x, args...) dev_printk(ERR, args)
>  #define dev_info(x, args...) dev_printk(INFO,  args)
>  #define dev_warning(x, args...) dev_printk(WARNING, args)
> +#ifdef RTE_LIBRTE_ENIC_DEBUG
>  #define dev_debug(x, args...) dev_printk(DEBUG, args)
> +#else
> +#define dev_debug(x, args...) do { } while(0)
> +#endif

I don't understand why it is needed:
dev_debug won't print anything if the log level is higher than DEBUG.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] tools: fix comment in bind script
  2015-04-15  9:43   ` Bruce Richardson
@ 2015-08-03 16:38     ` Thomas Monjalon
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2015-08-03 16:38 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Stephen Hemminger

> > The function documentation was obviously copied and not updated.
> > 
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks

Patch 1/2 has been rejected.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-08-03 16:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08 17:37 [dpdk-dev] [PATCH 0/2] small changes Stephen Hemminger
2015-04-08 17:37 ` [dpdk-dev] [PATCH 1/2] enic: silence log message Stephen Hemminger
2015-05-19 10:08   ` Bruce Richardson
2015-05-20 16:30     ` Sujith Sankar (ssujith)
2015-05-20 17:47       ` Stephen Hemminger
2015-05-21  1:52         ` Sujith Sankar (ssujith)
2015-07-30 17:03   ` [dpdk-dev] [PATCH v2] enic: silence log message unless debug enabled Stephen Hemminger
2015-07-30 19:18     ` Thomas Monjalon
2015-04-08 17:37 ` [dpdk-dev] [PATCH 2/2] tools: fix comment in bind script Stephen Hemminger
2015-04-15  9:43   ` Bruce Richardson
2015-08-03 16:38     ` Thomas Monjalon

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).