Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ipv4.Fragments: use a mutable LRU cache (Lru.M.t instead of mutable cache : Lru.F.t) #418

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Oct 13, 2019

  • is faster (O(1) instead of O(log n))
  • still avoids (due to randomization) collision-based complexity

as suggested by @pqwy in mirage/mirage-nat#28 (comment) (see as well the brief overview of Lru at https://pqwy.github.io/lru/doc/lru/Lru/index.html)

it also simplifies the API of the Fragments module, and makes it easier to use! :)

…ache : Lru.F.t):

- is faster (O(1) instead of O(log n))
- still avoids (due to randomization) collision-based complexity
@hannesm
Copy link
Member Author

hannesm commented Oct 13, 2019

CI failures are due to old (gcc < 4.9) linux distributions trying (and failing) to compile solo5.

@hannesm hannesm mentioned this pull request Oct 13, 2019
@hannesm hannesm merged commit 2201224 into mirage:master Oct 15, 2019
hannesm added a commit to hannesm/opam-repository that referenced this pull request Oct 15, 2019
CHANGES:

* Add ?ttl:int parameter to Udp and Icmp write (mirage/mirage-tcpip#416 @phaer)
* Ipv4.Fragments use a Lru.M.t instead of Lru.F.t (mirage/mirage-tcpip#418 @hannesm)
* Adapt to mirage-protocols 3.1.0 changes (mirage/mirage-tcpip#419 @hannesm)
  - removed IP.set_ip
  - added `Would_fragment to Ip.error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant