]> git.proxmox.com Git - ovs.git/commit
upcall: Replace ukeys for deleted flows.
authorJoe Stringer <joe@ovn.org>
Wed, 31 Aug 2016 18:06:05 +0000 (11:06 -0700)
committerJoe Stringer <joe@ovn.org>
Thu, 1 Sep 2016 20:21:59 +0000 (13:21 -0700)
commit67f08985d769468b112cb40a923cd75f3ee2c01a
tree51112c91c49306179d5b7c7ab9d514234ad3c376
parent54ebeff4c03d83fd8b8a61256af95524e757f640
upcall: Replace ukeys for deleted flows.

If a revalidator dumps/revalidates a flow during the 'dump' phase,
resulting in the deletion of the flow, then the ukey state moves into
UKEY_EVICTED, and the ukey is kept around until the 'sweep' phase. The
ukey is kept around to ensure that cases like duplicated dumps from the
datapaths do not result in multiple attribution of the same stats.

However, if an upcall for this flow comes for a handler between the
revalidator 'dump' and 'sweep' phases, the handler will lookup the ukey
and find that the ukey exists, then skip installing a new flow entirely.
As a result, for this period all traffic for the flow is slowpathed.
If there is a lot of traffic hitting this flow, then it will all be
handled in userspace until the 'sweep' phase. Eventually the
revalidators will reach the sweep phase and delete the ukey, and
subsequently the handlers should install a new flow.

To reduce the slowpathing of this traffic during flow table transitions,
allow the handler to identify this case during miss upcall handling and
replace the existing ukey with a new ukey. The handler will then be able
to install a flow for this traffic, allowing the traffic flow to return
to the fastpath.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
ofproto/ofproto-dpif-upcall.c