Inaccurate pipeline show information
tatry opened this issue · 0 comments
tatry commented
nikss-ctl
showsTC
hook type for XDP-based pipeline.In XDP-based pipeline has always egress program (TBC with compiler code).- Some object are shown which should be hidden in output JSON.
To avoid this in the future maybe we should hide all names starting fromebpf_
and use this prefix in the generated programs by p4c compiler? As far I remember this prefix is reserved for such usage.
Output from PTF test upf.UPFTest
:
Configuration:
Using test params: {'interfaces': 'psa_recirc,eth0,eth1,eth2,eth3,eth4,eth5', 'namespace': 'switch', 'trace': 'False', 'xdp': 'True', 'xdp2tc': 'meta'}
P4ARGS=--Wdisable=unused --max-ternary-masks 3 -DPORT0=4 -DPORT1=5 -DPORT2=6 -DPORT3=7 -DPORT4=8 -DPORT5=9 -DPSA_RECIRC=2 --xdp2tc=meta --xdp
Pipeline show information:
{
"pipeline": {
"id": 1,
"load_time": "2022-12-01T09:35:42+0100",
"bpf_hook": "TC",
"has_egress_program": false,
"ports": [
{
"name": "eth0",
"port_id": 4
},
{
"name": "eth1",
"port_id": 5
},
{
"name": "eth2",
"port_id": 6
},
{
"name": "eth3",
"port_id": 7
},
{
"name": "eth4",
"port_id": 8
},
{
"name": "eth5",
"port_id": 9
}
],
"objects": [
"xdp2tc_shared_map",
"ingress_upf_process_ingress_l4port_ingress_l4_src_port",
"ingress_upf_process_ingress_l4port_ingress_l4_dst_port",
"ingress_upf_ingress_source_interface_lookup_by_port",
"ingress_upf_ingress_session_lookup_by_ue_ip",
"ingress_upf_ingress_session_lookup_by_teid",
"ingress_upf_ingress_pdr_lookup",
"ingress_upf_ingress_far_lookup",
"ingress_ip_forward_ipv4_lpm",
"tx_port",
"crc_lookup_tbl",
"ingress_upf_process_ingress_l4port_ingress_l4port_fields"
]
}
}