#include "l2fwd_common.h"
int
l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
{
uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
},
.txmode = {
},
};
uint16_t nb_ports_available = 0;
uint16_t port_id;
int ret;
if (rsrc->event_mode) {
}
if ((rsrc->enabled_port_mask & (1 << port_id)) == 0) {
printf("Skipping disabled port %u\n", port_id);
continue;
}
nb_ports_available++;
printf("Initializing port %u... ", port_id);
fflush(stdout);
if (ret != 0)
rte_panic(
"Error during getting device (port %u) info: %s\n",
port_id, strerror(-ret));
printf("Port %u modified RSS hash function based on hardware support,"
"requested:%#"PRIx64" configured:%#"PRIx64"",
port_id,
}
if (ret < 0)
rte_panic(
"Cannot configure device: err=%d, port=%u\n",
ret, port_id);
&nb_txd);
if (ret < 0)
rte_panic(
"Cannot adjust number of descriptors: err=%d, port=%u\n",
ret, port_id);
fflush(stdout);
&rxq_conf,
rsrc->pktmbuf_pool);
if (ret < 0)
rte_panic(
"rte_eth_rx_queue_setup:err=%d, port=%u\n",
ret, port_id);
fflush(stdout);
&txq_conf);
if (ret < 0)
rte_panic(
"rte_eth_tx_queue_setup:err=%d, port=%u\n",
ret, port_id);
port_id,
}
return nb_ports_available;
}
int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf)
int rte_eth_rx_queue_setup(uint16_t port_id, 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)
#define RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE
int rte_eth_promiscuous_enable(uint16_t port_id)
int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, const struct rte_eth_txconf *tx_conf)
int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
int rte_eth_dev_socket_id(uint16_t port_id)
int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, uint16_t *nb_rx_desc, uint16_t *nb_tx_desc)
#define RTE_ETH_FOREACH_DEV(p)
#define RTE_ETHER_ADDR_PRT_FMT
#define RTE_ETHER_ADDR_BYTES(mac_addrs)
struct rte_eth_txmode txmode
struct rte_eth_rxmode rxmode
struct rte_eth_conf::@147 rx_adv_conf
struct rte_eth_rss_conf rss_conf
struct rte_eth_txconf default_txconf
struct rte_eth_rxconf default_rxconf
uint64_t flow_type_rss_offloads
enum rte_eth_rx_mq_mode mq_mode