DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues
@ 2018-10-08 10:41 Anoob Joseph
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 1/8] examples/l2fwd: remove quoted white space before newline Anoob Joseph
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Anoob Joseph @ 2018-10-08 10:41 UTC (permalink / raw)
  To: Bruce Richardson, Pablo de Lara
  Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev

This patchset fixes multiple issues reported by checkpatch in l2fwd
code base. These issues would be flagged for any new copy of the file
and hence, fixing at the source.

Anoob Joseph (8):
  examples/l2fwd: remove quoted white space before newline
  examples/l2fwd: need space between two args
  examples/l2fwd: else should follow close brace
  examples/l2fwd: replace bare usage of 'unsigned'
  examples/l2fwd: follow convention for block comments
  examples/l2fwd: limit line to 80 char
  examples/l2fwd: space required between elements
  examples/l2fwd: remove null initialisation

 examples/l2fwd/main.c | 49 ++++++++++++++++++++++++++-----------------------
 1 file changed, 26 insertions(+), 23 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 1/8] examples/l2fwd: remove quoted white space before newline
  2018-10-08 10:41 [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Anoob Joseph
@ 2018-10-08 10:41 ` Anoob Joseph
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 2/8] examples/l2fwd: need space between two args Anoob Joseph
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Anoob Joseph @ 2018-10-08 10:41 UTC (permalink / raw)
  To: Bruce Richardson, Pablo de Lara
  Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev

Remove quoted white space before newline.

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
 examples/l2fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 6c23215..829f981 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -700,7 +700,7 @@ main(int argc, char **argv)
 			rte_exit(EXIT_FAILURE, "rte_eth_dev_start:err=%d, port=%u\n",
 				  ret, portid);
 
-		printf("done: \n");
+		printf("done:\n");
 
 		rte_eth_promiscuous_enable(portid);
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 2/8] examples/l2fwd: need space between two args
  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 ` Anoob Joseph
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 3/8] examples/l2fwd: else should follow close brace Anoob Joseph
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Anoob Joseph @ 2018-10-08 10:41 UTC (permalink / raw)
  To: Bruce Richardson, Pablo de Lara
  Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev

Space is required after the ',' separating the members.

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
 examples/l2fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 829f981..ae51ac7 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -651,7 +651,7 @@ main(int argc, char **argv)
 				 "Cannot adjust number of descriptors: err=%d, port=%u\n",
 				 ret, portid);
 
-		rte_eth_macaddr_get(portid,&l2fwd_ports_eth_addr[portid]);
+		rte_eth_macaddr_get(portid, &l2fwd_ports_eth_addr[portid]);
 
 		/* init one RX queue */
 		fflush(stdout);
-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 3/8] examples/l2fwd: else should follow close brace
  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 ` Anoob Joseph
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 4/8] examples/l2fwd: replace bare usage of 'unsigned' Anoob Joseph
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Anoob Joseph @ 2018-10-08 10:41 UTC (permalink / raw)
  To: Bruce Richardson, Pablo de Lara
  Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev

The 'else' should follow close brace '}'

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
 examples/l2fwd/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index ae51ac7..d2b7034 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -568,8 +568,7 @@ main(int argc, char **argv)
 		if (nb_ports_in_mask % 2) {
 			l2fwd_dst_ports[portid] = last_port;
 			l2fwd_dst_ports[last_port] = portid;
-		}
-		else
+		} else
 			last_port = portid;
 
 		nb_ports_in_mask++;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 4/8] examples/l2fwd: replace bare usage of 'unsigned'
  2018-10-08 10:41 [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Anoob Joseph
                   ` (2 preceding siblings ...)
  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
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 5/8] examples/l2fwd: follow convention for block comments Anoob Joseph
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Anoob Joseph @ 2018-10-08 10:41 UTC (permalink / raw)
  To: Bruce Richardson, Pablo de Lara
  Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev

