Hi,
How is it possible to sum up all the QoS that was given by table match?
control ingress(
inout my_ingress_headers_t hdr,
inout my_ingress_metadata_t meta,
in psa_ingress_input_metadata_t ig_intr_md,
inout psa_ingress_output_metadata_t ostd
)
{
/*
* If got match -> egress
* to port 1 else drop
*/
action send(PortId_t port, ClassOfService_t class) {
ostd.egress_port = (PortId_t) port;
ostd.drop = false;
ostd.class_of_service = (ClassOfService_t) class;
}
/* This is workaround due to probably p4c-dpdk bug.
* Details can be see here:
* https://github.com/p4lang/p4c/issues/3861
* This line need to be "ostd.drop = true;"
*/
action drop() {
ostd.drop = true;
}
action set_port_and_src_mac( PortId_t port,
ethernet_addr_t src_mac,
ethernet_addr_t dst_mac) {
send_to_port(ostd, port);
hdr.ethernet.src_addr = src_mac;
hdr.ethernet.dst_addr = dst_mac;
}
table ipv4_host {
key = { hdr.ipv4.dst_addr : exact; }
actions = {
send;drop;
@defaultonly NoAction;
}
const default_action = NoAction();
size = IPV4_HOST_SIZE;
}
/*
* https://p4.org/p4-spec/docs/PSA.html#sec-registers
* registers, counter
*/
apply {
ipv4_host.apply();
}
}
I just want to be able to know what is the “weight” that my buffer when i trig the pipeline stat from CLI.
do I need to do it from DPDK app .c code?
thanks
GUY