You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was solved by reloading kernel module using load driver with bf_kdrv_mod_load script.
Old description below:
=====================
Hi, I compiled the program following the docs at https://switchml.readthedocs.io/en/latest/readmes/p4.html using bf-sde-9.6.0, and python 3.8. I have a Tofino switch and trying to run both switchd and controller on it. However, the controller program crashes and I also see error messages on switchd side when the controller crashes. Any pointers on what I am doing wrong and how to fix it?
Attaching the logs:
Controller:
(switchml_env) root@localhost:~/ewarraic/p4app-switchML/dev_root/controller# python switchml.py
Subscribe attempt #1
Subscribe response received 0
Binding with p4_name SwitchML
P4 program SwitchML not found!
Terminated
Switchd:
root@localhost:~/ewarraic/p4app-switchML/dev_root/p4# $SDE/run_switchd.sh -p SwitchML
Using SDE /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0
Using SDE_INSTALL /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install
Setting up DMA Memory Pool
Using TARGET_CONFIG_FILE /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/share/p4/targets/tofino/SwitchML.conf
Using PATH /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/bin:/root/bf-sde-9.4.0/install/bin:/root/.pyenv/shims:/root/.pyenv/bin:/root/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/lib/platform-config/current/onl/bin:/lib/platform-config/current/onl/sbin:/lib/platform-config/current/onl/lib/bin:/lib/platform-config/current/onl/lib/sbin
Using LD_LIBRARY_PATH /usr/local/lib:/root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/lib:
bf_sysfs_fname /sys/class/bf/bf0/device/dev_add
Install dir: /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install (0x55c86eac0a50)
bf_switchd: system services initialized
bf_switchd: loading conf_file /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/share/p4/targets/tofino/SwitchML.conf...
bf_switchd: processing device configuration...
Configuration for dev_id 0
Family : tofino
pci_sysfs_str : /sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0
pci_domain : 0
pci_bus : 5
pci_fn : 0
pci_dev : 0
pci_int_mode : 1
sbus_master_fw: /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/
pcie_fw : /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/
serdes_fw : /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/
sds_fw_path : /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/share/tofino_sds_fw/avago/firmware
microp_fw_path:
bf_switchd: processing P4 configuration...
P4 profile for dev_id 0
num P4 programs 1
p4_name: SwitchML
p4_pipeline_name: pipe
libpd:
libpdthrift:
context: /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/share/tofinopd/SwitchML/pipe/context.json
config: /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/share/tofinopd/SwitchML/pipe/tofino.bin
Pipes in scope [0 1 2 3 ]
diag:
accton diag:
Agent[0]: /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/lib/libpltfm_mgr.so
non_default_port_ppgs: 0
SAI default initialize: 1
bf_switchd: library /root/ewarraic/bf-sde/9.6/bf-sde-9.6.0/install/lib/libpltfm_mgr.so loaded
bf_switchd: agent[0] initialized
Health monitor started
Operational mode set to ASIC
Initialized the device types using platforms infra API
ASIC detected at PCI /sys/class/bf/bf0/device
ERROR getting ASIC pci device id fpr /sys/class/bf/bf0/device
Starting PD-API RPC server on port 9090
bf_switchd: drivers initialized
error opening /dev/bf0
ERROR: Device mmap failed for dev_id 0
Please load driver with bf_kdrv_mod_load script. Exiting..
ERROR: bf_switchd_device_add failed(2) for dev_id 0
bf_switchd: initialized 0 devices
Adding Thrift service for bf-platforms to server
bf_switchd: thrift initialized for agent : 0
bf_switchd: spawning cli server thread
bf_switchd: spawning driver shell
bf_switchd: server started - listening on port 9999
bfruntime gRPC server started on 0.0.0.0:50052
********************************************
* WARNING: Authorised Access Only *
********************************************
bfshell> 2024-12-26 10:48:39.424191 BF_BFRT ERROR - bfRtInfoGet:159 BfRtInfo Object not found for dev : 0
2024-12-26 10:48:39.424591 BF_BFRT ERROR - BF_RT_SERVER:forwardingConfigBind:993 Failed to find BfRtInfo for program SwitchML Object not found
2024-12-26 10:48:39.424719 BF_BFRT ERROR - BF_RT_SERVER:SetForwardingPipelineConfig:3513 Failed to set Fwd_config for client_id 0
The text was updated successfully, but these errors were encountered:
ertza
changed the title
Controller crashes with "P4 program SwitchML not found!" error message
Stuck in hello world, controller stats show retransmissions increasing
Dec 31, 2024
ertza
changed the title
Stuck in hello world, controller stats show retransmissions increasing
Controller crashes with "P4 program SwitchML not found!"
Dec 31, 2024
This issue was solved by reloading kernel module using load driver with bf_kdrv_mod_load script.
Old description below:
=====================
Hi, I compiled the program following the docs at https://switchml.readthedocs.io/en/latest/readmes/p4.html using bf-sde-9.6.0, and python 3.8. I have a Tofino switch and trying to run both switchd and controller on it. However, the controller program crashes and I also see error messages on switchd side when the controller crashes. Any pointers on what I am doing wrong and how to fix it?
Attaching the logs:
Controller:
Switchd:
The text was updated successfully, but these errors were encountered: