summaryrefslogtreecommitdiff
path: root/lib/librte_cmdline
AgeCommit message (Collapse)Author
2016-06-30cmdline: remove duplicated symbol from .mapFerruh Yigit
Fixes: 9d41beed24b0 ("lib: provide initial versioning") Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-19cmdline: check initialization errorMarcin Kerlin
The value returned by rdline_init() was not checked in cmdline_new(). On error, free the allocated memory and return NULL. This condition should not happen today, but it's safer to do the check in case rdline_init() is updated. Coverity issue: 13204 Fixes: af75078fece3 ("first public release") Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-02cmdline: add any multi string mode to token stringPiotr Azarewicz
While parsing token string there may be several modes: - fixed single string - multi-choice single string - any single string This patch add one more mode - any multi string. Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-03-09cmdline: bump library versionThomas Monjalon
There was an ABI change in the release 16.04. Fixes: fb76dd26a31d ("cmdline: increase command line buffer") Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2016-03-04cmdline: fix missing includeMarc Sune
cmdline_parse_*.h headers use struct cmdline_token_hdr / cmdline_parse_token_hdr_t which is defined in cmdline_parse.h, but do not include it, forcing manual inclusion. This commit includes cmdline_parse.h in all cmdline_parse_*.h. Signed-off-by: Marc Sune <marcdevel@gmail.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-03-03cmdline: increase command line bufferNelio Laranjeiro
Allow long command lines in testpmd (like flow director with IPv6, ...). Signed-off-by: John McNamara <john.mcnamara@intel.com> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2015-06-29lib: remove redundant definition of local symbolsThomas Monjalon
The new version nodes inherit from the previous ones which already include a default catch-all line for not exported symbols. Reported-by: Helin Zhang <helin.zhang@intel.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-06-23lib: remove extra parenthesis after returnFerruh Yigit
Remove extra parenthesis from return statements. Signed-off-by: Ferruh Yigit <ferruhy@gmail.com>
2015-06-12lib: fix whitespaceStephen Hemminger
More places with trailing whitespace, and empty blank lines Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-05-29cmdline: fix small memory leakErik Ziegenbalg
A function in cmdline.c has a return that does not free buf properly. Signed-off-by: Erik Ziegenbalg <eziegenb@brocade.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: John McNamara <john.mcnamara@intel.com>
2015-05-18cmdline: add polling modePawel Wodkowski
This patch adds the ability to process console input in the same thread as packet processing by using poll() function. Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-05-18cmdline: fix missing includesPawel Wodkowski
When including only some of library headers some definitions are missing and build fails. Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-03-04cmdline: fix parameter typePawel Wodkowski
Fix warning reported during static analysis about size_t to int cast when passing parameters to parse_set_list(). This patch fix code formating errors that give checkpatch.pl errors after generating patch. Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-02-20cmdline: fix check in port list parsingOlivier Matz
The argument ressize contains the size of the result buffer which should be large enough to store the parsed result of a token. In this case, it should be larger or equal to sizeof(cmdline_portlist_t) (4 bytes), not PORTLIST_TOKEN_SIZE which is the max size of the token string. This is not a critical, it fixes cases where the total length of the parsed instruction is greater than the maximum. Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2015-02-04cmdline: fix link due to missing symbol in version mapPanu Matilainen
cmdline_token_portlist_ops fell through cracks in the initial symbol versioning patch, breaking pktgen build. Signed-off-by: Panu Matilainen <pmatilai@redhat.com> Acked-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-02-03mk: add library version extensionNeil Horman
To differentiate libraries that break ABI, we add a library version number suffix to the library, which must be incremented when a given libraries ABI is broken. This patch enforces that addition, sets the initial abi soname extension to 1 for each library and creates a symlink to the base SONAME so that the test applications will link properly. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-02-03lib: provide initial versioningNeil Horman
Add linker version script files to each DPDK library to put a stake in the ground from which we can start cleaning up API's Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2014-12-05cmdline: fix overflow on bsdAlan Carew
When using test-pmd with flow director in FreeBSD, the application will segfault/Bus error while parsing the command-line. This is due to how each commands result structure is represented during parsing, where the offsets for each tokens value is stored in a character array(char result_buf[BUFSIZ]) in cmdline_parse()(./lib/librte_cmdline/cmdline_parse.c). The overflow occurs where BUFSIZ is less than the size of a commands result structure, in this case "struct cmd_pkt_filter_result" (app/test-pmd/cmdline.c) is 1088 bytes and BUFSIZ on FreeBSD is 1024 bytes as opposed to 8192 bytes on Linux. The problem can be reproduced by running test-pmd on FreeBSD: ./testpmd -c 0x3 -n 4 -- -i --portmask=0x3 --pkt-filter-mode=perfect And adding a filter: add_perfect_filter 0 udp src 192.168.0.0 1024 dst 192.168.0.0 1024 flexbytes 0x800 vlan 0 queue 0 soft 0x17 This patch removes the OS dependency on BUFSIZ and defines and uses a library #define CMDLINE_PARSE_RESULT_BUFSIZE 8192 Added boundary checking to ensure this buffer size cannot overflow, with an error message being produced. Suggested-by: Olivier Matz <olivier.matz@6wind.com> http://git.droids-corp.org/?p=libcmdline.git;a=commitdiff;h=b1d5b169352e57df3fc14c51ffad4b83f3e5613f Signed-off-by: Alan Carew <alan.carew@intel.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Tested-by: Bruce Richardson <bruce.richardson@intel.com>
2014-12-04cmdline: revert fix overflow on bsdThomas Monjalon
Revert commit a0547e0a751100 because it is an old version of the patch and was applied by error. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-03cmdline: fix overflow on bsdAlan Carew
When using test-pmd with flow director in FreeBSD, the application will segfault/Bus error while parsing the command-line. This is due to how each commands result structure is represented during parsing, where the offsets for each tokens value is stored in a character array(char result_buf[BUFSIZ]) in cmdline_parse()(./lib/librte_cmdline/cmdline_parse.c). The overflow occurs where BUFSIZ is less than the size of a commands result structure, in this case "struct cmd_pkt_filter_result" (app/test-pmd/cmdline.c) is 1088 bytes and BUFSIZ on FreeBSD is 1024 bytes as opposed to 8192 bytes on Linux. This patch removes the OS dependency on BUFSIZ and defines and uses a library #define CMDLINE_PARSE_RESULT_BUFSIZE 8192 The problem can be reproduced by running test-pmd on FreeBSD: ./testpmd -c 0x3 -n 4 -- -i --portmask=0x3 --pkt-filter-mode=perfect And adding a filter: add_perfect_filter 0 udp src 192.168.0.0 1024 dst 192.168.0.0 1024 flexbytes 0x800 vlan 0 queue 0 soft 0x17 Signed-off-by: Alan Carew <alan.carew@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-11-24cmdline: fix for bsdSergio Gonzalez Monroy
Some features of the cmdline were broken in FreeBSD as a result of termios not being compiled. Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-08-28fix unix permissions for source filesDavid Marchand
No need for that 'x bit' on source files. Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-06-27eal: deprecate rte_snprintfStephen Hemminger
The function rte_snprintf serves no useful purpose. It is the same as snprintf() for all valid inputs. Deprecate it and replace all uses in current code. Leave the tests for the deprecated function in place. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-27eal: fix usage of printf-like functionsBruce Richardson
Mark the rte_log, cmdline_printf and rte_snprintf functions as being printf-style functions. This causes compilation errors due to mis-matched parameter types, so the parameter types are fixed where appropriate. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-11remove trailing whitespacesBruce Richardson
This commit removes trailing whitespace from lines in files. Almost all files are affected, as the BSD license copyright header had trailing whitespace on 4 lines in it [hence the number of files reporting 8 lines changed in the diffstat]. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> [Thomas: remove spaces before tabs in libs] [Thomas: remove more trailing spaces in non-C files] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-26cmdline: fix infinite loop after EOFCristian Dumitrescu
Stop on EOF when reading commands from a file or a pipe. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-25add FreeBSD supportBruce Richardson
Changes to allow compilation and use on FreeBSD. Includes: * contigmem and nic_uio driver for FreeBSD * new EAL instance * new "bsdapp" compilation target * various compilation fixes due to differences between linux and freebsd Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25update Intel copyright years to 2014Bruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2013-10-09doc: whitespace changes in licensesIntel
Signed-off-by: Intel
2013-07-25update copyright date to 2013Intel
Signed-off-by: Intel
2013-07-25lib: fix non-C99 macros definitions in exported headersAdrien Mazarguil
The original definitions prevent external programs/libraries from compiling without warnings when using these headers and -std=gnu99 (relaxed C99 mode). Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Ivan Boule <ivan.boule@6wind.com> Acked-by: Damien Millescamps <damien.millescamps@6wind.com>
2013-07-25lib: fix unused valuesZijie Pan
Fix warnings of type "Value stored to 'xxx' is never read". Signed-off-by: Zijie Pan <zijie.pan@6wind.com> Acked-by: Ivan Boule <ivan.boule@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2013-07-25cmdline: fix for long inputIntel
Signed-off-by: Intel
2013-07-25cmdline: various updatesIntel
- Support of float number is removed. - C++ compatibility is done - More checks Signed-off-by: Intel
2013-07-05remove version in all filesIntel
Signed-off-by: Intel
2013-03-11first public releasev1.2.3r0Intel
version 1.2.3 Signed-off-by: Intel