samplevnf.git
4 years agoAdded support for DPDK 19.08 20/68320/6
Xavier Simonart [Tue, 6 Aug 2019 11:01:27 +0000 (13:01 +0200)]
Added support for DPDK 19.08

Change-Id: I090bf8f1cd5a5d2dfa4f336bc66c46cc03d6c5bb
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoPrepare for DPDK 19.08 support 19/68319/6
Xavier Simonart [Wed, 23 Oct 2019 10:38:51 +0000 (12:38 +0200)]
Prepare for DPDK 19.08 support

This commit prepares PROX for supporting changes from DPDK 19.08
Mainly, the "sed" listed below were run.
In addition,
- some forward definition have been removed,
- prox_compat.h has been updated
- prox_compat.h has been included where necessary.

Hence such a commit is rather easy to review and to reapply
on other branches if necessary.

sed -i 's/struct ether_hdr/prox_rte_ether_hdr/g' *.h
sed -i 's/struct ether_hdr/prox_rte_ether_hdr/g' *.c
sed -i 's/struct ether_addr/prox_rte_ether_addr/g' *.c
sed -i 's/struct ether_addr/prox_rte_ether_addr/g' *.h
sed -i 's/prox_rte_ether_addr_port/struct ether_addr_port/g' *.c
sed -i 's/prox_rte_ether_addr_port/struct ether_addr_port/g' *.h
sed -i 's/struct vlan_hdr/prox_rte_vlan_hdr/g' *.c
sed -i 's/struct vlan_hdr/prox_rte_vlan_hdr/g' *.h
sed -i 's/struct ipv4_hdr/prox_rte_ipv4_hdr/g' *.h
sed -i 's/struct ipv4_hdr/prox_rte_ipv4_hdr/g' *.c
sed -i 's/struct ipv6_hdr/prox_rte_ipv6_hdr/g' *.c
sed -i 's/struct ipv6_hdr/prox_rte_ipv6_hdr/g' *.h
sed -i 's/struct udp_hdr/prox_rte_udp_hdr/g' *.c
sed -i 's/struct udp_hdr/prox_rte_udp_hdr/g' *.h
sed -i 's/struct tcp_hdr/prox_rte_tcp_hdr/g' *.c
sed -i 's/struct tcp_hdr/prox_rte_tcp_hdr/g' *.h
sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.c
sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.h
sed -i 's/struct prox_rte_ether_addr_copy/prox_rte_ether_addr_copy/g' *.c
sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.h
sed -i 's/prox_rte_ether_addr_copy/ether_addr_copy/g' *.h
sed -i 's/prox_rte_ether_addr_copy/ether_addr_copy/g' *.c
sed -i 's/ether_addr_copy/prox_rte_ether_addr_copy/g' *.c
sed -i 's/ether_addr_copy/prox_rte_ether_addr_copy/g' *.h
sed -i 's/prox_rte_ether_hdr_arp/struct ether_hdr_arp/g' *.h
sed -i 's/prox_rte_ether_hdr_arp/struct ether_hdr_arp/g' *.c
sed -i 's/struct vxlan_gpe_hdr/prox_rte_vxlan_gpe_hdr/g' *.h
sed -i 's/struct vxlan_gpe_hdr/prox_rte_vxlan_gpe_hdr/g' *.c
sed -i 's/eth_random_addr/prox_rte_eth_random_addr/g' *.c
sed -i 's/eth_random_addr/prox_rte_eth_random_addr/g' *.h
sed -i 's/ETHER_CRC_LEN/PROX_RTE_ETHER_CRC_LEN/g' *.c
sed -i 's/ETHER_CRC_LEN/PROX_RTE_ETHER_CRC_LEN/g' *.h
sed -i 's/ETHER_HDR_LEN/PROX_RTE_ETHER_HDR_LEN/g' *.c
sed -i 's/ETHER_HDR_LEN/PROX_RTE_ETHER_HDR_LEN/g' *.h
sed -i 's/ETHER_MAX_LEN/PROX_RTE_ETHER_MAX_LEN/g' *.c
sed -i 's/ETHER_MAX_LEN/PROX_RTE_ETHER_MAX_LEN/g' *.h
sed -i 's/ETHER_MIN_LEN/PROX_RTE_ETHER_MIN_LEN/g' *.c
sed -i 's/ETHER_MIN_LEN/PROX_RTE_ETHER_MIN_LEN/g' *.h
sed -i 's/TCP_SYN_FLAG/PROX_RTE_TCP_SYN_FLAG/g' *.c
sed -i 's/TCP_RST_FLAG/PROX_RTE_TCP_RST_FLAG/g' *.c
sed -i 's/TCP_FIN_FLAG/PROX_RTE_TCP_FIN_FLAG/g' *.c
sed -i 's/TCP_ACK_FLAG/PROX_RTE_TCP_ACK_FLAG/g' *.c

