testpmd: remove duplicated function parse_item_list
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
@@ -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
@@ -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
De Lara Guarch, Pablo
Acked-byQuoted 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 functionparse_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.Signed-off-by Bruce Richardson <[email protected]>
Thomas Monjalon
AppliedQuoted 8 lines
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.Signed-off-by Bruce Richardson <[email protected]>Acked-by Pablo de Lara <[email protected]>
Applied
Thanks
Signature · 1 line
Thomas