X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto.c;h=e691bb93d5497066bff9756ff7f76b8a1c9fac34;hb=72310b041cfa7d8e2ee5fb585348223ac7c22497;hp=19e7091731ca29a24ff49cda168c81069c0a4dc0;hpb=1680d3d7e3813258f5050bb8cb10a2543c60e549;p=sliver-openvswitch.git diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 19e709173..e691bb93d 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -307,6 +307,7 @@ static size_t allocated_ofproto_classes; struct ovs_mutex ofproto_mutex = OVS_MUTEX_INITIALIZER; unsigned ofproto_flow_limit = OFPROTO_FLOW_LIMIT_DEFAULT; +unsigned ofproto_max_idle = OFPROTO_MAX_IDLE_DEFAULT; size_t n_handlers, n_revalidators; @@ -697,6 +698,14 @@ ofproto_set_flow_limit(unsigned limit) ofproto_flow_limit = limit; } +/* Sets the maximum idle time for flows in the datapath before they are + * expired. */ +void +ofproto_set_max_idle(unsigned max_idle) +{ + ofproto_max_idle = max_idle; +} + /* If forward_bpdu is true, the NORMAL action will forward frames with * reserved (e.g. STP) destination Ethernet addresses. if forward_bpdu is false, * the NORMAL action will drop these frames. */