'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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 5/8] examples/l2fwd: follow convention for block comments
  2018-10-08 10:41 [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Anoob Joseph
                   ` (3 preceding siblings ...)
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 4/8] examples/l2fwd: replace bare usage of 'unsigned' Anoob Joseph
@ 2018-10-08 10:41 ` Anoob Joseph
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 6/8] examples/l2fwd: limit line to 80 char Anoob Joseph
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Anoob Joseph @ 2018-10-08 10:41 UTC (permalink / raw)
  To: Bruce Richardson, Pablo de Lara
  Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev

Block comments need to use trailing */ on a separate line.

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
 examples/l2fwd/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index cbcd604..deebef5 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -366,7 +366,8 @@ enum {
 	/* long options mapped to a short option */
 
 	/* first long only option value must be >= 256, so that we won't
-	 * conflict with short options */
+	 * conflict with short options
+	 */
 	CMD_LINE_OPT_MIN_NUM = 256,
 };
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 6/8] examples/l2fwd: limit line to 80 char
  2018-10-08 10:41 [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Anoob Joseph
                   ` (4 preceding siblings ...)
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 5/8] examples/l2fwd: follow convention for block comments Anoob Joseph
@ 2018-10-08 10:41 ` Anoob Joseph
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 7/8] examples/l2fwd: space required between elements Anoob Joseph
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Anoob Joseph @ 2018-10-08 10:41 UTC (permalink / raw)
  To: Bruce Richardson, Pablo de Lara
  Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev

Fixing lines exceeding 80 char limit

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
 examples/l2fwd/main.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index deebef5..c70b839 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -193,8 +193,8 @@ l2fwd_main_loop(void)
 	uint64_t prev_tsc, diff_tsc, cur_tsc, timer_tsc;
 	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;
+	const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1)
+			/ US_PER_S * BURST_TX_DRAIN_US;
 	struct rte_eth_dev_tx_buffer *buffer;
 
 	prev_tsc = 0;
