summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/parse_utils.c
AgeCommit message (Collapse)AuthorFilesLines
2019-10-21Fix two strncpy issues introduced by fb0c44a8Xavier Simonart1-1/+1
Change-Id: Ic452b22dc2522a1b49e3091cb25f2784bc505b41 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-08Fix compatibility with GCC 6 and earlierXavier Simonart1-2/+2
fb0c44a fixed compilation on GCC 8 by using: 1) #pragma GCC diagnostic ignored "-Wstringop-truncation" 2) __attribute__ ((fallthrough)); However, -Wstringop-truncation has only been introduced in GCC 8 and __attribute__ ((fallthrough)) has only been introduced in GCC 7. Hence they caused Warnings/Errors on earlier versions. Comments about fallthough (see https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/) can be used on GCC 8 to prevent fall through warnings Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Change-Id: I6f22e023191bbf22d8b01f1812061795a6494134
2019-10-08Support for recent GCC compilerXavier Simonart1-9/+12
This is required for instance on gcc (GCC) 8.2.1 20180905 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Change-Id: Id86de5d39d77c5cbf168cc51434f436f84376a4c
2019-06-14Support multiple tasks in "dp core stats" commandXavier Simonart1-1/+1
The "dp core stats" command supported, as other commands, multiple cores but not multiple tasks. It now supports both (e.g. dp core stats 1-2 0-1). This is necessary so that users can collect all statistics from PROX in one command line. It will return similar information on the screen or through the socket: - if the syntax is wrong (e.g. missing task, too many cores or tasks, ...) => an error message is printed on the screen, and the single error line "error: invalid syntax" is returned through the socket - if the syntax is correct => one line is printed or returned for each core/task pair => if the core/task pair is invalid, the line reports an error => otherwise, the line provides dataplane statistics for the core/task pair, with the core_id and task_id added, either at the end of the line returned through the socket, or at the beginning of the line printed on the screen. This means a change in behaviour when using the socket: before, when an error happened (e.g. bad task), then nothing was returned which made it difficult for the script to catch the syntax error. Similar behaviour could/should be implemented for other commands. However, care must be taken as some scripts like NSB might count the number of lines within the output, or the number of items within the line. This should not be an issue for dp core stats as NSB does not use it, and other PROX scripts do not count the number of items and will be adjusted to count the number of lines. Change-Id: I582a671ae3d2f6493f791e80fc28e70f8e3a38d1 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-03-30Support additional MAC format in config fileIgor Shaula1-0/+2
Add support for space-divided bytes in MAC string. Support the same format as in "pkt inline". Change-Id: I7f2136c4424c45ce4abad4082470c9c9b1b3ab05 Signed-off-by: Igor Shaula <igor.shaula@intel.com>
2018-02-15Add support for comments in configuration variablesXavier Simonart1-2/+2
This feature will enable the possibility to have many cores configured in a prox config file, and enable/disable them through variables. For instance, a [core $var1] section in a config file will result in [core 1] if $var1 = 1; the whole section and section content will be ignored if $var1=# Before this implementation, [#core 1] or [core #] was already treated as a commented out section (the whole section was commented). But there was no way to define a variable $var = # to comment a section through a variable. Note that in today's implementation any non numerical (except s, h, t, -) characteter in the [core] section header (and not only #) will cause the section to be ignored. It would probably be better to consider # (as maybe N/A and none) as comments, and everything else as error. This is however not supported by the change request. Change-Id: Id4e2b27a1f9b6d595e0b442dcd971ad44a502031 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2017-07-14Adding PROX(Packet pROcessing eXecution engine) VNF to sampleVNFDeepak S1-0/+1420
JIRA: SAMPLEVNF-55 PROX is a DPDK-based application implementing Telco use-cases such as a simplified BRAS/BNG, light-weight AFTR... It also allows configuring finer grained network functions like QoS, Routing, load-balancing... (We are moving PROX version v039 to sampleVNF https://01.org/intel-data-plane-performance-demonstrators/prox-overview) Change-Id: Ia3cb02cf0e49ac5596e922c197ff7e010293d033 Signed-off-by: Deepak S <deepak.s@linux.intel.com>