examples/l3fwd-power: fix prog exit on ini pwr lib

Message ID 1541599750-18432-1-git-send-email-motih@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series examples/l3fwd-power: fix prog exit on ini pwr lib |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Moti Haimovsky Nov. 7, 2018, 2:09 p.m. UTC
  This patch replaces the rte_exit routine with error printing when
init_power_library() fails and by that restores the previous behavior
of the program (which was to issue an error message and continue
working if init_power_library fails). This allows the user to still
experience the Rx interrupts feature of the DPDK demonstrated in
this program.

Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Cc: radu.nicolau@intel.com

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
---
 examples/l3fwd-power/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Hunt, David Nov. 7, 2018, 2:21 p.m. UTC | #1
Hi Mordechay,

On 7/11/2018 2:09 PM, Mordechay Haimovsky wrote:
> This patch replaces the rte_exit routine with error printing when
> init_power_library() fails and by that restores the previous behavior
> of the program (which was to issue an error message and continue
> working if init_power_library fails). This allows the user to still
> experience the Rx interrupts feature of the DPDK demonstrated in
> this program.
>
> Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
> Cc: radu.nicolau@intel.com
>
> Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> ---
>   examples/l3fwd-power/main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> index 0b3f8fe..9c7b315 100644
> --- a/examples/l3fwd-power/main.c
> +++ b/examples/l3fwd-power/main.c
> @@ -1957,7 +1957,7 @@ static int check_ptype(uint16_t portid)
>   		rte_exit(EXIT_FAILURE, "Invalid L3FWD parameters\n");
>   
>   	if (init_power_library())
> -		rte_exit(EXIT_FAILURE, "init_power_library failed\n");
> +		RTE_LOG(ERR, L3FWD_POWER, "init_power_library failed\n");
>   
>   	if (update_lcore_params() < 0)
>   		rte_exit(EXIT_FAILURE, "update_lcore_params failed\n");

Acked-by: David Hunt <david.hunt@intel.com>
  
Thomas Monjalon Nov. 14, 2018, 3:40 a.m. UTC | #2
07/11/2018 15:21, Hunt, David:
> Hi Mordechay,
> 
> On 7/11/2018 2:09 PM, Mordechay Haimovsky wrote:
> > This patch replaces the rte_exit routine with error printing when
> > init_power_library() fails and by that restores the previous behavior
> > of the program (which was to issue an error message and continue
> > working if init_power_library fails). This allows the user to still
> > experience the Rx interrupts feature of the DPDK demonstrated in
> > this program.
> >
> > Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
> > Cc: radu.nicolau@intel.com
> >
> > Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> 
> Acked-by: David Hunt <david.hunt@intel.com>

Applied, thanks
  

Patch

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 0b3f8fe..9c7b315 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1957,7 +1957,7 @@  static int check_ptype(uint16_t portid)
 		rte_exit(EXIT_FAILURE, "Invalid L3FWD parameters\n");
 
 	if (init_power_library())
-		rte_exit(EXIT_FAILURE, "init_power_library failed\n");
+		RTE_LOG(ERR, L3FWD_POWER, "init_power_library failed\n");
 
 	if (update_lcore_params() < 0)
 		rte_exit(EXIT_FAILURE, "update_lcore_params failed\n");