This fixes missing netflow flows in
"ofproto-dpif - NetFlow flow expiration" tests.
Acked-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Conflicts:
ofproto/ofproto-dpif-upcall.c
struct ofpbuf xout_actions, *actions;
uint64_t slow_path_buf[128 / 8];
struct xlate_out xout, *xoutp;
struct ofpbuf xout_actions, *actions;
uint64_t slow_path_buf[128 / 8];
struct xlate_out xout, *xoutp;
+ struct netflow *netflow;
struct flow flow, udump_mask;
struct ofproto_dpif *ofproto;
struct dpif_flow_stats push;
struct flow flow, udump_mask;
struct ofproto_dpif *ofproto;
struct dpif_flow_stats push;
ok = false;
xoutp = NULL;
actions = NULL;
ok = false;
xoutp = NULL;
actions = NULL;
/* If we don't need to revalidate, we can simply push the stats contained
* in the udump, otherwise we'll have to get the actions so we can check
/* If we don't need to revalidate, we can simply push the stats contained
* in the udump, otherwise we'll have to get the actions so we can check
}
error = xlate_receive(udpif->backer, NULL, ukey->key, ukey->key_len, &flow,
}
error = xlate_receive(udpif->backer, NULL, ukey->key, ukey->key_len, &flow,
- NULL, &ofproto, NULL, NULL, NULL, &odp_in_port);
+ NULL, &ofproto, NULL, NULL, &netflow, &odp_in_port);
if (error) {
goto exit;
}
if (error) {
goto exit;
}
+ if (netflow) {
+ if (!ok) {
+ netflow_expire(netflow, &flow);
+ netflow_flow_clear(netflow, &flow);
+ }
+ netflow_unref(netflow);
+ }
ofpbuf_delete(actions);
xlate_out_uninit(xoutp);
return ok;
ofpbuf_delete(actions);
xlate_out_uninit(xoutp);
return ok;