ethdev: prevent duplicate event callback
authorE. Scott Daniels <daniels@research.att.com>
Thu, 20 Oct 2016 13:34:41 +0000 (09:34 -0400)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 25 Oct 2016 21:30:23 +0000 (23:30 +0200)
commitdbffbf80e99aad7c7a5ffaf78e750ae69963f9e0
tree139397db47487fb7d1200005a6c7993488e5529a
parent1e975578bc30a84547b62bd682b03f8f08bf3a38
ethdev: prevent duplicate event callback

This change prevents the attempt to add a structure which is
already on the callback list. If a struct with matching
parameters is found on the list, then no action is taken.

Fixes: ac2f69c ("ethdev: fix crash if malloc of user callback fails")

Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
lib/librte_ether/rte_ethdev.c