@@ -230,10 +230,12 @@ l2fwd_main_loop(void)
 
 			for (i = 0; i < qconf->n_rx_port; i++) {
 
-				portid = l2fwd_dst_ports[qconf->rx_port_list[i]];
+				portid =
+					l2fwd_dst_ports[qconf->rx_port_list[i]];
 				buffer = tx_buffer[portid];
 
-				sent = rte_eth_tx_buffer_flush(portid, 0, buffer);
+				sent = rte_eth_tx_buffer_flush(portid, 0,
+							       buffer);
 				if (sent)
 					port_statistics[portid].tx += sent;
 
@@ -249,7 +251,8 @@ l2fwd_main_loop(void)
 				if (unlikely(timer_tsc >= timer_period)) {
 
 					/* do this only on master core */
-					if (lcore_id == rte_get_master_lcore()) {
+					if (lcore_id ==
+					    rte_get_master_lcore()) {
 						print_stats();
 						/* reset the timer */
 						timer_tsc = 0;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 7/8] examples/l2fwd: space required between elements
  2018-10-08 10:41 [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Anoob Joseph
                   ` (5 preceding siblings ...)
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 6/8] examples/l2fwd: limit line to 80 char Anoob Joseph
@ 2018-10-08 10:41 ` 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
  8 siblings, 0 replies; 14+ messages in thread
From: Anoob Joseph @ 2018-10-08 10:41 UTC (permalink / raw)
  To: Bruce Richardson, Pablo de Lara
  Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev

Space is required after ','.

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
 examples/l2fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index c70b839..efb0b59 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -114,7 +114,7 @@ print_stats(void)
 	total_packets_rx = 0;
 
 	const char clr[] = { 27, '[', '2', 'J', '\0' };
-	const char topLeft[] = { 27, '[', '1', ';', '1', 'H','\0' };
+	const char topLeft[] = { 27, '[', '1', ';', '1', 'H', '\0' };
 
 		/* Clear screen and move to top left */
 	printf("%s%s", clr, topLeft);
-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 8/8] examples/l2fwd: remove null initialisation
  2018-10-08 10:41 [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Anoob Joseph
                   ` (6 preceding siblings ...)
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 7/8] examples/l2fwd: space required between elements Anoob Joseph
@ 2018-10-08 10:41 ` Anoob Joseph
  2018-10-08 11:00 ` [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Ferruh Yigit
  8 siblings, 0 replies; 14+ messages in thread
From: Anoob Joseph @ 2018-10-08 10:41 UTC (permalink / raw)
  To: Bruce Richardson, Pablo de Lara
  Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev

Do not initialise statis/globals to NULL.

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
 examples/l2fwd/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index efb0b59..1a1960c 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -62,7 +62,7 @@ static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
 static struct ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];
 
 /* mask of enabled ports */
-static uint32_t l2fwd_enabled_port_mask = 0;
+static uint32_t l2fwd_enabled_port_mask;
 
 /* list of enabled ports */
 static uint32_t l2fwd_dst_ports[RTE_MAX_ETHPORTS];
@@ -88,7 +88,7 @@ static struct rte_eth_conf port_conf = {
 	},
 };
 
-struct rte_mempool * l2fwd_pktmbuf_pool = NULL;
+struct rte_mempool *l2fwd_pktmbuf_pool;
 
 /* Per-port statistics struct */
 struct l2fwd_port_statistics {
-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues
  2018-10-08 10:41 [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues Anoob Joseph
                   ` (7 preceding siblings ...)
  2018-10-08 10:41 ` [dpdk-dev] [PATCH 8/8] examples/l2fwd: remove null initialisation Anoob Joseph
@ 2018-10-08 11:00 ` Ferruh Yigit
  2018-10-08 11:29   ` Joseph, Anoob
  8 siblings, 1 reply; 14+ messages in thread
From: Ferruh Yigit @ 2018-10-08 11:00 UTC (permalink / raw)
  To: Anoob Joseph, Bruce Richardson, Pablo de Lara
  Cc: Jerin Jacob, Narayana Prasad, dev, Thomas Monjalon

On 10/8/2018 11:41 AM, Anoob Joseph wrote:
> This patchset fixes multiple issues reported by checkpatch in l2fwd
> code base. These issues would be flagged for any new copy of the file
> and hence, fixing at the source.
> 
> Anoob Joseph (8):
>   examples/l2fwd: remove quoted white space before newline
>   examples/l2fwd: need space between two args
>   examples/l2fwd: else should follow close brace
>   examples/l2fwd: replace bare usage of 'unsigned'
>   examples/l2fwd: follow convention for block comments
>   examples/l2fwd: limit line to 80 char
>   examples/l2fwd: space required between elements
>   examples/l2fwd: remove null initialisation

Hi Anoob,

I am not sure if it is good idea to get syntax only fixes, I would prefer to get
syntax fixes when some other code touches that area.

Thanks,
ferruh

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues
  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
  0 siblings, 1 reply; 14+ messages in thread
From: Joseph, Anoob @ 2018-10-08 11:29 UTC (permalink / raw)
  To: Ferruh Yigit, Bruce Richardson, Pablo de Lara
  Cc: Jerin Jacob, Narayana Prasad, dev, Thomas Monjalon

Hi Ferruh,

On 08-10-2018 16:30, Ferruh Yigit wrote:
> External Email
>
> On 10/8/2018 11:41 AM, Anoob Joseph wrote:
>> This patchset fixes multiple issues reported by checkpatch in l2fwd
>> code base. These issues would be flagged for any new copy of the file
>> and hence, fixing at the source.
>>
>> Anoob Joseph (8):
>>    examples/l2fwd: remove quoted white space before newline
>>    examples/l2fwd: need space between two args
>>    examples/l2fwd: else should follow close brace
>>    examples/l2fwd: replace bare usage of 'unsigned'
>>    examples/l2fwd: follow convention for block comments
>>    examples/l2fwd: limit line to 80 char
>>    examples/l2fwd: space required between elements
>>    examples/l2fwd: remove null initialisation
> Hi Anoob,
>
> I am not sure if it is good idea to get syntax only fixes, I would prefer to get
> syntax fixes when some other code touches that area.
I'm preparing a new copy of l2fwd with support for eventmode(as 
suggested in, 
https://mails.dpdk.org/archives/dev/2018-August/109717.html). All these 
issues were flagged when I did the copy. What would be the better 
approach in that case? Fix it in just the new application or fix the 
source? Fixing in just the new app would mean, the two versions will 
have a diff at the time of copy. And next time someone touches these 
lines, the same problem would be there.

Thanks,
Anoob

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues
  2018-10-08 11:29   ` Joseph, Anoob
@ 2018-10-08 12:35     ` Ferruh Yigit
  2018-10-29  2:19       ` Thomas Monjalon
  0 siblings, 1 reply; 14+ messages in thread
From: Ferruh Yigit @ 2018-10-08 12:35 UTC (permalink / raw)
  To: Joseph, Anoob, Bruce Richardson, Pablo de Lara
  Cc: Jerin Jacob, Narayana Prasad, dev, Thomas Monjalon

On 10/8/2018 12:29 PM, Joseph, Anoob wrote:
> Hi Ferruh,
> 
> On 08-10-2018 16:30, Ferruh Yigit wrote:
>> External Email
>>
>> On 10/8/2018 11:41 AM, Anoob Joseph wrote:
>>> This patchset fixes multiple issues reported by checkpatch in l2fwd
>>> code base. These issues would be flagged for any new copy of the file
>>> and hence, fixing at the source.
>>>
>>> Anoob Joseph (8):
>>>    examples/l2fwd: remove quoted white space before newline
>>>    examples/l2fwd: need space between two args
>>>    examples/l2fwd: else should follow close brace
>>>    examples/l2fwd: replace bare usage of 'unsigned'
>>>    examples/l2fwd: follow convention for block comments
>>>    examples/l2fwd: limit line to 80 char
>>>    examples/l2fwd: space required between elements
>>>    examples/l2fwd: remove null initialisation
>> Hi Anoob,
>>
>> I am not sure if it is good idea to get syntax only fixes, I would prefer to get
>> syntax fixes when some other code touches that area.
> I'm preparing a new copy of l2fwd with support for eventmode(as 
> suggested in, 
> https://mails.dpdk.org/archives/dev/2018-August/109717.html). All these 
> issues were flagged when I did the copy. What would be the better 
> approach in that case? Fix it in just the new application or fix the 
> source? Fixing in just the new app would mean, the two versions will 
> have a diff at the time of copy.

I see, make sense to not create syntax diff copied and original versions, I
missed the new copy part. So OK for this patch.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues
  2018-10-08 12:35     ` Ferruh Yigit
@ 2018-10-29  2:19       ` Thomas Monjalon
  2018-10-29  4:48         ` Joseph, Anoob
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Monjalon @ 2018-10-29  2:19 UTC (permalink / raw)
  To: Joseph, Anoob
  Cc: dev, Ferruh Yigit, Bruce Richardson, Pablo de Lara, Jerin Jacob,
	Narayana Prasad

08/10/2018 14:35, Ferruh Yigit:
> On 10/8/2018 12:29 PM, Joseph, Anoob wrote:
> > On 08-10-2018 16:30, Ferruh Yigit wrote:
> >> On 10/8/2018 11:41 AM, Anoob Joseph wrote:
> >>> This patchset fixes multiple issues reported by checkpatch in l2fwd
> >>> code base. These issues would be flagged for any new copy of the file
> >>> and hence, fixing at the source.
> >>>
> >>> Anoob Joseph (8):
> >>>    examples/l2fwd: remove quoted white space before newline
> >>>    examples/l2fwd: need space between two args
> >>>    examples/l2fwd: else should follow close brace
> >>>    examples/l2fwd: replace bare usage of 'unsigned'
> >>>    examples/l2fwd: follow convention for block comments
> >>>    examples/l2fwd: limit line to 80 char
> >>>    examples/l2fwd: space required between elements
> >>>    examples/l2fwd: remove null initialisation
> >> Hi Anoob,
> >>
> >> I am not sure if it is good idea to get syntax only fixes, I would prefer to get
> >> syntax fixes when some other code touches that area.
> > I'm preparing a new copy of l2fwd with support for eventmode(as 
> > suggested in, 
> > https://mails.dpdk.org/archives/dev/2018-August/109717.html). All these 
> > issues were flagged when I did the copy. What would be the better 
> > approach in that case? Fix it in just the new application or fix the 
> > source? Fixing in just the new app would mean, the two versions will 
> > have a diff at the time of copy.
> 
> I see, make sense to not create syntax diff copied and original versions, I
> missed the new copy part. So OK for this patch.

It was said that there will be not so much common code.
So why bothering to reformat the original example?

Anyway, if such cleanup is worth before duplicating,
please insert it in the same patchset as the new example.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported issues
  2018-10-29  2:19       ` Thomas Monjalon
@ 2018-10-29  4:48         ` Joseph, Anoob
  0 siblings, 0 replies; 14+ messages in thread
From: Joseph, Anoob @ 2018-10-29  4:48 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Ferruh Yigit, Bruce Richardson, Pablo de Lara, Jacob,
	 Jerin, Athreya, Narayana Prasad

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: 29 October 2018 07:49
> To: Joseph, Anoob <Anoob.Joseph@cavium.com>
> Cc: dev@dpdk.org; Ferruh Yigit <ferruh.yigit@intel.com>; Bruce Richardson
> <bruce.richardson@intel.com>; Pablo de Lara
> <pablo.de.lara.guarch@intel.com>; Jacob, Jerin
> <Jerin.JacobKollanukkaran@cavium.com>; Athreya, Narayana Prasad
> <NarayanaPrasad.Athreya@cavium.com>
> Subject: Re: [dpdk-dev] [PATCH 0/8] examples/l2fwd: fix checkpatch reported
> issues
> 
> External Email
> 
> 08/10/2018 14:35, Ferruh Yigit:
> > On 10/8/2018 12:29 PM, Joseph, Anoob wrote:
> > > On 08-10-2018 16:30, Ferruh Yigit wrote:
> > >> On 10/8/2018 11:41 AM, Anoob Joseph wrote:
> > >>> This patchset fixes multiple issues reported by checkpatch in
> > >>> l2fwd code base. These issues would be flagged for any new copy of
> > >>> the file and hence, fixing at the source.
> > >>>
> > >>> Anoob Joseph (8):
> > >>>    examples/l2fwd: remove quoted white space before newline
> > >>>    examples/l2fwd: need space between two args
> > >>>    examples/l2fwd: else should follow close brace
> > >>>    examples/l2fwd: replace bare usage of 'unsigned'
> > >>>    examples/l2fwd: follow convention for block comments
> > >>>    examples/l2fwd: limit line to 80 char
> > >>>    examples/l2fwd: space required between elements
> > >>>    examples/l2fwd: remove null initialisation
> > >> Hi Anoob,
> > >>
> > >> I am not sure if it is good idea to get syntax only fixes, I would
> > >> prefer to get syntax fixes when some other code touches that area.
> > > I'm preparing a new copy of l2fwd with support for eventmode(as
> > > suggested in,
> > > https://mails.dpdk.org/archives/dev/2018-August/109717.html). All
> > > these issues were flagged when I did the copy. What would be the
> > > better approach in that case? Fix it in just the new application or
> > > fix the source? Fixing in just the new app would mean, the two
> > > versions will have a diff at the time of copy.
> >
> > I see, make sense to not create syntax diff copied and original
> > versions, I missed the new copy part. So OK for this patch.
> 
> It was said that there will be not so much common code.
> So why bothering to reformat the original example?

There will be common code. In fact most of the code could actually be shared. But we are creating a copy and starting from there because Bruce didn't want any changes in the existing app.

> Anyway, if such cleanup is worth before duplicating, please insert it in the same
> patchset as the new example.

These fixes will be there in the new app. I'll add this in the patchset when I share the new app.

Thanks,
Anoob

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-10-29  4:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [dpdk-dev] [PATCH 4/8] examples/l2fwd: replace bare usage of 'unsigned' Anoob Joseph
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

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).