From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9185FA04E7; Mon, 2 Nov 2020 15:39:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 998F6C944; Mon, 2 Nov 2020 15:38:05 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id BE2C7C918 for ; Mon, 2 Nov 2020 15:37:59 +0100 (CET) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CPwW671cyzLsmT for ; Mon, 2 Nov 2020 22:37:54 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Mon, 2 Nov 2020 22:37:48 +0800 From: Lijun Ou To: CC: , Date: Mon, 2 Nov 2020 22:38:19 +0800 Message-ID: <1604327899-60126-9-git-send-email-oulijun@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1604327899-60126-1-git-send-email-oulijun@huawei.com> References: <1604327899-60126-1-git-send-email-oulijun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 8/8] net/hns3: adjust some header files location X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Some header files have included by others. Also, some header files have a header file self-contained error will trigger building warning. As a result, it is unnecessary and move it into the correct location. Beside, here also remove some unused lines. Signed-off-by: Lijun Ou --- drivers/net/hns3/hns3_cmd.c | 15 --------------- drivers/net/hns3/hns3_cmd.h | 2 ++ drivers/net/hns3/hns3_dcb.c | 7 ------- drivers/net/hns3/hns3_dcb.h | 4 ++++ drivers/net/hns3/hns3_ethdev.c | 23 ++++------------------- drivers/net/hns3/hns3_ethdev.h | 5 ----- drivers/net/hns3/hns3_ethdev_vf.c | 21 +-------------------- drivers/net/hns3/hns3_fdir.c | 1 - drivers/net/hns3/hns3_flow.c | 2 -- drivers/net/hns3/hns3_intr.c | 4 ---- drivers/net/hns3/hns3_intr.h | 4 ++++ drivers/net/hns3/hns3_mbx.c | 14 -------------- drivers/net/hns3/hns3_mp.c | 2 -- drivers/net/hns3/hns3_regs.c | 16 ---------------- drivers/net/hns3/hns3_rss.c | 3 --- drivers/net/hns3/hns3_rxtx.c | 13 ------------- drivers/net/hns3/hns3_rxtx.h | 3 +++ drivers/net/hns3/hns3_stats.c | 4 ---- 18 files changed, 18 insertions(+), 125 deletions(-) diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c index 589547c..4f52ed0 100644 --- a/drivers/net/hns3/hns3_cmd.c +++ b/drivers/net/hns3/hns3_cmd.c @@ -2,21 +2,6 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h index 13550b9..194c3a7 100644 --- a/drivers/net/hns3/hns3_cmd.h +++ b/drivers/net/hns3/hns3_cmd.h @@ -5,6 +5,8 @@ #ifndef _HNS3_CMD_H_ #define _HNS3_CMD_H_ +#include + #define HNS3_CMDQ_TX_TIMEOUT 30000 #define HNS3_CMDQ_RX_INVLD_B 0 #define HNS3_CMDQ_RX_OUTVLD_B 1 diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c index e06561c..ab02c87 100644 --- a/drivers/net/hns3/hns3_dcb.c +++ b/drivers/net/hns3/hns3_dcb.c @@ -2,17 +2,10 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include -#include -#include -#include #include -#include #include #include "hns3_logs.h" -#include "hns3_regs.h" #include "hns3_ethdev.h" #include "hns3_dcb.h" diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h index 7ab9093..fee23d9 100644 --- a/drivers/net/hns3/hns3_dcb.h +++ b/drivers/net/hns3/hns3_dcb.h @@ -5,6 +5,10 @@ #ifndef _HNS3_DCB_H_ #define _HNS3_DCB_H_ +#include + +#include "hns3_cmd.h" + #define HNS3_ETHER_MAX_RATE 100000 /* MAC Pause */ diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index dc02af0..ba96724 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2,25 +2,10 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include -#include -#include -#include -#include #include -#include #include -#include #include #include "hns3_ethdev.h" @@ -3450,8 +3435,8 @@ hns3_is_rx_buf_ok(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc, hi_thrd = shared_buf - pf->dv_buf_size; if (tc_num <= NEED_RESERVE_TC_NUM) - hi_thrd = hi_thrd * BUF_RESERVE_PERCENT - / BUF_MAX_PERCENT; + hi_thrd = hi_thrd * BUF_RESERVE_PERCENT / + BUF_MAX_PERCENT; if (tc_num) hi_thrd = hi_thrd / tc_num; @@ -6256,7 +6241,7 @@ static const struct rte_pci_id pci_id_hns3_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_50GE_RDMA) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_100G_RDMA_MACSEC) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_200G_RDMA) }, - { .vendor_id = 0, /* sentinel */ }, + { .vendor_id = 0, }, /* sentinel */ }; static struct rte_pci_driver rte_hns3_pmd = { diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index 531a6cb..63e0c2f 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -6,7 +6,6 @@ #define _HNS3_ETHDEV_H_ #include -#include #include #include "hns3_cmd.h" @@ -792,12 +791,8 @@ struct hns3_adapter { #define HNS3_DEV_PRIVATE_TO_HW(adapter) \ (&((struct hns3_adapter *)adapter)->hw) -#define HNS3_DEV_PRIVATE_TO_ADAPTER(adapter) \ - ((struct hns3_adapter *)adapter) #define HNS3_DEV_PRIVATE_TO_PF(adapter) \ (&((struct hns3_adapter *)adapter)->pf) -#define HNS3VF_DEV_PRIVATE_TO_VF(adapter) \ - (&((struct hns3_adapter *)adapter)->vf) #define HNS3_DEV_HW_TO_ADAPTER(hw) \ container_of(hw, struct hns3_adapter, hw) diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index ca1507a..3111dfb 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2,29 +2,10 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include -#include -#include -#include -#include -#include #include - #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include -#include #include #include @@ -2888,7 +2869,7 @@ eth_hns3vf_pci_remove(struct rte_pci_device *pci_dev) static const struct rte_pci_id pci_id_hns3vf_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_100G_VF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_100G_RDMA_PFC_VF) }, - { .vendor_id = 0, /* sentinel */ }, + { .vendor_id = 0, }, /* sentinel */ }; static struct rte_pci_driver rte_hns3vf_pmd = { diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index e0e9419..857cc94 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -2,7 +2,6 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include #include #include #include diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 72d3745..2fff157 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -2,8 +2,6 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include #include #include #include diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index 2565688..bfd2ba8 100644 --- a/drivers/net/hns3/hns3_intr.c +++ b/drivers/net/hns3/hns3_intr.c @@ -2,15 +2,11 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include #include #include #include #include #include -#include -#include #include "hns3_ethdev.h" #include "hns3_logs.h" diff --git a/drivers/net/hns3/hns3_intr.h b/drivers/net/hns3/hns3_intr.h index 2b802bc..19de1aa 100644 --- a/drivers/net/hns3/hns3_intr.h +++ b/drivers/net/hns3/hns3_intr.h @@ -5,6 +5,10 @@ #ifndef _HNS3_INTR_H_ #define _HNS3_INTR_H_ +#include + +#include "hns3_ethdev.h" + #define HNS3_PPP_MPF_ECC_ERR_INT0_EN 0xFFFFFFFF #define HNS3_PPP_MPF_ECC_ERR_INT0_EN_MASK 0xFFFFFFFF #define HNS3_PPP_MPF_ECC_ERR_INT1_EN 0xFFFFFFFF diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index c522c6d..d2a5db8 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -2,22 +2,8 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include #include "hns3_ethdev.h" #include "hns3_regs.h" diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c index 7e0fc46..ed2567a 100644 --- a/drivers/net/hns3/hns3_mp.c +++ b/drivers/net/hns3/hns3_mp.c @@ -2,8 +2,6 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include - #include #include #include diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c index 1b7dd72..b2cc599 100644 --- a/drivers/net/hns3/hns3_regs.c +++ b/drivers/net/hns3/hns3_regs.c @@ -2,24 +2,8 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include #include "hns3_ethdev.h" #include "hns3_logs.h" diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index a4e552b..e2f0468 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -2,12 +2,9 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include #include #include #include -#include -#include #include "hns3_ethdev.h" #include "hns3_logs.h" diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 4e17b12..85316ca 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2,27 +2,14 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include -#include -#include -#include -#include #include -#include #include #include -#include -#include -#include #include #include #include -#include -#include #include #include -#include #if defined(RTE_ARCH_ARM64) && defined(CC_SVE_SUPPORT) #include #endif diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h index 51504ca..8b32abe 100644 --- a/drivers/net/hns3/hns3_rxtx.h +++ b/drivers/net/hns3/hns3_rxtx.h @@ -5,6 +5,9 @@ #ifndef _HNS3_RXTX_H_ #define _HNS3_RXTX_H_ +#include +#include + #define HNS3_MIN_RING_DESC 64 #define HNS3_MAX_RING_DESC 32768 #define HNS3_DEFAULT_RING_DESC 1024 diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c index ece07a4..c590647 100644 --- a/drivers/net/hns3/hns3_stats.c +++ b/drivers/net/hns3/hns3_stats.c @@ -2,13 +2,9 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include -#include -#include #include #include #include -#include #include "hns3_ethdev.h" #include "hns3_rxtx.h" -- 2.7.4