DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>
Cc: Anoob Joseph <anoob.joseph@caviumnetworks.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	Narayana Prasad <narayanaprasad.athreya@caviumnetworks.com>,
	dev@dpdk.org
Subject: [dpdk-dev] [PATCH 4/8] examples/l2fwd: replace bare usage of 'unsigned'
Date: Mon,  8 Oct 2018 16:11:21 +0530	[thread overview]
Message-ID: <1538995285-2040-5-git-send-email-anoob.joseph@caviumnetworks.com> (raw)
In-Reply-To: <1538995285-2040-1-git-send-email-anoob.joseph@caviumnetworks.com>

'unsigned int' is preferred over bare usage of 'unsigned'

Signed-off-by: Anoob Joseph <anoob.joseph@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

  parent reply	other threads:[~2018-10-08 10:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 10:41 [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Anoob Joseph
2018-10-08 10:41 ` [dpdk-dev] [PATCH 1/8] examples/l2fwd: remove quoted white space before newline Anoob Joseph
2018-10-08 10:41 ` [dpdk-dev] [PATCH 2/8] examples/l2fwd: need space between two args Anoob Joseph
2018-10-08 10:41 ` [dpdk-dev] [PATCH 3/8] examples/l2fwd: else should follow close brace Anoob Joseph
2018-10-08 10:41 ` Anoob Joseph [this message]
2018-10-08 10:41 ` [dpdk-dev] [PATCH 5/8] examples/l2fwd: follow convention for block comments Anoob Joseph
2018-10-08 10:41 ` [dpdk-dev] [PATCH 6/8] examples/l2fwd: limit line to 80 char Anoob Joseph
2018-10-08 10:41 ` [dpdk-dev] [PATCH 7/8] examples/l2fwd: space required between elements Anoob Joseph
2018-10-08 10:41 ` [dpdk-dev] [PATCH 8/8] examples/l2fwd: remove null initialisation Anoob Joseph
2018-10-08 11:00 ` [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Ferruh Yigit
2018-10-08 11:29   ` Joseph, Anoob
2018-10-08 12:35     ` Ferruh Yigit
2018-10-29  2:19       ` Thomas Monjalon
2018-10-29  4:48         ` Joseph, Anoob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1538995285-2040-5-git-send-email-anoob.joseph@caviumnetworks.com \
    --to=anoob.joseph@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=narayanaprasad.athreya@caviumnetworks.com \
    --cc=pablo.de.lara.guarch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).