Change-Id: I4dfe8be68e618c94dcaae28754579fbeb571bb00
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoRemove UUIDs in centos.json 25/69225/3
Luc Provoost [Mon, 2 Dec 2019 11:56:38 +0000 (06:56 -0500)]
Remove UUIDs in centos.json

Removed the remaining UUIDs from the centos.json file, making it easier
to reuse this file. This does require a recent version of the packer
tool. Updated the README accordingly and also added the --env option in
the packer alias, so that the OS_CLOUD variable is set when running
packer in the container. Updated rapid.vms with the security group name
used in the centos.json file.

Change-Id: I4f6815a3250811e336c14857e0ec5e7793a77acf
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoFix mempool size for swap.cfg 26/69226/2
Luc Provoost [Mon, 2 Dec 2019 15:38:35 +0000 (10:38 -0500)]
Fix mempool size for swap.cfg

Fixing an error re-introduced in the swap.cfg file. The mempool size
needs to be bigger than the number of rx and tx descriptors (we need
some extra buffers in the mempool for other things than rx and tx
descriptors). The default number of tx and rx descriptors has been
changed in PROX to 2K. This initially went through the testing since
this is just giving a warning in the prox.log file for some PMDs. For
other PMDs, PROX will not start.
Also fixed an inconsistency in rapid.vms: name of the security group.

Change-Id: If95677bd6169a16da1b3b2a56d13936a854c385e
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agorapid november release combining changes 41/68941/4
Luc Provoost [Wed, 20 Nov 2019 10:56:52 +0000 (11:56 +0100)]
rapid november release combining changes

-Renamed monitorswap.test into corestats.test. This is a more generic
test case that can monitor the core statistics of all PROX instances
-New portstats.test which can monitor the port statistics of all PROX
instances
-Removed the tasks parameter in the [DEFAULT] section of the *.test
files. Runrapid.py is now scaning the PROX configuration files to
automatically detect the PROX tasks that are being used.
-There is now an option to add the PushGateway parameter in the
[Default] section of some *.test files. This will push the measurements
to the Gateway, so they can be used by tools like Grafana. The logging
of the data in a csv file has also been improved. Results can now be
found on the screen, in the RUN*.log files, in the *.csv files and are
being pushed to the PushGateway.
-In the *.test files, replaced the swapcores, irqcores and impaircores
by the cores parameter since they are not treated differently by the
code. For a generator, we are still using the gencores and latcores
parameters since we need to treat them differently in runrapid.py
-devbind.sh is removed from the repository since this file is now
created by runrapid.py
-renamed the rapidVMs.vms file into rapid.vms
-image is now built without ssh access for root. Only using centos user.
runrapid.py is now using centos user for ssh sessions. PROX tools are
strted using sudo
-using new DPDK, mb_lib and PROX versions as defined in
deploycentostools.sh
-installing missing yum-utils package in image
-added flowsize parameter to the impairtest
-added list of flowsizes to the fixed_rate testing (l3framerate.test)
-the irqtest can now loop through multiple Test Machines in stead of
only checking the irq of one. Note that we should have the same cores
parameter for all Test machines
-changes in prox_ctrl.py to support setting the speed of a generator on
a combination of mulitple cores and tasks. Also added the
multi_port_stats function to support the new portstats.test
-Updated version to 19.11.21
-Fixed some power of 2 in the flow table

Change-Id: Ia14543bf3195a2b1bd4184b455da6940f1777fc9
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoUpdate RAPID readme about packer details 23/68923/4
Illia Polliul [Thu, 24 Oct 2019 14:00:05 +0000 (16:00 +0200)]
Update RAPID readme about packer details

Change-Id: Ieff72073fff06818a5c5bc8fb9116461c95c2901
Signed-off-by: Illia Polliul <ipolliul@juniper.net>
4 years agoAdded support for DPDK 19.05 / IPSec 65/68665/2
Xavier Simonart [Wed, 23 Oct 2019 10:38:51 +0000 (12:38 +0200)]
Added support for DPDK 19.05 / IPSec

Note that since 6073b359 (April 2018) IPsec PROX support requires
at least DPDK 17.11. Hence README has been updated.

