[dpdk-dev] [PATCH v3] hash: added a new API to hash to query key id

Aaron Conole aconole at redhat.com
Mon Nov 25 19:10:41 CET 2019


Thomas Monjalon <thomas at monjalon.net> writes:

>> From: Aaron Conole <aconole at redhat.com>
>> > -	if (!service_valid(id))
>> > +	if (id >= RTE_SERVICE_NUM_MAX || !service_valid(id))
>
> Why not adding this check in service_valid()?

I think the best fix is to use SERVICE_VALID_GET_OR_ERR_RET() in these
places.  For this, I at least want to try and show that there aren't any
further errors.  And my test loop has been running for a while now
without any more errors or segfaults, so I guess it's okay to build a
proper patch.



More information about the dev mailing list