8 Commits
Author SHA1 Message Date
Nayana BidariandgVisor bot 90266aa28a Netstack S/R: Mark all the structs in netstack as savable.
Marks the structs in netstack as savable. This does not change or break any
existing behavior as the netstack itself is not savable yet.

PiperOrigin-RevId: 635943481
2024-05-21 15:19:07 -07:00
Kevin KrakauerandgVisor bot 5b4fbd06d8 netstack: remove PacketBufferPtr
PacketBufferPtr is leftover from a dead experiment. Just use *PacketBuffer.

PiperOrigin-RevId: 611531815
2024-02-29 11:10:38 -08:00
Kevin KrakauerandgVisor bot c3da0e4f0d Automated rollback of changelist 531020857
PiperOrigin-RevId: 532863869
2023-05-17 12:09:12 -07:00
Kevin KrakauerandgVisor bot d207727b3a netstack: replace slice-based PacketBufferList with linked list
This is effectively a rollback of cl/450976957. The original motivation never
panned out, and it's easier to work with the lists. They also are easier to
avoid allocations with.

PiperOrigin-RevId: 531020857
2023-05-10 15:43:59 -07:00
Bruno Dal BoandgVisor bot 2b208ac832 Set PktType for all Ethernet Packets
In preparation for improving ARP handling of gratuitous ARPs, set PktType in
regular inbound flow instead of only when handling packet sockets.

PiperOrigin-RevId: 501562322
2023-01-12 07:43:18 -08:00
Kevin KrakauerandgVisor bot 4eca206fa4 netstack: introduce PacketBufferPtr
PiperOrigin-RevId: 479437464
2022-10-06 16:16:54 -07:00
Kevin KrakauerandgVisor bot 657b52920d netstack: replace PacketBufferList with slices
This has no impact on performance. It is in preparation for ticket references
(see final CL in the diffbase chain).

PiperOrigin-RevId: 450976957
2022-05-25 11:45:42 -07:00
Ghanan GowripalanandgVisor bot 4fcd3c77ea (Re)introduce packetsocket link endpoint
The packetsocket link endpoint is used to enable a packet endpoint to
receive packets right before they are sent to the driver for outgoing
packets or right after they are recieved from the driver for incoming
packets.

Before this change, only packets that are sent/received by the
`stack.nic` were delivered to packet endpoints. However, the packet
endpoint should also receive packets that don't reach `stack.nic`.
Such an example can be when the interface is bridged and an incoming
packet is sent out through a sibling bridge port instead of being
delivered to a `stack.nic`.

The packetsocket link endpoint must wrap a link endpoint that
populates the link headers for ingress packets. It should ideally
be placed as low in the link endpoint heirarchy as possible so that
packets are probed as close to device drivers as possible.

https://github.com/google/gvisor/commit/2d9b33c0fd7d812a7296cd71f14c03925f815f28
removed the original packetsocket link endpoint which only allowed
low-level capturing of outbound packets but not inbound packets.

The CL mentioned above is cl/395761629.

PiperOrigin-RevId: 424947620
2022-01-28 13:43:55 -08:00