Change-Id: I34b7a968c16db5c3a3fc7bb6af111fdb49ad6b91
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoFix two strncpy issues introduced by fb0c44a8 63/68663/1
Xavier Simonart [Mon, 21 Oct 2019 14:19:45 +0000 (16:19 +0200)]
Fix two strncpy issues introduced by fb0c44a8

Change-Id: Ic452b22dc2522a1b49e3091cb25f2784bc505b41
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoUpdate PROX version to (preprod) 1905 to reflect DPDK 19.05 support 41/68641/1
Xavier Simonart [Sat, 12 Oct 2019 22:31:39 +0000 (00:31 +0200)]
Update PROX version to (preprod) 1905 to reflect DPDK 19.05 support

Change-Id: I7ae7d9f2f5f3058df032062e0b2f6e3207086930
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoMerge "Increase the default number of rx and tx descriptors to 2K"
Xavier Simonart [Thu, 17 Oct 2019 12:02:53 +0000 (12:02 +0000)]
Merge "Increase the default number of rx and tx descriptors to 2K"

4 years agoFix support for old DPDK (such as 16.04) 22/68622/2
Xavier Simonart [Sat, 12 Oct 2019 22:27:47 +0000 (00:27 +0200)]
Fix support for old DPDK (such as 16.04)

When support for DPDK 18.05 was added it prevented supporting some
much older DPDK such as 16.04. This has been fixed.

Change-Id: Idd7ddd7e485c54c41def0540b8c126c097a05941
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoIncrease the default number of rx and tx descriptors to 2K 21/68621/2
Xavier Simonart [Sat, 12 Oct 2019 21:36:41 +0000 (23:36 +0200)]
Increase the default number of rx and tx descriptors to 2K

A high number of RX descriptor can be helpful in avoiding
packet loss due to the core being interrupted.
This commit increases the default number of descriptors from 256 to 2K.

Those values are checked versus the minimum and maximum supported by the pmd.
Number of mbufs (mempool size) have been updated n config files to support this
default number of dsescriptors.

The number of descriptors can still be overwritten by the config file. However
those values must always remain within the limits reported by the pmd.

Change-Id: I5f7999eca886dad68f3c0733da0d796bf4c06a56
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoDisable TX checksum offload in some virtio cases 23/68623/1
Xavier Simonart [Sat, 12 Oct 2019 22:18:14 +0000 (00:18 +0200)]
Disable TX checksum offload in some virtio cases

Some OVS versions reports that they support UDP offload and no IPv4 offload,
but fails when UDP offload is enabled.
Hence, now, when virtio reports that it supports UDP checksum and no IPV4
checksum offload, we disable UDP checksum offload.

Change-Id: I4f22f6be4d97b0aedf267ebeaa498c0dacef3317
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoMerge "Fix generation through pcap file"
Xavier Simonart [Fri, 11 Oct 2019 13:18:33 +0000 (13:18 +0000)]
Merge "Fix generation through pcap file"

4 years agoFix generation through pcap file 49/68449/2
Xavier Simonart [Wed, 4 Sep 2019 17:20:52 +0000 (19:20 +0200)]
Fix generation through pcap file

- When using "pcap file" argument in PROX config file in the gen mode
(and no submode), packets were truncated to 8 bytes (and a warning printed)
This has been fixed.
- "Set value" command was checking whether offset was within first 1518 bytes
unrespective to the mtu (e.g. jumbo packets). This has been fixed.
- There was a limit of 64K packets loaded from a pcap file (which could be
overwritten through PROX config). This limit has been removed - by default
all packets from pcap are loaded
- When pcap was loaded, memory was allocated to  store the packet. However
just enough memory was allocated, so that there was no way to change (increase)
packet size through command line after that. Now memory is allocated to store
up to mtu size
- While "set value" command was acting on all packets, "pkt size" command
was only changing the first packet. This has now been changed and both commands
change all the packets.
- A few other minor cleanups.

Change-Id: I7264cee8d57e3e6a405dfd7e7a52a95b99399d99
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoFix port throughput related statistics for i40e virtual functions 77/68177/4
Xavier Simonart [Mon, 1 Jul 2019 15:11:54 +0000 (17:11 +0200)]
Fix port throughput related statistics for i40e virtual functions

When CRC stripping is enabled (default PROX behavior), the number of
rx bytes received by the NIC returned by DPDK usually does not take the
CRC 4 bytes into account.
However, for i40e virtual functions those 4 bytes are counted as part of
the received bytes. This resulted in both DPDK and PROX taking those 4 bytes
into account causing the RX % to be above 100%.

