We purchased several LX2160A boards and tried to test some basic QoS functions in WRIOP. We were not able to find much instructions to build for this specific type of board. After trying various approaches we ended up using memory map to communicate with the HW. We are able to make simple functions such as mc_get_version() and dpni_open/close() to work. However when trying to invoke dpni_set_qos_table() we got an error code -22 which means “Device not configured”. This prevents us from testing any QoS related functions on the board. Attached is the related code we wrote for this (adapted from AIOP examples).
Does anyone have any luck making QoS function work on this specific type of board?
======
Below is output we got:
root@localhost:~/mc_release_10.14.3# ./a.out
beginning.
after mapping memory.
after opening dprc.
after 1, number of traffic classes is 8
Device not configured
dpni_set_qos_table failed
Cannot set qos table on dpni 2, err is -22
======
Before running our code, we used restool to create dprc.2 and dpni.2 as below:
root@localhost:~/mc_release_10.14.3# restool dprc info dprc.2
container id: 2
icid: 24
portal id: 36
dprc options: 0x47
DPRC_CFG_OPT_SPAWN_ALLOWED
DPRC_CFG_OPT_ALLOC_ALLOWED
DPRC_CFG_OPT_OBJ_CREATE_ALLOWED
DPRC_CFG_OPT_IRQ_CFG_ALLOWED
object label: DPDK Container
root@localhost:~/mc_release_10.14.3#
root@localhost:~/mc_release_10.14.3# restool dpni info dpni.2
dpni version: 7.10
dpni id: 2
plugged state: plugged
endpoint state: 0
endpoint: dpmac.5, link is down
link status: 0 - down
mac address: 00:04:9f:06:35:b7
dpni_attr.options value is: 0x310
DPNI_OPT_HAS_KEY_MASKING
DPNI_OPT_SINGLE_SENDER
DPNI_OPT_CUSTOM_CG
num_queues: 16
num_cgs: 24
num_rx_tcs: 8
num_tx_tcs: 16
mac_entries: 16
vlan_entries: 16
qos_entries: 64
fs_entries: 1
qos_key_size: 24
fs_key_size: 56
ingress_all_frames: 0
ingress_all_bytes: 0
ingress_multicast_frames: 0
ingress_multicast_bytes: 0
ingress_broadcast_frames: 0
ingress_broadcast_bytes: 0
egress_all_frames: 0
egress_all_bytes: 0
egress_multicast_frames: 0
egress_multicast_bytes: 0
egress_broadcast_frames: 0
egress_broadcast_bytes: 0
ingress_filtered_frames: 0
ingress_discarded_frames: 0
ingress_nobuffer_discards: 0
egress_discarded_frames: 0
egress_confirmed_frames: 0
root@localhost:~/mc_release_10.14.3#
The answer was provided through direct communication.