[dpdk-dev] [PATCH V5 5/7] bus: add helper to handle sigbus

Jeff Guo jia.guo at intel.com
Mon Jul 9 07:31:04 CEST 2018


hi, shaopeng

thanks for your review.


On 7/6/2018 11:22 PM, He, Shaopeng wrote:
>> -----Original Message-----
>> From: Guo, Jia
>> Sent: Thursday, July 5, 2018 3:39 PM
>>
>> This patch aim to add a helper to iterate all buses to find the
>> corresponding bus to handle the sigbus error.
>>
> [...]
>
>> +	bus = rte_bus_find(NULL, bus_handle_sigbus, failure_addr);
>> +	/* failed to handle the sigbus, pass the new errno. */
>> +	if (bus && rte_errno == -1)
>> +		return -1;
>> +	else if (!bus)
>> +		ret = 1;
> Change the compare order, code will be a little bit shorter?
> 	if (!bus)
> 		ret = 1
> 	else if (rte_errno == -1)
> 		return -1;
>
> [...]

make sense.

> Acked-by: Shaopeng He <shaopeng.he at intel.com>
>



More information about the dev mailing list