Change-Id: I59883b638ed67a6778f80c4dd6bfbfc4f9f2f528
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoUpdate PROX to CRC STRIP default bahavior change in DPDK 76/68176/5
Xavier Simonart [Fri, 28 Jun 2019 14:56:26 +0000 (16:56 +0200)]
Update PROX to CRC STRIP default bahavior change in DPDK

Change-Id: I7c3e2981692d823c86787b77d61190327d6448e4
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoFix strncpy issue introduced by fb0c44a8 10/68610/1
Xavier Simonart [Wed, 9 Oct 2019 17:03:29 +0000 (19:03 +0200)]
Fix strncpy issue introduced by fb0c44a8

Change-Id: I833d753bd5c426d50c0c9fdee5668f3b9fff13b9
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoAdd support for igmp and multicast 08/68108/9
Xavier Simonart [Mon, 24 Jun 2019 15:01:54 +0000 (17:01 +0200)]
Add support for igmp and multicast

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>
4 years agoAdded support for DPDK 19.02 and 19.05 34/68034/6
Xavier Simonart [Tue, 28 May 2019 13:31:43 +0000 (15:31 +0200)]
Added support for DPDK 19.02 and 19.05

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>
4 years agoFix parsing parameter errors in start and stop commands 41/68441/3
Xavier Simonart [Wed, 4 Sep 2019 12:07:53 +0000 (14:07 +0200)]
Fix parsing parameter errors in start and stop commands

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>
4 years agoFix compatibility with GCC 6 and earlier 06/68606/1
Xavier Simonart [Tue, 8 Oct 2019 21:54:22 +0000 (17:54 -0400)]
Fix compatibility with GCC 6 and earlier

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

4 years agoFix setting mac address through [port] section 35/68535/2
Xavier Simonart [Tue, 24 Sep 2019 16:42:44 +0000 (18:42 +0200)]
Fix setting mac address through [port] section

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>
4 years agoFix setting rx and tx queue stats mapping 36/68536/2
Xavier Simonart [Tue, 24 Sep 2019 16:54:17 +0000 (18:54 +0200)]
Fix setting rx and tx queue stats mapping

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>
4 years agoFix display error with repeated characters (ncurses/xterm related issue) 68/68368/5
Xavier Simonart [Mon, 19 Aug 2019 10:09:39 +0000 (06:09 -0400)]
Fix display error with repeated characters (ncurses/xterm related issue)

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

4 years agoSupport for recent GCC compiler 67/68367/4
Xavier Simonart [Tue, 13 Aug 2019 14:14:32 +0000 (10:14 -0400)]
Support for recent GCC compiler

This is required for instance on gcc (GCC) 8.2.1 20180905

Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Change-Id: Id86de5d39d77c5cbf168cc51434f436f84376a4c

4 years agoAdd heartbeat support (stop all cores in case of TCP socket issues) 40/68440/1
Xavier Simonart [Wed, 4 Sep 2019 11:54:31 +0000 (13:54 +0200)]
Add heartbeat support (stop all cores in case of TCP socket issues)

"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>
4 years agoMerge "Add option to change scheduler policy to SCHED_RR and increase scheduler priority"
Xavier Simonart [Wed, 28 Aug 2019 08:34:43 +0000 (08:34 +0000)]
Merge "Add option to change scheduler policy to SCHED_RR and increase scheduler priority"

4 years agoAdd warning in case of wrong configuration (missing l3 submode) 75/68175/2
Xavier Simonart [Wed, 15 May 2019 09:48:26 +0000 (11:48 +0200)]
Add warning in case of wrong configuration (missing l3 submode)

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>
4 years agoAdd option to change scheduler policy to SCHED_RR and increase scheduler priority 74/68174/2
Xavier Simonart [Fri, 28 Jun 2019 13:47:55 +0000 (15:47 +0200)]
Add option to change scheduler policy to SCHED_RR and increase scheduler 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>
4 years agoFix reset value 48/68048/4
Xavier Simonart [Fri, 14 Jun 2019 17:14:16 +0000 (19:14 +0200)]
Fix reset value

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>
4 years agoMerge changes from topic 'june_release'
Patrice Buriez [Fri, 5 Jul 2019 14:19:07 +0000 (14:19 +0000)]
Merge changes from topic 'june_release'

* changes:
  Some fixes after code review
  Cosmetic change when printing warnings
  Multiple changes for June release

4 years agoSome fixes after code review 94/68194/2
Luc Provoost [Fri, 5 Jul 2019 10:05:20 +0000 (06:05 -0400)]
Some fixes after code review

