demikernel icon indicating copy to clipboard operation
demikernel copied to clipboard

[inetstack] Need Actual IP Layer on Send Side

Open BrianZill opened this issue 2 years ago • 0 comments

We don't currently have an IP layer on the send side. TCP code calls ARP directly to resolve IP to link-layer addresses, composes all the packet headers itself, and submits segments directly to the runtime for sending.

On send, the IP layer is traditionally responsible for two major pieces of functionality: fragmentation and routing. We don't really care about fragmentation at the moment (see Issue demikernel/demikernel#208), as TCP typically sets the don't fragment bit and performs path MTU discovery to determine the correct MSS. However, we don't support path MTU discovery yet either (see Issue #325). But that also isn't important until we support routing, as currently the code is only able to talk to on-link destinations (where the initial MSS exchanged in the SYNs is likely to aways work).

But we do want to support routing, at least in its most basic form of identifying off-link destinations and sending those packets to a default gateway. And we'll eventually want to support path MTU discovery as well.

Therefore, we should add an actual IP send routine that fills in the IP and datalink layer information appropriately (hopefully writing into the same header buffer that TCP allocates for this purpose). This IP layer should hide all the datalink layer address resolution from TCP as well.

BrianZill avatar Mar 29 '22 23:03 BrianZill