# \[P4-DPDK-Target\] Getting error while hitting "enable" command in bfshell

**URL:** <https://forum.p4.org/t/p4-dpdk-target-getting-error-while-hitting-enable-command-in-bfshell/1058>\
**Category:** Getting Started with P4\
**Created:** [December 13, 2023, 4:12pm UTC](https://forum.p4.org/t/p4-dpdk-target-getting-error-while-hitting-enable-command-in-bfshell/1058 "2023-12-13T16:12:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShatakshiMishra](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@ShatakshiMishra](https://forum.p4.org/u/ShatakshiMishra)\
**Post date:** [December 13, 2023, 4:12pm UTC](https://forum.p4.org/t/p4-dpdk-target-getting-error-while-hitting-enable-command-in-bfshell/1058/1 "2023-12-13T16:12:39Z")

</div>

Hi, I was was trying to run the P4-DPDK-Target example, and encounter some error. Please suggest what could be the possible reason behind this error.

export SDE=/home/p4dpdk  
export SDE\_INSTALL=$SDE/install  
export LD\_LIBRARY\_PATH=$SDE\_INSTALL/lib:$SDE\_INSTALL/lib64:$SDE\_INSTALL/lib/x86\_64-linux-gnu/:/usr/local/lib64:/usr/local/lib  
export PATH=$SDE\_INSTALL/bin:$PATH  
export PYTHONPATH=$SDE\_INSTALL/lib/python3.8/:$SDE\_INSTALL/lib/python3.8/lib-dynload:$SDE\_INSTALL/lib/python3.8/site-packages  
export PYTHONHOME=$SDE\_INSTALL/lib/python3.8

### **switch\_conf.json**

* * *

{  
“chip\_list”: [  
{  
“id”: “asic-0”,  
“chip\_family”: “dpdk”,  
“instance”: 0  
}  
],  
“instance”: 0,  
“p4\_devices”: [  
{  
“device-id”: 0,  
“eal-args”: “dummy -n 4 -c 3”,  
“mempools”: [  
{  
“name”: “MEMPOOL0”,  
“buffer\_size”: 2304,  
“pool\_size”: 1024,  
“cache\_size”: 256,  
“numa\_node”: 0  
}  
],  
“p4\_programs”: [  
{  
“program-name”: “pna”,  
“bfrt-config”: “/home/p4dpdk/install/share/dpdk/pna/bf-rt.json”,  
“p4\_pipelines”: [  
{  
“p4\_pipeline\_name”: “pipe”,  
“core\_id”: 1,  
“numa\_node”: 0,  
“context”: “/home/p4dpdk/install/share/dpdk/pna/pipe/context.json”,  
“config”: “/home/p4dpdk/install/share/dpdk/pna/pipe/simple\_lpm.spec”,  
“pipe\_scope”: [  
0,  
1,  
2,  
3  
],  
“path”: “/home/p4dpdk/install/share/dpdk/pna”  
}  
]  
}  
]  
}  
]  
}

* * *

:~/p4dpdk/install/bin$ _ **sudo -E PATH=$PATH LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH $SDE\_INSTALL/bin/bf\_switchd --install-dir $SDE\_INSTALL --conf-file $SDE\_INSTALL/share/dpdk/pna/switch\_conf.json --init-mode=cold --status-port 7777** _

Install dir: /home/p4dpdk/install (0x562661a53c80)  
bf\_switchd: system services initialized  
bf\_switchd: loading conf\_file /home/p4dpdk/install/share/dpdk/pna/switch\_conf.json…  
bf\_switchd: processing device configuration…  
Configuration for dev\_id 0  
Family : dpdk  
bf\_switchd: processing P4 configuration…  
P4 profile for dev\_id 0  
P4 EAL args dummy -n 4 -c 3  
Debug CLI disable  
num mempool objs 1  
mempool\_name: MEMPOOL0  
buffer\_size: 2304  
pool\_size: 1024  
cache\_size: 256  
numa\_node: 0  
num fixed functions 0  
num P4 programs 1  
p4\_name: pna  
bfrt\_config: /home/p4dpdk/install/share/dpdk/pna/bf-rt.json  
port\_config:  
p4\_pipeline\_name: pipe  
core\_id: 1  
numa\_node: 0  
context: /home/p4dpdk/install/share/dpdk/pna/pipe/context.json  
config: /home/p4dpdk/install/share/dpdk/pna/pipe/simple\_lpm.spec  
Pipes in scope [0 1 2 3]  
Timer values   
Mirror Config  
n\_slots: 4  
n\_sessions: 64  
fast\_clone: 0  
diag:  
accton diag:  
non\_default\_port\_ppgs: 0  
SAI default initialize: 0  
Operational mode set to DPDK MODEL  
Initialized the device types using PAL handler registration  
STUB:port\_mgr\_platform\_init DPDK  
bf\_switchd: drivers initialized  
EAL: Detected CPU lcores: 8  
EAL: Detected NUMA nodes: 1  
EAL: Detected shared linkage of DPDK  
EAL: Multi-process socket /var/run/dpdk/rte/mp\_socket  
EAL: Selected IOVA mode ‘PA’  
TELEMETRY: No legacy callbacks, legacy socket not created

bf\_switchd: dev\_id 0 initialized

bf\_switchd: initialized 1 devices  
bf\_switchd\_switchsai\_lib\_init  
starting SAI  
bf\_switchd: spawning cli server thread  
bf\_switchd: spawning driver shell  
bf\_switchd: server started - listening on port 9999

```auto
    ********************************************
    * WARNING: Authorised Access Only *
    ********************************************

```

bfshell\> bfrt\_python  
cwd : /home/p4dpdk/install/bin

We’ve found 1 p4 programs for device 0:  
pna  
Creating tree for dev 0 and program pna

Devices found : [0]  
/home/p4dpdk/install/lib/python3.10/site-packages/IPython/core/history.py:226: UserWarning: IPython History requires SQLite, your history will not be saved  
warn(“IPython History requires SQLite, your history will not be saved”)  
Python 3.10.9 (1dd9be6584:1dd9be6584, Dec 13 2023, 10:31:12) [GCC 10.5.0]  
Type ‘copyright’, ‘credits’ or ‘license’ for more information  
IPython 7.31.1 – An enhanced Interactive Python. Type ‘?’ for help.

In [1]: bfrt  
------\> bfrt()  
Available symbols:  
dump - Command  
enable - Command  
info - Command  
pna - Node  
port - Node

bfrt\> pna.enable  
----\> pna.enable()  
_**2023-12-13 15:22:32.227229 BF\_PIPE ERROR - dal\_enable\_pipeline line:165 Pipeline build failed  
2023-12-13 15:22:32.227266 BF\_PIPE ERROR - Failed to Build Pipeline pipe  
2023-12-13 15:22:32.227278 BF\_BFRT ERROR - bf\_rt\_enable\_pipeline:120 failed**_

bfrt\>