Taking into account comments from Patrice and Xavier

Change-Id: Ifdabd1945e074c9ee97b059956f107901392c020
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoFix keyboard related issues on Ubuntu 18.04 90/68190/2
Xavier Simonart [Wed, 3 Jul 2019 22:04:17 +0000 (00:04 +0200)]
Fix keyboard related issues on Ubuntu 18.04

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>
4 years agoCosmetic change when printing warnings 69/68169/2
Provoost [Mon, 1 Jul 2019 15:21:00 +0000 (11:21 -0400)]
Cosmetic change when printing warnings

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>
4 years agoMultiple changes for June release 66/68166/1
Luc Provoost [Sun, 30 Jun 2019 07:46:10 +0000 (09:46 +0200)]
Multiple changes for June release

- 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>
4 years agoChange of openstackrapid directory name 60/68160/1
Luc Provoost [Thu, 27 Jun 2019 10:52:11 +0000 (12:52 +0200)]
Change of openstackrapid directory name

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>
4 years agoFix "code nested too deep error" introduced by commit 843ca042 34/68134/1
Xavier Simonart [Thu, 27 Jun 2019 12:38:02 +0000 (14:38 +0200)]
Fix "code nested too deep error" introduced by commit 843ca042

Change-Id: Ifb55091feedb28ffc5947ffe61e6f6a5ce034459
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoIncrease window size for latency accuracy 12/68012/3
Xavier Simonart [Fri, 7 Jun 2019 12:54:43 +0000 (14:54 +0200)]
Increase window size for latency accuracy

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>
4 years agoAdd support for latency task with multiple ports 47/68047/2
Xavier Simonart [Fri, 14 Jun 2019 15:12:56 +0000 (17:12 +0200)]
Add support for latency task with multiple ports

Change-Id: Iaae603a7558666b5794ec4c76f447eb3260a1df9
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
4 years agoSupport multiple tasks in "lat stats" command 11/68011/3
Xavier Simonart [Fri, 7 Jun 2019 12:42:41 +0000 (14:42 +0200)]
Support multiple tasks in "lat stats" command

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>
4 years agoSupport multiple tasks in "dp core stats" command 52/67952/3
Xavier Simonart [Wed, 15 May 2019 10:36:21 +0000 (12:36 +0200)]
Support multiple tasks in "dp core stats" command

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>
4 years agoAdd parse_cores_tasks() 52/68052/1
Patrice Buriez [Fri, 14 Jun 2019 15:03:14 +0000 (17:03 +0200)]
Add parse_cores_tasks()

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>
4 years agoAdd "total TX fail" count to "dp core stats" command output 51/68051/1
Patrice Buriez [Wed, 12 Jun 2019 16:39:15 +0000 (18:39 +0200)]
Add "total TX fail" count to "dp core stats" command output

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>
4 years agoSimplify cores_task_are_valid() 50/68050/1
Patrice Buriez [Wed, 12 Jun 2019 15:17:26 +0000 (17:17 +0200)]
Simplify cores_task_are_valid()

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>
4 years agoFix soft checksum calculation 65/67965/2
Xavier Simonart [Tue, 28 May 2019 18:24:00 +0000 (20:24 +0200)]
Fix soft checksum calculation

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>
5 years agoMerge "PROX: update version"
Deepak S [Fri, 19 Apr 2019 14:01:42 +0000 (14:01 +0000)]
Merge "PROX: update version"

5 years agoPROX: update version 90/67590/2 stable/hunter
Xavier Simonart [Mon, 15 Apr 2019 09:18:11 +0000 (11:18 +0200)]
PROX: update version

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>
5 years agoPROX: fix minimum rx buffer size used within generator 89/67589/2
Xavier Simonart [Mon, 15 Apr 2019 08:48:46 +0000 (10:48 +0200)]
PROX: fix minimum rx buffer size used within generator

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>
5 years agoImproved image building & new PROX 44/67544/1
Luc Provoost [Fri, 12 Apr 2019 09:20:58 +0000 (11:20 +0200)]
Improved image building & new PROX

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>
5 years agoMerge "Fix PROX generator latency"
Deepak S [Wed, 13 Mar 2019 04:27:26 +0000 (04:27 +0000)]
Merge "Fix PROX generator latency"

5 years agoMerge "Fix minimum latency since reset"
Deepak S [Wed, 13 Mar 2019 04:27:16 +0000 (04:27 +0000)]
Merge "Fix minimum latency since reset"

