[PATCH v1 3/3] examples/l3fwd-power: enable PMD power mgmt on Arm

Stephen Hemminger stephen at networkplumber.org
Fri Oct 21 00:09:37 CEST 2022


On Thu, 25 Aug 2022 14:42:51 +0800
Feifei Wang <feifei.wang2 at arm.com> wrote:

> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> index 887c6eae3f..2bd0d700f0 100644
> --- a/examples/l3fwd-power/main.c
> +++ b/examples/l3fwd-power/main.c
> @@ -432,8 +432,16 @@ static void
>  signal_exit_now(int sigtype)
>  {
>  
> -	if (sigtype == SIGINT)
> +	if (sigtype == SIGINT) {
> +#if defined(RTE_ARCH_ARM64)
> +	/**
> +	 * wake_up api does not need input parameter on Arm,
> +	 * so 0 is meaningless here.
> +	 */
> +		rte_power_monitor_wakeup(0);
> +#endif
>  		quit_signal = true;
> +	}
>  

This method is problematic. There is no guarantee that power
monitor is async signal safe.



More information about the dev mailing list