summaryrefslogtreecommitdiff
path: root/examples/l2fwd-crypto
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2017-10-13 21:17:00 +0800
committerThomas Monjalon <thomas@monjalon.net>2017-10-13 21:57:49 +0200
commit47523597ff6c6ecf5e26e9bd149ab74cca5ec598 (patch)
treed1654b9f107740099486fcf92bf0f2d949be1aa7 /examples/l2fwd-crypto
parentb526f0552432ec7c8ef5bd5914f90a03473e9149 (diff)
downloaddpdk-47523597ff6c6ecf5e26e9bd149ab74cca5ec598.zip
dpdk-47523597ff6c6ecf5e26e9bd149ab74cca5ec598.tar.gz
dpdk-47523597ff6c6ecf5e26e9bd149ab74cca5ec598.tar.xz
examples: fix port id type
Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Diffstat (limited to 'examples/l2fwd-crypto')
-rw-r--r--examples/l2fwd-crypto/main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 5aa71c8..7dfcba4 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -577,7 +577,7 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m,
/* Send the burst of packets on an output interface */
static int
l2fwd_send_burst(struct lcore_queue_conf *qconf, unsigned n,
- uint8_t port)
+ uint16_t port)
{
struct rte_mbuf **pkt_buffer;
unsigned ret;
@@ -598,7 +598,7 @@ l2fwd_send_burst(struct lcore_queue_conf *qconf, unsigned n,
/* Enqueue packets for TX and prepare them to be sent */
static int
-l2fwd_send_packet(struct rte_mbuf *m, uint8_t port)
+l2fwd_send_packet(struct rte_mbuf *m, uint16_t port)
{
unsigned lcore_id, len;
struct lcore_queue_conf *qconf;
@@ -1754,11 +1754,12 @@ l2fwd_crypto_parse_args(struct l2fwd_crypto_options *options,
/* Check the link status of all ports in up to 9s, and print them finally */
static void
-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
{
#define CHECK_INTERVAL 100 /* 100ms */
#define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */
- uint8_t portid, count, all_ports_up, print_flag = 0;
+ uint16_t portid;
+ uint8_t count, all_ports_up, print_flag = 0;
struct rte_eth_link link;
printf("\nChecking link status");
@@ -1773,14 +1774,13 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
/* print link status if flag set */
if (print_flag == 1) {
if (link.link_status)
- printf("Port %d Link Up - speed %u "
- "Mbps - %s\n", (uint8_t)portid,
- (unsigned)link.link_speed,
+ printf(
+ "Port%d Link Up. Speed %u Mbps - %s\n",
+ portid, link.link_speed,
(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
("full-duplex") : ("half-duplex\n"));
else
- printf("Port %d Link Down\n",
- (uint8_t)portid);
+ printf("Port %d Link Down\n", portid);
continue;
}
/* clear all_ports_up flag if any link down */