[dpdk-dev] [PATCH v2] lib/librte_timer:fix corruption with reset
Stephen Hemminger
stephen at networkplumber.org
Wed Jul 8 17:08:48 CEST 2020
On Wed, 8 Jul 2020 10:06:26 +0500
Sarosh Arif <sarosh.arif at emumba.com> wrote:
> rte_timer_stop_sync(struct rte_timer *tim)
> {
> + struct rte_timer_data *timer_data;
> + TIMER_DATA_VALID_GET_OR_ERR_RET(default_data_id, timer_data, -EINVAL);
> + unsigned int lcore_id = rte_lcore_id();
This mixing code and declarations. since the macro has a return statement.
Maybe:
struct rte_timer_data *timer_data;
unsigned int lcore_id = rte_lcore_id();
TIMER_DATA_VALID_GET_OR_ERR_RET(default_data_id, timer_data, -EINVAL);
More information about the dev
mailing list