5 years agoMerge "PROX generator: performance optimization (4/4)"
Deepak S [Wed, 13 Mar 2019 04:27:08 +0000 (04:27 +0000)]
Merge "PROX generator: performance optimization (4/4)"

5 years agoMerge "PROX generator: performance optimization (3/4)"
Deepak S [Wed, 13 Mar 2019 04:26:58 +0000 (04:26 +0000)]
Merge "PROX generator: performance optimization (3/4)"

5 years agoMerge "PROX generator: performance optimization (2/4)"
Deepak S [Wed, 13 Mar 2019 04:26:49 +0000 (04:26 +0000)]
Merge "PROX generator: performance optimization (2/4)"

5 years agoMerge "PROX generator: performance optimization (1/4)"
Deepak S [Wed, 13 Mar 2019 04:26:40 +0000 (04:26 +0000)]
Merge "PROX generator: performance optimization (1/4)"

5 years agoHunter 8.0 release notes update 45/67245/1
Deepak S [Wed, 13 Mar 2019 09:37:54 +0000 (15:07 +0530)]
Hunter 8.0 release notes update

Change-Id: I333c87b0c18565da479ecaa08e5ffce91232a7ce
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
5 years agoFix PROX generator latency 09/67209/1
Xavier Simonart [Fri, 8 Mar 2019 12:32:53 +0000 (13:32 +0100)]
Fix PROX generator latency

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>
5 years agoFix minimum latency since reset 08/67208/1
Xavier Simonart [Thu, 7 Mar 2019 13:46:29 +0000 (14:46 +0100)]
Fix minimum latency since reset

Change-Id: Icac622092c35dc197a0f7cb1dcee8afce9f06fa1
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
5 years agoPROX generator: performance optimization (4/4) 07/67207/1
Xavier Simonart [Wed, 6 Mar 2019 16:20:29 +0000 (17:20 +0100)]
PROX generator: performance optimization (4/4)

