DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing
@ 2014-06-18 20:33 Bruce Richardson
  2014-06-18 20:33 ` [dpdk-dev] [PATCH 1/4] testpmd: fix commandline variable types Bruce Richardson
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Bruce Richardson @ 2014-06-18 20:33 UTC (permalink / raw)
  To: dev

When testing compilation on BSD systems and with the clang compiler a
number of minor issues were encountered. This patchset fixes some of these.

NOTE: compilation targets for using clang on BSD and Linux I'm planning to 
upstream post-1.7 release. These are just issues found when doing testing for
it.

Bruce Richardson (4):
  testpmd: fix commandline variable types
  test app: remove unused variable definition
  scripts: fix filtering of comments on bsd
  i40e: remove endian.h include

 app/test-pmd/cmdline.c          | 18 +++++++++---------
 app/test/test_table_acl.c       |  2 --
 lib/librte_pmd_i40e/i40e_rxtx.c |  1 -
 scripts/gen-config-h.sh         |  2 +-
 4 files changed, 10 insertions(+), 13 deletions(-)

-- 
1.9.3

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

* [dpdk-dev] [PATCH 1/4] testpmd: fix commandline variable types
  2014-06-18 20:33 [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing Bruce Richardson
@ 2014-06-18 20:33 ` Bruce Richardson
  2014-06-18 20:33 ` [dpdk-dev] [PATCH 2/4] test app: remove unused variable definition Bruce Richardson
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2014-06-18 20:33 UTC (permalink / raw)
  To: dev

A number of commandline entries in the testpmd commandline were actually
defined as being string type values when in fact they were being
initialized as integer types. Correct this by specifying them as integer
type values in the type definition.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test-pmd/cmdline.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index e3e51fc..3298360 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1367,7 +1367,7 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_port =
 cmdline_parse_token_string_t cmd_config_rss_hash_key_config =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, config,
 				 "config");
-cmdline_parse_token_string_t cmd_config_rss_hash_key_port_id =
+cmdline_parse_token_num_t cmd_config_rss_hash_key_port_id =
 	TOKEN_NUM_INITIALIZER(struct cmd_config_rss_hash_key, port_id, UINT8);
 cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_hash_key =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key,
@@ -5367,7 +5367,7 @@ cmdline_parse_token_string_t cmd_mirror_mask_set =
 cmdline_parse_token_string_t cmd_mirror_mask_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_set_mirror_mask_result,
 				port, "port");
-cmdline_parse_token_string_t cmd_mirror_mask_portid =
+cmdline_parse_token_num_t cmd_mirror_mask_portid =
 	TOKEN_NUM_INITIALIZER(struct cmd_set_mirror_mask_result,
 				port_id, UINT8);
 cmdline_parse_token_string_t cmd_mirror_mask_mirror =
@@ -5477,7 +5477,7 @@ cmdline_parse_token_string_t cmd_mirror_link_set =
 cmdline_parse_token_string_t cmd_mirror_link_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_set_mirror_link_result,
 				port, "port");
-cmdline_parse_token_string_t cmd_mirror_link_portid =
+cmdline_parse_token_num_t cmd_mirror_link_portid =
 	TOKEN_NUM_INITIALIZER(struct cmd_set_mirror_link_result,
 				port_id, UINT8);
 cmdline_parse_token_string_t cmd_mirror_link_mirror =
@@ -5563,7 +5563,7 @@ cmdline_parse_token_string_t cmd_rm_mirror_rule_reset =
 cmdline_parse_token_string_t cmd_rm_mirror_rule_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_rm_mirror_rule_result,
 				port, "port");
-cmdline_parse_token_string_t cmd_rm_mirror_rule_portid =
+cmdline_parse_token_num_t cmd_rm_mirror_rule_portid =
 	TOKEN_NUM_INITIALIZER(struct cmd_rm_mirror_rule_result,
 				port_id, UINT8);
 cmdline_parse_token_string_t cmd_rm_mirror_rule_mirror =
@@ -5872,7 +5872,7 @@ cmd_set_syn_filter_parsed(void *parsed_result,
 		printf("syn filter setting error: (%s)\n", strerror(-ret));
 
 }
-cmdline_parse_token_string_t cmd_syn_filter_portid =
+cmdline_parse_token_num_t cmd_syn_filter_portid =
 	TOKEN_NUM_INITIALIZER(struct cmd_set_syn_filter_result,
 				port_id, UINT8);
 cmdline_parse_token_string_t cmd_syn_filter_priority =
@@ -5990,7 +5990,7 @@ cmdline_parse_token_num_t cmd_2tuple_filter_port_id =
 cmdline_parse_token_string_t cmd_2tuple_filter_protocol =
 	TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result,
 				 protocol, "protocol");
-cmdline_parse_token_string_t cmd_2tuple_filter_protocol_value =
+cmdline_parse_token_num_t cmd_2tuple_filter_protocol_value =
 	TOKEN_NUM_INITIALIZER(struct cmd_2tuple_filter_result,
 				 protocol_value, UINT8);
 cmdline_parse_token_num_t cmd_2tuple_filter_protocol_mask =
@@ -6008,7 +6008,7 @@ cmdline_parse_token_num_t cmd_2tuple_filter_dst_port_mask =
 cmdline_parse_token_string_t cmd_2tuple_filter_flags =
 	TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result,
 				flags, "flags");
-cmdline_parse_token_string_t cmd_2tuple_filter_flags_value =
+cmdline_parse_token_num_t cmd_2tuple_filter_flags_value =
 	TOKEN_NUM_INITIALIZER(struct cmd_2tuple_filter_result,
 				flags_value, UINT8);
 cmdline_parse_token_string_t cmd_2tuple_filter_priority =
@@ -6202,7 +6202,7 @@ cmdline_parse_token_num_t cmd_5tuple_filter_src_port_value =
 cmdline_parse_token_string_t cmd_5tuple_filter_protocol =
 	TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result,
 				protocol, "protocol");
-cmdline_parse_token_string_t cmd_5tuple_filter_protocol_value =
+cmdline_parse_token_num_t cmd_5tuple_filter_protocol_value =
 	TOKEN_NUM_INITIALIZER(struct cmd_5tuple_filter_result,
 				protocol_value, UINT8);
 cmdline_parse_token_string_t cmd_5tuple_filter_mask =
@@ -6448,7 +6448,7 @@ cmdline_parse_token_num_t cmd_flex_filter_port_id =
 cmdline_parse_token_string_t cmd_flex_filter_len =
 	TOKEN_STRING_INITIALIZER(struct cmd_flex_filter_result,
 				len, "len");
-cmdline_parse_token_string_t cmd_flex_filter_len_value =
+cmdline_parse_token_num_t cmd_flex_filter_len_value =
 	TOKEN_NUM_INITIALIZER(struct cmd_flex_filter_result,
 				len_value, UINT8);
 cmdline_parse_token_string_t cmd_flex_filter_bytes =
-- 
1.9.3

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

* [dpdk-dev] [PATCH 2/4] test app: remove unused variable definition
  2014-06-18 20:33 [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing Bruce Richardson
  2014-06-18 20:33 ` [dpdk-dev] [PATCH 1/4] testpmd: fix commandline variable types Bruce Richardson
