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
crypto/aesni_mb: fix HMAC supported key sizes
[dpdk.git]
/
examples
/
l2fwd-jobstats
/
main.c
diff --git
a/examples/l2fwd-jobstats/main.c
b/examples/l2fwd-jobstats/main.c
index
d1e9bf7
..
9893620
100644
(file)
--- a/
examples/l2fwd-jobstats/main.c
+++ b/
examples/l2fwd-jobstats/main.c
@@
-38,7
+38,6
@@
#include <ctype.h>
#include <getopt.h>
#include <ctype.h>
#include <getopt.h>
-#include <rte_alarm.h>
#include <rte_common.h>
#include <rte_log.h>
#include <rte_malloc.h>
#include <rte_common.h>
#include <rte_log.h>
#include <rte_malloc.h>
@@
-46,7
+45,6
@@
#include <rte_memcpy.h>
#include <rte_memzone.h>
#include <rte_eal.h>
#include <rte_memcpy.h>
#include <rte_memzone.h>
#include <rte_eal.h>
-#include <rte_per_lcore.h>
#include <rte_launch.h>
#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_launch.h>
#include <rte_atomic.h>
#include <rte_cycles.h>
@@
-59,7
+57,6
@@
#include <rte_debug.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_debug.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_ring.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_spinlock.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_spinlock.h>
@@
-68,6
+65,7
@@
#include <rte_jobstats.h>
#include <rte_timer.h>
#include <rte_alarm.h>
#include <rte_jobstats.h>
#include <rte_timer.h>
#include <rte_alarm.h>
+#include <rte_pause.h>
#define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1
#define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1
@@
-127,7
+125,7
@@
static const struct rte_eth_conf port_conf = {
.hw_ip_checksum = 0, /**< IP checksum offload disabled */
.hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
.hw_ip_checksum = 0, /**< IP checksum offload disabled */
.hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc =
0
, /**< CRC stripped by hardware */
+ .hw_strip_crc =
1
, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@
-710,7
+708,7
@@
l2fwd_parse_args(int argc, char **argv)
argv[optind-1] = prgname;
ret = optind-1;
argv[optind-1] = prgname;
ret = optind-1;
- optind =
0
; /* reset getopt lib */
+ optind =
1
; /* reset getopt lib */
return ret;
}
return ret;
}
@@
-746,7
+744,7
@@
check_all_ports_link_status(uint8_t port_num, 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 ==
0
) {
+ if (link.link_status ==
ETH_LINK_DOWN
) {
all_ports_up = 0;
break;
}
all_ports_up = 0;
break;
}
@@
-811,9
+809,6
@@
main(int argc, char **argv)
if (nb_ports == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
if (nb_ports == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
- if (nb_ports > RTE_MAX_ETHPORTS)
- nb_ports = RTE_MAX_ETHPORTS;
-
/* reset l2fwd_dst_ports */
for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++)
l2fwd_dst_ports[portid] = 0;
/* reset l2fwd_dst_ports */
for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++)
l2fwd_dst_ports[portid] = 0;
@@
-887,6
+882,13
@@
main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "Cannot configure device: err=%d, port=%u\n",
ret, (unsigned) portid);
rte_exit(EXIT_FAILURE, "Cannot configure device: err=%d, port=%u\n",
ret, (unsigned) portid);
+ ret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd,
+ &nb_txd);
+ if (ret < 0)
+ rte_exit(EXIT_FAILURE,
+ "Cannot adjust number of descriptors: err=%d, port=%u\n",
+ ret, (unsigned) portid);
+
rte_eth_macaddr_get(portid, &l2fwd_ports_eth_addr[portid]);
/* init one RX queue */
rte_eth_macaddr_get(portid, &l2fwd_ports_eth_addr[portid]);
/* init one RX queue */
@@
-990,7
+992,7
@@
main(int argc, char **argv)
struct rte_jobstats *job = &qconf->port_fwd_jobs[i];
portid = qconf->rx_port_list[i];
struct rte_jobstats *job = &qconf->port_fwd_jobs[i];
portid = qconf->rx_port_list[i];
- printf("Setting forward jo
n
for port %u\n", portid);
+ printf("Setting forward jo
b
for port %u\n", portid);
snprintf(name, RTE_DIM(name), "port %u fwd", portid);
/* Setup forward job.
snprintf(name, RTE_DIM(name), "port %u fwd", portid);
/* Setup forward job.