Change-Id: I73209cfb0534223e24f1f688391062a36e8fc20a
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
5 years agoPROX generator: performance optimization (3/4) 06/67206/1
Xavier Simonart [Wed, 6 Mar 2019 15:36:15 +0000 (16:36 +0100)]
PROX generator: performance optimization (3/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>
5 years agoPROX generator: performance optimization (2/4) 05/67205/1
Xavier Simonart [Mon, 4 Mar 2019 13:50:04 +0000 (14:50 +0100)]
PROX generator: performance optimization (2/4)

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>
5 years agoPROX generator: performance optimization (1/4) 04/67204/1
Xavier Simonart [Mon, 4 Mar 2019 13:21:19 +0000 (14:21 +0100)]
PROX generator: performance optimization (1/4)

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>
5 years agoMerge changes Iaad9c95e,Iccd9c95e
Deepak S [Mon, 4 Mar 2019 05:39:34 +0000 (05:39 +0000)]
Merge changes Iaad9c95e,Iccd9c95e

* changes:
  Proposing Patrice Buriez a commiter in SampleVNF
  Proposing Xavier Simonart as a commiter in samplevnf

5 years agoMerge "Use link speed from device capability instead of negotiated speeda"
Deepak S [Mon, 4 Mar 2019 05:31:42 +0000 (05:31 +0000)]
Merge "Use link speed from device capability instead of negotiated speeda"

5 years agoMerge "Fixed typo in setting up ARP timers"
Deepak S [Mon, 4 Mar 2019 05:31:33 +0000 (05:31 +0000)]
Merge "Fixed typo in setting up ARP timers"

5 years agoMerge "Added use case "Forwaring Rate At Maximum Offered Load""
Deepak S [Mon, 4 Mar 2019 05:31:24 +0000 (05:31 +0000)]
Merge "Added use case "Forwaring Rate At Maximum Offered Load""

5 years agoMerge "Add check for configuration error (not enough mbuf)"
Deepak S [Mon, 4 Mar 2019 05:31:06 +0000 (05:31 +0000)]
Merge "Add check for configuration error (not enough mbuf)"

5 years agoUse link speed from device capability instead of negotiated speeda 51/66151/5
Xavier Simonart [Wed, 19 Dec 2018 14:30:38 +0000 (15:30 +0100)]
Use link speed from device capability instead of negotiated speeda

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>
5 years agoGambia 7.2 release notes update 47/66947/2
Deepak S [Tue, 12 Feb 2019 08:51:32 +0000 (14:21 +0530)]
Gambia 7.2 release notes update

Change-Id: I255c87b0c18565da479ecaa08e5ffce91232a7ce
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
5 years agoProposing Patrice Buriez a commiter in SampleVNF 83/66883/1
Deepak S [Thu, 7 Feb 2019 16:23:52 +0000 (21:53 +0530)]
Proposing Patrice Buriez a commiter in SampleVNF

Patrice has contributed greatly to SampleVNF E/F/G release.

Achievement/Contributions include:
 - Provided quite many high-quality review comments.
 - Enhanced PROX VNF and added new feature to PROX.
 - Fixed multiple Bugs in PROX VNF.
 - Jenkins verify test evolvement.
 - SampleVNF Architecture Improvement.

https://gerrit.opnfv.org/gerrit/#/q/owner:%22Patrice+Buriez%22

Change-Id: Iaad9c95e856269277ff09572e92e9fda7288734e
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
5 years agoProposing Xavier Simonart as a commiter in samplevnf 81/66881/1
Deepak S [Thu, 7 Feb 2019 16:16:55 +0000 (21:46 +0530)]
Proposing Xavier Simonart as a commiter in samplevnf

Xavier Simonart has contributed greatly to SampleVNF E/F/G release.

Achievement/Contributions include:
 - Provided quite many high-quality review comments.
 - Enhanced PROX VNF and added new feature to PROX.
 - Fixed multiple Bugs in PROX VNF.
 - Jenkins verify test evolvement.
 - SampleVNF Architecture Improvement.

https://gerrit.opnfv.org/gerrit/#/q/owner:%22Xavier+Simonart%22+project:samplevnf

Change-Id: Iccd9c95e856269277ff09572e92e9fda7288734e
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
5 years agoFixed typo in setting up ARP timers 89/66889/1
Xavier Simonart [Thu, 7 Feb 2019 13:02:42 +0000 (14:02 +0100)]
Fixed typo in setting up ARP timers

Change-Id: I5b550a42b27d697f77c4bafab890ba57279f8d13
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
5 years agoAdd check for configuration error (not enough mbuf) 87/66887/1
Xavier Simonart [Wed, 23 Jan 2019 13:26:01 +0000 (14:26 +0100)]
Add check for configuration error (not enough mbuf)

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>
5 years agoAdded use case "Forwaring Rate At Maximum Offered Load" 85/66885/1
Xavier Simonart [Wed, 6 Feb 2019 14:41:51 +0000 (15:41 +0100)]
Added use case "Forwaring Rate At Maximum Offered Load"

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>
5 years agoMerge "Fix memory leak in L3 submode"
Deepak S [Thu, 7 Feb 2019 10:40:15 +0000 (10:40 +0000)]
Merge "Fix memory leak in L3 submode"

5 years agoMerge changes from topic 'fix_non_dataplane_pkt_count'
Deepak S [Thu, 7 Feb 2019 10:38:42 +0000 (10:38 +0000)]
Merge changes from topic 'fix_non_dataplane_pkt_count'

* changes:
  Prevent dropping ARP packets
  Do not add count of non dataplane packets to dropped count

5 years agoMerge "Add support for configurable arp timers in L3 mode"
Deepak S [Thu, 7 Feb 2019 10:38:20 +0000 (10:38 +0000)]
Merge "Add support for configurable arp timers in L3 mode"

5 years agoFix memory leak in L3 submode 87/66787/1
Xavier Simonart [Wed, 30 Jan 2019 14:27:20 +0000 (15:27 +0100)]
Fix memory leak in L3 submode

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>
5 years agoAdd support for configurable arp timers in L3 mode 95/66695/4
Xavier Simonart [Thu, 13 Dec 2018 11:52:02 +0000 (12:52 +0100)]
Add support for configurable arp timers in L3 mode

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>
5 years agoConfigure RSS hashing to IP/UDP and check for with PMD support 13/66713/1
Xavier Simonart [Wed, 23 Jan 2019 12:51:47 +0000 (13:51 +0100)]
Configure RSS hashing to IP/UDP and check for with PMD support

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>
5 years agoClean up port initialization 11/66711/1
Xavier Simonart [Wed, 23 Jan 2019 12:49:58 +0000 (13:49 +0100)]
Clean up port initialization

Change-Id: Ia9df816d522e5db460d9129109525d5d345d997f
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
5 years agoImproved image build & packet loss measurements 51/66251/1
Luc Provoost [Mon, 7 Jan 2019 09:41:07 +0000 (10:41 +0100)]
Improved image build & packet loss measurements

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>
5 years agoPrevent dropping ARP packets 57/66157/1
Xavier Simonart [Wed, 26 Dec 2018 14:26:27 +0000 (15:26 +0100)]
Prevent dropping ARP packets

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>
5 years agoDo not add count of non dataplane packets to dropped count 55/66155/1
Xavier Simonart [Thu, 20 Dec 2018 21:01:40 +0000 (22:01 +0100)]
Do not add count of non dataplane packets to dropped count

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>
5 years agoMerge "Fix handing configuration error (missing tx port or ring in gen mode)"
Deepak S [Tue, 18 Dec 2018 15:06:44 +0000 (15:06 +0000)]
Merge "Fix handing configuration error (missing tx port or ring in gen mode)"

5 years agoMerge changes from topic 'fix_multiple_arp_issues'
Deepak S [Tue, 18 Dec 2018 15:06:09 +0000 (15:06 +0000)]
Merge changes from topic 'fix_multiple_arp_issues'

* changes:
  Fix arp handling when master core is on socket 1
  Add support for zero packet loss in PROX L3 mode.
  Fix issue in l3 mode when no arp reply was received
  Clean up debugging messages

5 years agoFix handing configuration error (missing tx port or ring in gen mode) 03/65803/2
Xavier Simonart [Thu, 13 Dec 2018 12:02:36 +0000 (13:02 +0100)]
Fix handing configuration error (missing tx port or ring in gen mode)

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>
5 years agoGambia 7.1 release notes update 97/65797/1
Deepak S [Thu, 13 Dec 2018 20:32:14 +0000 (02:02 +0530)]
Gambia 7.1 release notes update

Change-Id: I145c87b0c18565da479ecaa08e5ffce91232a7ce
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
5 years agoFix arp handling when master core is on socket 1 21/65421/2
Xavier Simonart [Tue, 27 Nov 2018 13:58:02 +0000 (14:58 +0100)]
Fix arp handling when master core is on socket 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>
5 years agoAdd support for zero packet loss in PROX L3 mode. 25/65425/3
Xavier Simonart [Tue, 27 Nov 2018 14:33:20 +0000 (15:33 +0100)]
Add support for zero packet loss in PROX L3 mode.

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>
5 years agoFix issue in l3 mode when no arp reply was received 23/65423/3
Xavier Simonart [Tue, 27 Nov 2018 14:03:21 +0000 (15:03 +0100)]
Fix issue in l3 mode when no arp reply was received

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>
5 years agoClean up debugging messages 19/65419/2
Xavier Simonart [Tue, 27 Nov 2018 13:54:49 +0000 (14:54 +0100)]
Clean up debugging messages

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>
5 years agoMerge "Fix potential crash when getting device info"
Deepak S [Thu, 6 Dec 2018 02:59:38 +0000 (02:59 +0000)]
Merge "Fix potential crash when getting device info"

5 years agoMerge "Add support for VLAN insert and stripping"
Deepak S [Thu, 6 Dec 2018 02:59:29 +0000 (02:59 +0000)]
Merge "Add support for VLAN insert and stripping"

5 years agoAdd support for VLAN insert and stripping 67/64467/2
Xavier Simonart [Sun, 4 Nov 2018 16:29:43 +0000 (17:29 +0100)]
Add support for VLAN insert and stripping

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>
5 years agoAdd index.rst 97/64997/1
Aric Gardner [Sat, 10 Nov 2018 21:15:16 +0000 (16:15 -0500)]
Add index.rst

We need an index file so that

https://opnfv-samplevnf.readthedocs.io/en/latest/

can build

Change-Id: I81a98f5264f8ffef0e157610c75f7a172278bcc7
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
5 years agoFix potential crash when getting device info 65/64465/1
Xavier Simonart [Sun, 4 Nov 2018 16:23:32 +0000 (17:23 +0100)]
Fix potential crash when getting device info

In some cases, like when using virtual functions, getting device
info return a NULL device, which was potentially causing a crash.

Change-Id: Icc65f35bb54cd7d9bd8d837b3d6ec7ebb48b7c5e
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
5 years agoUpdating release notes for Gambia... 13/64413/1
Deepak S [Fri, 2 Nov 2018 09:36:25 +0000 (15:06 +0530)]
Updating release notes for Gambia...

Change-Id: Ide712ee94254b506a0ad88c95a7e01b789f00e48
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
5 years agoAdd Gambia release notes 41/64341/1
Deepak S [Wed, 31 Oct 2018 23:46:33 +0000 (05:16 +0530)]
Add Gambia release notes

Change-Id: Ide712ee94254b506a0ad88c95a7e01b789f99d49
Signed-off-by: Deepak S <deepak.s@linux.intel.com>