projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
proc-net-compat: Stub out on non-Linux.
[openvswitch]
/
lib
/
learning-switch.c
diff --git
a/lib/learning-switch.c
b/lib/learning-switch.c
index 092274cb57dcc365eed6b47e517858576d21abc7..64639f2c829a38324608113d55438e26bc320035 100644
(file)
--- a/
lib/learning-switch.c
+++ b/
lib/learning-switch.c
@@
-220,13
+220,7
@@
lswitch_run(struct lswitch *sw, struct rconn *rconn)
static void
wait_timeout(long long int started)
{
static void
wait_timeout(long long int started)
{
- long long int now = time_msec();
- long long int timeout = 10000 - (now - started);
- if (timeout <= 0) {
- poll_immediate_wake();
- } else {
- poll_timer_wait(timeout);
- }
+ poll_timer_wait_until(started + 10000);
}
void
}
void
@@
-404,7
+398,7
@@
process_packet_in(struct lswitch *sw, struct rconn *rconn, void *opi_)
pkt_len = ntohs(opi->header.length) - pkt_ofs;
pkt.data = opi->data;
pkt.size = pkt_len;
pkt_len = ntohs(opi->header.length) - pkt_ofs;
pkt.data = opi->data;
pkt.size = pkt_len;
- flow_extract(&pkt, in_port, &flow);
+ flow_extract(&pkt,
0,
in_port, &flow);
if (may_learn(sw, in_port) && sw->ml) {
if (mac_learning_learn(sw->ml, flow.dl_src, 0, in_port)) {
if (may_learn(sw, in_port) && sw->ml) {
if (mac_learning_learn(sw->ml, flow.dl_src, 0, in_port)) {