Skip to content

Commit

Permalink
ethdev: add namespace
Browse files Browse the repository at this point in the history
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible
way. The macros for backward compatibility can be removed in next LTS.
Also updated some struct names to have 'rte_eth' prefix.

All internal components switched to using new names.

Syntax fixed on lines that this patch touches.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
  • Loading branch information
Ferruh Yigit committed Oct 22, 2021
1 parent a136b08 commit 295968d
Show file tree
Hide file tree
Showing 339 changed files with 6,601 additions and 6,385 deletions.
8 changes: 4 additions & 4 deletions app/proc-info/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,11 +757,11 @@ show_port(void)
}

ret = rte_eth_dev_flow_ctrl_get(i, &fc_conf);
if (ret == 0 && fc_conf.mode != RTE_FC_NONE) {
if (ret == 0 && fc_conf.mode != RTE_ETH_FC_NONE) {
printf("\t -- flow control mode %s%s high %u low %u pause %u%s%s\n",
fc_conf.mode == RTE_FC_RX_PAUSE ? "rx " :
fc_conf.mode == RTE_FC_TX_PAUSE ? "tx " :
fc_conf.mode == RTE_FC_FULL ? "full" : "???",
fc_conf.mode == RTE_ETH_FC_RX_PAUSE ? "rx " :
fc_conf.mode == RTE_ETH_FC_TX_PAUSE ? "tx " :
fc_conf.mode == RTE_ETH_FC_FULL ? "full" : "???",
fc_conf.autoneg ? " auto" : "",
fc_conf.high_water,
fc_conf.low_water,
Expand Down
4 changes: 2 additions & 2 deletions app/test-eventdev/test_perf_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,13 +756,13 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
struct test_perf *t = evt_test_priv(test);
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.mq_mode = RTE_ETH_MQ_RX_RSS,
.split_hdr_size = 0,
},
.rx_adv_conf = {
.rss_conf = {
.rss_key = NULL,
.rss_hf = ETH_RSS_IP,
.rss_hf = RTE_ETH_RSS_IP,
},
},
};
Expand Down
10 changes: 5 additions & 5 deletions app/test-eventdev/test_pipeline_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
struct rte_eth_rxconf rx_conf;
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.mq_mode = RTE_ETH_MQ_RX_RSS,
},
.rx_adv_conf = {
.rss_conf = {
.rss_key = NULL,
.rss_hf = ETH_RSS_IP,
.rss_hf = RTE_ETH_RSS_IP,
},
},
};
Expand Down Expand Up @@ -223,7 +223,7 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)

if (!(caps & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT))
local_port_conf.rxmode.offloads |=
DEV_RX_OFFLOAD_RSS_HASH;
RTE_ETH_RX_OFFLOAD_RSS_HASH;

ret = rte_eth_dev_info_get(i, &dev_info);
if (ret != 0) {
Expand All @@ -233,9 +233,9 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
}

/* Enable mbuf fast free if PMD has the capability. */
if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
local_port_conf.txmode.offloads |=
DEV_TX_OFFLOAD_MBUF_FAST_FREE;
RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;

rx_conf = dev_info.default_rxconf;
rx_conf.offloads = port_conf.rxmode.offloads;
Expand Down
2 changes: 1 addition & 1 deletion app/test-flow-perf/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define FLOW_ITEM_MASK(_x) (UINT64_C(1) << _x)
#define FLOW_ACTION_MASK(_x) (UINT64_C(1) << _x)
#define FLOW_ATTR_MASK(_x) (UINT64_C(1) << _x)
#define GET_RSS_HF() (ETH_RSS_IP)
#define GET_RSS_HF() (RTE_ETH_RSS_IP)

/* Configuration */
#define RXQ_NUM 4
Expand Down
8 changes: 4 additions & 4 deletions app/test-pipeline/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ struct app_params app = {
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
.offloads = DEV_RX_OFFLOAD_CHECKSUM,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
.rss_conf = {
.rss_key = NULL,
.rss_hf = ETH_RSS_IP,
.rss_hf = RTE_ETH_RSS_IP,
},
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
};

Expand Down Expand Up @@ -178,7 +178,7 @@ app_ports_check_link(void)
RTE_LOG(INFO, USER1, "Port %u %s\n",
port,
link_status_text);
if (link.link_status == ETH_LINK_DOWN)
if (link.link_status == RTE_ETH_LINK_DOWN)
all_ports_up = 0;
}

Expand Down

0 comments on commit 295968d

Please sign in to comment.