[dpdk-dev] [PATCH 4/8] examples/l2fwd: replace bare usage of 'unsigned'
Anoob Joseph
anoob.joseph at caviumnetworks.com
Mon Oct 8 12:41:21 CEST 2018
'unsigned int' is preferred over bare usage of 'unsigned'
Signed-off-by: Anoob Joseph <anoob.joseph at caviumnetworks.com>
---
examples/l2fwd/main.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index d2b7034..cbcd604 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -72,8 +72,8 @@ static unsigned int l2fwd_rx_queue_per_lcore = 1;
#define MAX_RX_QUEUE_PER_LCORE 16
#define MAX_TX_QUEUE_PER_PORT 16
struct lcore_queue_conf {
- unsigned n_rx_port;
- unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE];
+ unsigned int n_rx_port;
+ unsigned int rx_port_list[MAX_RX_QUEUE_PER_LCORE];
} __rte_cache_aligned;
struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
@@ -107,7 +107,7 @@ static void
print_stats(void)
{
uint64_t total_packets_dropped, total_packets_tx, total_packets_rx;
- unsigned portid;
+ unsigned int portid;
total_packets_dropped = 0;
total_packets_tx = 0;
@@ -149,7 +149,7 @@ print_stats(void)
}
static void
-l2fwd_mac_updating(struct rte_mbuf *m, unsigned dest_portid)
+l2fwd_mac_updating(struct rte_mbuf *m, unsigned int dest_portid)
{
struct ether_hdr *eth;
void *tmp;
@@ -165,9 +165,9 @@ l2fwd_mac_updating(struct rte_mbuf *m, unsigned dest_portid)
}
static void
-l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid)
+l2fwd_simple_forward(struct rte_mbuf *m, unsigned int portid)
{
- unsigned dst_port;
+ unsigned int dst_port;
int sent;
struct rte_eth_dev_tx_buffer *buffer;
@@ -189,9 +189,9 @@ l2fwd_main_loop(void)
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
struct rte_mbuf *m;
int sent;
- unsigned lcore_id;
+ unsigned int lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc, timer_tsc;
- unsigned i, j, portid, nb_rx;
+ unsigned int i, j, portid, nb_rx;
struct lcore_queue_conf *qconf;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S *
BURST_TX_DRAIN_US;
@@ -517,8 +517,8 @@ main(int argc, char **argv)
uint16_t nb_ports;
uint16_t nb_ports_available = 0;
uint16_t portid, last_port;
- unsigned lcore_id, rx_lcore_id;
- unsigned nb_ports_in_mask = 0;
+ unsigned int lcore_id, rx_lcore_id;
+ unsigned int nb_ports_in_mask = 0;
unsigned int nb_lcores = 0;
unsigned int nb_mbufs;
--
2.7.4
More information about the dev
mailing list