eventdev: set error code in port link/unlink functions
authorGage Eads <gage.eads@intel.com>
Tue, 14 Nov 2017 22:44:10 +0000 (16:44 -0600)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Fri, 19 Jan 2018 15:09:56 +0000 (16:09 +0100)
commitc75f7897ea35aeb5fe8e2937733a071ea9304b99
tree46e23b7efaad0a09c37cbc1f89ca81ab7c7dc5ca
parent1ffee690eaa10b1b50deb230755ea4ceaa373e0f
eventdev: set error code in port link/unlink functions

The return value for rte_event_port_{link, unlink}() is defined as the
"number of {links, unlinks} actually established." However, the eventdev
layer's error checking returns negative error values. This commit aligns
the eventdev code with the API definition by having it set rte_errno and
return 0 if it detects an error.

Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
lib/librte_eventdev/rte_eventdev.c
lib/librte_eventdev/rte_eventdev_pmd.h