Skip to content

Commit a8be52d

Browse files
brunowonkaCQ Bot
authored andcommitted
[netstack3] Encode API compatibility with NS2
Explicitly encode the design decision to maintain full API compatibility with Netstack2. This encodes the thus-far informal decision of Netstack3 being a drop in replacement for Netstack2, it is not a new decision. Change-Id: I0c946a8093faa8f823a57c8ae28608f1feb7d98a Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/707975 Fuchsia-Auto-Submit: Bruno Dal Bo <brunodalbo@google.com> Reviewed-by: Ghanan Gowripalan <ghanan@google.com> Reviewed-by: Zeling Feng <zeling@google.com> Reviewed-by: Alex Konradi <akonradi@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Reviewed-by: Jeff Martin <martinjeffrey@google.com>
1 parent 24bf214 commit a8be52d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/connectivity/network/netstack3/docs/TENETS_AND_DESIGN_DECISIONS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,41 @@ present in `fuchsia.net.interfaces/Watcher`,
249249
`fuchsia.net.neighbor/EntryIterator`, and a hypothetical
250250
`fuchsia.net.routes/Watcher`.
251251

252+
## API compatibility with Netstack2
253+
254+
Netstack3 must be fully API compatible with Netstack2 and, when it comes the
255+
time to transition to it, we must be able to drop it in the network realm
256+
without any change to API clients.
257+
258+
### Why?
259+
260+
A drop-in replacement means we can iteratively assert proper operation and
261+
feature-completeness without carrying the burden of maintaining parallel client
262+
implementations. Similarly, it decreases the cost of parallel test cases and
263+
tooling. The shared test batteries also increase confidence since they run
264+
against the production-ready Netstack2.
265+
266+
Furthermore, it allows an incremental approach to enabling Netstack3 in specific
267+
product configurations, possibly accelerating real-world adoption before it is
268+
at full parity with Netstack2.
269+
270+
### How?
271+
272+
As Netstack3 progresses towards feature-completeness we will iteratively enable
273+
[FIDL integration] and [POSIX][posix-tests] tests. In the event we discover
274+
shortcomings in the API surface, we *may* update existing APIs, but Netstack2's
275+
implementation must be carried forward with it.
276+
277+
Note that `inspect` data is not considered part of the API surface and is not
278+
part of this contract. Netstack3 is not expected to generate fully compatible
279+
debugging or metrics information.
280+
252281
[`fuchsia.net.interfaces/Watcher`]: https://fuchsia.dev/reference/fidl/fuchsia.net.interfaces?hl=en#Watcher
253282
[DAD implementation]: https://fuchsia-review.googlesource.com/c/fuchsia/+/648202
254283
[Originally in Netstack3]: https://cs.opensource.google/fuchsia/fuchsia/+/07b825aab40438237b2c47239786aae08c179139:src/connectivity/network/netstack3/
255284
[subnet-router anycast address]: https://datatracker.ietf.org/doc/html/rfc4291#section-2.6.1
256285
[RFC 6724 Section 2.2]: https://datatracker.ietf.org/doc/html/rfc6724#section-2.2
257286
[RFC 6724 Section 5]: https://datatracker.ietf.org/doc/html/rfc6724#section-5
258287
[RFC 6724 Section 6]: https://datatracker.ietf.org/doc/html/rfc6724#section-6
288+
[FIDL integration]: /src/connectivity/network/tests/fidl
289+
[posix-tests]: /src/connectivity/network/tests/bsdsocket_test.cc

0 commit comments

Comments
 (0)