aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vpp/perf/container_memif/10ge2p1x710-ethip4-ip4base-eth-2memif-1dcr-ndrpdr.robot
blob: a0f92ff05c9a654139af83fd15cee7e25eaf4997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

*** Settings ***
| Resource | resources/libraries/robot/performance/performance_setup.robot
| ...
| Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR
| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | MEMIF | DOCKER
| ...
| Suite Setup | Run Keywords
| ... | Set up 3-node performance topology with DUT's NIC model | L3
| ... | Intel-X710
| ... | AND | Set up performance test suite with MEMIF
| ...
| Suite Teardown | Tear down 3-node performance topology
| ...
| Test Setup | Set up performance test
| ...
| Test Teardown | Run Keywords
| ... | Tear down performance discovery test | ${min_rate}pps
| ... | ${framesize} | ${traffic_profile}
| ... | AND | Tear down performance test with container
| ...
| Test Template | Local Template
| ...
| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases*
| ...
| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
| ... | with single links between nodes.
| ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing.
| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4
| ... | routing with two FIB tables and two static IPv4 /24 route entries per
| ... | FIB table. Container is connected to VPP via Memif interface. Container
| ... | is running same VPP version as running on DUT. Container is limited via
| ... | cgroup to use cores allocated from pool of isolated CPUs. There are no
| ... | memory contraints. DUTs are tested with 2p10GE NIC X710 by Intel.
| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop
| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
| ... | of packets transmitted. NDR and PDR are discovered for different
| ... | Ethernet L2 frame sizes using MLRsearch library.
| ... | Test packets are generated by TG on links to DUTs. TG traffic profile
| ... | contains two L3 flow-groups (flow-group per direction, 254 flows per
| ... | flow-group) with all packets containing Ethernet header, IPv4 header
| ... | with IP protocol=61 and static payload. MAC addresses are matching MAC
| ... | addresses of the TG node interfaces.

*** Variables ***
# X710-DA2 bandwidth limit
| ${s_limit}= | ${10000000000}
# Traffic profile:
| ${traffic_profile}= | trex-sl-3n-ethip4-ip4src254
# Container
| ${container_engine}= | Docker
| ${container_chain_topology}= | chain

*** Keywords ***
| Local Template
| | [Documentation]
| | ... | [Cfg] DUT runs IPv4 routing config.
| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads.
| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.
| | ...
| | ... | *Arguments:*
| | ... | - framesize - Framesize in Bytes in integer or string (IMIX_v4_1).
| | ... | Type: integer, string
| | ... | - phy_cores - Number of physical cores. Type: integer
| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
| | ...
| | [Arguments] | ${framesize} | ${phy_cores} | ${rxq}=${None}
| | ...
| | Set Test Variable | ${framesize}
| | Set Test Variable | ${min_rate} | ${10000}
| | ...
| | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
| | And Add PCI devices to all DUTs
| | ${max_rate} | ${jumbo} = | Get Max Rate And Jumbo And Handle Multi Seg
| | ... | ${s_limit} | ${framesize}
| | And Apply startup configuration on all VPP DUTs
| | And Set up performance test with containers | chains=${1} | nodeness=${1}
| | And Initialize IPv4 routing with memif pairs
| | Then Find NDR and PDR intervals using optimized search
| | ... | ${framesize} | ${traffic_profile} | ${min_rate} | ${max_rate}

*** Test Cases ***
| tc01-64B-1c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | 64B | 1C
| | framesize=${64} | phy_cores=${1}

| tc02-64B-2c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | 64B | 2C
| | framesize=${64} | phy_cores=${2}

| tc03-64B-4c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | 64B | 4C
| | framesize=${64} | phy_cores=${4}

| tc04-1518B-1c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | 1518B | 1C
| | framesize=${1518} | phy_cores=${1}

| tc05-1518B-2c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | 1518B | 2C
| | framesize=${1518} | phy_cores=${2}

| tc06-1518B-4c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | 1518B | 4C
| | framesize=${1518} | phy_cores=${4}

| tc07-9000B-1c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | 9000B | 1C
| | framesize=${9000} | phy_cores=${1}

| tc08-9000B-2c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | 9000B | 2C
| | framesize=${9000} | phy_cores=${2}

| tc09-9000B-4c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | 9000B | 4C
| | framesize=${9000} | phy_cores=${4}

| tc10-IMIX-1c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | IMIX | 1C
| | framesize=IMIX_v4_1 | phy_cores=${1}

| tc11-IMIX-2c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | IMIX | 2C
| | framesize=IMIX_v4_1 | phy_cores=${2}

