[roll] Roll fuchsia [netstack3] Remove TCP Takeable trait

The takeable trait defers to implementers a side-effect of how the TCP
state machine is implemented: moving references around when matching
enums is hard to do while keeping the borrow checker happy.

The existing implementation relies on `Default` impls to leave behind
supposedly unused memory, but there's no real checking that the memory
is not really used, which can cause bugs and hurts evolution. It's
better to have strong type safe statements of everywhere we need to take
things, even if it costs an option check at runtime.

While I'm here, also remove the clone bounds from the buffer providers,
it was doing mostly the same thing as Takeable but in less obvious ways.

Also fixed a bug where `on_icmp_error` would not consider the `Closing`
state. Unfortunately there's no good test coverage for this, but it's
fixed thanks to type steering. Test coverage will be added in a future
change.

Note that the attached bug suggested using `replace-with` instead of
Takeable. `replace-with` has 2 problems that called for a different
solution:

a) Ergonomics for _optionally_ replacing (like in the case of errors)
are very poor.
b) `replace-with` calls for copying the structure out and back in even
in the case where it doesn't get replace, which is the common case when
handling segments, for example. The data copies of these large structs
would've been a bigger performance hit than the Option check within the
new Takeable type.

Original-Fixed: 42082051
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1113413
Original-Revision: 44a95ca0c16d640d97bd4bc0c3f149558da77f86
GitOrigin-RevId: 1bbbf3f021c541db9ebc1b931ce6486f85645244
Change-Id: Ie791f29e0a6bba6fe05e159ad5b5e8b1915d8e7b
1 file changed
tree: e97361aa67cfea0c08d49ab62cbc542f5984979d
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.