[AMD Public Use]

Hi Alec,

I am using Ubuntu 20.04.1 with kernel 5.4.0-42.

Hugepage is configured in the grub
$ grep HugePages_ /proc/meminfo
HugePages_Total:    4096
HugePages_Free:     4096
HugePages_Rsvd:        0
HugePages_Surp:        0

In the host, I can manually bind the devices to vfio-pci, but in the container, 
it cannot bind the devices to vfio-pci or igb_uio. Please see the logs in the 
attached file.

Regards,
Charlie Li

From: Alec Hothan (ahothan) <ahot...@cisco.com>
Sent: Monday, August 31, 2020 5:36 PM
To: Li, Charlie <charlie...@amd.com>; opnfv-tech-discuss@lists.opnfv.org
Subject: Re: [opnfv-tech-discuss] #nfvbench - Example of run fails

[CAUTION: External Email]
This likely indicates that Trex failed to start properly, possibly pci address 
issue or other dpdk related issue.
Can you check/share the trex config and  trex log which are  located inside the 
container at:

/etc/trex_cfg.yaml
/tmp/trex.log

(you can use docker cp or simply docker exec <nfvbench> cat /tmp/trex.log)

Make sure you have your server is set properly to run dpdk (you need huge pages 
configured).

  Alec




From: "Li, Charlie" <charlie...@amd.com<mailto:charlie...@amd.com>>
Date: Monday, August 31, 2020 at 3:07 PM
To: "Alec Hothan (ahothan)" <ahot...@cisco.com<mailto:ahot...@cisco.com>>, 
"opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>" 
<opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>>
Subject: RE: [opnfv-tech-discuss] #nfvbench - Example of run fails


[AMD Public Use]

Thanks Alec for your help.

Now I can start it but it fails to connect to the server.

