34
34
Lsmod ,
35
35
Make ,
36
36
Modprobe ,
37
+ Ping ,
37
38
Timeout ,
38
39
)
39
40
from lisa .tools .hugepages import HugePageSize
@@ -142,6 +143,8 @@ def verify_dpdk_symmetric_mp(
142
143
nics = [node .nics .get_nic ("eth1" ), node .nics .get_nic ("eth2" )]
143
144
test_nic = node .nics .get_secondary_nic ()
144
145
extra_nics = [nic for nic in nics if nic .name != test_nic .name ]
146
+ ping = node .tools [Ping ]
147
+ ping .install ()
145
148
try :
146
149
test_kit = initialize_node_resources (
147
150
node ,
@@ -158,17 +161,19 @@ def verify_dpdk_symmetric_mp(
158
161
# The Testpmd tool doesn't get re-initialized
159
162
# even if you invoke it with new arguments.
160
163
raise SkippedException (
161
- "DPDK ring_ping test is not implemented for "
164
+ "DPDK symmetric_mp test is not implemented for "
162
165
" package manager installation."
163
166
)
164
167
symmetric_mp_path = testpmd .get_example_app_path ("dpdk-symmetric_mp" )
165
168
node .log .debug ("\n " .join ([str (nic ) for nic in nics ]))
166
-
167
- nic_args = (
168
- f'--vdev="{ test_nic .pci_slot } ,'
169
- f"mac={ test_nic .mac_addr } ,"
170
- f'mac={ extra_nics [0 ].mac_addr } "'
171
- )
169
+ if node .nics .is_mana_device_present ():
170
+ nic_args = (
171
+ f'--vdev="{ test_nic .pci_slot } ,'
172
+ f"mac={ test_nic .mac_addr } ,"
173
+ f'mac={ extra_nics [0 ].mac_addr } "'
174
+ )
175
+ else :
176
+ nic_args = f"-b { node .nics .get_primary_nic ().pci_slot } "
172
177
173
178
output = node .execute (
174
179
f"{ str (testpmd .get_example_app_path ('dpdk-devname' ))} { nic_args } " ,
@@ -193,23 +198,28 @@ def verify_dpdk_symmetric_mp(
193
198
f"-- -p { hex (port_mask )[2 :]} --num-procs 2"
194
199
)
195
200
primary = node .tools [Timeout ].start_with_timeout (
196
- command = f"{ str (symmetric_mp_path )} -l 1,2 { symmetric_mp_args } --proc-id 0" ,
197
- timeout = 30 ,
201
+ command = f"{ str (symmetric_mp_path )} -l 1 { symmetric_mp_args } --proc-id 0" ,
202
+ timeout = 150 ,
198
203
signal = SIGINT ,
199
204
kill_timeout = 30 ,
200
205
)
201
206
primary .wait_output ("APP: Finished Process Init" )
202
- secondary = node .tools [Timeout ].run_with_timeout (
203
- command = f"{ str (symmetric_mp_path )} -l 3,4 { symmetric_mp_args } --proc-id 1" ,
204
- timeout = 30 ,
207
+ secondary = node .tools [Timeout ].start_with_timeout (
208
+ command = f"{ str (symmetric_mp_path )} -l 2 { symmetric_mp_args } --proc-id 1" ,
209
+ timeout = 120 ,
205
210
signal = SIGINT ,
206
211
kill_timeout = 35 ,
207
212
)
208
- assert_that (secondary .exit_code ).described_as (
209
- f"Secondary process failure: { secondary .stdout } "
213
+ _ = ping .ping_async (
214
+ target = test_nic .ip_addr ,
215
+ nic_name = node .nics .get_primary_nic ().name ,
216
+ count = 100 ,
217
+ )
218
+ secondary_exit = secondary .wait_result ()
219
+ assert_that (secondary_exit .exit_code ).described_as (
220
+ f"Secondary process failure: { secondary_exit .stdout } "
210
221
).is_zero ()
211
222
process_result = primary .wait_result (
212
- timeout = 30 ,
213
223
expected_exit_code = 0 ,
214
224
expected_exit_code_failure_message = "Primary process failed to exit with 0" ,
215
225
)
@@ -218,8 +228,8 @@ def verify_dpdk_symmetric_mp(
218
228
f"\n primary stderr:\n { process_result .stderr } "
219
229
)
220
230
node .log .debug (
221
- f"Secondary system:\n \n { secondary .stdout } \n "
222
- f"secondary stderr:\n { secondary .stderr } "
231
+ f"Secondary system:\n \n { secondary_exit .stdout } \n "
232
+ f"secondary stderr:\n { secondary_exit .stderr } "
223
233
)
224
234
225
235
@TestCaseMetadata (
0 commit comments