| tc12-IMIX-4c-ethip4-ip4base-eth-2memif-1dcr-ndrpdr
| | [Tags] | IMIX | 4C
| | framesize=IMIX_v4_1 | phy_cores=${4}
span class="cp"> do {body;} while (0); \ cursor = pool_next_index (p, cursor); \ if (vl_api_process_may_suspend (vm, rp, start)) { \ if (cursor != ~0) \ rv = VNET_API_ERROR_EAGAIN; \ break; \ } \ } \ REPLY_MACRO2 (t, ({ \ rmp->cursor = clib_host_to_net_u32 (cursor); \ })); \ } while(0); /* "trust, but verify" */ static inline uword vnet_sw_if_index_is_api_valid (u32 sw_if_index) { return vnet_sw_interface_is_api_valid (vnet_get_main (), sw_if_index); } #define VALIDATE_SW_IF_INDEX(mp) \ do { u32 __sw_if_index = ntohl((mp)->sw_if_index); \ if (!vnet_sw_if_index_is_api_valid(__sw_if_index)) { \ rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ goto bad_sw_if_index; \ } \ } while(0); #define BAD_SW_IF_INDEX_LABEL \ do { \ bad_sw_if_index: \ ; \ } while (0); #define VALIDATE_RX_SW_IF_INDEX(mp) \ do { u32 __rx_sw_if_index = ntohl((mp)->rx_sw_if_index); \ if (!vnet_sw_if_index_is_api_valid(__rx_sw_if_index)) { \ rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ goto bad_rx_sw_if_index; \ } \ } while(0); #define BAD_RX_SW_IF_INDEX_LABEL \ do { \ bad_rx_sw_if_index: \ ; \ } while (0); #define VALIDATE_TX_SW_IF_INDEX(mp) \ do { u32 __tx_sw_if_index = ntohl(mp->tx_sw_if_index); \ if (!vnet_sw_if_index_is_api_valid(__tx_sw_if_index)) { \ rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ goto bad_tx_sw_if_index; \ } \ } while(0); #define BAD_TX_SW_IF_INDEX_LABEL \ do { \ bad_tx_sw_if_index: \ ; \ } while (0); #define VALIDATE_BD_ID(mp) \ do { u32 __rx_bd_id = ntohl(mp->bd_id); \ if (__rx_bd_id > L2_BD_ID_MAX) { \ rv = VNET_API_ERROR_BD_ID_EXCEED_MAX; \ goto bad_bd_id; \ } \ } while(0); #define BAD_BD_ID_LABEL \ do { \ bad_bd_id: \ ; \ } while (0); #define pub_sub_handler(lca,UCA) \ static void vl_api_want_##lca##_t_handler ( \ vl_api_want_##lca##_t *mp) \ { \ vpe_api_main_t *vam = &vpe_api_main; \ vpe_client_registration_t *rp; \ vl_api_want_##lca##_reply_t *rmp; \ uword *p; \ i32 rv = 0; \ \ p = hash_get (vam->lca##_registration_hash, mp->client_index); \ if (p) { \ if (mp->enable_disable) { \ clib_warning ("pid %d: already enabled...", ntohl(mp->pid)); \ rv = VNET_API_ERROR_INVALID_REGISTRATION; \ goto reply; \ } else { \ rp = pool_elt_at_index (vam->lca##_registrations, p[0]); \ pool_put (vam->lca##_registrations, rp); \ hash_unset (vam->lca##_registration_hash, \ mp->client_index); \ goto reply; \ } \ } \ if (mp->enable_disable == 0) { \ clib_warning ("pid %d: already disabled...", mp->pid); \ rv = VNET_API_ERROR_INVALID_REGISTRATION; \ goto reply; \ } \ pool_get (vam->lca##_registrations, rp); \ rp->client_index = mp->client_index; \ rp->client_pid = mp->pid; \ hash_set (vam->lca##_registration_hash, rp->client_index, \ rp - vam->lca##_registrations); \ \ reply: \ REPLY_MACRO (VL_API_WANT_##UCA##_REPLY); \ } \ \ static clib_error_t * vl_api_want_##lca##_t_reaper (u32 client_index) \ { \ vpe_api_main_t *vam = &vpe_api_main; \ vpe_client_registration_t *rp; \ uword *p; \ \ p = hash_get (vam->lca##_registration_hash, client_index); \ if (p) \ { \ rp = pool_elt_at_index (vam->lca##_registrations, p[0]); \ pool_put (vam->lca##_registrations, rp); \ hash_unset (vam->lca##_registration_hash, client_index); \ } \ return (NULL); \ } \ \ VL_MSG_API_REAPER_FUNCTION (vl_api_want_##lca##_t_reaper); \ #define foreach_registration_hash \ _(interface_events) \ _(to_netconf_server) \ _(from_netconf_server) \ _(to_netconf_client) \ _(from_netconf_client) \ _(oam_events) \ _(bfd_events) \ _(l2_arp_term_events) \ _(ip6_ra_events) \ _(dhcp6_pd_reply_events) \ _(dhcp6_reply_events) typedef struct { u32 client_index; /* in memclnt registration pool */ u32 client_pid; } vpe_client_registration_t; typedef struct { #define _(a) \ uword *a##_registration_hash; \ vpe_client_registration_t * a##_registrations; foreach_registration_hash #undef _ /* notifications happen really early in the game */ u8 link_state_process_up; /* convenience */ vlib_main_t *vlib_main; vnet_main_t *vnet_main; } vpe_api_main_t; extern vpe_api_main_t vpe_api_main; #endif /* __api_helper_macros_h__ */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */