[dpdk-dev] [PATCH v3] rte_delay_us can be replaced with user function

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Sep 26 14:48:37 CEST 2016


2016-09-26 10:35, jozmarti at cisco.com:
> From: Jozef Martiniak <jozmarti at cisco.com>
> 
> When running single-core, some drivers tend to call rte_delay_us for a
> long time, and that is causing packet drops.
> To avoid this, rte_delay_us can be replaced with user-defined delay
> function with:
> 
> void rte_delay_us_callback_register(void(*userfunc)(unsigned));
> 
> When userfunc==rte_delay_us_block build-in blocking delay function is
> restored.
> 
> Signed-off-by: Jozef Martiniak <jozmarti at cisco.com>

Applied, thanks.

Just 2 details (below) were fixed when applying.

> --- a/lib/librte_eal/common/include/generic/rte_cycles.h
> +++ b/lib/librte_eal/common/include/generic/rte_cycles.h
> @@ -180,15 +180,16 @@ rte_get_timer_hz(void)
>  	default: rte_panic("Invalid timer source specified\n");
>  	}
>  }
> -

This blank line should remain.

>  /**
>   * Wait at least us microseconds.
> + * This function can be replaced with user-defined function.
> + * @see rte_delay_us_callback_register
[...]
> + * @param userfunc
> + *   User function which replaces rte_delay_us. rte_delay_us_block restores
> + *   buildin block delay function.

buildin -> builtin


More information about the dev mailing list