2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-01 14:55:18 +00:00

ofpbuf: Simplify ofpbuf API.

ofpbuf was complicated due to its wide usage across all
layers of OVS, Now we have introduced independent dp_packet
which can be used for datapath packet, we can simplify ofpbuf.
Following patch removes DPDK mbuf and access API of ofpbuf
members.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Pravin B Shelar
2015-03-02 17:29:44 -08:00
parent cf62fa4c70
commit 6fd6ed71cb
42 changed files with 705 additions and 1058 deletions

View File

@@ -161,8 +161,8 @@ print_netflow(struct ofpbuf *buf)
putchar('\n');
}
if (ofpbuf_size(buf)) {
printf("%"PRIu32" extra bytes after last record\n", ofpbuf_size(buf));
if (buf->size) {
printf("%"PRIu32" extra bytes after last record\n", buf->size);
}
}
@@ -214,7 +214,7 @@ test_netflow_main(int argc, char *argv[])
ofpbuf_clear(&buf);
do {
retval = recv(sock, ofpbuf_data(&buf), buf.allocated, 0);
retval = recv(sock, buf.data, buf.allocated, 0);
} while (retval < 0 && errno == EINTR);
if (retval > 0) {
ofpbuf_put_uninit(&buf, retval);