Skip to content

Only outbound hit time is used in LFT expiry #788

@FelixMcFelix

Description

@FelixMcFelix

fn expire_flows(&mut self, now: Moment) {
// XXX The two sides can have different traffic patterns and
// thus one side could be considered expired while the other
// is active. You could have one side seeing packets while the
// other side is idle; so what do we do? Currently this impl
// bases expiration on the outgoing side only, but expires
// both entries (just like it's imperative to add an entry as
// a pair, it's also imperative to remove an entry as a pair).
// Perhaps the two sides should share a single moment (though
// that would required mutex or atomic). Or perhaps both sides
// should be checked, and if either side is expired the pair
// is considered expired (or active). Maybe this should be
// configurable?
let to_expire =
self.ft_out.expire_flows(now, LftOutEntry::extract_pair);
for flow in to_expire {
self.ft_in.expire(&flow);
}
self.count = self.ft_out.num_flows();

Inbound flow hit times are not used in any way for expiry. As the comment here outlines, these need to be held on a shared atomic Moment or the expiry logic should inspect both halves.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions