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
net/octeontx2: fix PTP and HIGIG2 coexistence
[dpdk.git]
/
examples
/
performance-thread
/
l3fwd-thread
/
main.c
diff --git
a/examples/performance-thread/l3fwd-thread/main.c
b/examples/performance-thread/l3fwd-thread/main.c
index
00f5350
..
ad540fd
100644
(file)
--- a/
examples/performance-thread/l3fwd-thread/main.c
+++ b/
examples/performance-thread/l3fwd-thread/main.c
@@
-1877,7
+1877,7
@@
process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,
/*
* CPU-load stats collector
*/
/*
* CPU-load stats collector
*/
-static int
+static int
__attribute__((noreturn))
cpu_load_collector(__rte_unused void *arg) {
unsigned i, j, k;
uint64_t hits;
cpu_load_collector(__rte_unused void *arg) {
unsigned i, j, k;
uint64_t hits;
@@
-2299,7
+2299,7
@@
sched_spawner(__rte_unused void *arg) {
}
/* main processing loop */
}
/* main processing loop */
-static int
+static int
__attribute__((noreturn))
pthread_tx(void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
pthread_tx(void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
@@
-3432,6
+3432,7
@@
check_all_ports_link_status(uint32_t port_mask)
uint16_t portid;
uint8_t count, all_ports_up, print_flag = 0;
struct rte_eth_link link;
uint16_t portid;
uint8_t count, all_ports_up, print_flag = 0;
struct rte_eth_link link;
+ int ret;
printf("\nChecking link status");
fflush(stdout);
printf("\nChecking link status");
fflush(stdout);
@@
-3441,7
+3442,14
@@
check_all_ports_link_status(uint32_t port_mask)
if ((port_mask & (1 << portid)) == 0)
continue;
memset(&link, 0, sizeof(link));
if ((port_mask & (1 << portid)) == 0)
continue;
memset(&link, 0, sizeof(link));
- rte_eth_link_get_nowait(portid, &link);
+ ret = rte_eth_link_get_nowait(portid, &link);
+ if (ret < 0) {
+ all_ports_up = 0;
+ if (print_flag == 1)
+ printf("Port %u link get failed: %s\n",
+ portid, rte_strerror(-ret));
+ continue;
+ }
/* print link status if flag set */
if (print_flag == 1) {
if (link.link_status)
/* print link status if flag set */
if (print_flag == 1) {
if (link.link_status)
@@
-3594,7
+3602,12
@@
main(int argc, char **argv)
"rte_eth_dev_adjust_nb_rx_tx_desc: err=%d, port=%d\n",
ret, portid);
"rte_eth_dev_adjust_nb_rx_tx_desc: err=%d, port=%d\n",
ret, portid);
- rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+ ret = rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+ if (ret < 0)
+ rte_exit(EXIT_FAILURE,
+ "rte_eth_macaddr_get: err=%d, port=%d\n",
+ ret, portid);
+
print_ethaddr(" Address:", &ports_eth_addr[portid]);
printf(", ");
print_ethaddr("Destination:",
print_ethaddr(" Address:", &ports_eth_addr[portid]);
printf(", ");
print_ethaddr("Destination:",
@@
-3706,8
+3719,13
@@
main(int argc, char **argv)
* to itself through 2 cross-connected ports of the
* target machine.
*/
* to itself through 2 cross-connected ports of the
* target machine.
*/
- if (promiscuous_on)
- rte_eth_promiscuous_enable(portid);
+ if (promiscuous_on) {
+ ret = rte_eth_promiscuous_enable(portid);
+ if (ret != 0)
+ rte_exit(EXIT_FAILURE,
+ "rte_eth_promiscuous_enable: err=%s, port=%u\n",
+ rte_strerror(-ret), portid);
+ }
}
for (i = 0; i < n_rx_thread; i++) {
}
for (i = 0; i < n_rx_thread; i++) {