Try to keep the API small by move the logic which need not expose from header file to source file verbatim. Also remove the unneeded header file include statement of source file.
Signed-off-by: Chaoyong He <chaoyong...@corigine.com> --- .../net/nfp/flower/nfp_flower_representor.c | 29 ++++++++++++------- .../net/nfp/flower/nfp_flower_representor.h | 14 --------- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index 48c3b3f844..d4df88fb73 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -3,22 +3,29 @@ * All rights reserved. */ -#include <rte_common.h> -#include <ethdev_pci.h> +#include "nfp_flower_representor.h" -#include "../nfp_common.h" -#include "../nfp_logs.h" -#include "../nfp_ctrl.h" -#include "../nfp_rxtx.h" #include "../nfd3/nfp_nfd3.h" -#include "../nfpcore/nfp_mip.h" -#include "../nfpcore/nfp_rtsym.h" #include "../nfpcore/nfp_nsp.h" -#include "nfp_flower.h" -#include "nfp_flower_representor.h" -#include "nfp_flower_ctrl.h" +#include "../nfp_flow.h" +#include "../nfp_logs.h" +#include "../nfp_mtr.h" #include "nfp_flower_cmsg.h" +/* + * enum nfp_repr_type - type of representor + * @NFP_REPR_TYPE_PHYS_PORT: external NIC port + * @NFP_REPR_TYPE_PF: physical function + * @NFP_REPR_TYPE_VF: virtual function + * @NFP_REPR_TYPE_MAX: number of representor types + */ +enum nfp_repr_type { + NFP_REPR_TYPE_PHYS_PORT, + NFP_REPR_TYPE_PF, + NFP_REPR_TYPE_VF, + NFP_REPR_TYPE_MAX, +}; + static int nfp_pf_repr_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, diff --git a/drivers/net/nfp/flower/nfp_flower_representor.h b/drivers/net/nfp/flower/nfp_flower_representor.h index 685cbe46b4..5ac5e38186 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.h +++ b/drivers/net/nfp/flower/nfp_flower_representor.h @@ -8,20 +8,6 @@ #include "nfp_flower.h" -/* - * enum nfp_repr_type - type of representor - * @NFP_REPR_TYPE_PHYS_PORT: external NIC port - * @NFP_REPR_TYPE_PF: physical function - * @NFP_REPR_TYPE_VF: virtual function - * @NFP_REPR_TYPE_MAX: number of representor types - */ -enum nfp_repr_type { - NFP_REPR_TYPE_PHYS_PORT = 0, - NFP_REPR_TYPE_PF, - NFP_REPR_TYPE_VF, - NFP_REPR_TYPE_MAX, -}; - struct nfp_flower_representor { uint16_t vf_id; uint16_t switch_domain_id; -- 2.39.1