Skip to content

Commit

Permalink
Update some stale DPDK reference files. Make sure that the dpdk test …
Browse files Browse the repository at this point in the history
…runner throws an error when the reference file is stale. (#4705)
  • Loading branch information
fruffy authored Jun 4, 2024
1 parent 32f2c1d commit d5df09b
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 17 deletions.
2 changes: 1 addition & 1 deletion backends/dpdk/run-dpdk-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def check_generated_files(options, tmpdir, expecteddir):
result = compare_files(options, produced, expected, file[-6:] == "-error")
# We do not want to compare stderr output generated by p4c-dpdk
if result != SUCCESS and (file[-6:] == "-error"):
return SUCCESS
return result
if result != SUCCESS and not ignoreStderr(options):
return result
if produced.endswith(".spec") and environ.get("DPDK_PIPELINE") is not None:
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_dpdk_errors/pna-example-ipsec-err1.p4
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>


#define inbound(meta) (istd.direction == PNA_Direction_t.NET_TO_HOST)
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_dpdk_errors/pna-example-ipsec-err2.p4
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>


#define inbound(meta) (istd.direction == PNA_Direction_t.NET_TO_HOST)
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_dpdk_errors/pna-example-ipsec-err3.p4
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>


#define inbound(meta) (istd.direction == PNA_Direction_t.NET_TO_HOST)
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_dpdk_errors/pna-example-ipsec-err4.p4
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>


#define inbound(meta) (istd.direction == PNA_Direction_t.NET_TO_HOST)
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_pna_errors/pna-dpdk-direct-counter-err-1.p4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>


typedef bit<48> EthernetAddress;
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_pna_errors/pna-dpdk-direct-counter-err-2.p4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>

typedef bit<48> EthernetAddress;
const bit<8> ETHERNET_HEADER_LEN = 14;
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_pna_errors/pna-dpdk-direct-counter-err-3.p4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>

typedef bit<48> EthernetAddress;
const bit<8> ETHERNET_HEADER_LEN = 14;
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_pna_errors/pna-dpdk-direct-counter-err-4.p4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>


typedef bit<48> EthernetAddress;
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_pna_errors/pna-dpdk-direct-counter-err.p4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>

typedef bit<48> EthernetAddress;
const bit<8> ETHERNET_HEADER_LEN = 14;
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_pna_errors/pna-dpdk-direct-meter-err-2.p4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>

typedef bit<48> EthernetAddress;
const bit<8> ETHERNET_HEADER_LEN = 14;
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_pna_errors/pna-dpdk-direct-meter-err-3.p4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <core.p4>
#include "dpdk/pna.p4"
#include <dpdk/pna.p4>


typedef bit<48> EthernetAddress;
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_pna_errors/pna-dpdk-direct-meter-err-4.p4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>


typedef bit<48> EthernetAddress;
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_16_pna_errors/pna-dpdk-direct-meter-err.p4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <core.p4>
#include <pna.p4>
#include <dpdk/pna.p4>

typedef bit<48> EthernetAddress;
const bit<8> ETHERNET_HEADER_LEN = 14;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
pna.p4(401): [--Werror=unexpected] error: count method of per_prefix_pkt_bytes_count extern can only be invoked from within action of ownertable
void count(in bit<32> pkt_len);
^^^^^
pna.p4(401): [--Werror=unexpected] error: count method of per_prefix_bytes_count extern can only be invoked from within action of ownertable
void count(in bit<32> pkt_len);
^^^^^
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
pna-dpdk-direct-meter-err-4.p4(118): [--Werror=expected] error: Expected default action default_route_drop to have 'dpdk_execute' method call for DirectMeter extern instance MainControlImpl.meter0
action default_route_drop() {
^^^^^^^^^^^^^^^^^^
pna-dpdk-direct-meter-err-4.p4(111): [--Werror=type-error] error: meter0.execute: extern DirectMeter does not have method matching this call
out1 = meter0.execute(color_in, 32w1024);
^^^^^^^^^^^^^^
pna.p4(444)
extern DirectMeter {
^^^^^^^^^^^
pna-dpdk-direct-meter-err-4.p4(113): [--Werror=type-error] error: meter1.execute: extern DirectMeter does not have method matching this call
color_out = meter1.execute(color_in, 32w1024);
^^^^^^^^^^^^^^
pna.p4(444)
extern DirectMeter {
^^^^^^^^^^^
pna-dpdk-direct-meter-err-4.p4(119): [--Werror=type-error] error: meter0.execute: extern DirectMeter does not have method matching this call
out1 = meter0.execute(color_in, 32w1024);
^^^^^^^^^^^^^^
pna.p4(444)
extern DirectMeter {
^^^^^^^^^^^
pna-dpdk-direct-meter-err-4.p4(148): [--Werror=type-error] error: meter1.execute: extern DirectMeter does not have method matching this call
color_out = meter1.execute(color_in, 32w1024);
^^^^^^^^^^^^^^
pna.p4(444)
extern DirectMeter {
^^^^^^^^^^^

0 comments on commit d5df09b

Please sign in to comment.