X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fdpif.c;h=41b8eb7e66eec1e0e7ca8084b2d2e97ed89ac9f7;hb=cfc50ae514f805dcd9c14589f21158185424daf6;hp=dbf1c101d5689f63145affb556c02a7898da9e12;hpb=df1e5a3bc7d772237de0ca19663e4a5a9b8f403b;p=sliver-openvswitch.git diff --git a/lib/dpif.c b/lib/dpif.c index dbf1c101d..41b8eb7e6 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; @@ -1108,7 +1108,7 @@ struct dpif_execute_helper_aux { * meaningful. */ static void dpif_execute_helper_cb(void *aux_, struct ofpbuf *packet, - const struct pkt_metadata *md, + struct pkt_metadata *md, const struct nlattr *action, bool may_steal OVS_UNUSED) { struct dpif_execute_helper_aux *aux = aux_; @@ -1133,6 +1133,8 @@ dpif_execute_helper_cb(void *aux_, struct ofpbuf *packet, case OVS_ACTION_ATTR_SET: case OVS_ACTION_ATTR_SAMPLE: case OVS_ACTION_ATTR_UNSPEC: + case OVS_ACTION_ATTR_RECIRC: + case OVS_ACTION_ATTR_HASH: case __OVS_ACTION_ATTR_MAX: OVS_NOT_REACHED(); } @@ -1358,8 +1360,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); @@ -1562,8 +1564,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) {