projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9159ab1
)
Make hwtable_dummy compile again.
author
Ben Pfaff
<blp@nicira.com>
Thu, 14 Aug 2008 23:22:00 +0000
(16:22 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 14 Aug 2008 23:22:00 +0000
(16:22 -0700)
Bug #109.
datapath/hwtable_dummy/hwtable_dummy.c
patch
|
blob
|
history
diff --git
a/datapath/hwtable_dummy/hwtable_dummy.c
b/datapath/hwtable_dummy/hwtable_dummy.c
index fc797caf3913f3aa82b986f6b38e3f6691a9a5d2..d6699b9d118b25f6e2717eae22825c86d692d664 100644
(file)
--- a/
datapath/hwtable_dummy/hwtable_dummy.c
+++ b/
datapath/hwtable_dummy/hwtable_dummy.c
@@
-131,18
+131,19
@@
static int table_dummy_timeout(struct datapath *dp, struct sw_table *swt)
struct sw_flow *flow;
int del_count = 0;
uint64_t packet_count = 0;
struct sw_flow *flow;
int del_count = 0;
uint64_t packet_count = 0;
- int i = 0;
+ uint64_t byte_count = 0;
+ int reason;
mutex_lock(&dp_mutex);
list_for_each_entry (flow, &td->flows, node) {
mutex_lock(&dp_mutex);
list_for_each_entry (flow, &td->flows, node) {
- /* xxx Retrieve the packet
count associated with this entry
- *
xxx and store it in "packet
_count".
+ /* xxx Retrieve the packet
and byte counts associated with this
+ *
entry xxx and store them in "packet_count" and "byte
_count".
*/
*/
- if ((packet_count > flow->packet_count)
- && (flow->max_idle != OFP_FLOW_PERMANENT)) {
+ if (packet_count != flow->packet_count) {
flow->packet_count = packet_count;
flow->packet_count = packet_count;
- flow->timeout = jiffies + HZ * flow->max_idle;
+ flow->byte_count = byte_count;
+ flow->used = jiffies;
}
reason = flow_timeout(flow);
}
reason = flow_timeout(flow);
@@
-154,7
+155,6
@@
static int table_dummy_timeout(struct datapath *dp, struct sw_table *swt)
}
del_count += do_delete(swt, flow);
}
}
del_count += do_delete(swt, flow);
}
- i++;
}
mutex_unlock(&dp_mutex);
}
mutex_unlock(&dp_mutex);