[dpdk-dev] [dpdk-stable] [PATCH] eal/mp: remove rte_panic and profanity

Thomas Monjalon thomas at monjalon.net
Fri Oct 26 22:41:59 CEST 2018


26/10/2018 16:55, Anatoly Burakov:
> --- a/lib/librte_eal/common/eal_common_proc.c
> +++ b/lib/librte_eal/common/eal_common_proc.c
> +	/*
> +	 * set the alarm before sending message. there are two possible error
> +	 * scenarios to consider here:
> +	 *
> +	 * - if the alarm set fails, we free the memory right there
> +	 * - if the alarm set succeeds but sending message fails, then the alarm
> +	 *   will trigger and clean up the memory
> +	 *
> +	 * Even if the alarm triggers too early (i.e. immediately), we're still
> +	 * holding the lock to pending requests queue, so the interrupt thread
> +	 * will just spin until we release the lock, and either release the
> +	 * memory, or doesn't find any pending requests in the queue because we
> +	 * never added any due to send message failure.
> +	 */
> +	if (rte_eal_alarm_set(ts->tv_sec * 1000000 + ts->tv_nsec / 1000,
> +			      async_reply_handle, pending_req) < 0) {
> +		RTE_LOG(ERR, EAL, "Fail to set alarm for request %s:%s\n",
> +			dst, req->name);
> +		goto fail;
> +	}

ret variable is not set and not initialized.





More information about the dev mailing list