behavioral-model
behavioral-model copied to clipboard
p4c-bm2-psa compile DirectMeter fail
Use p4c-bm2-psa to compile p4 code with extern DirectMeter, but always fail.
Fail log:
ingress/meter.p4(21): [--Werror=unsupported] error: meter0: could not convert expression to Json
flow_md.meter_color = meter0.execute();
^^^^^^
ingress/meter.p4(21): [--Werror=target-error] error: meter0.execute: **not supported**
flow_md.meter_color = meter0.execute();
P4 code:
DirectMeter(PSA_MeterType_t.PACKETS) meter0;
action execute_meter() {
flow_md.meter_color = meter0.execute();
}
table flow_meter_tb {
key = {
flow_md.meter_id: exact;
}
actions = {
NoAction;
execute_meter;
}
psa_direct_meter = meter0;
default_action = NoAction;
size = METER_TABLE_SIZE;
}
Is there something wrong? Thanks.
The implementation of the PSA architecture for the bmv2 back end is still only a partial implementation, unfortunately. I believe this status is up to date, but it might be slightly off: https://github.com/jafingerhut/p4-guide/tree/master/psa-test-info
There is a p4c DPDK back end that is open source that has several developers at Intel actively working on enhancing it, with the goal of making it complete for both the PSA and still-not-completely-specified PNA architectures. I do not know whether it supports the DirectMeter extern yet.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days