Relationship between Rx/Tx ring and Skbuff.

Vasu M vasu.kernel at gmail.com
Thu Aug 6 00:52:14 EDT 2020


> On Wed, 05 Aug 2020 11:34:52 -0700, Vasu M said:
>
> > it on a high level, when a packet is received in a NIC, DMA  moves the
> > packets from the NIC frame buffer into the RX ring buffer in the driver.
> A
> > hardware interrupt is then raised and the top half moves the packet to
> the
> > RX ring buffer.
>
> Umm... I would expect the packet to be moved to the RX ring buffer exactly
> once,
> not twice...
>

I am sorry, yes, thats a mistake and it makes sense. If the DMA moves the
packet to the RX ring, the top half just acknowledges the interrupt and
schedules the softirq to drain the packets from RX. Subsequently, after the
packets go through sk_buff, they get queued in the socket recv buffer and
get to user space memory finally? I suppose I am only scratching the
surface leaving so many details.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20200805/ffc29308/attachment.html>


More information about the Kernelnewbies mailing list