git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
examples/l3fwd: add vector stubs for RISC-V
[dpdk.git]
/
examples
/
vm_power_manager
/
main.c
diff --git
a/examples/vm_power_manager/main.c
b/examples/vm_power_manager/main.c
index
e59fb7d
..
b159291
100644
(file)
--- a/
examples/vm_power_manager/main.c
+++ b/
examples/vm_power_manager/main.c
@@
-51,17
+51,10
@@
static uint32_t enabled_port_mask;
static volatile bool force_quit;
static uint32_t enabled_port_mask;
static volatile bool force_quit;
-/****************/
-static const struct rte_eth_conf port_conf_default = {
- .rxmode = {
- .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
- },
-};
-
static inline int
port_init(uint16_t port, struct rte_mempool *mbuf_pool)
{
static inline int
port_init(uint16_t port, struct rte_mempool *mbuf_pool)
{
- struct rte_eth_conf port_conf
= port_conf_default
;
+ struct rte_eth_conf port_conf;
const uint16_t rx_rings = 1, tx_rings = 1;
int retval;
uint16_t q;
const uint16_t rx_rings = 1, tx_rings = 1;
int retval;
uint16_t q;
@@
-71,6
+64,8
@@
port_init(uint16_t port, struct rte_mempool *mbuf_pool)
if (!rte_eth_dev_is_valid_port(port))
return -1;
if (!rte_eth_dev_is_valid_port(port))
return -1;
+ memset(&port_conf, 0, sizeof(struct rte_eth_conf));
+
retval = rte_eth_dev_info_get(port, &dev_info);
if (retval != 0) {
printf("Error during getting device (port %u) info: %s\n",
retval = rte_eth_dev_info_get(port, &dev_info);
if (retval != 0) {
printf("Error during getting device (port %u) info: %s\n",
@@
-78,9
+73,9
@@
port_init(uint16_t port, struct rte_mempool *mbuf_pool)
return retval;
}
return retval;
}
- 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)
port_conf.txmode.offloads |=
port_conf.txmode.offloads |=
-
DEV
_TX_OFFLOAD_MBUF_FAST_FREE;
+
RTE_ETH
_TX_OFFLOAD_MBUF_FAST_FREE;
/* Configure the Ethernet device. */
retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
/* Configure the Ethernet device. */
retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
@@
-275,7
+270,7
@@
check_all_ports_link_status(uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == ETH_LINK_DOWN) {
+ if (link.link_status ==
RTE_
ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
all_ports_up = 0;
break;
}