git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofproto-dpif-upcall: Expire netflow flow when revalidate_ukey failed
[sliver-openvswitch.git]
/
ofproto
/
ofproto-dpif-upcall.c
diff --git
a/ofproto/ofproto-dpif-upcall.c
b/ofproto/ofproto-dpif-upcall.c
index
de72a22
..
938cfde
100644
(file)
--- a/
ofproto/ofproto-dpif-upcall.c
+++ b/
ofproto/ofproto-dpif-upcall.c
@@
-1332,6
+1332,7
@@
revalidate_ukey(struct udpif *udpif, struct udpif_flow_dump *udump,
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;
@@
-1345,6
+1346,7
@@
revalidate_ukey(struct udpif *udpif, struct udpif_flow_dump *udump,
ok = false;
xoutp = NULL;
actions = NULL;
ok = false;
xoutp = NULL;
actions = NULL;
+ netflow = 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
@@
-1372,7
+1374,7
@@
revalidate_ukey(struct udpif *udpif, struct udpif_flow_dump *udump,
}
error = xlate_receive(udpif->backer, NULL, ukey->key, ukey->key_len, &flow,
}
error = xlate_receive(udpif->backer, NULL, ukey->key, ukey->key_len, &flow,
- &ofproto, NULL, NULL,
NULL
, &odp_in_port);
+ &ofproto, NULL, NULL,
&netflow
, &odp_in_port);
if (error) {
goto exit;
}
if (error) {
goto exit;
}
@@
-1421,6
+1423,13
@@
revalidate_ukey(struct udpif *udpif, struct udpif_flow_dump *udump,
ok = true;
exit:
ok = true;
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;