rawdev: allow devices to skip extra memory allocation
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 2 Jul 2019 14:12:22 +0000 (15:12 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 4 Jul 2019 07:33:59 +0000 (09:33 +0200)
commita951e147ea95b26815c72eb710e0b2b8e5d85e40
treee6fea9cde9b6abd908e2f3cbc25a18ebe82cad37
parent85cf6dc3a5dcb5efa6ed78bd6baa0be262674760
rawdev: allow devices to skip extra memory allocation

Some device drivers want to allocate their own private memory, and should
be allowed to do so. Therefore skip memory allocation and associated error
checks if zero-length private memory is requested.

While adjusting the code for new indent level, fix incorrect error
message.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
lib/librte_rawdev/rte_rawdev.c
lib/librte_rawdev/rte_rawdev_pmd.h