summaryrefslogtreecommitdiff
path: root/tests/test-flows.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-flows.c')
-rw-r--r--tests/test-flows.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test-flows.c b/tests/test-flows.c
index 19e83151b..0e8b148bf 100644
--- a/tests/test-flows.c
+++ b/tests/test-flows.c
@@ -27,6 +27,7 @@
#include "ofp-util.h"
#include "openflow/openflow.h"
#include "ovstest.h"
+#include "dp-packet.h"
#include "pcap-file.h"
#include "timeval.h"
#include "util.h"
@@ -57,7 +58,7 @@ test_flows_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
}
while (fread(&expected_match, sizeof expected_match, 1, flows)) {
- struct ofpbuf *packet;
+ struct dp_packet *packet;
struct ofp10_match extracted_match;
struct match match;
struct flow flow;
@@ -70,7 +71,7 @@ test_flows_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
ovs_fatal(retval, "error reading pcap file");
}
- flow_extract(packet, NULL, &flow);
+ flow_extract(packet, &flow);
flow.in_port.ofp_port = u16_to_ofp(1);
match_wc_init(&match, &flow);
@@ -82,8 +83,8 @@ test_flows_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
errors++;
printf("mismatch on packet #%d (1-based).\n", n);
printf("Packet:\n");
- ofp_print_packet(stdout, ofpbuf_data(packet), ofpbuf_size(packet));
- ovs_hex_dump(stdout, ofpbuf_data(packet), ofpbuf_size(packet), 0, true);
+ ofp_print_packet(stdout, dp_packet_data(packet), dp_packet_size(packet));
+ ovs_hex_dump(stdout, dp_packet_data(packet), dp_packet_size(packet), 0, true);
match_print(&match);
printf("Expected flow:\n%s\n", exp_s);
printf("Actually extracted flow:\n%s\n", got_s);
@@ -94,7 +95,7 @@ test_flows_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
free(got_s);
}
- ofpbuf_delete(packet);
+ dp_packet_delete(packet);
}
printf("checked %d packets, %d errors\n", n, errors);
exit(errors != 0);