aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/04_vnf.conf5
-rw-r--r--conf/06_pktfwd.conf5
-rwxr-xr-xdocs/userguide/testusage.rst7
-rwxr-xr-xsystems/centos/build_base_machine.sh2
-rwxr-xr-xsystems/fedora/20/build_base_machine.sh6
-rwxr-xr-xsystems/fedora/21/build_base_machine.sh4
-rwxr-xr-xsystems/fedora/22/build_base_machine.sh6
-rwxr-xr-xsystems/rhel/7.2/build_base_machine.sh4
-rwxr-xr-xsystems/ubuntu/14.04/build_base_machine.sh4
-rwxr-xr-xsystems/ubuntu/build_base_machine.sh2
-rw-r--r--tools/pkt_gen/moongen/moongen.py23
-rw-r--r--tools/pkt_gen/xena/XenaDriver.py16
-rw-r--r--vnfs/qemu/qemu_pci_passthrough.py4
-rwxr-xr-xvsperf6
14 files changed, 73 insertions, 21 deletions
diff --git a/conf/04_vnf.conf b/conf/04_vnf.conf
index 0a80c1af..ff110d93 100644
--- a/conf/04_vnf.conf
+++ b/conf/04_vnf.conf
@@ -35,7 +35,10 @@ GUEST_IMAGE = ['', '']
# For 2 VNFs you may use [180, 180]
GUEST_TIMEOUT = [180, 180]
-# packet forwarding mode: io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho
+# packet forwarding mode supported by testpmd; Please see DPDK documentation
+# for comprehensive list of modes supported by your version.
+# e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
+# Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
GUEST_TESTPMD_FWD_MODE = 'csum'
# guest loopback application method; supported options are:
diff --git a/conf/06_pktfwd.conf b/conf/06_pktfwd.conf
index d6a83d07..6175aa6a 100644
--- a/conf/06_pktfwd.conf
+++ b/conf/06_pktfwd.conf
@@ -24,7 +24,10 @@ PKTFWD = 'TestPMD'
# ############################
TESTPMD_ARGS = []
-# packet forwarding mode: io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho
+# packet forwarding mode supported by testpmd; Please see DPDK documentation
+# for comprehensive list of modes supported by your version.
+# e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
+# Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
TESTPMD_FWD_MODE = 'csum'
# checksum calculation layer: ip|udp|tcp|sctp|outer-ip
TESTPMD_CSUM_LAYER = 'ip'
diff --git a/docs/userguide/testusage.rst b/docs/userguide/testusage.rst
index d807590d..b5f47998 100755
--- a/docs/userguide/testusage.rst
+++ b/docs/userguide/testusage.rst
@@ -396,7 +396,7 @@ Execution of test with PCI passthrough with vswitch disabled:
.. code-block:: console
$ ./vsperf --conf-file=<path_to_custom_conf>/10_custom.conf
- --vswtich none --vnf QemuPciPassthrough pvp_tput
+ --vswitch none --vnf QemuPciPassthrough pvp_tput
Any of supported guest-loopback-application_ can be used inside VM with
PCI passthrough support.
@@ -526,7 +526,10 @@ for selected Packet Forwarder:
# testpmd configuration
TESTPMD_ARGS = []
- # packet forwarding mode: io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho
+ # packet forwarding mode supported by testpmd; Please see DPDK documentation
+ # for comprehensive list of modes supported by your version.
+ # e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
+ # Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
TESTPMD_FWD_MODE = 'csum'
# checksum calculation layer: ip|udp|tcp|sctp|outer-ip
TESTPMD_CSUM_LAYER = 'ip'
diff --git a/systems/centos/build_base_machine.sh b/systems/centos/build_base_machine.sh
index d3ac3e2b..d94dc975 100755
--- a/systems/centos/build_base_machine.sh
+++ b/systems/centos/build_base_machine.sh
@@ -58,6 +58,8 @@ zlib-devel
glib2-devel
pixman-devel
socat
+numactl
+numactl-devel
# install gvim
vim-X11
diff --git a/systems/fedora/20/build_base_machine.sh b/systems/fedora/20/build_base_machine.sh
index 96bb17df..839d2bee 100755
--- a/systems/fedora/20/build_base_machine.sh
+++ b/systems/fedora/20/build_base_machine.sh
@@ -62,6 +62,10 @@ libreport-python3
abrt-python3
abrt-addon-python3
+# libs
+numactl
+numactl-devel
+
# install git-review tool
git-review
-" | grep -v ^#) \ No newline at end of file
+" | grep -v ^#)
diff --git a/systems/fedora/21/build_base_machine.sh b/systems/fedora/21/build_base_machine.sh
index 69b067f9..e4969893 100755
--- a/systems/fedora/21/build_base_machine.sh
+++ b/systems/fedora/21/build_base_machine.sh
@@ -65,6 +65,10 @@ libreport-python3
abrt-python3
abrt-addon-python3
+# libs
+numactl
+numactl-devel
+
# install git-review tool
git-review
" | grep -v ^#) || exit 1
diff --git a/systems/fedora/22/build_base_machine.sh b/systems/fedora/22/build_base_machine.sh
index 0ca565f3..3cfe0c78 100755
--- a/systems/fedora/22/build_base_machine.sh
+++ b/systems/fedora/22/build_base_machine.sh
@@ -66,9 +66,13 @@ libreport-python3
abrt-python3
abrt-addon-python3
+# libs
+numactl
+numactl-devel
+
# install git-review tool
git-review
" | grep -v ^#)
# Create hugepage dirs
-mkdir -p /dev/hugepages \ No newline at end of file
+mkdir -p /dev/hugepages
diff --git a/systems/rhel/7.2/build_base_machine.sh b/systems/rhel/7.2/build_base_machine.sh
index 86608066..2319535b 100755
--- a/systems/rhel/7.2/build_base_machine.sh
+++ b/systems/rhel/7.2/build_base_machine.sh
@@ -50,6 +50,8 @@ pkglist=(
socat\
tk-devel\
wget\
+ numactl\
+ numactl-devel\
)
# python tools for proper QEMU, DPDK, and OVS make
@@ -95,4 +97,4 @@ rm -f Python-3.4.2.tar.xz
pip3.4 install virtualenv
# Create hugepage dirs
-mkdir -p /dev/hugepages \ No newline at end of file
+mkdir -p /dev/hugepages
diff --git a/systems/ubuntu/14.04/build_base_machine.sh b/systems/ubuntu/14.04/build_base_machine.sh
index 9fa8511c..04f4a7e1 100755
--- a/systems/ubuntu/14.04/build_base_machine.sh
+++ b/systems/ubuntu/14.04/build_base_machine.sh
@@ -77,6 +77,10 @@ python3-tk
libpython3.4
python3-reportlab
+# libs
+libnuma1
+libnuma-dev
+
# install git-review tool
git-review
" | grep -v ^#)
diff --git a/systems/ubuntu/build_base_machine.sh b/systems/ubuntu/build_base_machine.sh
index a2b48a26..1b42a790 100755
--- a/systems/ubuntu/build_base_machine.sh
+++ b/systems/ubuntu/build_base_machine.sh
@@ -44,6 +44,8 @@ apt-get -y install autoconf libtool
apt-get -y install libpcap-dev
apt-get -y install libglib2.0
apt-get -y install libfuse-dev
+apt-get -y install libnuma1
+apt-get -y install libnuma-dev
# Some useful tools you may optionally install
#apt-get -y install ctags
diff --git a/tools/pkt_gen/moongen/moongen.py b/tools/pkt_gen/moongen/moongen.py
index e14c6a79..1d2fdee5 100644
--- a/tools/pkt_gen/moongen/moongen.py
+++ b/tools/pkt_gen/moongen/moongen.py
@@ -488,10 +488,21 @@ class Moongen(ITrafficGenerator):
'PARAMETERS section of Moongen log file')
frame_size = 0
- if results_match and parameters_match:
+ # Each packet stream in the MoonGen report is prefaced with the
+ # words '[REPORT]Device'. Count the instances of this string to
+ # get the total aggregrate throughput. For example:
+ #
+ # - If num_traffic_streams = 1, there is a single
+ # unidirectional stream
+ #
+ # - If num_traffic_streams = 2, there is a bidirectional
+ # traffic stream
+ num_traffic_streams = mytext.count('[REPORT]Device')
+
+ if results_match and parameters_match and num_traffic_streams:
# Assume for now 10G link speed
- max_theoretical_mfps = (
- (self._moongen_line_speed / 8) / (frame_size + 20))
+ max_theoretical_fps = (
+ num_traffic_streams * (10000000000 / 8) / (frame_size + 20))
moongen_results[ResultsConstants.THROUGHPUT_RX_FPS] = (
float(results_match.group(6)) * 1000000)
@@ -500,8 +511,7 @@ class Moongen(ITrafficGenerator):
(float(results_match.group(6)) * frame_size + 20) * 8)
moongen_results[ResultsConstants.THROUGHPUT_RX_PERCENT] = (
- float(results_match.group(6)) * \
- 1000000 / max_theoretical_mfps * 100)
+ (100 * float(results_match.group(6)) * 1000000) / max_theoretical_fps)
moongen_results[ResultsConstants.TX_RATE_FPS] = (
float(results_match.group(5)) * 1000000)
@@ -510,8 +520,7 @@ class Moongen(ITrafficGenerator):
float(results_match.group(5)) * (frame_size + 20) * 8)
moongen_results[ResultsConstants.TX_RATE_PERCENT] = (
- float(results_match.group(5)) *
- 1000000 / max_theoretical_mfps * 100)
+ (100 * float(results_match.group(5)) * 1000000) / max_theoretical_fps)
moongen_results[ResultsConstants.B2B_TX_COUNT] = (
float(results_match.group(1)))
diff --git a/tools/pkt_gen/xena/XenaDriver.py b/tools/pkt_gen/xena/XenaDriver.py
index aa8443c9..d3862312 100644
--- a/tools/pkt_gen/xena/XenaDriver.py
+++ b/tools/pkt_gen/xena/XenaDriver.py
@@ -1001,9 +1001,21 @@ class XenaTXStats(object):
mydict = statdict
return mydict
-
def aggregate_stats(stat1, stat2):
"""
+ Judge whether stat1 and stat2 both have same key, if both have same key,
+ call the aggregate fuction, else use the stat1's value
+ """
+ newstat = dict()
+ for keys in stat1.keys():
+ if keys in stat2 and isinstance(stat1[keys], dict):
+ newstat[keys] = aggregate(stat1[keys], stat2[keys])
+ else:
+ newstat[keys] = stat1[keys]
+ return newstat
+
+def aggregate(stat1, stat2):
+ """
Recursive function to aggregate two sets of statistics. This is used when
bi directional traffic is done and statistics need to be calculated based
on two sets of statistics.
@@ -1014,7 +1026,7 @@ def aggregate_stats(stat1, stat2):
newstat = dict()
for (keys1, keys2) in zip(stat1.keys(), stat2.keys()):
if isinstance(stat1[keys1], dict):
- newstat[keys1] = aggregate_stats(stat1[keys1], stat2[keys2])
+ newstat[keys1] = aggregate(stat1[keys1], stat2[keys2])
else:
if not isinstance(stat1[keys1], int) and not isinstance(
[keys1], float):
diff --git a/vnfs/qemu/qemu_pci_passthrough.py b/vnfs/qemu/qemu_pci_passthrough.py
index 14810f0a..951d6086 100644
--- a/vnfs/qemu/qemu_pci_passthrough.py
+++ b/vnfs/qemu/qemu_pci_passthrough.py
@@ -44,8 +44,8 @@ class QemuPciPassthrough(IVnfQemu):
# in case of SRIOV and PCI passthrough we must ensure, that MAC addresses are swapped
if S.getValue('SRIOV_ENABLED') and not self._testpmd_fwd_mode.startswith('mac'):
self._logger.info("SRIOV detected, forwarding mode of testpmd was changed from '%s' to '%s'",
- self._testpmd_fwd_mode, 'mac_retry')
- self._testpmd_fwd_mode = 'mac_retry'
+ self._testpmd_fwd_mode, 'mac')
+ self._testpmd_fwd_mode = 'mac'
for nic in self._nics:
self._cmd += ['-device', 'vfio-pci,host=' + nic['pci']]
diff --git a/vsperf b/vsperf
index f2f443be..d41b92f2 100755
--- a/vsperf
+++ b/vsperf
@@ -557,13 +557,13 @@ def main():
_LOGGER.error("Cannot specify tests with both positional args and --test.")
sys.exit(1)
- # sriov handling
- settings.setValue('SRIOV_ENABLED', enable_sriov(settings.getValue('WHITELIST_NICS')))
-
# modify NIC configuration to decode enhanced PCI IDs
wl_nics_orig = list(networkcard.check_pci(pci) for pci in settings.getValue('WHITELIST_NICS'))
settings.setValue('WHITELIST_NICS_ORIG', wl_nics_orig)
+ # sriov handling is performed on checked/expanded PCI IDs
+ settings.setValue('SRIOV_ENABLED', enable_sriov(wl_nics_orig))
+
nic_list = []
for nic in wl_nics_orig:
tmp_nic = networkcard.get_nic_info(nic)