From: Bruce Richardson Date: Fri, 29 Jan 2021 16:48:19 +0000 (+0000) Subject: ethdev: make driver-only headers private X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=df96fd0d7395;p=dpdk.git ethdev: make driver-only headers private The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed. Signed-off-by: Bruce Richardson Reviewed-by: Maxime Coquelin Acked-by: Thomas Monjalon Acked-by: Steven Webster --- diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index e8b76bd850..8a5c8310a8 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/app/test/test_pdump.c b/app/test/test_pdump.c index 21fcc1bc4c..b49fcfb3f1 100644 --- a/app/test/test_pdump.c +++ b/app/test/test_pdump.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include "rte_eal.h" #include "rte_lcore.h" diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index 2c24c9b3f5..7036f401ed 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index 184d1f0d35..c36b9e45b5 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -151,11 +151,18 @@ Removed Items Also, make sure to start the actual text at the margin. ======================================================= +* The internal header files ``rte_ethdev_driver.h``, ``rte_ethdev_vdev.h`` and + ``rte_ethdev_pci.h`` are no longer installed as part of the DPDK + ``ninja install`` action and are renamed to ``ethdev_driver.h``, + ``ethdev_vdev.h`` and ``ethdev_pci.h`` respectively in the source tree, to + reflect the fact that they are non-public headers. + * Removed support for NetXtreme devices belonging to ``BCM573xx and BCM5740x`` families. Specifically the support for the following Broadcom PCI device IDs ``0x16c8, 0x16c9, 0x16ca, 0x16ce, 0x16cf, 0x16df, 0x16d0,`` ``0x16d1, 0x16d2, 0x16d4, 0x16d5, 0x16e7, 0x16e8, 0x16e9`` has been removed. + API Changes ----------- diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index f39d6e2092..662cbfaae5 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/bus/dpaa/include/fman.h b/drivers/bus/dpaa/include/fman.h index f2b0bf91e7..516c6c1515 100644 --- a/drivers/bus/dpaa/include/fman.h +++ b/drivers/bus/dpaa/include/fman.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 58435589b2..26910ac01f 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index b52f36c33e..c8373e627a 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c index d9619848d8..122aa1740d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c index d393ce6186..8ed969c7c0 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 1a9dd18b99..c6f8312a1d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index eeb2494bd0..e4fa3a2e46 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c index 200b71640b..acc1fde771 100644 --- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c +++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index e60a7dc69e..17325bbf6a 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index 97ce08d78f..ca49a8d42a 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 671ee87ae2..bfe5a0a451 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 703b7417ed..b8d5ad0d91 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index a658993512..ef650a4658 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include "rte_pmd_ark.h" diff --git a/drivers/net/ark/ark_ethdev_rx.h b/drivers/net/ark/ark_ethdev_rx.h index 001fa9bdfa..33c1f2c953 100644 --- a/drivers/net/ark/ark_ethdev_rx.h +++ b/drivers/net/ark/ark_ethdev_rx.h @@ -9,7 +9,7 @@ #include #include -#include +#include extern uint64_t ark_timestamp_rx_dynflag; extern int ark_timestamp_dynfield_offset; diff --git a/drivers/net/ark/ark_ethdev_tx.h b/drivers/net/ark/ark_ethdev_tx.h index e448ce2225..12c71a7158 100644 --- a/drivers/net/ark/ark_ethdev_tx.h +++ b/drivers/net/ark/ark_ethdev_tx.h @@ -7,7 +7,7 @@ #include -#include +#include uint16_t eth_ark_xmit_pkts_noop(void *vtxq, diff --git a/drivers/net/ark/ark_ext.h b/drivers/net/ark/ark_ext.h index 5a987e4d67..821fb55bba 100644 --- a/drivers/net/ark/ark_ext.h +++ b/drivers/net/ark/ark_ext.h @@ -5,7 +5,7 @@ #ifndef _ARK_EXT_H_ #define _ARK_EXT_H_ -#include +#include /* * This is the template file for users who which to define a dynamic diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h index 403df5900b..91726ecc20 100644 --- a/drivers/net/ark/ark_global.h +++ b/drivers/net/ark/ark_global.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c index b8fb69497d..0f2d31e5be 100644 --- a/drivers/net/ark/ark_pktchkr.c +++ b/drivers/net/ark/ark_pktchkr.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "ark_pktchkr.h" diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c index 4a02662a46..ac4322a359 100644 --- a/drivers/net/ark/ark_pktgen.c +++ b/drivers/net/ark/ark_pktgen.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include "ark_pktgen.h" diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index b0716773ad..473f6209f6 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include "atl_ethdev.h" diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c index 449ffd454d..7d367c9306 100644 --- a/drivers/net/atlantic/atl_rxtx.c +++ b/drivers/net/atlantic/atl_rxtx.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include "atl_ethdev.h" diff --git a/drivers/net/atlantic/rte_pmd_atlantic.c b/drivers/net/atlantic/rte_pmd_atlantic.c index 2962f5c6cb..00fc2872e5 100644 --- a/drivers/net/atlantic/rte_pmd_atlantic.c +++ b/drivers/net/atlantic/rte_pmd_atlantic.c @@ -2,7 +2,7 @@ * Copyright(c) 2018 Aquantia Corporation */ -#include +#include #include "rte_pmd_atlantic.h" #include "atl_ethdev.h" diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index f531e03c02..566a3606a2 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index 91404ca01c..b83fdcca85 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index d35c75a2e2..50db70dfcd 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include /* diff --git a/drivers/net/bnx2x/bnx2x_ethdev.h b/drivers/net/bnx2x/bnx2x_ethdev.h index f712bb3e84..fa1c3ba955 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.h +++ b/drivers/net/bnx2x/bnx2x_ethdev.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index d2d76b623a..0db6e58f3d 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 74b0f3d1dc..e8a7a8ecd4 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -7,8 +7,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/bnxt/bnxt_stats.h b/drivers/net/bnxt/bnxt_stats.h index 3cf2a1b822..50c3d92b9a 100644 --- a/drivers/net/bnxt/bnxt_stats.h +++ b/drivers/net/bnxt/bnxt_stats.h @@ -6,7 +6,7 @@ #ifndef _BNXT_STATS_H_ #define _BNXT_STATS_H_ -#include +#include void bnxt_free_stats(struct bnxt *bp); int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index d67db46c65..965381c0c4 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h index 8f198bd50e..75fb8dc02e 100644 --- a/drivers/net/bonding/eth_bond_private.h +++ b/drivers/net/bonding/eth_bond_private.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 55c8e3167c..17e6ff8b90 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 66ab8dd693..5241c60089 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -7,8 +7,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c index ef20dc6675..0e3033b550 100644 --- a/drivers/net/cxgbe/base/t4_hw.c +++ b/drivers/net/cxgbe/base/t4_hw.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/cxgbe/base/t4vf_hw.c b/drivers/net/cxgbe/base/t4vf_hw.c index cd011bc1b8..561d759dbc 100644 --- a/drivers/net/cxgbe/base/t4vf_hw.c +++ b/drivers/net/cxgbe/base/t4vf_hw.c @@ -3,7 +3,7 @@ * All rights reserved. */ -#include +#include #include #include "common.h" diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index cfa385bab7..bfa57c979d 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index 3b56eccfbe..83ad758e88 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/cxgbe/cxgbevf_ethdev.c b/drivers/net/cxgbe/cxgbevf_ethdev.c index c2918f5356..bf1815c25f 100644 --- a/drivers/net/cxgbe/cxgbevf_ethdev.c +++ b/drivers/net/cxgbe/cxgbevf_ethdev.c @@ -3,8 +3,8 @@ * All rights reserved. */ -#include -#include +#include +#include #include "cxgbe.h" #include "cxgbe_pfvf.h" diff --git a/drivers/net/cxgbe/cxgbevf_main.c b/drivers/net/cxgbe/cxgbevf_main.c index 9ee060504f..f639612ae4 100644 --- a/drivers/net/cxgbe/cxgbevf_main.c +++ b/drivers/net/cxgbe/cxgbevf_main.c @@ -3,8 +3,8 @@ * All rights reserved. */ -#include -#include +#include +#include #include #include "base/common.h" diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index 8c7dbe3a1d..56b8ec1f33 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 0c87c136d7..d643514de6 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index a858b1372c..b5728e09c2 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -9,7 +9,7 @@ /* System headers */ #include -#include +#include #include #include diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index e2459d9b99..e38fba23c0 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c index 25b1d2bb6d..87c893db51 100644 --- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 6f38da3cce..38774e255b 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 9cca6d16c3..003b379fa7 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 2036c6e917..9b8c4a7de5 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -15,8 +15,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 19e3bffd46..db5d1222ce 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index dfe87508c2..ec355cbf35 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -17,8 +17,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c index ccb184df95..33f6b1d6b3 100644 --- a/drivers/net/e1000/igb_flow.c +++ b/drivers/net/e1000/igb_flow.c @@ -15,8 +15,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c index 9d74c08abe..2ce74dd5a9 100644 --- a/drivers/net/e1000/igb_pf.c +++ b/drivers/net/e1000/igb_pf.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index dd520cd82c..1500d2ffff 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 20ff3653c6..c796af4aa7 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -5,8 +5,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index 4d2c9c0474..0b45168c60 100644 --- a/drivers/net/enetc/enetc_ethdev.c +++ b/drivers/net/enetc/enetc_ethdev.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 1c8d60e264..b3f441c8f7 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -9,8 +9,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c index 1eec96abca..97ee7509ce 100644 --- a/drivers/net/enic/enic_flow.c +++ b/drivers/net/enic/enic_flow.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c index ad1e89a581..21d9b1cef7 100644 --- a/drivers/net/enic/enic_fm_flow.c +++ b/drivers/net/enic/enic_fm_flow.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 805eb5e46a..2a06d46872 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "enic_compat.h" #include "enic.h" diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c index 1405db15ab..689bf748ae 100644 --- a/drivers/net/enic/enic_res.c +++ b/drivers/net/enic/enic_res.c @@ -4,7 +4,7 @@ */ #include "enic_compat.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "wq_enet_desc.h" #include "rq_enet_desc.h" #include "cq_enet_desc.h" diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 4b6b97eb10..a2a02227e3 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -4,7 +4,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/net/enic/enic_rxtx_vec_avx2.c b/drivers/net/enic/enic_rxtx_vec_avx2.c index f0bea33423..1848f52717 100644 --- a/drivers/net/enic/enic_rxtx_vec_avx2.c +++ b/drivers/net/enic/enic_rxtx_vec_avx2.c @@ -4,7 +4,7 @@ */ #include -#include +#include #include #include "enic_compat.h" diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c index c2c03c0281..f7b79c1c4e 100644 --- a/drivers/net/enic/enic_vf_representor.c +++ b/drivers/net/enic/enic_vf_representor.c @@ -8,8 +8,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index ba81c82174..e3bda0df2b 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -7,8 +7,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 492047f587..2b6ca9080d 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h index 0f9a572af8..cd39d103c6 100644 --- a/drivers/net/failsafe/failsafe_private.h +++ b/drivers/net/failsafe/failsafe_private.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/failsafe/failsafe_rxtx.c b/drivers/net/failsafe/failsafe_rxtx.c index fee08fa23c..fe67293299 100644 --- a/drivers/net/failsafe/failsafe_rxtx.c +++ b/drivers/net/failsafe/failsafe_rxtx.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include "failsafe_private.h" diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index c187088a33..fd471c415e 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2,8 +2,8 @@ * Copyright(c) 2013-2016 Intel Corporation */ -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index 4accaa2cd6..8585c5b9e4 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -4,7 +4,7 @@ #include -#include +#include #include #include #include "fm10k.h" diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c index 6fcc939ad9..39e3cdac1f 100644 --- a/drivers/net/fm10k/fm10k_rxtx_vec.c +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c @@ -4,7 +4,7 @@ #include -#include +#include #include #include "fm10k.h" #include "base/fm10k_type.h" diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c index 41c99bdbf8..cb9cf6efa2 100644 --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Huawei Technologies Co., Ltd */ -#include +#include #include #include #include diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c index 5a2c171099..1d6b710c9f 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h index c7338d83be..70b4d32ff2 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.h +++ b/drivers/net/hinic/hinic_pmd_ethdev.h @@ -7,7 +7,7 @@ #include #include -#include +#include #include "base/hinic_compat.h" #include "base/hinic_pmd_cfg.h" diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c index f58f4f7adc..45dbead512 100644 --- a/drivers/net/hns3/hns3_cmd.c +++ b/drivers/net/hns3/hns3_cmd.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include +#include #include #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 449d967784..a796469435 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index 0d17170fa7..6374a76794 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -6,7 +6,7 @@ #define _HNS3_ETHDEV_H_ #include -#include +#include #include #include #include diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index bb4ec6bb39..394ffe38cd 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index 857cc94c98..896540df78 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include +#include #include #include #include diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index d2a5db8aab..1d500b984c 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include +#include #include #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c index ed2567a8ff..3342a781ad 100644 --- a/drivers/net/hns3/hns3_mp.c +++ b/drivers/net/hns3/hns3_mp.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c index f2cb465eed..01550458b7 100644 --- a/drivers/net/hns3/hns3_regs.c +++ b/drivers/net/hns3/hns3_regs.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include +#include #include #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 0badfc9260..676962553f 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c index a26c83d146..2bc4372449 100644 --- a/drivers/net/hns3/hns3_rxtx_vec.c +++ b/drivers/net/hns3/hns3_rxtx_vec.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include "hns3_ethdev.h" #include "hns3_rxtx.h" diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c index 8c2c8f6108..b02bae7a0d 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_sve.c +++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include "hns3_ethdev.h" #include "hns3_rxtx.h" diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 946994b80a..d7cd049891 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -17,8 +17,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 5d7db7fe13..2909b4d894 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index f5defcf585..c572d003cb 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 7fe760dba2..4d44282312 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 65d649b627..f3d6d899f6 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 668edd6626..804fce8606 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c index d3238bfb6a..e6e468752c 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c +++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c @@ -4,7 +4,7 @@ */ #include -#include +#include #include #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c index e5a1deaeb2..ea554b4fda 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c index e92f97b7ed..80b153e8f6 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index 31f73f6054..33cebbe88b 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _I40E_RXTX_VEC_COMMON_H_ #define _I40E_RXTX_VEC_COMMON_H_ #include -#include +#include #include #include "i40e_ethdev.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c index f094de69ae..d81269624e 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c @@ -4,7 +4,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c index 0bcb48e24e..45fce0a022 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_sse.c +++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c index 9e40406a3d..7ed47c1a2c 100644 --- a/drivers/net/i40e/i40e_vf_representor.c +++ b/drivers/net/i40e/i40e_vf_representor.c @@ -7,7 +7,7 @@ #include #include -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "base/i40e_type.h" #include "base/virtchnl.h" #include "i40e_ethdev.h" diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index cf6ea0b15c..e9c8c1157a 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index f48f574a5d..4e864b4b9c 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c index aabbcf34c2..8635ff83ca 100644 --- a/drivers/net/iavf/iavf_generic_flow.c +++ b/drivers/net/iavf/iavf_generic_flow.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index 958c73c4fb..f437fc3170 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 1ddbad0f1f..3d471d9acc 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h index 7ad1e0f68a..46a18732d3 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_common.h +++ b/drivers/net/iavf/iavf_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _IAVF_RXTX_VEC_COMMON_H_ #define _IAVF_RXTX_VEC_COMMON_H_ #include -#include +#include #include #include "iavf.h" diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c index 75c77f9d32..8574d0830f 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_sse.c +++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include "iavf.h" diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 3ef29d509d..8add888987 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -16,8 +16,8 @@ #include #include #include -#include -#include +#include +#include #include #include "iavf.h" diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c index 363ce68318..113cb68765 100644 --- a/drivers/net/ice/ice_acl_filter.c +++ b/drivers/net/ice/ice_acl_filter.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c index 4a9af3292c..dbe42fa3df 100644 --- a/drivers/net/ice/ice_dcf.c +++ b/drivers/net/ice/ice_dcf.c @@ -17,8 +17,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h index ff029963bf..0cb90b5e9f 100644 --- a/drivers/net/ice/ice_dcf.h +++ b/drivers/net/ice/ice_dcf.h @@ -5,7 +5,7 @@ #ifndef _ICE_DCF_H_ #define _ICE_DCF_H_ -#include +#include #include #include diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index ea1f2951ba..86f70cf7ff 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index ec29f0fe40..c021d7ab6c 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h index 2b03c59671..7e9cbd2e9a 100644 --- a/drivers/net/ice/ice_ethdev.h +++ b/drivers/net/ice/ice_ethdev.h @@ -7,7 +7,7 @@ #include -#include +#include #include "base/ice_common.h" #include "base/ice_adminq_cmd.h" diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index c4496dbbe1..25d15a8adb 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 2d23c8dd50..322df649b1 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 69f994579a..4136d045e1 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -2,7 +2,7 @@ * Copyright(c) 2018 Intel Corporation */ -#include +#include #include #include diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 7bac77ecd1..5ca0985e21 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c index 802212fc57..dbaa7a83e5 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -8,8 +8,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/drivers/net/igc/igc_filter.h b/drivers/net/igc/igc_filter.h index 877f51c88b..df8516bc40 100644 --- a/drivers/net/igc/igc_filter.h +++ b/drivers/net/igc/igc_filter.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "igc_ethdev.h" diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c index 4654ec41f0..c0a5d5e84f 100644 --- a/drivers/net/igc/igc_txrx.c +++ b/drivers/net/igc/igc_txrx.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include "igc_logs.h" diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 2face7c635..ded3ffe48d 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -5,9 +5,9 @@ #include #include #include -#include +#include #include -#include +#include #include "ionic_logs.h" #include "ionic.h" diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index f39b54e8ef..f3d55c0fa6 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include "ionic.h" #include "ionic_logs.h" diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 5d0e9d5d5a..61ad396469 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c index 4446d2af9e..f8e751cb09 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h b/drivers/net/ipn3ke/ipn3ke_ethdev.h index a6815a9cca..ba3f8821e2 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.h +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h @@ -15,8 +15,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/ipn3ke/ipn3ke_flow.c b/drivers/net/ipn3ke/ipn3ke_flow.c index f857e64afb..c702e19ea5 100644 --- a/drivers/net/ipn3ke/ipn3ke_flow.c +++ b/drivers/net/ipn3ke/ipn3ke_flow.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c index 9e15cce34f..856d21ef9b 100644 --- a/drivers/net/ipn3ke/ipn3ke_representor.c +++ b/drivers/net/ipn3ke/ipn3ke_representor.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c b/drivers/net/ipn3ke/ipn3ke_tm.c index 17ac026d38..6a9b98fd7f 100644 --- a/drivers/net/ipn3ke/ipn3ke_tm.c +++ b/drivers/net/ipn3ke/ipn3ke_tm.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/ixgbe/ixgbe_bypass.c b/drivers/net/ixgbe/ixgbe_bypass.c index ae38ce3559..67ced6c723 100644 --- a/drivers/net/ixgbe/ixgbe_bypass.c +++ b/drivers/net/ixgbe/ixgbe_bypass.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include "ixgbe_ethdev.h" #include "ixgbe_bypass_api.h" #include "rte_pmd_ixgbe.h" diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index c8b9ec8c11..761a0f26bb 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c index 11b9effeba..27a49bbce5 100644 --- a/drivers/net/ixgbe/ixgbe_fdir.c +++ b/drivers/net/ixgbe/ixgbe_fdir.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include "ixgbe_logs.h" diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 9aeb2e4a49..0b10e91a9b 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c index 62f2a5f764..e45c5501e6 100644 --- a/drivers/net/ixgbe/ixgbe_ipsec.c +++ b/drivers/net/ixgbe/ixgbe_ipsec.c @@ -2,8 +2,8 @@ * Copyright(c) 2010-2017 Intel Corporation */ -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index 15982af8da..fbf2b17d16 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index c0305a8238..36e6ca9010 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h index a97c27189b..adba855ca3 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _IXGBE_RXTX_VEC_COMMON_H_ #define _IXGBE_RXTX_VEC_COMMON_H_ #include -#include +#include #include "ixgbe_ethdev.h" #include "ixgbe_rxtx.h" diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c index a5a5b2167f..f83b800ad9 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c index 90c076825a..9bbffe6119 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include "ixgbe_ethdev.h" diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c index 8185f0d3bb..d5b636a194 100644 --- a/drivers/net/ixgbe/ixgbe_vf_representor.c +++ b/drivers/net/ixgbe/ixgbe_vf_representor.c @@ -6,7 +6,7 @@ #include #include -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "base/ixgbe_type.h" #include "base/ixgbe_vf.h" #include "ixgbe_ethdev.h" diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c index d2f708242c..cf089cd9ae 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c @@ -2,7 +2,7 @@ * Copyright(c) 2010-2017 Intel Corporation */ -#include +#include #include "base/ixgbe_api.h" #include "base/ixgbe_x550.h" diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 1696787a9b..9ce74e549b 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -7,8 +7,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/liquidio/base/lio_23xx_vf.c b/drivers/net/liquidio/base/lio_23xx_vf.c index ddbc8c0e0c..c6b8310b71 100644 --- a/drivers/net/liquidio/base/lio_23xx_vf.c +++ b/drivers/net/liquidio/base/lio_23xx_vf.c @@ -4,7 +4,7 @@ #include -#include +#include #include #include diff --git a/drivers/net/liquidio/base/lio_mbox.c b/drivers/net/liquidio/base/lio_mbox.c index 1129001515..2ac2b1b334 100644 --- a/drivers/net/liquidio/base/lio_mbox.c +++ b/drivers/net/liquidio/base/lio_mbox.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Cavium, Inc */ -#include +#include #include #include "lio_logs.h" diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index eb0fdab45a..0b189d5d15 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -3,8 +3,8 @@ */ #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index 8d705bfe7f..a067b60e47 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Cavium, Inc */ -#include +#include #include #include diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c index c526f90778..5b373738e6 100644 --- a/drivers/net/memif/memif_socket.c +++ b/drivers/net/memif/memif_socket.c @@ -13,8 +13,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 8ed9aebab7..77c95bcb7a 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -17,8 +17,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h index 765a7e5998..24321d3a39 100644 --- a/drivers/net/memif/rte_eth_memif.h +++ b/drivers/net/memif/rte_eth_memif.h @@ -11,7 +11,7 @@ #include -#include +#include #include #include diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index d5d8c96351..27af426363 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index c6cb29493e..63df8fcf2b 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -19,7 +19,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include +#include #include #include #include diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c index 9ff05c6738..783ff94dce 100644 --- a/drivers/net/mlx4/mlx4_ethdev.c +++ b/drivers/net/mlx4/mlx4_ethdev.c @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 2a86382db7..b8ecfa829b 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx4/mlx4_flow.h b/drivers/net/mlx4/mlx4_flow.h index 26465c66a4..e4366f28bb 100644 --- a/drivers/net/mlx4/mlx4_flow.h +++ b/drivers/net/mlx4/mlx4_flow.h @@ -18,7 +18,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include +#include #include #include #include diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c index 6786b12ab5..d56009c418 100644 --- a/drivers/net/mlx4/mlx4_intr.c +++ b/drivers/net/mlx4/mlx4_intr.c @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c index eca0c20a8a..e05da89c0e 100644 --- a/drivers/net/mlx4/mlx4_mp.c +++ b/drivers/net/mlx4/mlx4_mp.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include "mlx4.h" diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c index 0699bdd5f2..978cbb8201 100644 --- a/drivers/net/mlx4/mlx4_rxq.c +++ b/drivers/net/mlx4/mlx4_rxq.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h index 9de6c59411..7c72ce6d17 100644 --- a/drivers/net/mlx4/mlx4_rxtx.h +++ b/drivers/net/mlx4/mlx4_rxtx.h @@ -19,7 +19,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include +#include #include #include diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c index 37b84413fb..8262071505 100644 --- a/drivers/net/mlx4/mlx4_txq.c +++ b/drivers/net/mlx4/mlx4_txq.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c index e36a78091c..0e8de9439e 100644 --- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c index 08ade75799..60fdee22a1 100644 --- a/drivers/net/mlx5/linux/mlx5_mp_os.c +++ b/drivers/net/mlx5/linux/mlx5_mp_os.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 9ac1d46b1b..7efa7c6cd2 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c index 318e39b1df..43ff85f9c4 100644 --- a/drivers/net/mlx5/linux/mlx5_verbs.c +++ b/drivers/net/mlx5/linux/mlx5_verbs.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c index 40e895e080..005904bdfe 100644 --- a/drivers/net/mlx5/linux/mlx5_vlan_os.c +++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c @@ -14,7 +14,7 @@ */ #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 3730f32295..50a6d2b19f 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 101e9c20d0..4bbf628885 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h index 85a0979653..af29d93901 100644 --- a/drivers/net/mlx5/mlx5_defs.h +++ b/drivers/net/mlx5/mlx5_defs.h @@ -6,7 +6,7 @@ #ifndef RTE_PMD_MLX5_DEFS_H_ #define RTE_PMD_MLX5_DEFS_H_ -#include +#include #include #include "mlx5_autoconf.h" diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 45ee7e4488..51b39ddde5 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 2ca6148c1d..6716a20141 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index c1ddff7364..707d6749e2 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 2d4381946d..9347490967 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c index bd786fd638..6ffcfcd97a 100644 --- a/drivers/net/mlx5/mlx5_mac.c +++ b/drivers/net/mlx5/mlx5_mac.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include "mlx5_defs.h" diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c index 845cebe2e8..dc0131af3a 100644 --- a/drivers/net/mlx5/mlx5_rss.c +++ b/drivers/net/mlx5/mlx5_rss.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c index 7613ff770d..cf93ccac86 100644 --- a/drivers/net/mlx5/mlx5_rxmode.c +++ b/drivers/net/mlx5/mlx5_rxmode.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include "mlx5.h" diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 787b2b74dd..92e3a792e1 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index 82d4d4a745..a6569b250a 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 48210bf0b2..94dd56709e 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c index b38482d4e9..696282ca31 100644 --- a/drivers/net/mlx5/mlx5_txpp.c +++ b/drivers/net/mlx5/mlx5_txpp.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index b81bb4a12d..5142e50858 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c index dbb9d362f3..64678d3f51 100644 --- a/drivers/net/mlx5/mlx5_vlan.c +++ b/drivers/net/mlx5/mlx5_vlan.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c index 076c688699..8609d38eca 100644 --- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/mlx5/windows/mlx5_mp_os.c b/drivers/net/mlx5/windows/mlx5_mp_os.c index db793b1f7d..8313c29ffb 100644 --- a/drivers/net/mlx5/windows/mlx5_mp_os.c +++ b/drivers/net/mlx5/windows/mlx5_mp_os.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c index b036432937..e37cc65c17 100644 --- a/drivers/net/mlx5/windows/mlx5_os.c +++ b/drivers/net/mlx5/windows/mlx5_os.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/mlx5/windows/mlx5_vlan_os.c b/drivers/net/mlx5/windows/mlx5_vlan_os.c index d3b11e0001..3917c822e4 100644 --- a/drivers/net/mlx5/windows/mlx5_vlan_os.c +++ b/drivers/net/mlx5/windows/mlx5_vlan_os.c @@ -13,7 +13,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c index 2cd73919ce..b0940b4462 100644 --- a/drivers/net/mvneta/mvneta_ethdev.c +++ b/drivers/net/mvneta/mvneta_ethdev.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index f25cf9e46d..1d67f2abf1 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 5a401b4b06..04904b1514 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c index 1ce260c89b..e317539de7 100644 --- a/drivers/net/netvsc/hn_rndis.c +++ b/drivers/net/netvsc/hn_rndis.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c index 86392917c5..2dc7abe354 100644 --- a/drivers/net/netvsc/hn_vf.c +++ b/drivers/net/netvsc/hn_vf.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c index c55bcdf1ef..7e91d59847 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include "nfb_stats.h" diff --git a/drivers/net/nfb/nfb_tx.h b/drivers/net/nfb/nfb_tx.h index b6578cc38a..28daeae0b8 100644 --- a/drivers/net/nfb/nfb_tx.h +++ b/drivers/net/nfb/nfb_tx.h @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 9ea24e5bda..9927c9c44b 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -17,8 +17,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h index 1427954c17..78f7b8ca2f 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp.h +++ b/drivers/net/nfp/nfpcore/nfp_cpp.h @@ -6,7 +6,7 @@ #ifndef __NFP_CPP_H__ #define __NFP_CPP_H__ -#include +#include #include "nfp-common/nfp_platform.h" #include "nfp-common/nfp_resid.h" diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c index 36725d69ab..bad80a5a1c 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include "nfp_cpp.h" diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c index dec4a8b6d1..848c452eab 100644 --- a/drivers/net/nfp/nfpcore/nfp_cppcore.c +++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include "nfp_cpp.h" #include "nfp_target.h" diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 49ee8da8e4..32764e8f0e 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -4,8 +4,8 @@ */ #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h index 780a094ffa..b73515de37 100644 --- a/drivers/net/octeontx/octeontx_ethdev.h +++ b/drivers/net/octeontx/octeontx_ethdev.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/octeontx/octeontx_rxtx.c b/drivers/net/octeontx/octeontx_rxtx.c index bbe43a874b..61865ef0bc 100644 --- a/drivers/net/octeontx/octeontx_rxtx.c +++ b/drivers/net/octeontx/octeontx_rxtx.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h index 7c24d8b4fd..2ed28ea563 100644 --- a/drivers/net/octeontx/octeontx_rxtx.h +++ b/drivers/net/octeontx/octeontx_rxtx.h @@ -5,7 +5,7 @@ #ifndef __OCTEONTX_RXTX_H__ #define __OCTEONTX_RXTX_H__ -#include +#include #define OFFLOAD_FLAGS \ uint16_t rx_offload_flags; \ diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 9bfe95d6b1..e9fbbca4da 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -4,7 +4,7 @@ #include -#include +#include #include #include #include diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c index 439ec4fa89..a79b997376 100644 --- a/drivers/net/octeontx2/otx2_link.c +++ b/drivers/net/octeontx2/otx2_link.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include "otx2_ethdev.h" diff --git a/drivers/net/octeontx2/otx2_ptp.c b/drivers/net/octeontx2/otx2_ptp.c index b8ef4c181d..91e5c0f6bd 100644 --- a/drivers/net/octeontx2/otx2_ptp.c +++ b/drivers/net/octeontx2/otx2_ptp.c @@ -2,7 +2,7 @@ * Copyright(C) 2019 Marvell International Ltd. */ -#include +#include #include "otx2_ethdev.h" diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index a32b1f3f37..ff02ade70d 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/pfe/pfe_eth.h b/drivers/net/pfe/pfe_eth.h index 9820d7bf47..fbc11b4ffb 100644 --- a/drivers/net/pfe/pfe_eth.h +++ b/drivers/net/pfe/pfe_eth.h @@ -7,7 +7,7 @@ #include #include -#include +#include #define ETH_ALEN 6 #define GEMAC_NO_PHY BIT(0) diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c index 3b079693fb..8cf59e210d 100644 --- a/drivers/net/pfe/pfe_ethdev.c +++ b/drivers/net/pfe/pfe_ethdev.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index 61a65ac42e..da4b87f5e2 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethdev.h @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 41402a5159..472d838582 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -4,7 +4,7 @@ #include "rte_eth_ring.h" #include -#include +#include #include #include #include diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h index ed059e142f..fdee800482 100644 --- a/drivers/net/sfc/sfc.h +++ b/drivers/net/sfc/sfc.h @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h index f3e00e2e38..f20154b568 100644 --- a/drivers/net/sfc/sfc_dp_rx.h +++ b/drivers/net/sfc/sfc_dp_rx.h @@ -11,7 +11,7 @@ #define _SFC_DP_RX_H #include -#include +#include #include "sfc_dp.h" diff --git a/drivers/net/sfc/sfc_dp_tx.h b/drivers/net/sfc/sfc_dp_tx.h index 3ecdfcdd28..b4af68984a 100644 --- a/drivers/net/sfc/sfc_dp_tx.h +++ b/drivers/net/sfc/sfc_dp_tx.h @@ -10,7 +10,7 @@ #ifndef _SFC_DP_TX_H #define _SFC_DP_TX_H -#include +#include #include "sfc_dp.h" #include "sfc_debug.h" diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index f2f5336435..d6f6a84eab 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -8,8 +8,8 @@ */ #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/sfc/sfc_ev.h b/drivers/net/sfc/sfc_ev.h index 3c7e5580e2..03bfb14b5c 100644 --- a/drivers/net/sfc/sfc_ev.h +++ b/drivers/net/sfc/sfc_ev.h @@ -10,7 +10,7 @@ #ifndef _SFC_EV_H_ #define _SFC_EV_H_ -#include +#include #include "efx.h" diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c index 4321045d1a..ab1d2cc595 100644 --- a/drivers/net/sfc/sfc_flow.c +++ b/drivers/net/sfc/sfc_flow.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/sfc/sfc_rx.h b/drivers/net/sfc/sfc_rx.h index d6ee9cf802..0d64b9c8bb 100644 --- a/drivers/net/sfc/sfc_rx.h +++ b/drivers/net/sfc/sfc_rx.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include "efx.h" diff --git a/drivers/net/sfc/sfc_tx.h b/drivers/net/sfc/sfc_tx.h index d583ee9c3d..3367bade37 100644 --- a/drivers/net/sfc/sfc_tx.h +++ b/drivers/net/sfc/sfc_tx.h @@ -11,7 +11,7 @@ #define _SFC_TX_H #include -#include +#include #include "efx.h" diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c index 3387ab485f..99d8468c94 100644 --- a/drivers/net/softnic/rte_eth_softnic.c +++ b/drivers/net/softnic/rte_eth_softnic.c @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h index 9c8737c9e2..faf90a5a8c 100644 --- a/drivers/net/softnic/rte_eth_softnic_internals.h +++ b/drivers/net/softnic/rte_eth_softnic_internals.h @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 7874c4f4f8..6eaeadf1c8 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -15,8 +15,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 2542de3065..c36d4bf76e 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -7,8 +7,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h index ba45de8409..a98ea11a33 100644 --- a/drivers/net/tap/rte_eth_tap.h +++ b/drivers/net/tap/rte_eth_tap.h @@ -13,7 +13,7 @@ #include -#include +#include #include #include #include "tap_log.h" diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index c2e7c334d4..c45d6e00a9 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -23,8 +23,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h index 3914117997..b8dd905d0b 100644 --- a/drivers/net/thunderx/nicvf_ethdev.h +++ b/drivers/net/thunderx/nicvf_ethdev.h @@ -5,7 +5,7 @@ #ifndef __THUNDERX_NICVF_ETHDEV_H__ #define __THUNDERX_NICVF_ETHDEV_H__ -#include +#include #define THUNDERX_NICVF_PMD_VERSION "2.0" #define THUNDERX_REG_BYTES 8 diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c index d0ea95f1d1..91e09ff8d5 100644 --- a/drivers/net/thunderx/nicvf_rxtx.c +++ b/drivers/net/thunderx/nicvf_rxtx.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/thunderx/nicvf_rxtx.h b/drivers/net/thunderx/nicvf_rxtx.h index 1f274b2954..d6ed660b4e 100644 --- a/drivers/net/thunderx/nicvf_rxtx.h +++ b/drivers/net/thunderx/nicvf_rxtx.h @@ -6,7 +6,7 @@ #define __THUNDERX_NICVF_RXTX_H__ #include -#include +#include #define NICVF_RX_OFFLOAD_NONE 0x1 #define NICVF_RX_OFFLOAD_CKSUM 0x2 diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h index cf1c281a06..0ca207d0dd 100644 --- a/drivers/net/thunderx/nicvf_struct.h +++ b/drivers/net/thunderx/nicvf_struct.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include struct nicvf_rbdr { diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index eef4b6d4a5..23f9d17091 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c index daa523b204..9f4eee4081 100644 --- a/drivers/net/txgbe/txgbe_ipsec.c +++ b/drivers/net/txgbe/txgbe_ipsec.c @@ -2,7 +2,7 @@ * Copyright(c) 2015-2020 */ -#include +#include #include #include diff --git a/drivers/net/txgbe/txgbe_pf.c b/drivers/net/txgbe/txgbe_pf.c index 151f2c7a45..e4bd990b96 100644 --- a/drivers/net/txgbe/txgbe_pf.c +++ b/drivers/net/txgbe/txgbe_pf.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 3ad92248c6..ac09e75a3e 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 5845bb15f3..d198fc8a8e 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 92a3d4efa5..edcd6203d9 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index ab61e911b8..0382dc5b2c 100644 --- a/drivers/net/virtio/virtio_pci.h +++ b/drivers/net/virtio/virtio_pci.h @@ -10,7 +10,7 @@ #include #include -#include +#include struct virtqueue; struct virtnet_ctl; diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 622d4bf201..fb7382eff7 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c index a26182bb46..f248869a8f 100644 --- a/drivers/net/virtio/virtio_rxtx_simple.c +++ b/drivers/net/virtio/virtio_rxtx_simple.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/virtio/virtio_rxtx_simple_altivec.c b/drivers/net/virtio/virtio_rxtx_simple_altivec.c index a260ebdf57..f09a1eda49 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_altivec.c +++ b/drivers/net/virtio/virtio_rxtx_simple_altivec.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c index 12e034dc0a..2cba800807 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_neon.c +++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c index 1056e9c20b..85a5a6664a 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_sse.c +++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 241808cd8f..308275b70e 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 23a2ebbefa..ecdecc427c 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 95c697f8e3..5cf53d4de8 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lib/librte_ethdev/ethdev_driver.h b/lib/librte_ethdev/ethdev_driver.h new file mode 100644 index 0000000000..57fdedaa1a --- /dev/null +++ b/lib/librte_ethdev/ethdev_driver.h @@ -0,0 +1,1465 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2017 Intel Corporation + */ + +#ifndef _RTE_ETHDEV_DRIVER_H_ +#define _RTE_ETHDEV_DRIVER_H_ + +/** + * @file + * + * RTE Ethernet Device PMD API + * + * These APIs for the use from Ethernet drivers, user applications shouldn't + * use them. + * + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/**< @internal Declaration of the hairpin peer queue information structure. */ +struct rte_hairpin_peer_info; + +/* + * Definitions of all functions exported by an Ethernet driver through the + * generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev* + * structure associated with an Ethernet device. + */ + +typedef int (*eth_dev_configure_t)(struct rte_eth_dev *dev); +/**< @internal Ethernet device configuration. */ + +typedef int (*eth_dev_start_t)(struct rte_eth_dev *dev); +/**< @internal Function used to start a configured Ethernet device. */ + +typedef int (*eth_dev_stop_t)(struct rte_eth_dev *dev); +/**< @internal Function used to stop a configured Ethernet device. */ + +typedef int (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev); +/**< @internal Function used to link up a configured Ethernet device. */ + +typedef int (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev); +/**< @internal Function used to link down a configured Ethernet device. */ + +typedef int (*eth_dev_close_t)(struct rte_eth_dev *dev); +/**< @internal Function used to close a configured Ethernet device. */ + +typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev); +/** <@internal Function used to reset a configured Ethernet device. */ + +typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev); +/**< @internal Function used to detect an Ethernet device removal. */ + +/** + * @internal + * Function used to enable the Rx promiscuous mode of an Ethernet device. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, promiscuous mode is enabled. + * @retval -ENOTSUP + * Promiscuous mode is not supported. + * @retval -ENODEV + * Device is gone. + * @retval -E_RTE_SECONDARY + * Function was called from a secondary process instance and not supported. + * @retval -ETIMEDOUT + * Attempt to enable promiscuos mode failed because of timeout. + * @retval -EAGAIN + * Failed to enable promiscuous mode. + */ +typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev); + +/** + * @internal + * Function used to disable the Rx promiscuous mode of an Ethernet device. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, promiscuous mode is disabled. + * @retval -ENOTSUP + * Promiscuous mode disabling is not supported. + * @retval -ENODEV + * Device is gone. + * @retval -E_RTE_SECONDARY + * Function was called from a secondary process instance and not supported. + * @retval -ETIMEDOUT + * Attempt to disable promiscuos mode failed because of timeout. + * @retval -EAGAIN + * Failed to disable promiscuous mode. + */ +typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev); + +/** + * @internal + * Enable the receipt of all multicast packets by an Ethernet device. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, all-multicast mode is enabled. + * @retval -ENOTSUP + * All-multicast mode is not supported. + * @retval -ENODEV + * Device is gone. + * @retval -E_RTE_SECONDARY + * Function was called from a secondary process instance and not supported. + * @retval -ETIMEDOUT + * Attempt to enable all-multicast mode failed because of timeout. + * @retval -EAGAIN + * Failed to enable all-multicast mode. + */ +typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev); + +/** + * @internal + * Disable the receipt of all multicast packets by an Ethernet device. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, all-multicast mode is disabled. + * @retval -ENOTSUP + * All-multicast mode disabling is not supported. + * @retval -ENODEV + * Device is gone. + * @retval -E_RTE_SECONDARY + * Function was called from a secondary process instance and not supported. + * @retval -ETIMEDOUT + * Attempt to disable all-multicast mode failed because of timeout. + * @retval -EAGAIN + * Failed to disable all-multicast mode. + */ +typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev); + +typedef int (*eth_link_update_t)(struct rte_eth_dev *dev, + int wait_to_complete); +/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */ + +typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev, + struct rte_eth_stats *igb_stats); +/**< @internal Get global I/O statistics of an Ethernet device. */ + +/** + * @internal + * Reset global I/O statistics of an Ethernet device to 0. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, statistics has been reset. + * @retval -ENOTSUP + * Resetting statistics is not supported. + * @retval -EINVAL + * Resetting statistics is not valid. + * @retval -ENOMEM + * Not enough memory to get the stats. + */ +typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev); + +typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev, + struct rte_eth_xstat *stats, unsigned int n); +/**< @internal Get extended stats of an Ethernet device. */ + +typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev, + const uint64_t *ids, + uint64_t *values, + unsigned int n); +/**< @internal Get extended stats of an Ethernet device. */ + +/** + * @internal + * Reset extended stats of an Ethernet device. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, statistics has been reset. + * @retval -ENOTSUP + * Resetting statistics is not supported. + * @retval -EINVAL + * Resetting statistics is not valid. + * @retval -ENOMEM + * Not enough memory to get the stats. + */ +typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev); + +typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev, + struct rte_eth_xstat_name *xstats_names, unsigned int size); +/**< @internal Get names of extended stats of an Ethernet device. */ + +typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev, + struct rte_eth_xstat_name *xstats_names, const uint64_t *ids, + unsigned int size); +/**< @internal Get names of extended stats of an Ethernet device. */ + +typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev, + uint16_t queue_id, + uint8_t stat_idx, + uint8_t is_rx); +/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */ + +typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev, + struct rte_eth_dev_info *dev_info); +/**< @internal Get specific information of an Ethernet device. */ + +typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev); +/**< @internal Get supported ptypes of an Ethernet device. */ + +/** + * @internal + * Inform Ethernet device about reduced range of packet types to handle. + * + * @param dev + * The Ethernet device identifier. + * @param ptype_mask + * The ptype family that application is interested in should be bitwise OR of + * RTE_PTYPE_*_MASK or 0. + * @return + * - (0) if Success. + */ +typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev, + uint32_t ptype_mask); + +typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev, + uint16_t queue_id); +/**< @internal Start rx and tx of a queue of an Ethernet device. */ + +typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev, + uint16_t queue_id); +/**< @internal Stop rx and tx of a queue of an Ethernet device. */ + +typedef int (*eth_rx_queue_setup_t)(struct rte_eth_dev *dev, + uint16_t rx_queue_id, + uint16_t nb_rx_desc, + unsigned int socket_id, + const struct rte_eth_rxconf *rx_conf, + struct rte_mempool *mb_pool); +/**< @internal Set up a receive queue of an Ethernet device. */ + +typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev, + uint16_t tx_queue_id, + uint16_t nb_tx_desc, + unsigned int socket_id, + const struct rte_eth_txconf *tx_conf); +/**< @internal Setup a transmit queue of an Ethernet device. */ + +typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev, + uint16_t rx_queue_id); +/**< @internal Enable interrupt of a receive queue of an Ethernet device. */ + +typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev, + uint16_t rx_queue_id); +/**< @internal Disable interrupt of a receive queue of an Ethernet device. */ + +typedef void (*eth_queue_release_t)(void *queue); +/**< @internal Release memory resources allocated by given RX/TX queue. */ + +typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev, + char *fw_version, size_t fw_size); +/**< @internal Get firmware information of an Ethernet device. */ + +typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt); +/**< @internal Force mbufs to be from TX ring. */ + +typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev, + uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo); + +typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev, + uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo); + +typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev, + uint16_t queue_id, struct rte_eth_burst_mode *mode); + +typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu); +/**< @internal Set MTU. */ + +typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev, + uint16_t vlan_id, + int on); +/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */ + +typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev, + enum rte_vlan_type type, uint16_t tpid); +/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */ + +typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask); +/**< @internal set VLAN offload function by an Ethernet device. */ + +typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev, + uint16_t vlan_id, + int on); +/**< @internal set port based TX VLAN insertion by an Ethernet device. */ + +typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev, + uint16_t rx_queue_id, + int on); +/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */ + +typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev, + struct rte_eth_fc_conf *fc_conf); +/**< @internal Get current flow control parameter on an Ethernet device */ + +typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev, + struct rte_eth_fc_conf *fc_conf); +/**< @internal Setup flow control parameter on an Ethernet device */ + +typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev, + struct rte_eth_pfc_conf *pfc_conf); +/**< @internal Setup priority flow control parameter on an Ethernet device */ + +typedef int (*reta_update_t)(struct rte_eth_dev *dev, + struct rte_eth_rss_reta_entry64 *reta_conf, + uint16_t reta_size); +/**< @internal Update RSS redirection table on an Ethernet device */ + +typedef int (*reta_query_t)(struct rte_eth_dev *dev, + struct rte_eth_rss_reta_entry64 *reta_conf, + uint16_t reta_size); +/**< @internal Query RSS redirection table on an Ethernet device */ + +typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev, + struct rte_eth_rss_conf *rss_conf); +/**< @internal Update RSS hash configuration of an Ethernet device */ + +typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev, + struct rte_eth_rss_conf *rss_conf); +/**< @internal Get current RSS hash configuration of an Ethernet device */ + +typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev); +/**< @internal Turn on SW controllable LED on an Ethernet device */ + +typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev); +/**< @internal Turn off SW controllable LED on an Ethernet device */ + +typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index); +/**< @internal Remove MAC address from receive address register */ + +typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev, + struct rte_ether_addr *mac_addr, + uint32_t index, + uint32_t vmdq); +/**< @internal Set a MAC address into Receive Address Register */ + +typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev, + struct rte_ether_addr *mac_addr); +/**< @internal Set a MAC address into Receive Address Register */ + +typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev, + struct rte_ether_addr *mac_addr, + uint8_t on); +/**< @internal Set a Unicast Hash bitmap */ + +typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev, + uint8_t on); +/**< @internal Set all Unicast Hash bitmap */ + +typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev, + uint16_t queue_idx, + uint16_t tx_rate); +/**< @internal Set queue TX rate */ + +typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev, + struct rte_eth_mirror_conf *mirror_conf, + uint8_t rule_id, + uint8_t on); +/**< @internal Add a traffic mirroring rule on an Ethernet device */ + +typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev, + uint8_t rule_id); +/**< @internal Remove a traffic mirroring rule on an Ethernet device */ + +typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev, + struct rte_eth_udp_tunnel *tunnel_udp); +/**< @internal Add tunneling UDP port */ + +typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev, + struct rte_eth_udp_tunnel *tunnel_udp); +/**< @internal Delete tunneling UDP port */ + +typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev, + struct rte_ether_addr *mc_addr_set, + uint32_t nb_mc_addr); +/**< @internal set the list of multicast addresses on an Ethernet device */ + +typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev); +/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */ + +typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev); +/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */ + +typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev, + struct timespec *timestamp, + uint32_t flags); +/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */ + +typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev, + struct timespec *timestamp); +/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */ + +typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t); +/**< @internal Function used to adjust the device clock */ + +typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev, + struct timespec *timestamp); +/**< @internal Function used to get time from the device clock. */ + +typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev, + const struct timespec *timestamp); +/**< @internal Function used to get time from the device clock */ + +typedef int (*eth_read_clock)(struct rte_eth_dev *dev, + uint64_t *timestamp); +/**< @internal Function used to get the current value of the device clock. */ + +typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev, + struct rte_dev_reg_info *info); +/**< @internal Retrieve registers */ + +typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev); +/**< @internal Retrieve eeprom size */ + +typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev, + struct rte_dev_eeprom_info *info); +/**< @internal Retrieve eeprom data */ + +typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev, + struct rte_dev_eeprom_info *info); +/**< @internal Program eeprom data */ + +typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev, + struct rte_eth_dev_module_info *modinfo); +/**< @internal Retrieve type and size of plugin module eeprom */ + +typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev, + struct rte_dev_eeprom_info *info); +/**< @internal Retrieve plugin module eeprom data */ + +/** + * Feature filter types + */ +enum rte_filter_type { + RTE_ETH_FILTER_NONE = 0, + RTE_ETH_FILTER_ETHERTYPE, + RTE_ETH_FILTER_FLEXIBLE, + RTE_ETH_FILTER_SYN, + RTE_ETH_FILTER_NTUPLE, + RTE_ETH_FILTER_TUNNEL, + RTE_ETH_FILTER_FDIR, + RTE_ETH_FILTER_HASH, + RTE_ETH_FILTER_L2_TUNNEL, + RTE_ETH_FILTER_GENERIC, +}; + +/** + * Generic operations on filters + */ +enum rte_filter_op { + RTE_ETH_FILTER_GET, /**< get flow API ops */ +}; + +typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev, + enum rte_filter_type filter_type, + enum rte_filter_op filter_op, + void *arg); +/**< @internal Take operations to assigned filter type on an Ethernet device */ + +typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops); +/**< @internal Get Traffic Management (TM) operations on an Ethernet device */ + +typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops); +/**< @internal Get Traffic Metering and Policing (MTR) operations */ + +typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev, + struct rte_eth_dcb_info *dcb_info); +/**< @internal Get dcb information on an Ethernet device */ + +typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev, + const char *pool); +/**< @internal Test if a port supports specific mempool ops */ + +/** + * @internal + * Get the hairpin capabilities. + * + * @param dev + * ethdev handle of port. + * @param cap + * returns the hairpin capabilities from the device. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, hairpin is supported. + * @retval -ENOTSUP + * Hairpin is not supported. + */ +typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev, + struct rte_eth_hairpin_cap *cap); + +/** + * @internal + * Setup RX hairpin queue. + * + * @param dev + * ethdev handle of port. + * @param rx_queue_id + * the selected RX queue index. + * @param nb_rx_desc + * the requested number of descriptors for this queue. 0 - use PMD default. + * @param conf + * the RX hairpin configuration structure. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, hairpin is supported. + * @retval -ENOTSUP + * Hairpin is not supported. + * @retval -EINVAL + * One of the parameters is invalid. + * @retval -ENOMEM + * Unable to allocate resources. + */ +typedef int (*eth_rx_hairpin_queue_setup_t) + (struct rte_eth_dev *dev, uint16_t rx_queue_id, + uint16_t nb_rx_desc, + const struct rte_eth_hairpin_conf *conf); + +/** + * @internal + * Setup TX hairpin queue. + * + * @param dev + * ethdev handle of port. + * @param tx_queue_id + * the selected TX queue index. + * @param nb_tx_desc + * the requested number of descriptors for this queue. 0 - use PMD default. + * @param conf + * the TX hairpin configuration structure. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, hairpin is supported. + * @retval -ENOTSUP + * Hairpin is not supported. + * @retval -EINVAL + * One of the parameters is invalid. + * @retval -ENOMEM + * Unable to allocate resources. + */ +typedef int (*eth_tx_hairpin_queue_setup_t) + (struct rte_eth_dev *dev, uint16_t tx_queue_id, + uint16_t nb_tx_desc, + const struct rte_eth_hairpin_conf *hairpin_conf); + +/** + * @internal + * Get Forward Error Correction(FEC) capability. + * + * @param dev + * ethdev handle of port. + * @param speed_fec_capa + * speed_fec_capa is out only with per-speed capabilities. + * @param num + * a number of elements in an speed_fec_capa array. + * + * @return + * Negative errno value on error, positive value on success. + * + * @retval positive value + * A non-negative value lower or equal to num: success. The return value + * is the number of entries filled in the fec capa array. + * A non-negative value higher than num: error, the given fec capa array + * is too small. The return value corresponds to the num that should + * be given to succeed. The entries in the fec capa array are not valid + * and shall not be used by the caller. + * @retval -ENOTSUP + * Operation is not supported. + * @retval -EIO + * Device is removed. + * @retval -EINVAL + * *num* or *speed_fec_capa* invalid. + */ +typedef int (*eth_fec_get_capability_t)(struct rte_eth_dev *dev, + struct rte_eth_fec_capa *speed_fec_capa, unsigned int num); + +/** + * @internal + * Get Forward Error Correction(FEC) mode. + * + * @param dev + * ethdev handle of port. + * @param fec_capa + * a bitmask of enabled FEC modes. If AUTO bit is set, other + * bits specify FEC modes which may be negotiated. If AUTO + * bit is clear, specify FEC modes to be used (only one valid + * mode per speed may be set). + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, get FEC success. + * @retval -ENOTSUP + * Operation is not supported. + * @retval -EIO + * Device is removed. + */ +typedef int (*eth_fec_get_t)(struct rte_eth_dev *dev, + uint32_t *fec_capa); + +/** + * @internal + * Set Forward Error Correction(FEC) mode. + * + * @param dev + * ethdev handle of port. + * @param fec_capa + * bitmask of allowed FEC modes. It must be only one + * if AUTO is disabled. If AUTO is enabled, other + * bits specify FEC modes which may be negotiated. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, set FEC success. + * @retval -ENOTSUP + * Operation is not supported. + * @retval -EINVAL + * Unsupported FEC mode requested. + * @retval -EIO + * Device is removed. + */ +typedef int (*eth_fec_set_t)(struct rte_eth_dev *dev, uint32_t fec_capa); + +/** + * @internal + * Get all hairpin Tx/Rx peer ports of the current device, if any. + * + * @param dev + * ethdev handle of port. + * @param peer_ports + * array to save the ports list. + * @param len + * array length. + * @param direction + * value to decide the current to peer direction + * positive - used as Tx to get all peer Rx ports. + * zero - used as Rx to get all peer Tx ports. + * + * @return + * Negative errno value on error, 0 or positive on success. + * + * @retval 0 + * Success, no peer ports. + * @retval >0 + * Actual number of the peer ports. + * @retval -ENOTSUP + * Get peer ports API is not supported. + * @retval -EINVAL + * One of the parameters is invalid. + */ +typedef int (*hairpin_get_peer_ports_t)(struct rte_eth_dev *dev, + uint16_t *peer_ports, size_t len, + uint32_t direction); + +/** + * @internal + * Bind all hairpin Tx queues of one port to the Rx queues of the peer port. + * + * @param dev + * ethdev handle of port. + * @param rx_port + * the peer Rx port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, bind successfully. + * @retval -ENOTSUP + * Bind API is not supported. + * @retval -EINVAL + * One of the parameters is invalid. + * @retval -EBUSY + * Device is not started. + */ +typedef int (*eth_hairpin_bind_t)(struct rte_eth_dev *dev, + uint16_t rx_port); + +/** + * @internal + * Unbind all hairpin Tx queues of one port from the Rx queues of the peer port. + * + * @param dev + * ethdev handle of port. + * @param rx_port + * the peer Rx port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, unbind successfully. + * @retval -ENOTSUP + * Bind API is not supported. + * @retval -EINVAL + * One of the parameters is invalid. + * @retval -EBUSY + * Device is already stopped. + */ +typedef int (*eth_hairpin_unbind_t)(struct rte_eth_dev *dev, + uint16_t rx_port); + +typedef int (*eth_hairpin_queue_peer_update_t) + (struct rte_eth_dev *dev, uint16_t peer_queue, + struct rte_hairpin_peer_info *current_info, + struct rte_hairpin_peer_info *peer_info, uint32_t direction); +/**< @internal Update and fetch peer queue information. */ + +typedef int (*eth_hairpin_queue_peer_bind_t) + (struct rte_eth_dev *dev, uint16_t cur_queue, + struct rte_hairpin_peer_info *peer_info, uint32_t direction); +/**< @internal Bind peer queue to the current queue with fetched information. */ + +typedef int (*eth_hairpin_queue_peer_unbind_t) + (struct rte_eth_dev *dev, uint16_t cur_queue, uint32_t direction); +/**< @internal Unbind peer queue from the current queue. */ + +/** + * @internal + * Get address of memory location whose contents will change whenever there is + * new data to be received on an Rx queue. + * + * @param rxq + * Ethdev queue pointer. + * @param pmc + * The pointer to power-optimized monitoring condition structure. + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success + * @retval -EINVAL + * Invalid parameters + */ +typedef int (*eth_get_monitor_addr_t)(void *rxq, + struct rte_power_monitor_cond *pmc); + +/** + * @internal A structure containing the functions exported by an Ethernet driver. + */ +struct eth_dev_ops { + eth_dev_configure_t dev_configure; /**< Configure device. */ + eth_dev_start_t dev_start; /**< Start device. */ + eth_dev_stop_t dev_stop; /**< Stop device. */ + eth_dev_set_link_up_t dev_set_link_up; /**< Device link up. */ + eth_dev_set_link_down_t dev_set_link_down; /**< Device link down. */ + eth_dev_close_t dev_close; /**< Close device. */ + eth_dev_reset_t dev_reset; /**< Reset device. */ + eth_link_update_t link_update; /**< Get device link state. */ + eth_is_removed_t is_removed; + /**< Check if the device was physically removed. */ + + eth_promiscuous_enable_t promiscuous_enable; /**< Promiscuous ON. */ + eth_promiscuous_disable_t promiscuous_disable;/**< Promiscuous OFF. */ + eth_allmulticast_enable_t allmulticast_enable;/**< RX multicast ON. */ + eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */ + eth_mac_addr_remove_t mac_addr_remove; /**< Remove MAC address. */ + eth_mac_addr_add_t mac_addr_add; /**< Add a MAC address. */ + eth_mac_addr_set_t mac_addr_set; /**< Set a MAC address. */ + eth_set_mc_addr_list_t set_mc_addr_list; /**< set list of mcast addrs. */ + mtu_set_t mtu_set; /**< Set MTU. */ + + eth_stats_get_t stats_get; /**< Get generic device statistics. */ + eth_stats_reset_t stats_reset; /**< Reset generic device statistics. */ + eth_xstats_get_t xstats_get; /**< Get extended device statistics. */ + eth_xstats_reset_t xstats_reset; /**< Reset extended device statistics. */ + eth_xstats_get_names_t xstats_get_names; + /**< Get names of extended statistics. */ + eth_queue_stats_mapping_set_t queue_stats_mapping_set; + /**< Configure per queue stat counter mapping. */ + + eth_dev_infos_get_t dev_infos_get; /**< Get device info. */ + eth_rxq_info_get_t rxq_info_get; /**< retrieve RX queue information. */ + eth_txq_info_get_t txq_info_get; /**< retrieve TX queue information. */ + eth_burst_mode_get_t rx_burst_mode_get; /**< Get RX burst mode */ + eth_burst_mode_get_t tx_burst_mode_get; /**< Get TX burst mode */ + eth_fw_version_get_t fw_version_get; /**< Get firmware version. */ + eth_dev_supported_ptypes_get_t dev_supported_ptypes_get; + /**< Get packet types supported and identified by device. */ + eth_dev_ptypes_set_t dev_ptypes_set; + /**< Inform Ethernet device about reduced range of packet types to handle. */ + + vlan_filter_set_t vlan_filter_set; /**< Filter VLAN Setup. */ + vlan_tpid_set_t vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */ + vlan_strip_queue_set_t vlan_strip_queue_set; /**< VLAN Stripping on queue. */ + vlan_offload_set_t vlan_offload_set; /**< Set VLAN Offload. */ + vlan_pvid_set_t vlan_pvid_set; /**< Set port based TX VLAN insertion. */ + + eth_queue_start_t rx_queue_start;/**< Start RX for a queue. */ + eth_queue_stop_t rx_queue_stop; /**< Stop RX for a queue. */ + eth_queue_start_t tx_queue_start;/**< Start TX for a queue. */ + eth_queue_stop_t tx_queue_stop; /**< Stop TX for a queue. */ + eth_rx_queue_setup_t rx_queue_setup;/**< Set up device RX queue. */ + eth_queue_release_t rx_queue_release; /**< Release RX queue. */ + + eth_rx_enable_intr_t rx_queue_intr_enable; /**< Enable Rx queue interrupt. */ + eth_rx_disable_intr_t rx_queue_intr_disable; /**< Disable Rx queue interrupt. */ + eth_tx_queue_setup_t tx_queue_setup;/**< Set up device TX queue. */ + eth_queue_release_t tx_queue_release; /**< Release TX queue. */ + eth_tx_done_cleanup_t tx_done_cleanup;/**< Free tx ring mbufs */ + + eth_dev_led_on_t dev_led_on; /**< Turn on LED. */ + eth_dev_led_off_t dev_led_off; /**< Turn off LED. */ + + flow_ctrl_get_t flow_ctrl_get; /**< Get flow control. */ + flow_ctrl_set_t flow_ctrl_set; /**< Setup flow control. */ + priority_flow_ctrl_set_t priority_flow_ctrl_set; /**< Setup priority flow control. */ + + eth_uc_hash_table_set_t uc_hash_table_set; /**< Set Unicast Table Array. */ + eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */ + + eth_mirror_rule_set_t mirror_rule_set; /**< Add a traffic mirror rule. */ + eth_mirror_rule_reset_t mirror_rule_reset; /**< reset a traffic mirror rule. */ + + eth_udp_tunnel_port_add_t udp_tunnel_port_add; /** Add UDP tunnel port. */ + eth_udp_tunnel_port_del_t udp_tunnel_port_del; /** Del UDP tunnel port. */ + + eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */ + + rss_hash_update_t rss_hash_update; /** Configure RSS hash protocols. */ + rss_hash_conf_get_t rss_hash_conf_get; /** Get current RSS hash configuration. */ + reta_update_t reta_update; /** Update redirection table. */ + reta_query_t reta_query; /** Query redirection table. */ + + eth_get_reg_t get_reg; /**< Get registers. */ + eth_get_eeprom_length_t get_eeprom_length; /**< Get eeprom length. */ + eth_get_eeprom_t get_eeprom; /**< Get eeprom data. */ + eth_set_eeprom_t set_eeprom; /**< Set eeprom. */ + + eth_get_module_info_t get_module_info; + /** Get plugin module eeprom attribute. */ + eth_get_module_eeprom_t get_module_eeprom; + /** Get plugin module eeprom data. */ + + eth_filter_ctrl_t filter_ctrl; /**< common filter control. */ + + eth_get_dcb_info get_dcb_info; /** Get DCB information. */ + + eth_timesync_enable_t timesync_enable; + /** Turn IEEE1588/802.1AS timestamping on. */ + eth_timesync_disable_t timesync_disable; + /** Turn IEEE1588/802.1AS timestamping off. */ + eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp; + /** Read the IEEE1588/802.1AS RX timestamp. */ + eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp; + /** Read the IEEE1588/802.1AS TX timestamp. */ + eth_timesync_adjust_time timesync_adjust_time; /** Adjust the device clock. */ + eth_timesync_read_time timesync_read_time; /** Get the device clock time. */ + eth_timesync_write_time timesync_write_time; /** Set the device clock time. */ + + eth_read_clock read_clock; + + eth_xstats_get_by_id_t xstats_get_by_id; + /**< Get extended device statistic values by ID. */ + eth_xstats_get_names_by_id_t xstats_get_names_by_id; + /**< Get name of extended device statistics by ID. */ + + eth_tm_ops_get_t tm_ops_get; + /**< Get Traffic Management (TM) operations. */ + + eth_mtr_ops_get_t mtr_ops_get; + /**< Get Traffic Metering and Policing (MTR) operations. */ + + eth_pool_ops_supported_t pool_ops_supported; + /**< Test if a port supports specific mempool ops */ + + eth_hairpin_cap_get_t hairpin_cap_get; + /**< Returns the hairpin capabilities. */ + eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup; + /**< Set up device RX hairpin queue. */ + eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup; + /**< Set up device TX hairpin queue. */ + + eth_fec_get_capability_t fec_get_capability; + /**< Get Forward Error Correction(FEC) capability. */ + eth_fec_get_t fec_get; + /**< Get Forward Error Correction(FEC) mode. */ + eth_fec_set_t fec_set; + /**< Set Forward Error Correction(FEC) mode. */ + hairpin_get_peer_ports_t hairpin_get_peer_ports; + /**< Get hairpin peer ports list. */ + eth_hairpin_bind_t hairpin_bind; + /**< Bind all hairpin Tx queues of device to the peer port Rx queues. */ + eth_hairpin_unbind_t hairpin_unbind; + /**< Unbind all hairpin Tx queues from the peer port Rx queues. */ + eth_hairpin_queue_peer_update_t hairpin_queue_peer_update; + /**< Pass the current queue info and get the peer queue info. */ + eth_hairpin_queue_peer_bind_t hairpin_queue_peer_bind; + /**< Set up the connection between the pair of hairpin queues. */ + eth_hairpin_queue_peer_unbind_t hairpin_queue_peer_unbind; + /**< Disconnect the hairpin queues of a pair from each other. */ + + eth_get_monitor_addr_t get_monitor_addr; + /**< Get power monitoring condition for Rx queue. */ +}; + +/** + * RX/TX queue states + */ +#define RTE_ETH_QUEUE_STATE_STOPPED 0 +#define RTE_ETH_QUEUE_STATE_STARTED 1 +#define RTE_ETH_QUEUE_STATE_HAIRPIN 2 + +/** + * @internal + * Check if the selected Rx queue is hairpin queue. + * + * @param dev + * Pointer to the selected device. + * @param queue_id + * The selected queue. + * + * @return + * - (1) if the queue is hairpin queue, 0 otherwise. + */ +__rte_internal +int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id); + +/** + * @internal + * Check if the selected Tx queue is hairpin queue. + * + * @param dev + * Pointer to the selected device. + * @param queue_id + * The selected queue. + * + * @return + * - (1) if the queue is hairpin queue, 0 otherwise. + */ +__rte_internal +int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id); + +/** + * @internal + * Returns a ethdev slot specified by the unique identifier name. + * + * @param name + * The pointer to the Unique identifier name for each Ethernet device + * @return + * - The pointer to the ethdev slot, on success. NULL on error + */ +__rte_internal +struct rte_eth_dev *rte_eth_dev_allocated(const char *name); + +/** + * @internal + * Allocates a new ethdev slot for an ethernet device and returns the pointer + * to that slot for the driver to use. + * + * @param name Unique identifier name for each Ethernet device + * @return + * - Slot in the rte_dev_devices array for a new device; + */ +__rte_internal +struct rte_eth_dev *rte_eth_dev_allocate(const char *name); + +/** + * @internal + * Attach to the ethdev already initialized by the primary + * process. + * + * @param name Ethernet device's name. + * @return + * - Success: Slot in the rte_dev_devices array for attached + * device. + * - Error: Null pointer. + */ +__rte_internal +struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name); + +/** + * @internal + * Notify RTE_ETH_EVENT_DESTROY and release the specified ethdev port. + * + * The following PMD-managed data fields will be freed: + * - dev_private + * - mac_addrs + * - hash_mac_addrs + * If one of these fields should not be freed, + * it must be reset to NULL by the PMD, typically in dev_close method. + * + * @param eth_dev + * Device to be detached. + * @return + * - 0 on success, negative on error + */ +__rte_internal +int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev); + +/** + * @internal + * Release device queues and clear its configuration to force the user + * application to reconfigure it. It is for internal use only. + * + * @param dev + * Pointer to struct rte_eth_dev. + * + * @return + * void + */ +__rte_internal +void rte_eth_dev_internal_reset(struct rte_eth_dev *dev); + +/** + * @internal Executes all the user application registered callbacks for + * the specific device. It is for DPDK internal user only. User + * application should not call it directly. + * + * @param dev + * Pointer to struct rte_eth_dev. + * @param event + * Eth device interrupt event type. + * @param ret_param + * To pass data back to user application. + * This allows the user application to decide if a particular function + * is permitted or not. + * + * @return + * int + */ +__rte_internal +int rte_eth_dev_callback_process(struct rte_eth_dev *dev, + enum rte_eth_event_type event, void *ret_param); + +/** + * @internal + * This is the last step of device probing. + * It must be called after a port is allocated and initialized successfully. + * + * The notification RTE_ETH_EVENT_NEW is sent to other entities + * (libraries and applications). + * The state is set as RTE_ETH_DEV_ATTACHED. + * + * @param dev + * New ethdev port. + */ +__rte_internal +void rte_eth_dev_probing_finish(struct rte_eth_dev *dev); + +/** + * Create memzone for HW rings. + * malloc can't be used as the physical address is needed. + * If the memzone is already created, then this function returns a ptr + * to the old one. + * + * @param eth_dev + * The *eth_dev* pointer is the address of the *rte_eth_dev* structure + * @param name + * The name of the memory zone + * @param queue_id + * The index of the queue to add to name + * @param size + * The sizeof of the memory area + * @param align + * Alignment for resulting memzone. Must be a power of 2. + * @param socket_id + * The *socket_id* argument is the socket identifier in case of NUMA. + */ +__rte_internal +const struct rte_memzone * +rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name, + uint16_t queue_id, size_t size, + unsigned align, int socket_id); + +/** + * Free previously allocated memzone for HW rings. + * + * @param eth_dev + * The *eth_dev* pointer is the address of the *rte_eth_dev* structure + * @param name + * The name of the memory zone + * @param queue_id + * The index of the queue to add to name + * @return + * Negative errno value on error, 0 on success. + */ +__rte_internal +int +rte_eth_dma_zone_free(const struct rte_eth_dev *eth_dev, const char *name, + uint16_t queue_id); + +/** + * @internal + * Atomically set the link status for the specific device. + * It is for use by DPDK device driver use only. + * User applications should not call it + * + * @param dev + * Pointer to struct rte_eth_dev. + * @param link + * New link status value. + * @return + * Same convention as eth_link_update operation. + * 0 if link up status has changed + * -1 if link up status was unchanged + */ +static inline int +rte_eth_linkstatus_set(struct rte_eth_dev *dev, + const struct rte_eth_link *new_link) +{ + uint64_t *dev_link = (uint64_t *)&(dev->data->dev_link); + union { + uint64_t val64; + struct rte_eth_link link; + } orig; + + RTE_BUILD_BUG_ON(sizeof(*new_link) != sizeof(uint64_t)); + + orig.val64 = __atomic_exchange_n(dev_link, *(const uint64_t *)new_link, + __ATOMIC_SEQ_CST); + + return (orig.link.link_status == new_link->link_status) ? -1 : 0; +} + +/** + * @internal + * Atomically get the link speed and status. + * + * @param dev + * Pointer to struct rte_eth_dev. + * @param link + * link status value. + */ +static inline void +rte_eth_linkstatus_get(const struct rte_eth_dev *dev, + struct rte_eth_link *link) +{ + uint64_t *src = (uint64_t *)&(dev->data->dev_link); + uint64_t *dst = (uint64_t *)link; + + RTE_BUILD_BUG_ON(sizeof(*link) != sizeof(uint64_t)); + + *dst = __atomic_load_n(src, __ATOMIC_SEQ_CST); +} + +/** + * Allocate an unique switch domain identifier. + * + * A pool of switch domain identifiers which can be allocated on request. This + * will enabled devices which support the concept of switch domains to request + * a switch domain id which is guaranteed to be unique from other devices + * running in the same process. + * + * @param domain_id + * switch domain identifier parameter to pass back to application + * + * @return + * Negative errno value on error, 0 on success. + */ +__rte_internal +int +rte_eth_switch_domain_alloc(uint16_t *domain_id); + +/** + * Free switch domain. + * + * Return a switch domain identifier to the pool of free identifiers after it is + * no longer in use by device. + * + * @param domain_id + * switch domain identifier to free + * + * @return + * Negative errno value on error, 0 on success. + */ +__rte_internal +int +rte_eth_switch_domain_free(uint16_t domain_id); + +/** Generic Ethernet device arguments */ +struct rte_eth_devargs { + uint16_t ports[RTE_MAX_ETHPORTS]; + /** port/s number to enable on a multi-port single function */ + uint16_t nb_ports; + /** number of ports in ports field */ + uint16_t representor_ports[RTE_MAX_ETHPORTS]; + /** representor port/s identifier to enable on device */ + uint16_t nb_representor_ports; + /** number of ports in representor port field */ +}; + +/** + * PMD helper function to parse ethdev arguments + * + * @param devargs + * device arguments + * @param eth_devargs + * parsed ethdev specific arguments. + * + * @return + * Negative errno value on error, 0 on success. + */ +__rte_internal +int +rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs); + + +typedef int (*ethdev_init_t)(struct rte_eth_dev *ethdev, void *init_params); +typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev, + void *bus_specific_init_params); + +/** + * PMD helper function for the creation of a new ethdev ports. + * + * @param device + * rte_device handle. + * @param name + * port name. + * @param priv_data_size + * size of private data required for port. + * @param bus_specific_init + * port bus specific initialisation callback function + * @param bus_init_params + * port bus specific initialisation parameters + * @param ethdev_init + * device specific port initialization callback function + * @param init_params + * port initialisation parameters + * + * @return + * Negative errno value on error, 0 on success. + */ +__rte_internal +int +rte_eth_dev_create(struct rte_device *device, const char *name, + size_t priv_data_size, + ethdev_bus_specific_init bus_specific_init, void *bus_init_params, + ethdev_init_t ethdev_init, void *init_params); + + +typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev); + +/** + * PMD helper function for cleaning up the resources of a ethdev port on it's + * destruction. + * + * @param ethdev + * ethdev handle of port. + * @param ethdev_uninit + * device specific port un-initialise callback function + * + * @return + * Negative errno value on error, 0 on success. + */ +__rte_internal +int +rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit); + +/** + * @internal + * Pass the current hairpin queue HW and/or SW information to the peer queue + * and fetch back the information of the peer queue. + * + * @param peer_port + * Peer port identifier of the Ethernet device. + * @param peer_queue + * Peer queue index of the port. + * @param cur_info + * Pointer to the current information structure. + * @param peer_info + * Pointer to the peer information, output. + * @param direction + * Direction to pass the information. + * positive - pass Tx queue information and get peer Rx queue information + * zero - pass Rx queue information and get peer Tx queue information + * + * @return + * Negative errno value on error, 0 on success. + */ +__rte_internal +int +rte_eth_hairpin_queue_peer_update(uint16_t peer_port, uint16_t peer_queue, + struct rte_hairpin_peer_info *cur_info, + struct rte_hairpin_peer_info *peer_info, + uint32_t direction); + +/** + * @internal + * Configure current hairpin queue with the peer information fetched to create + * the connection (bind) with peer queue in the specified direction. + * This function might need to be called twice to fully create the connections. + * + * @param cur_port + * Current port identifier of the Ethernet device. + * @param cur_queue + * Current queue index of the port. + * @param peer_info + * Pointer to the peer information, input. + * @param direction + * Direction to create the connection. + * positive - bind current Tx queue to peer Rx queue + * zero - bind current Rx queue to peer Tx queue + * + * @return + * Negative errno value on error, 0 on success. + */ +__rte_internal +int +rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue, + struct rte_hairpin_peer_info *peer_info, + uint32_t direction); + +/** + * @internal + * Reset the current queue state and configuration to disconnect (unbind) it + * from the peer queue. + * This function might need to be called twice to disconnect each other. + * + * @param cur_port + * Current port identifier of the Ethernet device. + * @param cur_queue + * Current queue index of the port. + * @param direction + * Direction to destroy the connection. + * positive - unbind current Tx queue from peer Rx queue + * zero - unbind current Rx queue from peer Tx queue + * + * @return + * Negative errno value on error, 0 on success. + */ +__rte_internal +int +rte_eth_hairpin_queue_peer_unbind(uint16_t cur_port, uint16_t cur_queue, + uint32_t direction); + + +/* + * Legacy ethdev API used internally by drivers. + */ + +/** + * Define all structures for Ethertype Filter type. + */ + +#define RTE_ETHTYPE_FLAGS_MAC 0x0001 /**< If set, compare mac */ +#define RTE_ETHTYPE_FLAGS_DROP 0x0002 /**< If set, drop packet when match */ + +/** + * A structure used to define the ethertype filter entry + * to support RTE_ETH_FILTER_ETHERTYPE data representation. + */ +struct rte_eth_ethertype_filter { + struct rte_ether_addr mac_addr; /**< Mac address to match. */ + uint16_t ether_type; /**< Ether type to match */ + uint16_t flags; /**< Flags from RTE_ETHTYPE_FLAGS_* */ + uint16_t queue; /**< Queue assigned to when match*/ +}; + +/** + * A structure used to define the TCP syn filter entry + * to support RTE_ETH_FILTER_SYN data representation. + */ +struct rte_eth_syn_filter { + /** 1 - higher priority than other filters, 0 - lower priority. */ + uint8_t hig_pri; + uint16_t queue; /**< Queue assigned to when match */ +}; + +/** + * filter type of tunneling packet + */ +#define ETH_TUNNEL_FILTER_OMAC 0x01 /**< filter by outer MAC addr */ +#define ETH_TUNNEL_FILTER_OIP 0x02 /**< filter by outer IP Addr */ +#define ETH_TUNNEL_FILTER_TENID 0x04 /**< filter by tenant ID */ +#define ETH_TUNNEL_FILTER_IMAC 0x08 /**< filter by inner MAC addr */ +#define ETH_TUNNEL_FILTER_IVLAN 0x10 /**< filter by inner VLAN ID */ +#define ETH_TUNNEL_FILTER_IIP 0x20 /**< filter by inner IP addr */ + +#define RTE_TUNNEL_FILTER_IMAC_IVLAN (ETH_TUNNEL_FILTER_IMAC | \ + ETH_TUNNEL_FILTER_IVLAN) +#define RTE_TUNNEL_FILTER_IMAC_IVLAN_TENID (ETH_TUNNEL_FILTER_IMAC | \ + ETH_TUNNEL_FILTER_IVLAN | \ + ETH_TUNNEL_FILTER_TENID) +#define RTE_TUNNEL_FILTER_IMAC_TENID (ETH_TUNNEL_FILTER_IMAC | \ + ETH_TUNNEL_FILTER_TENID) +#define RTE_TUNNEL_FILTER_OMAC_TENID_IMAC (ETH_TUNNEL_FILTER_OMAC | \ + ETH_TUNNEL_FILTER_TENID | \ + ETH_TUNNEL_FILTER_IMAC) + +/** + * Select IPv4 or IPv6 for tunnel filters. + */ +enum rte_tunnel_iptype { + RTE_TUNNEL_IPTYPE_IPV4 = 0, /**< IPv4. */ + RTE_TUNNEL_IPTYPE_IPV6, /**< IPv6. */ +}; + +/** + * Tunneling Packet filter configuration. + */ +struct rte_eth_tunnel_filter_conf { + struct rte_ether_addr outer_mac; /**< Outer MAC address to match. */ + struct rte_ether_addr inner_mac; /**< Inner MAC address to match. */ + uint16_t inner_vlan; /**< Inner VLAN to match. */ + enum rte_tunnel_iptype ip_type; /**< IP address type. */ + /** + * Outer destination IP address to match if ETH_TUNNEL_FILTER_OIP + * is set in filter_type, or inner destination IP address to match + * if ETH_TUNNEL_FILTER_IIP is set in filter_type. + */ + union { + uint32_t ipv4_addr; /**< IPv4 address in big endian. */ + uint32_t ipv6_addr[4]; /**< IPv6 address in big endian. */ + } ip_addr; + /** Flags from ETH_TUNNEL_FILTER_XX - see above. */ + uint16_t filter_type; + enum rte_eth_tunnel_type tunnel_type; /**< Tunnel Type. */ + uint32_t tenant_id; /**< Tenant ID to match. VNI, GRE key... */ + uint16_t queue_id; /**< Queue assigned to if match. */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_ETHDEV_DRIVER_H_ */ diff --git a/lib/librte_ethdev/ethdev_pci.h b/lib/librte_ethdev/ethdev_pci.h new file mode 100644 index 0000000000..8edca82ce8 --- /dev/null +++ b/lib/librte_ethdev/ethdev_pci.h @@ -0,0 +1,164 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2017 Brocade Communications Systems, Inc. + * Author: Jan Blunck + */ + +#ifndef _RTE_ETHDEV_PCI_H_ +#define _RTE_ETHDEV_PCI_H_ + +#include +#include +#include +#include +#include + +/** + * Copy pci device info to the Ethernet device data. + * Shared memory (eth_dev->data) only updated by primary process, so it is safe + * to call this function from both primary and secondary processes. + * + * @param eth_dev + * The *eth_dev* pointer is the address of the *rte_eth_dev* structure. + * @param pci_dev + * The *pci_dev* pointer is the address of the *rte_pci_device* structure. + */ +static inline void +rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, + struct rte_pci_device *pci_dev) +{ + if ((eth_dev == NULL) || (pci_dev == NULL)) { + RTE_ETHDEV_LOG(ERR, "NULL pointer eth_dev=%p pci_dev=%p", + (void *)eth_dev, (void *)pci_dev); + return; + } + + eth_dev->intr_handle = &pci_dev->intr_handle; + + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + eth_dev->data->dev_flags = 0; + if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC) + eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; + if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_RMV) + eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV; + + eth_dev->data->numa_node = pci_dev->device.numa_node; + } +} + +static inline int +eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) { + struct rte_pci_device *pci_dev = bus_device; + + if (!pci_dev) + return -ENODEV; + + rte_eth_copy_pci_info(eth_dev, pci_dev); + + return 0; +} + +/** + * @internal + * Allocates a new ethdev slot for an ethernet device and returns the pointer + * to that slot for the driver to use. + * + * @param dev + * Pointer to the PCI device + * + * @param private_data_size + * Size of private data structure + * + * @return + * A pointer to a rte_eth_dev or NULL if allocation failed. + */ +static inline struct rte_eth_dev * +rte_eth_dev_pci_allocate(struct rte_pci_device *dev, size_t private_data_size) +{ + struct rte_eth_dev *eth_dev; + const char *name; + + if (!dev) + return NULL; + + name = dev->device.name; + + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + eth_dev = rte_eth_dev_allocate(name); + if (!eth_dev) + return NULL; + + if (private_data_size) { + eth_dev->data->dev_private = rte_zmalloc_socket(name, + private_data_size, RTE_CACHE_LINE_SIZE, + dev->device.numa_node); + if (!eth_dev->data->dev_private) { + rte_eth_dev_release_port(eth_dev); + return NULL; + } + } + } else { + eth_dev = rte_eth_dev_attach_secondary(name); + if (!eth_dev) + return NULL; + } + + eth_dev->device = &dev->device; + rte_eth_copy_pci_info(eth_dev, dev); + return eth_dev; +} + +typedef int (*eth_dev_pci_callback_t)(struct rte_eth_dev *eth_dev); + +/** + * @internal + * Wrapper for use by pci drivers in a .probe function to attach to a ethdev + * interface. + */ +static inline int +rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev, + size_t private_data_size, eth_dev_pci_callback_t dev_init) +{ + struct rte_eth_dev *eth_dev; + int ret; + + eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size); + if (!eth_dev) + return -ENOMEM; + + RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL); + ret = dev_init(eth_dev); + if (ret) + rte_eth_dev_release_port(eth_dev); + else + rte_eth_dev_probing_finish(eth_dev); + + return ret; +} + +/** + * @internal + * Wrapper for use by pci drivers in a .remove function to detach a ethdev + * interface. + */ +static inline int +rte_eth_dev_pci_generic_remove(struct rte_pci_device *pci_dev, + eth_dev_pci_callback_t dev_uninit) +{ + struct rte_eth_dev *eth_dev; + int ret; + + eth_dev = rte_eth_dev_allocated(pci_dev->device.name); + if (!eth_dev) + return 0; + + if (dev_uninit) { + ret = dev_uninit(eth_dev); + if (ret) + return ret; + } + + rte_eth_dev_release_port(eth_dev); + return 0; +} + +#endif /* _RTE_ETHDEV_PCI_H_ */ diff --git a/lib/librte_ethdev/ethdev_private.c b/lib/librte_ethdev/ethdev_private.c index 162a502fe7..5960c75cc5 100644 --- a/lib/librte_ethdev/ethdev_private.c +++ b/lib/librte_ethdev/ethdev_private.c @@ -3,7 +3,7 @@ */ #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_private.h" uint16_t diff --git a/lib/librte_ethdev/ethdev_vdev.h b/lib/librte_ethdev/ethdev_vdev.h new file mode 100644 index 0000000000..46c75d9e5f --- /dev/null +++ b/lib/librte_ethdev/ethdev_vdev.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2017 Brocade Communications Systems, Inc. + * Author: Jan Blunck + */ + +#ifndef _RTE_ETHDEV_VDEV_H_ +#define _RTE_ETHDEV_VDEV_H_ + +#include +#include +#include +#include + +/** + * @internal + * Allocates a new ethdev slot for an ethernet device and returns the pointer + * to that slot for the driver to use. + * + * @param dev + * Pointer to virtual device + * + * @param private_data_size + * Size of private data structure + * + * @return + * A pointer to a rte_eth_dev or NULL if allocation failed. + */ +static inline struct rte_eth_dev * +rte_eth_vdev_allocate(struct rte_vdev_device *dev, size_t private_data_size) +{ + struct rte_eth_dev *eth_dev; + const char *name = rte_vdev_device_name(dev); + + eth_dev = rte_eth_dev_allocate(name); + if (!eth_dev) + return NULL; + + if (private_data_size) { + eth_dev->data->dev_private = rte_zmalloc_socket(name, + private_data_size, RTE_CACHE_LINE_SIZE, + dev->device.numa_node); + if (!eth_dev->data->dev_private) { + rte_eth_dev_release_port(eth_dev); + return NULL; + } + } + + eth_dev->device = &dev->device; + eth_dev->intr_handle = NULL; + + eth_dev->data->numa_node = dev->device.numa_node; + return eth_dev; +} + +#endif /* _RTE_ETHDEV_VDEV_H_ */ diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index e4b610246f..829abd456b 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -11,12 +11,9 @@ sources = files('ethdev_private.c', 'rte_tm.c') headers = files('rte_ethdev.h', - 'rte_ethdev_driver.h', 'rte_ethdev_core.h', - 'rte_ethdev_pci.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', - 'rte_ethdev_vdev.h', 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', diff --git a/lib/librte_ethdev/rte_class_eth.c b/lib/librte_ethdev/rte_class_eth.c index 6338355e25..ca2ce87f7a 100644 --- a/lib/librte_ethdev/rte_class_eth.c +++ b/lib/librte_ethdev/rte_class_eth.c @@ -12,7 +12,7 @@ #include "rte_ethdev.h" #include "rte_ethdev_core.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_private.h" enum eth_params { diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index daf5f24f7e..f40df65e34 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -41,7 +41,7 @@ #include "rte_ethdev_trace.h" #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_profile.h" #include "ethdev_private.h" diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index eb299955d4..89b8ba2fc4 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -20,7 +20,7 @@ * - The driver-oriented Ethernet API that exports functions allowing * an Ethernet Poll Mode Driver (PMD) to allocate an Ethernet device instance, * create memzone for HW rings and process registered callbacks, and so on. - * PMDs should include rte_ethdev_driver.h instead of this header. + * PMDs should include ethdev_driver.h instead of this header. * * By default, all the functions of the Ethernet Device API exported by a PMD * are lock-free functions which assume to not be invoked in parallel on diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h deleted file mode 100644 index 57fdedaa1a..0000000000 --- a/lib/librte_ethdev/rte_ethdev_driver.h +++ /dev/null @@ -1,1465 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2017 Intel Corporation - */ - -#ifndef _RTE_ETHDEV_DRIVER_H_ -#define _RTE_ETHDEV_DRIVER_H_ - -/** - * @file - * - * RTE Ethernet Device PMD API - * - * These APIs for the use from Ethernet drivers, user applications shouldn't - * use them. - * - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/**< @internal Declaration of the hairpin peer queue information structure. */ -struct rte_hairpin_peer_info; - -/* - * Definitions of all functions exported by an Ethernet driver through the - * generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev* - * structure associated with an Ethernet device. - */ - -typedef int (*eth_dev_configure_t)(struct rte_eth_dev *dev); -/**< @internal Ethernet device configuration. */ - -typedef int (*eth_dev_start_t)(struct rte_eth_dev *dev); -/**< @internal Function used to start a configured Ethernet device. */ - -typedef int (*eth_dev_stop_t)(struct rte_eth_dev *dev); -/**< @internal Function used to stop a configured Ethernet device. */ - -typedef int (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev); -/**< @internal Function used to link up a configured Ethernet device. */ - -typedef int (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev); -/**< @internal Function used to link down a configured Ethernet device. */ - -typedef int (*eth_dev_close_t)(struct rte_eth_dev *dev); -/**< @internal Function used to close a configured Ethernet device. */ - -typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev); -/** <@internal Function used to reset a configured Ethernet device. */ - -typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev); -/**< @internal Function used to detect an Ethernet device removal. */ - -/** - * @internal - * Function used to enable the Rx promiscuous mode of an Ethernet device. - * - * @param dev - * ethdev handle of port. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, promiscuous mode is enabled. - * @retval -ENOTSUP - * Promiscuous mode is not supported. - * @retval -ENODEV - * Device is gone. - * @retval -E_RTE_SECONDARY - * Function was called from a secondary process instance and not supported. - * @retval -ETIMEDOUT - * Attempt to enable promiscuos mode failed because of timeout. - * @retval -EAGAIN - * Failed to enable promiscuous mode. - */ -typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev); - -/** - * @internal - * Function used to disable the Rx promiscuous mode of an Ethernet device. - * - * @param dev - * ethdev handle of port. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, promiscuous mode is disabled. - * @retval -ENOTSUP - * Promiscuous mode disabling is not supported. - * @retval -ENODEV - * Device is gone. - * @retval -E_RTE_SECONDARY - * Function was called from a secondary process instance and not supported. - * @retval -ETIMEDOUT - * Attempt to disable promiscuos mode failed because of timeout. - * @retval -EAGAIN - * Failed to disable promiscuous mode. - */ -typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev); - -/** - * @internal - * Enable the receipt of all multicast packets by an Ethernet device. - * - * @param dev - * ethdev handle of port. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, all-multicast mode is enabled. - * @retval -ENOTSUP - * All-multicast mode is not supported. - * @retval -ENODEV - * Device is gone. - * @retval -E_RTE_SECONDARY - * Function was called from a secondary process instance and not supported. - * @retval -ETIMEDOUT - * Attempt to enable all-multicast mode failed because of timeout. - * @retval -EAGAIN - * Failed to enable all-multicast mode. - */ -typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev); - -/** - * @internal - * Disable the receipt of all multicast packets by an Ethernet device. - * - * @param dev - * ethdev handle of port. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, all-multicast mode is disabled. - * @retval -ENOTSUP - * All-multicast mode disabling is not supported. - * @retval -ENODEV - * Device is gone. - * @retval -E_RTE_SECONDARY - * Function was called from a secondary process instance and not supported. - * @retval -ETIMEDOUT - * Attempt to disable all-multicast mode failed because of timeout. - * @retval -EAGAIN - * Failed to disable all-multicast mode. - */ -typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev); - -typedef int (*eth_link_update_t)(struct rte_eth_dev *dev, - int wait_to_complete); -/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */ - -typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev, - struct rte_eth_stats *igb_stats); -/**< @internal Get global I/O statistics of an Ethernet device. */ - -/** - * @internal - * Reset global I/O statistics of an Ethernet device to 0. - * - * @param dev - * ethdev handle of port. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, statistics has been reset. - * @retval -ENOTSUP - * Resetting statistics is not supported. - * @retval -EINVAL - * Resetting statistics is not valid. - * @retval -ENOMEM - * Not enough memory to get the stats. - */ -typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev); - -typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev, - struct rte_eth_xstat *stats, unsigned int n); -/**< @internal Get extended stats of an Ethernet device. */ - -typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev, - const uint64_t *ids, - uint64_t *values, - unsigned int n); -/**< @internal Get extended stats of an Ethernet device. */ - -/** - * @internal - * Reset extended stats of an Ethernet device. - * - * @param dev - * ethdev handle of port. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, statistics has been reset. - * @retval -ENOTSUP - * Resetting statistics is not supported. - * @retval -EINVAL - * Resetting statistics is not valid. - * @retval -ENOMEM - * Not enough memory to get the stats. - */ -typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev); - -typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev, - struct rte_eth_xstat_name *xstats_names, unsigned int size); -/**< @internal Get names of extended stats of an Ethernet device. */ - -typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev, - struct rte_eth_xstat_name *xstats_names, const uint64_t *ids, - unsigned int size); -/**< @internal Get names of extended stats of an Ethernet device. */ - -typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev, - uint16_t queue_id, - uint8_t stat_idx, - uint8_t is_rx); -/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */ - -typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev, - struct rte_eth_dev_info *dev_info); -/**< @internal Get specific information of an Ethernet device. */ - -typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev); -/**< @internal Get supported ptypes of an Ethernet device. */ - -/** - * @internal - * Inform Ethernet device about reduced range of packet types to handle. - * - * @param dev - * The Ethernet device identifier. - * @param ptype_mask - * The ptype family that application is interested in should be bitwise OR of - * RTE_PTYPE_*_MASK or 0. - * @return - * - (0) if Success. - */ -typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev, - uint32_t ptype_mask); - -typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev, - uint16_t queue_id); -/**< @internal Start rx and tx of a queue of an Ethernet device. */ - -typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev, - uint16_t queue_id); -/**< @internal Stop rx and tx of a queue of an Ethernet device. */ - -typedef int (*eth_rx_queue_setup_t)(struct rte_eth_dev *dev, - uint16_t rx_queue_id, - uint16_t nb_rx_desc, - unsigned int socket_id, - const struct rte_eth_rxconf *rx_conf, - struct rte_mempool *mb_pool); -/**< @internal Set up a receive queue of an Ethernet device. */ - -typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev, - uint16_t tx_queue_id, - uint16_t nb_tx_desc, - unsigned int socket_id, - const struct rte_eth_txconf *tx_conf); -/**< @internal Setup a transmit queue of an Ethernet device. */ - -typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev, - uint16_t rx_queue_id); -/**< @internal Enable interrupt of a receive queue of an Ethernet device. */ - -typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev, - uint16_t rx_queue_id); -/**< @internal Disable interrupt of a receive queue of an Ethernet device. */ - -typedef void (*eth_queue_release_t)(void *queue); -/**< @internal Release memory resources allocated by given RX/TX queue. */ - -typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev, - char *fw_version, size_t fw_size); -/**< @internal Get firmware information of an Ethernet device. */ - -typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt); -/**< @internal Force mbufs to be from TX ring. */ - -typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev, - uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo); - -typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev, - uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo); - -typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev, - uint16_t queue_id, struct rte_eth_burst_mode *mode); - -typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu); -/**< @internal Set MTU. */ - -typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev, - uint16_t vlan_id, - int on); -/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */ - -typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev, - enum rte_vlan_type type, uint16_t tpid); -/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */ - -typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask); -/**< @internal set VLAN offload function by an Ethernet device. */ - -typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev, - uint16_t vlan_id, - int on); -/**< @internal set port based TX VLAN insertion by an Ethernet device. */ - -typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev, - uint16_t rx_queue_id, - int on); -/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */ - -typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev, - struct rte_eth_fc_conf *fc_conf); -/**< @internal Get current flow control parameter on an Ethernet device */ - -typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev, - struct rte_eth_fc_conf *fc_conf); -/**< @internal Setup flow control parameter on an Ethernet device */ - -typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev, - struct rte_eth_pfc_conf *pfc_conf); -/**< @internal Setup priority flow control parameter on an Ethernet device */ - -typedef int (*reta_update_t)(struct rte_eth_dev *dev, - struct rte_eth_rss_reta_entry64 *reta_conf, - uint16_t reta_size); -/**< @internal Update RSS redirection table on an Ethernet device */ - -typedef int (*reta_query_t)(struct rte_eth_dev *dev, - struct rte_eth_rss_reta_entry64 *reta_conf, - uint16_t reta_size); -/**< @internal Query RSS redirection table on an Ethernet device */ - -typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev, - struct rte_eth_rss_conf *rss_conf); -/**< @internal Update RSS hash configuration of an Ethernet device */ - -typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev, - struct rte_eth_rss_conf *rss_conf); -/**< @internal Get current RSS hash configuration of an Ethernet device */ - -typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev); -/**< @internal Turn on SW controllable LED on an Ethernet device */ - -typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev); -/**< @internal Turn off SW controllable LED on an Ethernet device */ - -typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index); -/**< @internal Remove MAC address from receive address register */ - -typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev, - struct rte_ether_addr *mac_addr, - uint32_t index, - uint32_t vmdq); -/**< @internal Set a MAC address into Receive Address Register */ - -typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev, - struct rte_ether_addr *mac_addr); -/**< @internal Set a MAC address into Receive Address Register */ - -typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev, - struct rte_ether_addr *mac_addr, - uint8_t on); -/**< @internal Set a Unicast Hash bitmap */ - -typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev, - uint8_t on); -/**< @internal Set all Unicast Hash bitmap */ - -typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev, - uint16_t queue_idx, - uint16_t tx_rate); -/**< @internal Set queue TX rate */ - -typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev, - struct rte_eth_mirror_conf *mirror_conf, - uint8_t rule_id, - uint8_t on); -/**< @internal Add a traffic mirroring rule on an Ethernet device */ - -typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev, - uint8_t rule_id); -/**< @internal Remove a traffic mirroring rule on an Ethernet device */ - -typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev, - struct rte_eth_udp_tunnel *tunnel_udp); -/**< @internal Add tunneling UDP port */ - -typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev, - struct rte_eth_udp_tunnel *tunnel_udp); -/**< @internal Delete tunneling UDP port */ - -typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev, - struct rte_ether_addr *mc_addr_set, - uint32_t nb_mc_addr); -/**< @internal set the list of multicast addresses on an Ethernet device */ - -typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev); -/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */ - -typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev); -/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */ - -typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev, - struct timespec *timestamp, - uint32_t flags); -/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */ - -typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev, - struct timespec *timestamp); -/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */ - -typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t); -/**< @internal Function used to adjust the device clock */ - -typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev, - struct timespec *timestamp); -/**< @internal Function used to get time from the device clock. */ - -typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev, - const struct timespec *timestamp); -/**< @internal Function used to get time from the device clock */ - -typedef int (*eth_read_clock)(struct rte_eth_dev *dev, - uint64_t *timestamp); -/**< @internal Function used to get the current value of the device clock. */ - -typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev, - struct rte_dev_reg_info *info); -/**< @internal Retrieve registers */ - -typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev); -/**< @internal Retrieve eeprom size */ - -typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev, - struct rte_dev_eeprom_info *info); -/**< @internal Retrieve eeprom data */ - -typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev, - struct rte_dev_eeprom_info *info); -/**< @internal Program eeprom data */ - -typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev, - struct rte_eth_dev_module_info *modinfo); -/**< @internal Retrieve type and size of plugin module eeprom */ - -typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev, - struct rte_dev_eeprom_info *info); -/**< @internal Retrieve plugin module eeprom data */ - -/** - * Feature filter types - */ -enum rte_filter_type { - RTE_ETH_FILTER_NONE = 0, - RTE_ETH_FILTER_ETHERTYPE, - RTE_ETH_FILTER_FLEXIBLE, - RTE_ETH_FILTER_SYN, - RTE_ETH_FILTER_NTUPLE, - RTE_ETH_FILTER_TUNNEL, - RTE_ETH_FILTER_FDIR, - RTE_ETH_FILTER_HASH, - RTE_ETH_FILTER_L2_TUNNEL, - RTE_ETH_FILTER_GENERIC, -}; - -/** - * Generic operations on filters - */ -enum rte_filter_op { - RTE_ETH_FILTER_GET, /**< get flow API ops */ -}; - -typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev, - enum rte_filter_type filter_type, - enum rte_filter_op filter_op, - void *arg); -/**< @internal Take operations to assigned filter type on an Ethernet device */ - -typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops); -/**< @internal Get Traffic Management (TM) operations on an Ethernet device */ - -typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops); -/**< @internal Get Traffic Metering and Policing (MTR) operations */ - -typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev, - struct rte_eth_dcb_info *dcb_info); -/**< @internal Get dcb information on an Ethernet device */ - -typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev, - const char *pool); -/**< @internal Test if a port supports specific mempool ops */ - -/** - * @internal - * Get the hairpin capabilities. - * - * @param dev - * ethdev handle of port. - * @param cap - * returns the hairpin capabilities from the device. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, hairpin is supported. - * @retval -ENOTSUP - * Hairpin is not supported. - */ -typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev, - struct rte_eth_hairpin_cap *cap); - -/** - * @internal - * Setup RX hairpin queue. - * - * @param dev - * ethdev handle of port. - * @param rx_queue_id - * the selected RX queue index. - * @param nb_rx_desc - * the requested number of descriptors for this queue. 0 - use PMD default. - * @param conf - * the RX hairpin configuration structure. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, hairpin is supported. - * @retval -ENOTSUP - * Hairpin is not supported. - * @retval -EINVAL - * One of the parameters is invalid. - * @retval -ENOMEM - * Unable to allocate resources. - */ -typedef int (*eth_rx_hairpin_queue_setup_t) - (struct rte_eth_dev *dev, uint16_t rx_queue_id, - uint16_t nb_rx_desc, - const struct rte_eth_hairpin_conf *conf); - -/** - * @internal - * Setup TX hairpin queue. - * - * @param dev - * ethdev handle of port. - * @param tx_queue_id - * the selected TX queue index. - * @param nb_tx_desc - * the requested number of descriptors for this queue. 0 - use PMD default. - * @param conf - * the TX hairpin configuration structure. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, hairpin is supported. - * @retval -ENOTSUP - * Hairpin is not supported. - * @retval -EINVAL - * One of the parameters is invalid. - * @retval -ENOMEM - * Unable to allocate resources. - */ -typedef int (*eth_tx_hairpin_queue_setup_t) - (struct rte_eth_dev *dev, uint16_t tx_queue_id, - uint16_t nb_tx_desc, - const struct rte_eth_hairpin_conf *hairpin_conf); - -/** - * @internal - * Get Forward Error Correction(FEC) capability. - * - * @param dev - * ethdev handle of port. - * @param speed_fec_capa - * speed_fec_capa is out only with per-speed capabilities. - * @param num - * a number of elements in an speed_fec_capa array. - * - * @return - * Negative errno value on error, positive value on success. - * - * @retval positive value - * A non-negative value lower or equal to num: success. The return value - * is the number of entries filled in the fec capa array. - * A non-negative value higher than num: error, the given fec capa array - * is too small. The return value corresponds to the num that should - * be given to succeed. The entries in the fec capa array are not valid - * and shall not be used by the caller. - * @retval -ENOTSUP - * Operation is not supported. - * @retval -EIO - * Device is removed. - * @retval -EINVAL - * *num* or *speed_fec_capa* invalid. - */ -typedef int (*eth_fec_get_capability_t)(struct rte_eth_dev *dev, - struct rte_eth_fec_capa *speed_fec_capa, unsigned int num); - -/** - * @internal - * Get Forward Error Correction(FEC) mode. - * - * @param dev - * ethdev handle of port. - * @param fec_capa - * a bitmask of enabled FEC modes. If AUTO bit is set, other - * bits specify FEC modes which may be negotiated. If AUTO - * bit is clear, specify FEC modes to be used (only one valid - * mode per speed may be set). - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, get FEC success. - * @retval -ENOTSUP - * Operation is not supported. - * @retval -EIO - * Device is removed. - */ -typedef int (*eth_fec_get_t)(struct rte_eth_dev *dev, - uint32_t *fec_capa); - -/** - * @internal - * Set Forward Error Correction(FEC) mode. - * - * @param dev - * ethdev handle of port. - * @param fec_capa - * bitmask of allowed FEC modes. It must be only one - * if AUTO is disabled. If AUTO is enabled, other - * bits specify FEC modes which may be negotiated. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, set FEC success. - * @retval -ENOTSUP - * Operation is not supported. - * @retval -EINVAL - * Unsupported FEC mode requested. - * @retval -EIO - * Device is removed. - */ -typedef int (*eth_fec_set_t)(struct rte_eth_dev *dev, uint32_t fec_capa); - -/** - * @internal - * Get all hairpin Tx/Rx peer ports of the current device, if any. - * - * @param dev - * ethdev handle of port. - * @param peer_ports - * array to save the ports list. - * @param len - * array length. - * @param direction - * value to decide the current to peer direction - * positive - used as Tx to get all peer Rx ports. - * zero - used as Rx to get all peer Tx ports. - * - * @return - * Negative errno value on error, 0 or positive on success. - * - * @retval 0 - * Success, no peer ports. - * @retval >0 - * Actual number of the peer ports. - * @retval -ENOTSUP - * Get peer ports API is not supported. - * @retval -EINVAL - * One of the parameters is invalid. - */ -typedef int (*hairpin_get_peer_ports_t)(struct rte_eth_dev *dev, - uint16_t *peer_ports, size_t len, - uint32_t direction); - -/** - * @internal - * Bind all hairpin Tx queues of one port to the Rx queues of the peer port. - * - * @param dev - * ethdev handle of port. - * @param rx_port - * the peer Rx port. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, bind successfully. - * @retval -ENOTSUP - * Bind API is not supported. - * @retval -EINVAL - * One of the parameters is invalid. - * @retval -EBUSY - * Device is not started. - */ -typedef int (*eth_hairpin_bind_t)(struct rte_eth_dev *dev, - uint16_t rx_port); - -/** - * @internal - * Unbind all hairpin Tx queues of one port from the Rx queues of the peer port. - * - * @param dev - * ethdev handle of port. - * @param rx_port - * the peer Rx port. - * - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success, unbind successfully. - * @retval -ENOTSUP - * Bind API is not supported. - * @retval -EINVAL - * One of the parameters is invalid. - * @retval -EBUSY - * Device is already stopped. - */ -typedef int (*eth_hairpin_unbind_t)(struct rte_eth_dev *dev, - uint16_t rx_port); - -typedef int (*eth_hairpin_queue_peer_update_t) - (struct rte_eth_dev *dev, uint16_t peer_queue, - struct rte_hairpin_peer_info *current_info, - struct rte_hairpin_peer_info *peer_info, uint32_t direction); -/**< @internal Update and fetch peer queue information. */ - -typedef int (*eth_hairpin_queue_peer_bind_t) - (struct rte_eth_dev *dev, uint16_t cur_queue, - struct rte_hairpin_peer_info *peer_info, uint32_t direction); -/**< @internal Bind peer queue to the current queue with fetched information. */ - -typedef int (*eth_hairpin_queue_peer_unbind_t) - (struct rte_eth_dev *dev, uint16_t cur_queue, uint32_t direction); -/**< @internal Unbind peer queue from the current queue. */ - -/** - * @internal - * Get address of memory location whose contents will change whenever there is - * new data to be received on an Rx queue. - * - * @param rxq - * Ethdev queue pointer. - * @param pmc - * The pointer to power-optimized monitoring condition structure. - * @return - * Negative errno value on error, 0 on success. - * - * @retval 0 - * Success - * @retval -EINVAL - * Invalid parameters - */ -typedef int (*eth_get_monitor_addr_t)(void *rxq, - struct rte_power_monitor_cond *pmc); - -/** - * @internal A structure containing the functions exported by an Ethernet driver. - */ -struct eth_dev_ops { - eth_dev_configure_t dev_configure; /**< Configure device. */ - eth_dev_start_t dev_start; /**< Start device. */ - eth_dev_stop_t dev_stop; /**< Stop device. */ - eth_dev_set_link_up_t dev_set_link_up; /**< Device link up. */ - eth_dev_set_link_down_t dev_set_link_down; /**< Device link down. */ - eth_dev_close_t dev_close; /**< Close device. */ - eth_dev_reset_t dev_reset; /**< Reset device. */ - eth_link_update_t link_update; /**< Get device link state. */ - eth_is_removed_t is_removed; - /**< Check if the device was physically removed. */ - - eth_promiscuous_enable_t promiscuous_enable; /**< Promiscuous ON. */ - eth_promiscuous_disable_t promiscuous_disable;/**< Promiscuous OFF. */ - eth_allmulticast_enable_t allmulticast_enable;/**< RX multicast ON. */ - eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */ - eth_mac_addr_remove_t mac_addr_remove; /**< Remove MAC address. */ - eth_mac_addr_add_t mac_addr_add; /**< Add a MAC address. */ - eth_mac_addr_set_t mac_addr_set; /**< Set a MAC address. */ - eth_set_mc_addr_list_t set_mc_addr_list; /**< set list of mcast addrs. */ - mtu_set_t mtu_set; /**< Set MTU. */ - - eth_stats_get_t stats_get; /**< Get generic device statistics. */ - eth_stats_reset_t stats_reset; /**< Reset generic device statistics. */ - eth_xstats_get_t xstats_get; /**< Get extended device statistics. */ - eth_xstats_reset_t xstats_reset; /**< Reset extended device statistics. */ - eth_xstats_get_names_t xstats_get_names; - /**< Get names of extended statistics. */ - eth_queue_stats_mapping_set_t queue_stats_mapping_set; - /**< Configure per queue stat counter mapping. */ - - eth_dev_infos_get_t dev_infos_get; /**< Get device info. */ - eth_rxq_info_get_t rxq_info_get; /**< retrieve RX queue information. */ - eth_txq_info_get_t txq_info_get; /**< retrieve TX queue information. */ - eth_burst_mode_get_t rx_burst_mode_get; /**< Get RX burst mode */ - eth_burst_mode_get_t tx_burst_mode_get; /**< Get TX burst mode */ - eth_fw_version_get_t fw_version_get; /**< Get firmware version. */ - eth_dev_supported_ptypes_get_t dev_supported_ptypes_get; - /**< Get packet types supported and identified by device. */ - eth_dev_ptypes_set_t dev_ptypes_set; - /**< Inform Ethernet device about reduced range of packet types to handle. */ - - vlan_filter_set_t vlan_filter_set; /**< Filter VLAN Setup. */ - vlan_tpid_set_t vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */ - vlan_strip_queue_set_t vlan_strip_queue_set; /**< VLAN Stripping on queue. */ - vlan_offload_set_t vlan_offload_set; /**< Set VLAN Offload. */ - vlan_pvid_set_t vlan_pvid_set; /**< Set port based TX VLAN insertion. */ - - eth_queue_start_t rx_queue_start;/**< Start RX for a queue. */ - eth_queue_stop_t rx_queue_stop; /**< Stop RX for a queue. */ - eth_queue_start_t tx_queue_start;/**< Start TX for a queue. */ - eth_queue_stop_t tx_queue_stop; /**< Stop TX for a queue. */ - eth_rx_queue_setup_t rx_queue_setup;/**< Set up device RX queue. */ - eth_queue_release_t rx_queue_release; /**< Release RX queue. */ - - eth_rx_enable_intr_t rx_queue_intr_enable; /**< Enable Rx queue interrupt. */ - eth_rx_disable_intr_t rx_queue_intr_disable; /**< Disable Rx queue interrupt. */ - eth_tx_queue_setup_t tx_queue_setup;/**< Set up device TX queue. */ - eth_queue_release_t tx_queue_release; /**< Release TX queue. */ - eth_tx_done_cleanup_t tx_done_cleanup;/**< Free tx ring mbufs */ - - eth_dev_led_on_t dev_led_on; /**< Turn on LED. */ - eth_dev_led_off_t dev_led_off; /**< Turn off LED. */ - - flow_ctrl_get_t flow_ctrl_get; /**< Get flow control. */ - flow_ctrl_set_t flow_ctrl_set; /**< Setup flow control. */ - priority_flow_ctrl_set_t priority_flow_ctrl_set; /**< Setup priority flow control. */ - - eth_uc_hash_table_set_t uc_hash_table_set; /**< Set Unicast Table Array. */ - eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */ - - eth_mirror_rule_set_t mirror_rule_set; /**< Add a traffic mirror rule. */ - eth_mirror_rule_reset_t mirror_rule_reset; /**< reset a traffic mirror rule. */ - - eth_udp_tunnel_port_add_t udp_tunnel_port_add; /** Add UDP tunnel port. */ - eth_udp_tunnel_port_del_t udp_tunnel_port_del; /** Del UDP tunnel port. */ - - eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */ - - rss_hash_update_t rss_hash_update; /** Configure RSS hash protocols. */ - rss_hash_conf_get_t rss_hash_conf_get; /** Get current RSS hash configuration. */ - reta_update_t reta_update; /** Update redirection table. */ - reta_query_t reta_query; /** Query redirection table. */ - - eth_get_reg_t get_reg; /**< Get registers. */ - eth_get_eeprom_length_t get_eeprom_length; /**< Get eeprom length. */ - eth_get_eeprom_t get_eeprom; /**< Get eeprom data. */ - eth_set_eeprom_t set_eeprom; /**< Set eeprom. */ - - eth_get_module_info_t get_module_info; - /** Get plugin module eeprom attribute. */ - eth_get_module_eeprom_t get_module_eeprom; - /** Get plugin module eeprom data. */ - - eth_filter_ctrl_t filter_ctrl; /**< common filter control. */ - - eth_get_dcb_info get_dcb_info; /** Get DCB information. */ - - eth_timesync_enable_t timesync_enable; - /** Turn IEEE1588/802.1AS timestamping on. */ - eth_timesync_disable_t timesync_disable; - /** Turn IEEE1588/802.1AS timestamping off. */ - eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp; - /** Read the IEEE1588/802.1AS RX timestamp. */ - eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp; - /** Read the IEEE1588/802.1AS TX timestamp. */ - eth_timesync_adjust_time timesync_adjust_time; /** Adjust the device clock. */ - eth_timesync_read_time timesync_read_time; /** Get the device clock time. */ - eth_timesync_write_time timesync_write_time; /** Set the device clock time. */ - - eth_read_clock read_clock; - - eth_xstats_get_by_id_t xstats_get_by_id; - /**< Get extended device statistic values by ID. */ - eth_xstats_get_names_by_id_t xstats_get_names_by_id; - /**< Get name of extended device statistics by ID. */ - - eth_tm_ops_get_t tm_ops_get; - /**< Get Traffic Management (TM) operations. */ - - eth_mtr_ops_get_t mtr_ops_get; - /**< Get Traffic Metering and Policing (MTR) operations. */ - - eth_pool_ops_supported_t pool_ops_supported; - /**< Test if a port supports specific mempool ops */ - - eth_hairpin_cap_get_t hairpin_cap_get; - /**< Returns the hairpin capabilities. */ - eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup; - /**< Set up device RX hairpin queue. */ - eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup; - /**< Set up device TX hairpin queue. */ - - eth_fec_get_capability_t fec_get_capability; - /**< Get Forward Error Correction(FEC) capability. */ - eth_fec_get_t fec_get; - /**< Get Forward Error Correction(FEC) mode. */ - eth_fec_set_t fec_set; - /**< Set Forward Error Correction(FEC) mode. */ - hairpin_get_peer_ports_t hairpin_get_peer_ports; - /**< Get hairpin peer ports list. */ - eth_hairpin_bind_t hairpin_bind; - /**< Bind all hairpin Tx queues of device to the peer port Rx queues. */ - eth_hairpin_unbind_t hairpin_unbind; - /**< Unbind all hairpin Tx queues from the peer port Rx queues. */ - eth_hairpin_queue_peer_update_t hairpin_queue_peer_update; - /**< Pass the current queue info and get the peer queue info. */ - eth_hairpin_queue_peer_bind_t hairpin_queue_peer_bind; - /**< Set up the connection between the pair of hairpin queues. */ - eth_hairpin_queue_peer_unbind_t hairpin_queue_peer_unbind; - /**< Disconnect the hairpin queues of a pair from each other. */ - - eth_get_monitor_addr_t get_monitor_addr; - /**< Get power monitoring condition for Rx queue. */ -}; - -/** - * RX/TX queue states - */ -#define RTE_ETH_QUEUE_STATE_STOPPED 0 -#define RTE_ETH_QUEUE_STATE_STARTED 1 -#define RTE_ETH_QUEUE_STATE_HAIRPIN 2 - -/** - * @internal - * Check if the selected Rx queue is hairpin queue. - * - * @param dev - * Pointer to the selected device. - * @param queue_id - * The selected queue. - * - * @return - * - (1) if the queue is hairpin queue, 0 otherwise. - */ -__rte_internal -int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id); - -/** - * @internal - * Check if the selected Tx queue is hairpin queue. - * - * @param dev - * Pointer to the selected device. - * @param queue_id - * The selected queue. - * - * @return - * - (1) if the queue is hairpin queue, 0 otherwise. - */ -__rte_internal -int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id); - -/** - * @internal - * Returns a ethdev slot specified by the unique identifier name. - * - * @param name - * The pointer to the Unique identifier name for each Ethernet device - * @return - * - The pointer to the ethdev slot, on success. NULL on error - */ -__rte_internal -struct rte_eth_dev *rte_eth_dev_allocated(const char *name); - -/** - * @internal - * Allocates a new ethdev slot for an ethernet device and returns the pointer - * to that slot for the driver to use. - * - * @param name Unique identifier name for each Ethernet device - * @return - * - Slot in the rte_dev_devices array for a new device; - */ -__rte_internal -struct rte_eth_dev *rte_eth_dev_allocate(const char *name); - -/** - * @internal - * Attach to the ethdev already initialized by the primary - * process. - * - * @param name Ethernet device's name. - * @return - * - Success: Slot in the rte_dev_devices array for attached - * device. - * - Error: Null pointer. - */ -__rte_internal -struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name); - -/** - * @internal - * Notify RTE_ETH_EVENT_DESTROY and release the specified ethdev port. - * - * The following PMD-managed data fields will be freed: - * - dev_private - * - mac_addrs - * - hash_mac_addrs - * If one of these fields should not be freed, - * it must be reset to NULL by the PMD, typically in dev_close method. - * - * @param eth_dev - * Device to be detached. - * @return - * - 0 on success, negative on error - */ -__rte_internal -int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev); - -/** - * @internal - * Release device queues and clear its configuration to force the user - * application to reconfigure it. It is for internal use only. - * - * @param dev - * Pointer to struct rte_eth_dev. - * - * @return - * void - */ -__rte_internal -void rte_eth_dev_internal_reset(struct rte_eth_dev *dev); - -/** - * @internal Executes all the user application registered callbacks for - * the specific device. It is for DPDK internal user only. User - * application should not call it directly. - * - * @param dev - * Pointer to struct rte_eth_dev. - * @param event - * Eth device interrupt event type. - * @param ret_param - * To pass data back to user application. - * This allows the user application to decide if a particular function - * is permitted or not. - * - * @return - * int - */ -__rte_internal -int rte_eth_dev_callback_process(struct rte_eth_dev *dev, - enum rte_eth_event_type event, void *ret_param); - -/** - * @internal - * This is the last step of device probing. - * It must be called after a port is allocated and initialized successfully. - * - * The notification RTE_ETH_EVENT_NEW is sent to other entities - * (libraries and applications). - * The state is set as RTE_ETH_DEV_ATTACHED. - * - * @param dev - * New ethdev port. - */ -__rte_internal -void rte_eth_dev_probing_finish(struct rte_eth_dev *dev); - -/** - * Create memzone for HW rings. - * malloc can't be used as the physical address is needed. - * If the memzone is already created, then this function returns a ptr - * to the old one. - * - * @param eth_dev - * The *eth_dev* pointer is the address of the *rte_eth_dev* structure - * @param name - * The name of the memory zone - * @param queue_id - * The index of the queue to add to name - * @param size - * The sizeof of the memory area - * @param align - * Alignment for resulting memzone. Must be a power of 2. - * @param socket_id - * The *socket_id* argument is the socket identifier in case of NUMA. - */ -__rte_internal -const struct rte_memzone * -rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name, - uint16_t queue_id, size_t size, - unsigned align, int socket_id); - -/** - * Free previously allocated memzone for HW rings. - * - * @param eth_dev - * The *eth_dev* pointer is the address of the *rte_eth_dev* structure - * @param name - * The name of the memory zone - * @param queue_id - * The index of the queue to add to name - * @return - * Negative errno value on error, 0 on success. - */ -__rte_internal -int -rte_eth_dma_zone_free(const struct rte_eth_dev *eth_dev, const char *name, - uint16_t queue_id); - -/** - * @internal - * Atomically set the link status for the specific device. - * It is for use by DPDK device driver use only. - * User applications should not call it - * - * @param dev - * Pointer to struct rte_eth_dev. - * @param link - * New link status value. - * @return - * Same convention as eth_link_update operation. - * 0 if link up status has changed - * -1 if link up status was unchanged - */ -static inline int -rte_eth_linkstatus_set(struct rte_eth_dev *dev, - const struct rte_eth_link *new_link) -{ - uint64_t *dev_link = (uint64_t *)&(dev->data->dev_link); - union { - uint64_t val64; - struct rte_eth_link link; - } orig; - - RTE_BUILD_BUG_ON(sizeof(*new_link) != sizeof(uint64_t)); - - orig.val64 = __atomic_exchange_n(dev_link, *(const uint64_t *)new_link, - __ATOMIC_SEQ_CST); - - return (orig.link.link_status == new_link->link_status) ? -1 : 0; -} - -/** - * @internal - * Atomically get the link speed and status. - * - * @param dev - * Pointer to struct rte_eth_dev. - * @param link - * link status value. - */ -static inline void -rte_eth_linkstatus_get(const struct rte_eth_dev *dev, - struct rte_eth_link *link) -{ - uint64_t *src = (uint64_t *)&(dev->data->dev_link); - uint64_t *dst = (uint64_t *)link; - - RTE_BUILD_BUG_ON(sizeof(*link) != sizeof(uint64_t)); - - *dst = __atomic_load_n(src, __ATOMIC_SEQ_CST); -} - -/** - * Allocate an unique switch domain identifier. - * - * A pool of switch domain identifiers which can be allocated on request. This - * will enabled devices which support the concept of switch domains to request - * a switch domain id which is guaranteed to be unique from other devices - * running in the same process. - * - * @param domain_id - * switch domain identifier parameter to pass back to application - * - * @return - * Negative errno value on error, 0 on success. - */ -__rte_internal -int -rte_eth_switch_domain_alloc(uint16_t *domain_id); - -/** - * Free switch domain. - * - * Return a switch domain identifier to the pool of free identifiers after it is - * no longer in use by device. - * - * @param domain_id - * switch domain identifier to free - * - * @return - * Negative errno value on error, 0 on success. - */ -__rte_internal -int -rte_eth_switch_domain_free(uint16_t domain_id); - -/** Generic Ethernet device arguments */ -struct rte_eth_devargs { - uint16_t ports[RTE_MAX_ETHPORTS]; - /** port/s number to enable on a multi-port single function */ - uint16_t nb_ports; - /** number of ports in ports field */ - uint16_t representor_ports[RTE_MAX_ETHPORTS]; - /** representor port/s identifier to enable on device */ - uint16_t nb_representor_ports; - /** number of ports in representor port field */ -}; - -/** - * PMD helper function to parse ethdev arguments - * - * @param devargs - * device arguments - * @param eth_devargs - * parsed ethdev specific arguments. - * - * @return - * Negative errno value on error, 0 on success. - */ -__rte_internal -int -rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs); - - -typedef int (*ethdev_init_t)(struct rte_eth_dev *ethdev, void *init_params); -typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev, - void *bus_specific_init_params); - -/** - * PMD helper function for the creation of a new ethdev ports. - * - * @param device - * rte_device handle. - * @param name - * port name. - * @param priv_data_size - * size of private data required for port. - * @param bus_specific_init - * port bus specific initialisation callback function - * @param bus_init_params - * port bus specific initialisation parameters - * @param ethdev_init - * device specific port initialization callback function - * @param init_params - * port initialisation parameters - * - * @return - * Negative errno value on error, 0 on success. - */ -__rte_internal -int -rte_eth_dev_create(struct rte_device *device, const char *name, - size_t priv_data_size, - ethdev_bus_specific_init bus_specific_init, void *bus_init_params, - ethdev_init_t ethdev_init, void *init_params); - - -typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev); - -/** - * PMD helper function for cleaning up the resources of a ethdev port on it's - * destruction. - * - * @param ethdev - * ethdev handle of port. - * @param ethdev_uninit - * device specific port un-initialise callback function - * - * @return - * Negative errno value on error, 0 on success. - */ -__rte_internal -int -rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit); - -/** - * @internal - * Pass the current hairpin queue HW and/or SW information to the peer queue - * and fetch back the information of the peer queue. - * - * @param peer_port - * Peer port identifier of the Ethernet device. - * @param peer_queue - * Peer queue index of the port. - * @param cur_info - * Pointer to the current information structure. - * @param peer_info - * Pointer to the peer information, output. - * @param direction - * Direction to pass the information. - * positive - pass Tx queue information and get peer Rx queue information - * zero - pass Rx queue information and get peer Tx queue information - * - * @return - * Negative errno value on error, 0 on success. - */ -__rte_internal -int -rte_eth_hairpin_queue_peer_update(uint16_t peer_port, uint16_t peer_queue, - struct rte_hairpin_peer_info *cur_info, - struct rte_hairpin_peer_info *peer_info, - uint32_t direction); - -/** - * @internal - * Configure current hairpin queue with the peer information fetched to create - * the connection (bind) with peer queue in the specified direction. - * This function might need to be called twice to fully create the connections. - * - * @param cur_port - * Current port identifier of the Ethernet device. - * @param cur_queue - * Current queue index of the port. - * @param peer_info - * Pointer to the peer information, input. - * @param direction - * Direction to create the connection. - * positive - bind current Tx queue to peer Rx queue - * zero - bind current Rx queue to peer Tx queue - * - * @return - * Negative errno value on error, 0 on success. - */ -__rte_internal -int -rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue, - struct rte_hairpin_peer_info *peer_info, - uint32_t direction); - -/** - * @internal - * Reset the current queue state and configuration to disconnect (unbind) it - * from the peer queue. - * This function might need to be called twice to disconnect each other. - * - * @param cur_port - * Current port identifier of the Ethernet device. - * @param cur_queue - * Current queue index of the port. - * @param direction - * Direction to destroy the connection. - * positive - unbind current Tx queue from peer Rx queue - * zero - unbind current Rx queue from peer Tx queue - * - * @return - * Negative errno value on error, 0 on success. - */ -__rte_internal -int -rte_eth_hairpin_queue_peer_unbind(uint16_t cur_port, uint16_t cur_queue, - uint32_t direction); - - -/* - * Legacy ethdev API used internally by drivers. - */ - -/** - * Define all structures for Ethertype Filter type. - */ - -#define RTE_ETHTYPE_FLAGS_MAC 0x0001 /**< If set, compare mac */ -#define RTE_ETHTYPE_FLAGS_DROP 0x0002 /**< If set, drop packet when match */ - -/** - * A structure used to define the ethertype filter entry - * to support RTE_ETH_FILTER_ETHERTYPE data representation. - */ -struct rte_eth_ethertype_filter { - struct rte_ether_addr mac_addr; /**< Mac address to match. */ - uint16_t ether_type; /**< Ether type to match */ - uint16_t flags; /**< Flags from RTE_ETHTYPE_FLAGS_* */ - uint16_t queue; /**< Queue assigned to when match*/ -}; - -/** - * A structure used to define the TCP syn filter entry - * to support RTE_ETH_FILTER_SYN data representation. - */ -struct rte_eth_syn_filter { - /** 1 - higher priority than other filters, 0 - lower priority. */ - uint8_t hig_pri; - uint16_t queue; /**< Queue assigned to when match */ -}; - -/** - * filter type of tunneling packet - */ -#define ETH_TUNNEL_FILTER_OMAC 0x01 /**< filter by outer MAC addr */ -#define ETH_TUNNEL_FILTER_OIP 0x02 /**< filter by outer IP Addr */ -#define ETH_TUNNEL_FILTER_TENID 0x04 /**< filter by tenant ID */ -#define ETH_TUNNEL_FILTER_IMAC 0x08 /**< filter by inner MAC addr */ -#define ETH_TUNNEL_FILTER_IVLAN 0x10 /**< filter by inner VLAN ID */ -#define ETH_TUNNEL_FILTER_IIP 0x20 /**< filter by inner IP addr */ - -#define RTE_TUNNEL_FILTER_IMAC_IVLAN (ETH_TUNNEL_FILTER_IMAC | \ - ETH_TUNNEL_FILTER_IVLAN) -#define RTE_TUNNEL_FILTER_IMAC_IVLAN_TENID (ETH_TUNNEL_FILTER_IMAC | \ - ETH_TUNNEL_FILTER_IVLAN | \ - ETH_TUNNEL_FILTER_TENID) -#define RTE_TUNNEL_FILTER_IMAC_TENID (ETH_TUNNEL_FILTER_IMAC | \ - ETH_TUNNEL_FILTER_TENID) -#define RTE_TUNNEL_FILTER_OMAC_TENID_IMAC (ETH_TUNNEL_FILTER_OMAC | \ - ETH_TUNNEL_FILTER_TENID | \ - ETH_TUNNEL_FILTER_IMAC) - -/** - * Select IPv4 or IPv6 for tunnel filters. - */ -enum rte_tunnel_iptype { - RTE_TUNNEL_IPTYPE_IPV4 = 0, /**< IPv4. */ - RTE_TUNNEL_IPTYPE_IPV6, /**< IPv6. */ -}; - -/** - * Tunneling Packet filter configuration. - */ -struct rte_eth_tunnel_filter_conf { - struct rte_ether_addr outer_mac; /**< Outer MAC address to match. */ - struct rte_ether_addr inner_mac; /**< Inner MAC address to match. */ - uint16_t inner_vlan; /**< Inner VLAN to match. */ - enum rte_tunnel_iptype ip_type; /**< IP address type. */ - /** - * Outer destination IP address to match if ETH_TUNNEL_FILTER_OIP - * is set in filter_type, or inner destination IP address to match - * if ETH_TUNNEL_FILTER_IIP is set in filter_type. - */ - union { - uint32_t ipv4_addr; /**< IPv4 address in big endian. */ - uint32_t ipv6_addr[4]; /**< IPv6 address in big endian. */ - } ip_addr; - /** Flags from ETH_TUNNEL_FILTER_XX - see above. */ - uint16_t filter_type; - enum rte_eth_tunnel_type tunnel_type; /**< Tunnel Type. */ - uint32_t tenant_id; /**< Tenant ID to match. VNI, GRE key... */ - uint16_t queue_id; /**< Queue assigned to if match. */ -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_ETHDEV_DRIVER_H_ */ diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h deleted file mode 100644 index bf715896ae..0000000000 --- a/lib/librte_ethdev/rte_ethdev_pci.h +++ /dev/null @@ -1,164 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2017 Brocade Communications Systems, Inc. - * Author: Jan Blunck - */ - -#ifndef _RTE_ETHDEV_PCI_H_ -#define _RTE_ETHDEV_PCI_H_ - -#include -#include -#include -#include -#include - -/** - * Copy pci device info to the Ethernet device data. - * Shared memory (eth_dev->data) only updated by primary process, so it is safe - * to call this function from both primary and secondary processes. - * - * @param eth_dev - * The *eth_dev* pointer is the address of the *rte_eth_dev* structure. - * @param pci_dev - * The *pci_dev* pointer is the address of the *rte_pci_device* structure. - */ -static inline void -rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, - struct rte_pci_device *pci_dev) -{ - if ((eth_dev == NULL) || (pci_dev == NULL)) { - RTE_ETHDEV_LOG(ERR, "NULL pointer eth_dev=%p pci_dev=%p", - (void *)eth_dev, (void *)pci_dev); - return; - } - - eth_dev->intr_handle = &pci_dev->intr_handle; - - if (rte_eal_process_type() == RTE_PROC_PRIMARY) { - eth_dev->data->dev_flags = 0; - if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC) - eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; - if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_RMV) - eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV; - - eth_dev->data->numa_node = pci_dev->device.numa_node; - } -} - -static inline int -eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) { - struct rte_pci_device *pci_dev = bus_device; - - if (!pci_dev) - return -ENODEV; - - rte_eth_copy_pci_info(eth_dev, pci_dev); - - return 0; -} - -/** - * @internal - * Allocates a new ethdev slot for an ethernet device and returns the pointer - * to that slot for the driver to use. - * - * @param dev - * Pointer to the PCI device - * - * @param private_data_size - * Size of private data structure - * - * @return - * A pointer to a rte_eth_dev or NULL if allocation failed. - */ -static inline struct rte_eth_dev * -rte_eth_dev_pci_allocate(struct rte_pci_device *dev, size_t private_data_size) -{ - struct rte_eth_dev *eth_dev; - const char *name; - - if (!dev) - return NULL; - - name = dev->device.name; - - if (rte_eal_process_type() == RTE_PROC_PRIMARY) { - eth_dev = rte_eth_dev_allocate(name); - if (!eth_dev) - return NULL; - - if (private_data_size) { - eth_dev->data->dev_private = rte_zmalloc_socket(name, - private_data_size, RTE_CACHE_LINE_SIZE, - dev->device.numa_node); - if (!eth_dev->data->dev_private) { - rte_eth_dev_release_port(eth_dev); - return NULL; - } - } - } else { - eth_dev = rte_eth_dev_attach_secondary(name); - if (!eth_dev) - return NULL; - } - - eth_dev->device = &dev->device; - rte_eth_copy_pci_info(eth_dev, dev); - return eth_dev; -} - -typedef int (*eth_dev_pci_callback_t)(struct rte_eth_dev *eth_dev); - -/** - * @internal - * Wrapper for use by pci drivers in a .probe function to attach to a ethdev - * interface. - */ -static inline int -rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev, - size_t private_data_size, eth_dev_pci_callback_t dev_init) -{ - struct rte_eth_dev *eth_dev; - int ret; - - eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size); - if (!eth_dev) - return -ENOMEM; - - RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL); - ret = dev_init(eth_dev); - if (ret) - rte_eth_dev_release_port(eth_dev); - else - rte_eth_dev_probing_finish(eth_dev); - - return ret; -} - -/** - * @internal - * Wrapper for use by pci drivers in a .remove function to detach a ethdev - * interface. - */ -static inline int -rte_eth_dev_pci_generic_remove(struct rte_pci_device *pci_dev, - eth_dev_pci_callback_t dev_uninit) -{ - struct rte_eth_dev *eth_dev; - int ret; - - eth_dev = rte_eth_dev_allocated(pci_dev->device.name); - if (!eth_dev) - return 0; - - if (dev_uninit) { - ret = dev_uninit(eth_dev); - if (ret) - return ret; - } - - rte_eth_dev_release_port(eth_dev); - return 0; -} - -#endif /* _RTE_ETHDEV_PCI_H_ */ diff --git a/lib/librte_ethdev/rte_ethdev_vdev.h b/lib/librte_ethdev/rte_ethdev_vdev.h deleted file mode 100644 index 4ba3f28964..0000000000 --- a/lib/librte_ethdev/rte_ethdev_vdev.h +++ /dev/null @@ -1,55 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2017 Brocade Communications Systems, Inc. - * Author: Jan Blunck - */ - -#ifndef _RTE_ETHDEV_VDEV_H_ -#define _RTE_ETHDEV_VDEV_H_ - -#include -#include -#include -#include - -/** - * @internal - * Allocates a new ethdev slot for an ethernet device and returns the pointer - * to that slot for the driver to use. - * - * @param dev - * Pointer to virtual device - * - * @param private_data_size - * Size of private data structure - * - * @return - * A pointer to a rte_eth_dev or NULL if allocation failed. - */ -static inline struct rte_eth_dev * -rte_eth_vdev_allocate(struct rte_vdev_device *dev, size_t private_data_size) -{ - struct rte_eth_dev *eth_dev; - const char *name = rte_vdev_device_name(dev); - - eth_dev = rte_eth_dev_allocate(name); - if (!eth_dev) - return NULL; - - if (private_data_size) { - eth_dev->data->dev_private = rte_zmalloc_socket(name, - private_data_size, RTE_CACHE_LINE_SIZE, - dev->device.numa_node); - if (!eth_dev->data->dev_private) { - rte_eth_dev_release_port(eth_dev); - return NULL; - } - } - - eth_dev->device = &dev->device; - eth_dev->intr_handle = NULL; - - eth_dev->data->numa_node = dev->device.numa_node; - return eth_dev; -} - -#endif /* _RTE_ETHDEV_VDEV_H_ */ diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h index f3d72827cc..dabd819d10 100644 --- a/lib/librte_ethdev/rte_flow_driver.h +++ b/lib/librte_ethdev/rte_flow_driver.h @@ -18,7 +18,7 @@ #include #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_flow.h" #ifdef __cplusplus diff --git a/lib/librte_ethdev/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h index 3b39532935..a0ddc2b5f4 100644 --- a/lib/librte_ethdev/rte_mtr_driver.h +++ b/lib/librte_ethdev/rte_mtr_driver.h @@ -18,7 +18,7 @@ #include #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_mtr.h" #ifdef __cplusplus diff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h index b86ed89c00..45290fb3fd 100644 --- a/lib/librte_ethdev/rte_tm_driver.h +++ b/lib/librte_ethdev/rte_tm_driver.h @@ -18,7 +18,7 @@ #include #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_tm.h" #ifdef __cplusplus