net/bnxt: fix endianness in ring macros
authorLance Richardson <lance.richardson@broadcom.com>
Sun, 2 Jun 2019 17:42:36 +0000 (13:42 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 13 Jun 2019 14:54:29 +0000 (23:54 +0900)
commit3858965c3a266c2d9350402cf4f2f420de686a62
tree12cfd62c275a4bc436f3a951d5b20ad2ebf74f2f
parent9aa0afd1e9c61f95d1fb4586b09b6e47be09233d
net/bnxt: fix endianness in ring macros

Descriptor fields in CP ring are in little-endian form, convert
to CPU endian before performing arithmetic operations.

Also use more general comparison when checking for ring
index wrap.

Fixes: f2a768d4d186 ("net/bnxt: add completion ring")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_cpr.h