Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create dpdk specific pna.p4 and extend it #3658

Merged
merged 11 commits into from
Nov 11, 2022
Prev Previous commit
Next Next commit
rename execute to dpdk_execute
  • Loading branch information
kamleshbhalui committed Nov 11, 2022
commit 4f1c8fa41f319b58cb22d1057f6cafcf2f06edad
4 changes: 2 additions & 2 deletions p4include/dpdk/pna.p4
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ extern Meter<S> {
// RFC 2698). The color of the packet before the method call was
// made is specified by the color parameter.
PNA_MeterColor_t execute(in S index, in PNA_MeterColor_t color);
PNA_MeterColor_t execute(in S index, in PNA_MeterColor_t color, in bit<32> pkt_len);
PNA_MeterColor_t dpdk_execute(in S index, in PNA_MeterColor_t color, in bit<32> pkt_len);

// Use this method call to perform a color blind meter update (see
// RFC 2698). It may be implemented via a call to execute(index,
Expand All @@ -423,7 +423,7 @@ extern DirectMeter {
// See the corresponding methods for extern Meter.
PNA_MeterColor_t execute(in PNA_MeterColor_t color);
PNA_MeterColor_t execute();
PNA_MeterColor_t execute(in PNA_MeterColor_t color, in bit<32> pkt_len);
PNA_MeterColor_t dpdk_execute(in PNA_MeterColor_t color, in bit<32> pkt_len);
PNA_MeterColor_t dpdk_execute(in bit<32> pkt_len);
}
// END:DirectMeter_extern
Expand Down
4 changes: 2 additions & 2 deletions p4include/dpdk/psa.p4
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ extern Meter<S> {
// RFC 2698). The color of the packet before the method call was
// made is specified by the color parameter.
PSA_MeterColor_t execute(in S index, in PSA_MeterColor_t color);
PSA_MeterColor_t execute(in S index, in PSA_MeterColor_t color, in bit<32> pkt_len);
PSA_MeterColor_t dpdk_execute(in S index, in PSA_MeterColor_t color, in bit<32> pkt_len);

// Use this method call to perform a color blind meter update (see
// RFC 2698). It may be implemented via a call to execute(index,
Expand All @@ -691,7 +691,7 @@ extern DirectMeter {
DirectMeter(PSA_MeterType_t type);
// See the corresponding methods for extern Meter.
PSA_MeterColor_t execute(in PSA_MeterColor_t color);
PSA_MeterColor_t execute(in PSA_MeterColor_t color, in bit<32> pkt_len);
PSA_MeterColor_t dpdk_execute(in PSA_MeterColor_t color, in bit<32> pkt_len);
PSA_MeterColor_t execute();
PSA_MeterColor_t dpdk_execute(in bit<32> pkt_len);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
color_out = meter0.execute(index, color_in, (bit<32>) hdr.ipv4.totalLen);
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
color_out = meter0.execute(index, color_in, (bit<32>) hdr.ipv4.totalLen);
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
color_out = meter0.execute(index, color_in, (bit <32>) hdr.ipv4.totalLen);
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
color_out = meter0.execute(index, color_in, (bit<32>) hdr.ipv4.totalLen);
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
color_out = meter0.execute(index, color_in, (bit<32>) hdr.ipv4.totalLen);
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.version == 6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
color_out = meter0.execute(index, color_in, (bit<32>) hdr.ipv4.totalLen);
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.version == 6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
color_out = meter0.execute(index, color_in, (bit<32>) hdr.ipv4.totalLen);
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.version == 6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
color_out = meter0.execute(index, color_in, (bit<32>) hdr.ipv4.totalLen);
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6)
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_samples/psa-example-dpdk-meter1.p4
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_out;
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
color_out = meter0.execute(index, color_in, (bit<32>) hdr.ipv4.totalLen);
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
}
table tbl {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6w6) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4.totalLen);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
if (color_out_0 == PSA_MeterColor_t.GREEN) {
tmp = 32w1;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4.totalLen);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg_0.write(index_1, (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0));
hdr.ipv4.ihl = 4w5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6w6) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4.totalLen);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
if (color_out_0 == PSA_MeterColor_t.GREEN) {
tmp = 32w1;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4.totalLen);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg_0.write(index_1, (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0));
hdr.ipv4.ihl = 4w5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6w6) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4.totalLen);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
if (color_out_0 == PSA_MeterColor_t.GREEN) {
tmp = 32w1;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4.totalLen);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg_0.write(index_1, (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0));
hdr.ipv4.ihl = 4w5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6w6) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4.totalLen);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
if (color_out_0 == PSA_MeterColor_t.GREEN) {
tmp = 32w1;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4.totalLen);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg_0.write(index_1, (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0));
hdr.ipv4.ihl = 4w5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.hdrChecksum[5:0] == 6) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.version == 4w6) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4.ihl = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4.totalLen);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
if (color_out_0 == PSA_MeterColor_t.GREEN) {
tmp = 32w1;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
@name("ingress.meter0") Meter<bit<12>>(32w1024, PSA_MeterType_t.BYTES) meter0_0;
@name("ingress.execute") action execute_1(@name("index") bit<12> index_1) {
hdr.ipv4._ihl1 = 4w5;
<<<<<<< HEAD
color_out_0 = meter0_0.execute(index_1, color_in_0, (bit<32>)hdr.ipv4._totalLen3);
=======
color_out_0 = meter0_0.dpdk_execute(index_1, color_in_0, hdr.ipv4._totalLen3);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg_0.write(index_1, (color_out_0 == PSA_MeterColor_t.GREEN ? 32w1 : 32w0));
hdr.ipv4._ihl1 = (hdr.ipv4._version0 == 4w6 ? 4w6 : 4w5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ control ingress(inout headers hdr, inout metadata_t user_meta, in psa_ingress_in
PSA_MeterColor_t color_in = PSA_MeterColor_t.RED;
action execute(bit<12> index) {
hdr.ipv4.ihl = 5;
<<<<<<< HEAD
color_out = meter0.execute(index, color_in, (bit<32>)hdr.ipv4.totalLen);
=======
color_out = meter0.dpdk_execute(index, color_in, hdr.ipv4.totalLen);
>>>>>>> rename execute to dpdk_execute
user_meta.port_out = (color_out == PSA_MeterColor_t.GREEN ? 32w1 : 32w0);
reg.write(index, user_meta.port_out);
if (hdr.ipv4.version == 6) {
Expand Down
Loading