$ nfvbench -c /tmp/nfvbench/nfvbench.cfg --rate 10kpps
2020-08-31 21:43:30,092 INFO Loading configuration file: 
/tmp/nfvbench/nfvbench.cfg
2020-08-31 21:43:30,101 INFO -c /tmp/nfvbench/nfvbench.cfg --rate 10kpps
2020-08-31 21:43:30,104 INFO Connecting to TRex (127.0.0.1)...
2020-08-31 21:43:33,175 INFO Starting TRex ...
2020-08-31 21:43:33,178 INFO nohup /bin/bash -c ./t-rex-64 -i -c 4 --iom 0 
--no-scapy-server --unbind-unused-ports --close-at-end  --vlan --hdrh 
--mbuf-factor 0.2 --cfg /etc/trex_cfg.yaml &> /tmp/trex.log & disown
2020-08-31 21:43:33,181 INFO TRex server is running...
nohup: ignoring input and appending output to 'nohup.out'
2020-08-31 21:43:37,189 INFO Retrying connection to TRex (*** [RPC] - Failed to 
get server response from tcp://127.0.0.1:4501)...
2020-08-31 21:43:41,196 INFO Retrying connection to TRex (*** [RPC] - Failed to 
get server response from tcp://127.0.0.1:4501)...
2020-08-31 21:43:45,203 INFO Retrying connection to TRex (*** [RPC] - Failed to 
get server response from tcp://127.0.0.1:4501)...

I tried to bind the devices to vfio-pci manually but it still cannot connect to 
the server.

Regards,
Charlie Li

From: Alec Hothan (ahothan) <ahot...@cisco.com<mailto:ahot...@cisco.com>>
Sent: Monday, August 31, 2020 1:45 PM
To: Li, Charlie <charlie...@amd.com<mailto:charlie...@amd.com>>; 
opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>
Subject: Re: [opnfv-tech-discuss] #nfvbench - Example of run fails

[CAUTION: External Email]
Hi Charlie,

This is likely due to the file "/tmp/nfvbench/nfvbench.cfg" missing inside the 
container.
Can you check the following:

*         Check where you stored the nfvbench.cfg file on the host (the 
quickstart guide suggests to put the file under $HOME/nfvbench)

*         Check that that directory on host is mapped to /tmp/nfvbench in the 
container

To verify you can also try to cat that file from inside the container (docker 
exec <container name> cat /tmp/nfvbench/nfvbench.cfg)

For further interaction, you can continue on this email thread or you can join 
opnfv.slack.com #nfvbench if you prefer.


Thanks

Alec



From: 
<opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>> 
on behalf of "Li, Charlie" <charlie...@amd.com<mailto:charlie...@amd.com>>
Date: Monday, August 31, 2020 at 9:59 AM
To: 
"opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>" 
<opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>>
Subject: [opnfv-tech-discuss] #nfvbench - Example of run fails


[AMD Public Use]

Hello,

I am new to NFVbench and is following the link below to get started
https://opnfv-nfvbench.readthedocs.io/en/latest/testing/user/userguide/quickstart_docker.html<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopnfv-nfvbench.readthedocs.io%2Fen%2Flatest%2Ftesting%2Fuser%2Fuserguide%2Fquickstart_docker.html&data=02%7C01%7CCharlie.Li%40amd.com%7Ca8b345a1f5134d2f91f508d84dfe3b03%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637345101599997618&sdata=Yh8wvZoPBaBXqCGaHLZbZvidWTg%2B%2BFQvqfG1TJ9x3vg%3D&reserved=0>

The NFVbench container is started successfully

$ nfvbench --version
4.3.1.dev4

But when I try the example of run, it fails

$ nfvbench -c /tmp/nfvbench/nfvbench.cfg --rate 10kpps
2020-08-27 20:10:45,424 INFO Loading configuration string: 
/tmp/nfvbench/nfvbench.cfg
2020-08-27 20:10:45,425 ERROR String /tmp/nfvbench/nfvbench.cfg is not well 
formatted. Please verify your yaml/json string. If string is a file path, file 
was not found. Please use correct path and verify it is visible to container if 
you run nfvbench in container.
2020-08-27 20:10:45,425 ERROR {'status': 'ERROR', 'error_message': 'Traceback 
(most recent call last):\n  File "/nfvbench/nfvbench/config.py", line 46, in 
config_loads\n    cfg = AttrDict(yaml.safe_load(cfg_text))\n  File 
"/usr/local/lib/python3.6/dist-packages/attrdict/dictionary.py", line 17, in 
__init__\n    super(AttrDict, self).__init__(*args, **kwargs)\nValueError: 
dictionary update sequence element #0 has length 1; 2 is required\n\nDuring 
handling of the above exception, another exception occurred:\n\nTraceback (most 
recent call last):\n  File "/nfvbench/nfvbench/nfvbench.py", line 611, in 
main\n    config = config_loads(opts.config, config, whitelist_keys)\n  File 
"/nfvbench/nfvbench/config.py", line 55, in config_loads\n    raise 
Exception(e)\nException: dictionary update sequence element #0 has length 1; 2 
is required\n'}
dictionary update sequence element #0 has length 1; 2 is required

The /tmp/nfvbench/nfvbench.cfg is cut and paste (OpenStack is not used and only 
PCIe addresses are modified)
traffic_generator:
    generator_profile:
        - name: trex-local
          tool: TRex
          ip: 127.0.0.1
          cores: 3
          software_mode: false
          interfaces:
            - port: 0
              pci: "04:00.0"
            - port: 1
              pci: "04:00.1"
          intf_speed:

Any help is appreciated.

Regards,
Charlie Li

$ grep HugePages_ /proc/meminfo
HugePages_Total:    4096
HugePages_Free:     4096
HugePages_Rsvd:        0
HugePages_Surp:        0

$ sudo docker exec nfvbench cat /etc/trex_cfg.yaml
# Config generated by NFVbench
        - port_limit : 2
          version    : 2
          zmq_pub_port : 4500
          zmq_rpc_port : 4501
          prefix       : trex-local
          limit_memory : 1024
          interfaces : ['04:00.4','04:00.5']

$ sudo docker exec nfvbench cat /tmp/trex.log
Error - no supported modules(DPDK driver) are loaded
Traceback (most recent call last):
  File "./dpdk_setup_ports.py", line 1617, in main
    ret = obj.do_run()
  File "./dpdk_setup_ports.py", line 1009, in do_run
    compile_and_load_igb_uio()
  File "./dpdk_setup_ports.py", line 337, in compile_and_load_igb_uio
    subprocess.check_output('make', cwd = build_src_path, stderr = 
subprocess.STDOUT, universal_newlines = True)
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'make': 'make'
Trying to bind to vfio-pci ...
/usr/local/bin/python3 dpdk_nic_bind.py --bind=vfio-pci 0000:04:00.4 
0000:04:00.5
Trying to compile and bind to igb_uio ...
ERROR: We don't have precompiled igb_uio.ko module for your kernel version
Will try compiling automatically...
ERROR encountered while configuring TRex system
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#24361): 
https://lists.opnfv.org/g/opnfv-tech-discuss/message/24361
Mute This Topic: https://lists.opnfv.org/mt/76538156/21656
Mute #nfvbench: 
https://lists.opnfv.org/g/OPNFV+opnfv-tech-discuss/mutehashtag/nfvbench
Group Owner: opnfv-tech-discuss+ow...@lists.opnfv.org
Unsubscribe: https://lists.opnfv.org/g/opnfv-tech-discuss/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to