File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -481,29 +481,34 @@ def _thread_action() -> BaseOutput:
481481 logger .info ("There is no VF on an external server" )
482482 msg = "External Iperf Server"
483483 else :
484+ ifname = (
485+ "net1"
486+ if self ._perf_instance ._network_type == "secondary"
487+ else "eth0"
488+ )
484489 # Get VF representor - use DPU mode if configured
485490 if self ._is_dpu_mode :
486491 logger .info ("DPU mode: querying VF representor from DPU cluster" )
487492 vf_rep = self ._get_vf_rep_dpu_mode (
488493 pod_name = self .perf_pod_name ,
489- ifname = "eth0" ,
494+ ifname = ifname ,
490495 )
491496 else :
492497 vf_rep = self .pod_get_vf_rep (
493498 pod_name = self .perf_pod_name ,
494- ifname = "eth0" ,
499+ ifname = ifname ,
495500 host_pod_name = self .pod_name ,
496501 )
497502
498503 if vf_rep is None :
499504 success_result = False
500505 msg = "cannot determine VF_REP for pod"
501506 logger .error (
502- f"VF representor for { self .perf_pod_name } not detected"
507+ f"VF representor for { ifname } in { self .perf_pod_name } not detected"
503508 )
504509 else :
505510 logger .info (
506- f"VF representor for eth0 in pod { self .perf_pod_name } is { repr (vf_rep )} "
511+ f"VF representor for { ifname } in pod { self .perf_pod_name } is { repr (vf_rep )} "
507512 )
508513 ethtool_cmd = f"ethtool -S { vf_rep } "
509514
You can’t perform that action at this time.
0 commit comments