bus/pci: harmonize return value of config read
authorLuca Boccassi <bluca@debian.org>
Tue, 28 Aug 2018 10:12:39 +0000 (11:12 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 28 Oct 2018 23:32:14 +0000 (00:32 +0100)
commite8d435f1f3a16b02011f604581c80d09fea3a44f
tree62ec39f87c38ec4dc7a93f9bcaee0946dcea6b4a
parent075b182b54ce90e0a22810e67cf3204e22673bac
bus/pci: harmonize return value of config read

On Linux, rte_pci_read_config on success returns the number of read
bytes, but on BSD it returns 0.
Document the return values, and have BSD behave as Linux does.

At least one case (bnx2x PMD) treats 0 as an error, so the change
makes sense also for that.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/bus/pci/bsd/pci.c
drivers/bus/pci/rte_bus_pci.h