X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fdpif.c;h=a8bd6745d1d9d10187b1e97b97e74e520e6cef08;hb=1f317cb5;hp=66491766343d8eaff1dc6cbf4f1e1b699ad308c8;hpb=6e2f6e708fb9bdb5443f8854016ea4f6fa73b355;p=sliver-openvswitch.git diff --git a/lib/dpif.c b/lib/dpif.c index 664917663..a8bd6745d 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -788,7 +788,7 @@ dpif_flow_stats_extract(const struct flow *flow, const struct ofpbuf *packet, long long int used, struct dpif_flow_stats *stats) { stats->tcp_flags = ntohs(flow->tcp_flags); - stats->n_bytes = packet->size; + stats->n_bytes = ofpbuf_size(packet); stats->n_packets = 1; stats->used = used; } @@ -861,8 +861,8 @@ dpif_flow_get(const struct dpif *dpif, size_t actions_len; if (!error && actionsp) { - actions = (*actionsp)->data; - actions_len = (*actionsp)->size; + actions = ofpbuf_data(*actionsp); + actions_len = ofpbuf_size(*actionsp); } else { actions = NULL; actions_len = 0; @@ -1359,8 +1359,8 @@ dpif_recv(struct dpif *dpif, uint32_t handler_id, struct dpif_upcall *upcall, struct ds flow; char *packet; - packet = ofp_packet_to_string(upcall->packet.data, - upcall->packet.size); + packet = ofp_packet_to_string(ofpbuf_data(&upcall->packet), + ofpbuf_size(&upcall->packet)); ds_init(&flow); odp_flow_key_format(upcall->key, upcall->key_len, &flow); @@ -1563,8 +1563,8 @@ log_execute_message(struct dpif *dpif, const struct dpif_execute *execute, struct ds ds = DS_EMPTY_INITIALIZER; char *packet; - packet = ofp_packet_to_string(execute->packet->data, - execute->packet->size); + packet = ofp_packet_to_string(ofpbuf_data(execute->packet), + ofpbuf_size(execute->packet)); ds_put_format(&ds, "%s: execute ", dpif_name(dpif)); format_odp_actions(&ds, execute->actions, execute->actions_len); if (error) {