Skip to contentSkip to conversation

testpmd: remove duplicated function parse_item_list

PATCH Applied Bruce Richardson 3 participants 3 messages Dec 16, 2014 – Jan 15, 2015 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testpmd: remove duplicated function parse_item_list

There were two static functions called "parse_item_list" in testpmd app. Since one was a superset of the functionality of the other, we can collapse the two calls down into a single one, shared between the two C files.

---
 app/test-pmd/cmdline.c    |  2 +-
 app/test-pmd/parameters.c | 49 ++---------------------------------------------
 app/test-pmd/testpmd.h    |  3 +++
 3 files changed, 6 insertions(+), 48 deletions(-)
app/test-pmd/cmdline.c +1 -1
index 882a5a2..4618b92 100644
@@ -2224,7 +2224,7 @@ cmdline_parse_inst_t cmd_stop = {
 
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
-static unsigned int
+unsigned int
 parse_item_list(char* str, const char* item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
app/test-pmd/parameters.c +2 -47

61 lines not on this page · raw message

app/test-pmd/testpmd.h +3 -0
index f8b0740..8f5e6c7 100644
@@ -446,6 +446,9 @@ port_pci_reg_write(struct rte_port *port, uint32_t reg_off, uint32_t reg_v)
 	port_pci_reg_write(&ports[(pt_id)], (reg_off), (reg_value))
 
 /* Prototypes */
+unsigned int parse_item_list(char* str, const char* item_name,
+			unsigned int max_items,
+			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
 void prompt(void);
 void nic_stats_display(portid_t port_id);
Signature · 1 line
1.9.3

A message that is not in the archive (sent off-list or not yet received): 1418728072-20092-1-git-send-email-bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 9 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Tuesday, December 16, 2014 11:08 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH] testpmd: remove duplicated function parse_item_list

Quoted 6 lines

There were two static functions called "parse_item_list" in testpmd app. Since one was a superset of the functionality of the other, we can collapse the two calls down into a single one, shared between the two C files.

A message that is not in the archive (sent off-list or not yet received): E115CCD9D858EF4F90C690B0DCB4D89726898658-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org