Closed ivan4th closed 2 years ago
A bit of explanation:
upf.c
to update the flow counters
https://github.com/travelping/upg-vpp/blob/56b2959241ebd859d5cf07c77f4c5f8180f2e539/upf/upf.c#L501-L522O(n)
, n
being the number of
flows per session. We could use a doubly-linked list instead, so as to
have O(1)
during flow deletion, but that would further enlarge the
flowtable entries, decreasing performance. (Alternative, maybe
implement later: keep flow list linkage as a separate vector) Thepfcp_free_session
, all of the flows belonging to it are
forcibly removed:
https://github.com/travelping/upg-vpp/blob/56b2959241ebd859d5cf07c77f4c5f8180f2e539/upf/upf_pfcp.c#L1140-L1151
This will invoke FLOW_EVENT_REMOVE
and FLOW_EVENT_UNLINK
events
for each flow, making sure IPFIX reports are sent and proxy
connections are dealt with.
This is needed to avoid losing IPFIX reports for the flows that still exist when a PFCP session is deleted. As part of the change, flowtable hooks are replaced with flowtable events which are more flexible (multiple handlers per event). Possible inconsistencies related to flows that don't correspond to any active session are now being avoided.