@ 2014-06-18 20:33 ` Bruce Richardson
  2014-06-18 20:33 ` [dpdk-dev] [PATCH 3/4] scripts: fix filtering of comments on bsd Bruce Richardson
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2014-06-18 20:33 UTC (permalink / raw)
  To: dev

Remove an unused variable definition in test_table_acl.c

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/test_table_acl.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test/test_table_acl.c b/app/test/test_table_acl.c
index afc234a..ad0e6f1 100644
--- a/app/test/test_table_acl.c
+++ b/app/test/test_table_acl.c
@@ -42,8 +42,6 @@
 	(((c) & 0xff) << 8) |						\
 	((d) & 0xff))
 
-static const char cb_port_delim[] = ":";
-
 /*
  * Rule and trace formats definitions.
  **/
-- 
1.9.3

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

* [dpdk-dev] [PATCH 3/4] scripts: fix filtering of comments on bsd
  2014-06-18 20:33 [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing Bruce Richardson
  2014-06-18 20:33 ` [dpdk-dev] [PATCH 1/4] testpmd: fix commandline variable types Bruce Richardson
  2014-06-18 20:33 ` [dpdk-dev] [PATCH 2/4] test app: remove unused variable definition Bruce Richardson
@ 2014-06-18 20:33 ` Bruce Richardson
  2014-06-18 20:33 ` [dpdk-dev] [PATCH 4/4] i40e: remove endian.h include Bruce Richardson
  2014-06-18 23:05 ` [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing Thomas Monjalon
  4 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2014-06-18 20:33 UTC (permalink / raw)
  To: dev

On BSD 10, the cpp binary behaves a little differently and often leaves
lines starting with a space before the inital '#' character. This change
ensures those lines are filtered out properly.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 scripts/gen-config-h.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen-config-h.sh b/scripts/gen-config-h.sh
index 86b41ab..efd7667 100755
--- a/scripts/gen-config-h.sh
+++ b/scripts/gen-config-h.sh
@@ -34,7 +34,7 @@
 echo "#ifndef __RTE_CONFIG_H"
 echo "#define __RTE_CONFIG_H"
 grep CONFIG_ $1							 \
-| grep -v '^#'							 \
+| grep -v '^[ \t]*#'							 \
 | sed 's,CONFIG_\(.*\)=y.*$,#define \1 1,'			 \
 | sed 's,CONFIG_\(.*\)=n.*$,#undef \1,'				 \
 | sed 's,CONFIG_\(.*\)=\(.*\)$,#define \1 \2,'			 \
-- 
1.9.3

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

* [dpdk-dev] [PATCH 4/4] i40e: remove endian.h include
  2014-06-18 20:33 [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing Bruce Richardson
                   ` (2 preceding siblings ...)
  2014-06-18 20:33 ` [dpdk-dev] [PATCH 3/4] scripts: fix filtering of comments on bsd Bruce Richardson
@ 2014-06-18 20:33 ` Bruce Richardson
  2014-06-18 23:05 ` [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing Thomas Monjalon
  4 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2014-06-18 20:33 UTC (permalink / raw)
  To: dev

endian.h is not needed for the compilation of i40e_rxtx.c and its
inclusion prevents building on FreeBSD systems.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_pmd_i40e/i40e_rxtx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c
index d802894..9fccbee 100644
--- a/lib/librte_pmd_i40e/i40e_rxtx.c
+++ b/lib/librte_pmd_i40e/i40e_rxtx.c
@@ -31,7 +31,6 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <endian.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing
  2014-06-18 20:33 [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing Bruce Richardson
                   ` (3 preceding siblings ...)
  2014-06-18 20:33 ` [dpdk-dev] [PATCH 4/4] i40e: remove endian.h include Bruce Richardson
@ 2014-06-18 23:05 ` Thomas Monjalon
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2014-06-18 23:05 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

2014-06-18 21:33, Bruce Richardson:
> When testing compilation on BSD systems and with the clang compiler a
> number of minor issues were encountered. This patchset fixes some of these.

Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Applied for version 1.7.0.

Thanks
-- 
Thomas

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

end of thread, other threads:[~2014-06-18 23:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 20:33 [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing Bruce Richardson
2014-06-18 20:33 ` [dpdk-dev] [PATCH 1/4] testpmd: fix commandline variable types Bruce Richardson
2014-06-18 20:33 ` [dpdk-dev] [PATCH 2/4] test app: remove unused variable definition Bruce Richardson
2014-06-18 20:33 ` [dpdk-dev] [PATCH 3/4] scripts: fix filtering of comments on bsd Bruce Richardson
2014-06-18 20:33 ` [dpdk-dev] [PATCH 4/4] i40e: remove endian.h include Bruce Richardson
2014-06-18 23:05 ` [dpdk-dev] [PATCH 0/4] minor fixes from BSD and clang testing Thomas Monjalon

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