NSB: fix port topology 91/41891/7
authorMartin Banszel <martinx.banszel@intel.com>
Wed, 19 Jul 2017 19:35:02 +0000 (19:35 +0000)
committerEdward MacGillivray <edward.s.macgillivray@intel.com>
Thu, 14 Sep 2017 22:46:38 +0000 (15:46 -0700)
commitbe6e7ed6f053a4a697af939fa0ddcd5dce54c0c8
tree5bc4b5bed762d9d4ddf79369d3e925acf86596e2
parentac0c076ffc701333aed7d65112a0f2e15fda825a
NSB: fix port topology

Add a new PortPair class to resolve the
topology into list of public and private ports.

Before we were calculating public/private in multiple
locations and using different conventions.

In addition for all the DPDK test we need to use the DPDK
port number and no rely on interface ordering or interface naming
conventions.

We used to use  xe0 -> 0, xe1 -> 1, etc.  This is not the DPDK port
number.

Use the new dpdknicbind_helper class to parse the output of
dpdk-devbind.py to find the actual DPDK port number at runtime.

We then use this DPDK port number to correctly calculate the
port_mask_hex.

The port mask maps the DPDK port num (PMD ID) to the LINK ID
used in the pipeline config

We also need to make sure we only use the interfaces matched to the
topology and not use all the interfaces, because in some cases we will
have unused interfaces.  In particular TRex always requires an even
number of interfaces, so for single port TRex tests we have to create
the second port and not use it.

Thus we had to modify the traffic generator stats code to only dump
stats for used ports and no unused ports.

Ixia was using interface ordering to map to Ixia ports, instead we use
the dpdk_port_num which must be hardcoded for Ixia.

Renamed traffic_profile.execute to traffic_profile.execute_traffic so
we can trace the code easier.

We pass the port used by the traffic profile to generate_samples so we
don't get stats for unused ports.

Fixed up vPE config creation and bring up issues.

Fixed up CGNAPT and UDP_Replay to work correctly.

Tested with 4-port scale-out

Change-Id: I2e4f328bff2904108081e92a4bf712333fa73869
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
75 files changed:
samples/vnf_samples/nsut/acl/acl-tg-topology-3node.yaml
samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml
samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node.yaml
samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml
samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml
samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml
samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml
samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml
samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml
samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml
samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml
samples/vnf_samples/vnf_descriptors/acl_vnf.yaml
samples/vnf_samples/vnf_descriptors/cgnapt_vnf.yaml
samples/vnf_samples/vnf_descriptors/prox_vnf-1.yaml
samples/vnf_samples/vnf_descriptors/prox_vnf-2.yaml
samples/vnf_samples/vnf_descriptors/prox_vnf-4.yaml
samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl.yaml
samples/vnf_samples/vnf_descriptors/udp_replay_vnf.yaml
samples/vnf_samples/vnf_descriptors/vfw_vnf.yaml
tests/unit/benchmark/contexts/test_heat.py
tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
tests/unit/network_services/helpers/test_dpdkbindnic_helper.py [new file with mode: 0644]
tests/unit/network_services/helpers/test_samplevnf_helper.py
tests/unit/network_services/libs/ixia_libs/test_IxNet.py
tests/unit/network_services/nfvi/test_resource.py
tests/unit/network_services/traffic_profile/test_base.py
tests/unit/network_services/traffic_profile/test_fixed.py
tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
tests/unit/network_services/traffic_profile/test_rfc2544.py
tests/unit/network_services/traffic_profile/test_traffic_profile.py
tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_base.py
tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py
tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_tg_ixload.py
tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py
tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py
tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py
tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py
yardstick/benchmark/contexts/heat.py
yardstick/benchmark/contexts/model.py
yardstick/benchmark/scenarios/networking/vnf_generic.py
yardstick/network_services/helpers/dpdknicbind_helper.py [new file with mode: 0644]
yardstick/network_services/helpers/samplevnf_helper.py
yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py
yardstick/network_services/nfvi/resource.py
yardstick/network_services/traffic_profile/base.py
yardstick/network_services/traffic_profile/ixia_rfc2544.py
yardstick/network_services/traffic_profile/rfc2544.py
yardstick/network_services/traffic_profile/traffic_profile.py
yardstick/network_services/vnf_generic/vnf/acl_vnf.py
yardstick/network_services/vnf_generic/vnf/base.py
yardstick/network_services/vnf_generic/vnf/cgnapt_vnf.py
yardstick/network_services/vnf_generic/vnf/prox_helpers.py
yardstick/network_services/vnf_generic/vnf/prox_vnf.py
yardstick/network_services/vnf_generic/vnf/sample_vnf.py
yardstick/network_services/vnf_generic/vnf/tg_ping.py
yardstick/network_services/vnf_generic/vnf/tg_prox.py
yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py
yardstick/network_services/vnf_generic/vnf/udp_replay.py
yardstick/network_services/vnf_generic/vnf/vfw_vnf.py
yardstick/network_services/vnf_generic/vnf/vpe_vnf.py