examples/kni: add CR character at print log

Message ID 20220307090505.6598-1-laitianli@tom.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series examples/kni: add CR character at print log |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Tianli Lai March 7, 2022, 9:05 a.m. UTC
  add CR character at print link state information

Signed-off-by: Tianli Lai <laitianli@tom.com>
---
 examples/kni/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit March 7, 2022, 2:52 p.m. UTC | #1
On 3/7/2022 9:05 AM, Tianli Lai wrote:
> add CR character at print link state information
> 
> Signed-off-by: Tianli Lai <laitianli@tom.com>
> ---
>   examples/kni/main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/kni/main.c b/examples/kni/main.c
> index f5b20a7b62..e99ef5c38a 100644
> --- a/examples/kni/main.c
> +++ b/examples/kni/main.c
> @@ -719,7 +719,7 @@ log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link)
>   
>   	rte_eth_link_to_str(link_status_text, sizeof(link_status_text), link);
>   	if (prev != link->link_status)
> -		RTE_LOG(INFO, APP, "%s NIC %s",
> +		RTE_LOG(INFO, APP, "%s NIC %s\n",
>   			rte_kni_get_name(kni),
>   			link_status_text);
>   }

Fixes: db4e81351fb8 ("examples: use new link status print format")
Cc: stable@dpdk.org

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Thomas Monjalon March 8, 2022, 1:29 p.m. UTC | #2
07/03/2022 15:52, Ferruh Yigit:
> On 3/7/2022 9:05 AM, Tianli Lai wrote:
> > add CR character at print link state information
> > 
> > Signed-off-by: Tianli Lai <laitianli@tom.com>
> > ---
> >   examples/kni/main.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/examples/kni/main.c b/examples/kni/main.c
> > index f5b20a7b62..e99ef5c38a 100644
> > --- a/examples/kni/main.c
> > +++ b/examples/kni/main.c
> > @@ -719,7 +719,7 @@ log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link)
> >   
> >   	rte_eth_link_to_str(link_status_text, sizeof(link_status_text), link);
> >   	if (prev != link->link_status)
> > -		RTE_LOG(INFO, APP, "%s NIC %s",
> > +		RTE_LOG(INFO, APP, "%s NIC %s\n",
> >   			rte_kni_get_name(kni),
> >   			link_status_text);
> >   }
> 
> Fixes: db4e81351fb8 ("examples: use new link status print format")
> Cc: stable@dpdk.org
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied with title "examples/kni: add missing trailing newline in log"
  

Patch

diff --git a/examples/kni/main.c b/examples/kni/main.c
index f5b20a7b62..e99ef5c38a 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -719,7 +719,7 @@  log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link)
 
 	rte_eth_link_to_str(link_status_text, sizeof(link_status_text), link);
 	if (prev != link->link_status)
-		RTE_LOG(INFO, APP, "%s NIC %s",
+		RTE_LOG(INFO, APP, "%s NIC %s\n",
 			rte_kni_get_name(kni),
 			link_status_text);
 }