net/hns3: replace special vport ids with macros
authorChengchang Tang <tangchengchang@huawei.com>
Fri, 22 May 2020 09:21:14 +0000 (17:21 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 28 May 2020 15:57:07 +0000 (17:57 +0200)
commite7eb703f8b7ef238459e4209c49db8ed12fccbae
tree0b15be2477c1d268f597b76b0c17e55cb5c3e2e6
parentc9da9d4183821d92e2bca63e7fe22823366adabf
net/hns3: replace special vport ids with macros

In hns3 PMD driver, the vport id 0 denote PF, and the vport id 1 denote
the first VF device of the port.

This patch adds two macros named HNS3_PF_FUNC_ID and
HNS3_1ST_VF_FUNC_ID, and replaces this two numbers to improve code
readability.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev.h