summaryrefslogtreecommitdiffstats
path: root/VNFs
AgeCommit message (Collapse)AuthorFilesLines
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>
2019-01-23Configure RSS hashing to IP/UDP and check for with PMD supportXavier Simonart1-2/+9
RSS was enabled when rss=yes is set in the configuration or when multiqueue is being used. But when RSS was enabled the types of packets on which RSS hashing was applied might not be supported by the PMD, as almost every PMD supported a different set of packets. Change-Id: I1d9516da61df7ef18c1d6953879ee15e33fca077 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-01-23Clean up port initializationXavier Simonart1-77/+68
Change-Id: Ia9df816d522e5db460d9129109525d5d345d997f Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-01-07Improved image build & packet loss measurementsLuc Provoost22-84/+139
Reworked deploycentos1.sh and deploycentos2.sh which is installing a PROX version that deals with non data plane packet counting for improved packet loss measurements. Fixed some issues with the packer scripts. Change-Id: I64aab09d364ab5abbbc5fc75c73afcbe11fed681 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2019-01-03Prevent dropping ARP packetsXavier Simonart5-13/+47
JIRA: SAMPLEVNF-152 When system is overloaded, ARP packets were sometimes dropped, as any other packets. This was causing two issues: - The count of TX non dataplane packets was wrong - If many consecutive ARP packets were dropped, the underlying switch might see its ARP timer expiring, causing performance degradation (packets being broadcasted). ARP packets are now always sent as no-drop. Change-Id: I9a86cbf8c4b56a178f86bc789153f1fa49ddf73f Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-12-20Do not add count of non dataplane packets to dropped countXavier Simonart1-1/+6
RX packets count = TX count + dropped (handled + discarded) count + non dataplane packets count. Hence non dataplane packets such as unexpected packets (e.g. dhcp request) should not b considerded as handled. Change-Id: I45cef19fed09bb4f86644d56d689a0959a9038db Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-12-18Merge "Fix handing configuration error (missing tx port or ring in gen mode)"Deepak S1-1/+2
2018-12-14Fix handing configuration error (missing tx port or ring in gen mode)Xavier Simonart1-1/+2
Gen mode requires a tx ring or a tx port. A configuration without those should gracefully report an error. This was causing a crash. Change-Id: Ia30d4d4c87a694da1dfed86587f90b9199c493ab Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-12-13Fix arp handling when master core is on socket 1Xavier Simonart1-1/+1
When master core was on socket 1, the rings setup to exchange messages related to arp between dataplane cores and master core was not properly setup, resulting in arp not working. Change-Id: Icc08df81f2e39e53de7c212248cdc7b78d7e2618 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-12-13Add support for zero packet loss in PROX L3 mode.Xavier Simonart3-24/+109
In L3 mode, prox is extracting IP destination address in the packets. It uses this destination address to find the MAC address. If the MAC address is not found, it sends a ARP request. It also sends ARP request when it realizes that some timeout expired. However, PROX was using the mbuf of the existing packets (to be forwarded) to send the ARP. This resulted in packet loss. Now PROX is generating ARP requests using mbuf from an ARP mempool. Some clean up was also done. Change-Id: Icb6083a8cdf88789553ad23c32ca12d6b7ba7f08 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-12-13Fix issue in l3 mode when no arp reply was receivedXavier Simonart1-7/+26
When no arp reply was received in l3 mode, the requesting core continuously sends ARP requests every seconds (which is correct). But master core was keeping a list of all requests, while all those requests are the same, resulting in potential table overflow. Change-Id: I13aa1ec4ea88404a690a25678fb6ec72df19a9b9 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-12-13Clean up debugging messagesXavier Simonart6-15/+16
Print IP address in a.b.c.d format instead of one 32-bit number. Better align debugging information in log file Change-Id: Icfab30836ba83d53f700fcfbdfbd7cf238ed7bf8 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-12-06Merge "Fix potential crash when getting device info"Deepak S1-10/+12
2018-12-05Add support for VLAN insert and strippingXavier Simonart2-0/+19
JIRA: SAMPLEVNF-149 VLAN can be enabled on a port by adding "vlan=yes" in the port section. When VLAN is enabled on a port, then DEV_RX_OFFLOAD_VLAN_STRIP and DEV_TX_OFFLOAD_VLAN_INSERT are enabled (if device supports it). This will cause VLAN to be stripped from any packets received with the proper tag, and VLAN to be added for any packets being transmitted. The VLAN ID themselves are configured through the physical function using something like (where ens801f1 isthe PF): ip link set ens801f1 vf 0 vlan 1111 Change-Id: I945c87b0c18565da479ecaa08e5ffce91232a7ce Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>