summaryrefslogtreecommitdiffstats
path: root/VNFs
AgeCommit message (Collapse)AuthorFilesLines
2019-10-09Add support for igmp and multicastXavier Simonart15-70/+543
Multicast can be enabled through configuration or through command line - Through configuration Add multicast=mcast_address (e.g. multicast=01:00:5e:01:02:03) in the port section - Through command line run enable multicast port_id mcast_address (e.g. enable multicast 1 01:00:5e:01:02:03) IGMP join message is sent unsollicited through command line: join igmp core_id task_id ip (e.g. join igmp 1 0 224.1.1.3) To enable swap answering IGMP Query (w/ IGMP Join) - Through configuration Add igmp ipv4=ip_address within the core/task section - Through command line join igmp core_id task_id ip (e.g. join igmp 1 0 224.1.1.3) (this will 1st initiate an unsollicated join, then answer any subsequent query) UDP/TCP packets received on a multicast address (224.0.0.0 => 239.255.255.255) are discarded To stop sending responses to IGMP query: leave igmp core_id task_id Change-Id: I3808ccabf3b38b5a1e10e1b044db63aa05bcd7b5 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-09Added support for DPDK 19.02 and 19.05Xavier Simonart14-27/+136
This includes supporting following API changes - RTE_VER_... now in rte_config.h instead of rte_version.h - <rte_ethdev.h> now seems required by <rte_eth_ctrl.h> - rte_sched_port_pkt_write takes extra argument - rte_sched_port_pkt_read_tree_path takes extra argument - enum rte_meter_color replaced by rte_color The extra argument, sched_port, is initialized based on qos_conf parameters. Modes such as qinq_encap4 uses sched_port when doing classification, but does not set qos_conf params. It inherits the sched_port from QoS Change-Id: If8312918241e7d482161a7538f53faac6c303e86 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-09Fix parsing parameter errors in start and stop commandsXavier Simonart2-2/+25
Some wrong parameters in start (such as "start all 4" while there are only less than 4 tasks available on some cores) and stop command could have potentially caused a crash in some cases. Change-Id: I6dc201575b574c53ded242ea795c35de82fb787e Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-08Fix compatibility with GCC 6 and earlierXavier Simonart3-3/+4
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-08Fix setting mac address through [port] sectionXavier Simonart1-0/+3
MAC address can be configured through the [port] section. However this had only some effect on packets being transmitted. For instance it was used to set the src mac address by the generator. It had no effect on packets reception: when not in promiscuous mode only the packets with the MAC originally set by the HW were received. Now, when not in promiscuous mode, only packets with MAC as defined in [port] section will be received. Change-Id: I064817bf6727d098e89fbbb7a90412ed599f0fb6 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-08Fix setting rx and tx queue stats mappingXavier Simonart1-1/+3
rx_queue_stats_mapping and tx_queue_stats_mapping were called unrespective of the number of active queues, and failing on all unactive queues. this caused lot of errros in prox.log Change-Id: I15ecb7adfb562caff8efb0eb24c341a3ba354571 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-08Fix display error with repeated characters (ncurses/xterm related issue)Xavier Simonart1-1/+36
On recent OSes such as RHEL 8.0, ncurses(6.1) introduced support for ECMA-48 repeat character control. Some terminal emulators use TERM=xterm but do not support this feature. In this case, printing repeated character such as "22000000 Hz" might be displayed as 220 Hz. Other emulators, such as tmux, use TERM=screen, and do not exhibit the issue. Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Change-Id: I79977c7421699b59957d6cbd8aa954f06f3e0227
2019-10-08Support for recent GCC compilerXavier Simonart16-42/+68
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-09-04Add heartbeat support (stop all cores in case of TCP socket issues)Xavier Simonart5-0/+37
"heartbeat timeout" (in second) can be specified as a global parameter in PROX config file. If set, a timer is started when the first command is received from the TCP socket. This timer is reset at each commands received through the TCP socket. If the timer expires, then - all cores are stopped - the TCP socket is closed, causing an error at client side. This feature helps in case a script starts PROX and the traffic generated through PROX causes issues to the control plane. Change-Id: I900f22fa091786a564f6b7d846f5abc2c5cbcc58 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-08-28Merge "Add option to change scheduler policy to SCHED_RR and increase ↵Xavier Simonart3-0/+28
scheduler priority"
2019-08-28Add warning in case of wrong configuration (missing l3 submode)Xavier Simonart1-0/+2
Add warning if gateway_ip is configured and l3 is not configured. If l3 sub mode is not configured, then gateway_ip parameter is ignored (an error is not returned to make it easy to switch from an l3 sub mode to default submode). Change-Id: Ica4a522b037a024dd54bf616d32d69e29d5b8b92 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-08-28Add option to change scheduler policy to SCHED_RR and increase scheduler ↵Xavier Simonart3-0/+28
priority Set "realtime scheduling=yes" option to change Linux scheduler policy to SCHED_RR and increase the priority to the maximum possible for the policy. Change-Id: I3ecef5cbc3816cf2b56364bb4e806ae5ac093c23 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-08-05Fix reset valueXavier Simonart1-4/+11
In addition to resetting all values set by the user, reset value was also resetting internal configuration. It resulted that the src mac address in the outgoing packet was set to whatever was specified in pkt inline, which is wrong (by default src mac address should be set the the port mac address). Note that reset value reset any "set values" but does not reset the packet size. Change-Id: I9d1cd92be9f5814bd7b104932dd6ffe5df3b6edd Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-07-05Merge changes from topic 'june_release'Patrice Buriez27-762/+913
* changes: Some fixes after code review Cosmetic change when printing warnings Multiple changes for June release
2019-07-05Some fixes after code reviewLuc Provoost25-91/+92
Taking into account comments from Patrice and Xavier Change-Id: Ifdabd1945e074c9ee97b059956f107901392c020 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2019-07-04Fix keyboard related issues on Ubuntu 18.04Xavier Simonart2-1/+34
On Ubuntu 18.04, the keyboard was not properly handled in PROX For instance, many keys pressed were silently discarded. The issue is related to a change in histedit/libedit version. Recent libedit have (silently) changed the prototype of the get_char function passed in el_set(el, EL_GETCFN, get_char), with some input parameters changing from char to wchar_t. As PROX used the old prototype (char based), this resulted in some uninitialized field (= garbage) in the wchar_t, causing libedit to discard the character. PROX now uses different get_char prototypes, depending of the libedit version being used. If PROX was already compiled and a the OS is updated (e.g. from Ubuntu 16.04 to Ubuntu 18.04), this will require a 'make clean'. Change-Id: Icb0e555a21e13cdaf98172bad17f2f838fb7bc3a Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-07-01Cosmetic change when printing warningsProvoost1-1/+3
Warnings can be printed in the following cases: - When not enough packets are taken into account for measuring packet latency accuracy. - When there us a potential network throughput issue, meaning the generator is generating more packets than the the NIC can handle - When the generator cannot generate the requested load If there are no warnings for a certain measurement, nothing gets printed, suppressing an empty line Change-Id: Iee07c12142e28dcc0ac406bfed7626731ab08f98 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2019-06-30Multiple changes for June releaseLuc Provoost25-713/+861
- Change inittest in warmuptest. This has now a warmuptime, warmupspeed, packet size and flow size. - Change in centos.json. This will now also copy deploycentostools.sh during image building so that it can be used to re-compile prox in the VM by typing "./deploycentostools.sh compile" - runrapid.py parameters needing a file name, need to be complete file names: no extensions will be added any more by the scripts. - Changes in createrapid.py to handel the openstack CLI output in a simpler way. - The management interface of the VMs can now also be an SRIOV interface. We have now an extra optional parameter in the VM sections of the rapiVMs.vms file: SRIOV_mgmt_port - Changed the name of some sections and keys in the environment file since runrapid.py will not always communicate to OpenStack VMs. This could be containers or any other (virtual) machine. - The previous MachineMap.cfg has been renamed to machine.map - A new test has been added: monitorswap is just showing the statistics of a swap (virtual) machine, without generating any packets. This is useful in situations where an external tester is used. - Latency and core statistics can now be measured even if there are multiple PROX cores and tasks running. A new parameter has been added in the test files with following default value: tasks=[0]. During the collection of statistics, all tasks in this list will be queried. It is ok to have a non-existing task in such a query since it will be ignored. - A --screenlog parameter was added for runrapid.py allowing for more detailed output on the screen during debugging. No need to check the log file. - Previous tests to run multiple packet size with a given flow size and to run multiple flow size, with a given packet size are now combined by specifiying 2 lists: packetsizes & flows - The screen output of this test has also been reworked with more meaningful column names and the test result is now in the field "core received". This allows also for faster termination of the test: When the all packets sent by Gen NIC are received by the cores within the thresholds for packet loss and latency, the test is now stopped, even we were requesting more packets to be sent. Change-Id: I3307e7a972f2140e739f376f146fe875df0303e6 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2019-06-28Change of openstackrapid directory nameLuc Provoost27-0/+0
The scripts are orrignally written to support an OpenStack deployment. We are now making changes to support container environments, hence renaming the directory to rapid. Change-Id: Icaa2fad83c6da451eee733934151e98e9cd07de4 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2019-06-27Fix "code nested too deep error" introduced by commit 843ca042Xavier Simonart1-44/+46
Change-Id: Ifb55091feedb28ffc5947ffe61e6f6a5ce034459 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-06-14Increase window size for latency accuracyXavier Simonart3-15/+19
Accuracy of latency is obtained by writing TX accuracy for packet N in a later packet i.e. packet N + WINDOW. If this window is too small, packet N + WINDOW (conveying accuracy for packet N) might arrive before packet N, resulting in no accuracy for packet N. This change increases this window from 64 to 8K packets. This change should result in a higher number of packets used for latency measurements when packets are reordered. This change might have a performance impact as it uses more memory. Change-Id: I1016fddb66af86605c73a24050238da41cf54152 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2019-06-14Add support for latency task with multiple portsXavier Simonart2-4/+17
Change-Id: Iaae603a7558666b5794ec4c76f447eb3260a1df9 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2019-06-14Support multiple tasks in "lat stats" commandXavier Simonart1-9/+38
Similar support and comments as for "dp core stats" command Change-Id: I215fc57c292fbc1f12a3fe95d40a0a80c29b714a Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2019-06-14Support multiple tasks in "dp core stats" commandXavier Simonart2-10/+31
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>
2019-06-14Add parse_cores_tasks()Patrice Buriez1-32/+55
and rename parse_core_task() to parse_cores_task() Change-Id: I256dfb8d02520a70d65d6623feddcc9037938501 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2019-06-14Add "total TX fail" count to "dp core stats" command outputPatrice Buriez3-4/+11
Warning: This change breaks backward-compatibility of PROX socket scripting API, because the "total TX fail" count is reported before the "last TSC" field. As a result, PROX scripts that make use of the "dp core stats" command, such as the core_stats() method in helper-scripts/openstackrapid/prox_ctrl.py, MUST be reworked to correctly parse the returned set of fields. Change-Id: I3fe7f37dccee19f5f0b2719f262c6cfa7bad850f Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2019-06-14Simplify cores_task_are_valid()Patrice Buriez1-12/+1
by means of calling core_task_is_valid() Change-Id: Ice64aabc84066633288ff43d4dc9af3f5b378e33 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2019-06-11Fix soft checksum calculationXavier Simonart1-1/+11
Soft CRC was wrong in some cases, such as when compiled with gcc -O2 This might have caused the checksum to be set to 0 in those cases. Change-Id: Idf01df92876bd2a152ad028293b67a31861a0dfc Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2019-04-19Merge "PROX: update version"Deepak S3-11/+11
2019-04-15PROX: update versionstable/hunterXavier Simonart3-11/+11
PROX version was not udpated since a long time, resulting in difficulty to easily understand which version is being run. Improved solution should be to support sha1. Change-Id: I9d68bd64f52f32544d31d2b8c6bcd0c55c7c228c Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-04-15PROX: fix minimum rx buffer size used within generatorXavier Simonart1-0/+3
Different PMD have different requirements for minimum rx buffer size. vmxnet3 has (in DPDK 18.08) requires minimum 1518 + 128 (RTE_PKTMBUF_HEADROOM). Change-Id: I327ae5b8dcf7eef8dd71fb4e2f0603b9bab6e1d3 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-04-12Improved image building & new PROXLuc Provoost25-551/+764
Bug fixes for the script for building an image via the packer tool. This also installs a newer version of PROX with some bug fixes in PROX. The *.test files have been simplified. Also introduced a new file MachineMap.cfg to map test machines on actual VMs. Change-Id: I69445327ef0a907bc8c1566aaa60c733418c541e Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2019-03-08Fix PROX generator latencyXavier Simonart2-4/+23
When PROX fails to transmit packets (e.g. because switch or NIC is overloaded) some cleanup needs to be done related to packet id and latency. In addition, in some casesi, the clock estimate is slighly over-estimated which might result, in rare cases, in negative (hence very high) latencies, due to the extrapolation of timestamps. This has been workarounded bydecreasing the extrapolation, tolerating up to 1% clock estimate error Change-Id: I1ba17dfe0d5e2f9f9167f4f087ed0d96da1293c2 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-03-07Fix minimum latency since resetXavier Simonart2-0/+3
Change-Id: Icac622092c35dc197a0f7cb1dcee8afce9f06fa1 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-03-06PROX generator: performance optimization (4/4)Xavier Simonart1-8/+8
Change-Id: I73209cfb0534223e24f1f688391062a36e8fc20a Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-03-06PROX generator: performance optimization (3/4)Xavier Simonart1-13/+4
The Signature is now written in the pkt template instead of being written in each packet Change-Id: I58ca99ff47260b82ce9471b7a47a11edbd14c582 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-03-06PROX generator: performance optimization (2/4)Xavier Simonart8-162/+101
Improve PROX generator performance by pre-calculating bytes_to_tsc. This improvement is only implemented for non-pcap generator, where only few different packet sizes are usually generated. This change might have a negative performance impact in some cases, if many different packet sizes are generated, resulting in higher memory usage. This is the case for instance if random is applied to packet size. In addition, simplified the rx path, receiving now only MAX_PKT_BURST packets per handle loop. Before we were trying to empty the NIC looping on RX packets, ending up with many rx packets per handle loop. This was used to determine an lower bound for the time the packet was received. We now set the lower bound when less than MAX_PKT_BURST has been received. Change-Id: I1ce813d7e4ac1577ea412c590add5d6f94b36ec7 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-03-06PROX generator: performance optimization (1/4)Xavier Simonart1-18/+9
Improve PROX generator performance by - Cleanup some old code checking for unset flags Change-Id: Icd7ff0a8d17f11f1a1bd09bef4fb40574257c093 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-03-04Merge "Use link speed from device capability instead of negotiated speeda"Deepak S4-13/+94
2019-03-04Merge "Fixed typo in setting up ARP timers"Deepak S1-1/+0
2019-03-04Merge "Added use case "Forwaring Rate At Maximum Offered Load""Deepak S2-0/+148
2019-02-20Use link speed from device capability instead of negotiated speedaXavier Simonart4-13/+94
JIRA: SAMPLEVNF-151 link speed is used in gen and lat latency extrapolations. Using a link_speed value lower than the actual link speed might result in errors (e.g. negative latencies). Negotiated link speed might be reported slowly (as reported through irq) Hence it is better to use the device capability link speed. In addition, this remove the check for link speed changes in fastpath. Change-Id: I0f475fe5e139b046012de6cd0b710e4390735078 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-02-07Fixed typo in setting up ARP timersXavier Simonart1-1/+0
Change-Id: I5b550a42b27d697f77c4bafab890ba57279f8d13 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-02-07Add check for configuration error (not enough mbuf)Xavier Simonart1-1/+24
Number of mbufs must at least cover for number of rx descriptors, number of tx descriptors, number of mbuf cached and number of mbufs handled by the application. If this is not the case, a warning is returned. This ony check for the more basic cases. This will not check for instance for cases with multiples rings where more mbufs might be cached. Change-Id: If2c0c9fc76ed4500849d92cf7586bb0b25d8ab22 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-02-07Added use case "Forwaring Rate At Maximum Offered Load"Xavier Simonart2-0/+148
With this use case, the generator is generating at maximum speed We measure the forwarding rate. Throughput, latency, number of packets sent and received are printed every seconds. Change-Id: I05eb874d6ecefd58fb0c876bccf6a32872306076 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-02-07Merge "Fix memory leak in L3 submode"Deepak S2-1/+3
2019-02-07Merge changes from topic 'fix_non_dataplane_pkt_count'Deepak S6-14/+53
* changes: Prevent dropping ARP packets Do not add count of non dataplane packets to dropped count
2019-02-07Merge "Add support for configurable arp timers in L3 mode"Deepak S4-7/+26
2019-01-30Fix memory leak in L3 submodeXavier Simonart2-1/+3
In L3 submodes, there were two memory leaks - when a L3 core was restarted, causing around 2MB leak and a potential issue after 256 start/stop - a potential mbuf leak when handling arp replies Those have been fixed Change-Id: I348478fa5967936297850432e93667e12b0adac4 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-01-28Add support for configurable arp timers in L3 modeXavier Simonart4-7/+26
L3 mode supports two timers: - arp_update_time, defaulted to 1 second, which makes PROX to send arp request every second for active flows - arp_timeout, previously defaulted to 30 seconds, which makes PROX consider a MAC address as invalid if no arp_reply was received within those 30 seconds. Those timers values were hardcoded. They can now be configured through the configuration file (within the core section), using resp. "arp update time" and "arp timeout" keywords. Unit is milli seconds. The default becomes respectively 1 second and 2 weeks. Change-Id: I35e46e97df32ca44c2cdfae85a20ee015de5d6e1 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>