projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1e98da
)
sflow: Set proper output port number for dropped packets.
author
Ben Pfaff
<blp@nicira.com>
Sat, 9 Jan 2010 00:10:01 +0000
(16:10 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Sat, 9 Jan 2010 00:10:01 +0000
(16:10 -0800)
Based on advice from Neil McKee.
ofproto/ofproto-sflow.c
patch
|
blob
|
history
diff --git
a/ofproto/ofproto-sflow.c
b/ofproto/ofproto-sflow.c
index 29f7e34587cf903405ac23cb89b3b983ec5a1b41..cf63c65501d5cb1168cff978133efd636f7de13c 100644
(file)
--- a/
ofproto/ofproto-sflow.c
+++ b/
ofproto/ofproto-sflow.c
@@
-535,7
+535,11
@@
ofproto_sflow_received(struct ofproto_sflow *os, struct odp_msg *msg)
break;
}
}
- if (n_outputs > 1 || !fs.output) {
+ if (!n_outputs) {
+ /* This value indicates that the packet was dropped for an unknown
+ * reason. */
+ fs.output = 0x40000000 | 256;
+ } else if (n_outputs > 1 || !fs.output) {
/* Setting the high bit means "multiple output ports". */
fs.output = 0x80000000 | n_outputs;
}