net/hns3: refactor converting descriptor error
authorLijun Ou <oulijun@huawei.com>
Fri, 22 Jan 2021 10:18:41 +0000 (18:18 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:11 +0000 (18:16 +0100)
commit040c4fb8cec4953939f435b3f984ed0e2d5120b1
treea43af9704a48b3c3fb0891bf1e539aab35bc0bd4
parent86c551d1d8d28af3b6bf8d685b3e7efaa6c49e3a
net/hns3: refactor converting descriptor error

Use errno array instead of switch-case for refactor
the hns3_cmd_convert_err_code function.

Besides, we add a type for ROH(RDMA Over HCCS) check
cmdq return error in Kunpeng930 NIC hardware.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
drivers/net/hns3/hns3_cmd.c
drivers/net/hns3/hns3_cmd.h