diff options
author | Salil Mehta | 2017-12-14 19:03:06 +0100 |
---|---|---|
committer | David S. Miller | 2017-12-15 16:55:34 +0100 |
commit | 424eb834a9be49273c4b32d0d6395dfdbe768a1a (patch) | |
tree | 952b4bdab1b27d9197b4d2c8cda5ec9cfcb72f27 /drivers/net/ethernet/hisilicon/hns3/hnae3.h | |
parent | net: hns3: Add HNS3 VF driver to kernel build framework (diff) | |
download | kernel-qcow2-linux-424eb834a9be49273c4b32d0d6395dfdbe768a1a.tar.gz kernel-qcow2-linux-424eb834a9be49273c4b32d0d6395dfdbe768a1a.tar.xz kernel-qcow2-linux-424eb834a9be49273c4b32d0d6395dfdbe768a1a.zip |
net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC
Most of the NAPI handling interface, skb buffer management,
management of the RX/TX descriptors, ethool interface etc.
has quite a bit of code which is common to VF and PF driver.
This patch makes the exisitng PF's HNS3 ENET driver as the
common ENET driver for both Virtual & Physical Function. This
will help in reduction of redundancy and better management of
code.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: lipeng <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hnae3.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hnae3.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index 67c59e1039f2..a9e2b32834c5 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -452,9 +452,10 @@ struct hnae3_unic_private_info { struct hnae3_queue **tqp; /* array base of all TQPs of this instance */ }; -#define HNAE3_SUPPORT_MAC_LOOPBACK 1 -#define HNAE3_SUPPORT_PHY_LOOPBACK 2 -#define HNAE3_SUPPORT_SERDES_LOOPBACK 4 +#define HNAE3_SUPPORT_MAC_LOOPBACK BIT(0) +#define HNAE3_SUPPORT_PHY_LOOPBACK BIT(1) +#define HNAE3_SUPPORT_SERDES_LOOPBACK BIT(2) +#define HNAE3_SUPPORT_VF BIT(3) struct hnae3_handle { struct hnae3_client *client; |