On 1/27/06, John Smith <[EMAIL PROTECTED]> wrote:
> Hi Jesse,
>
> I have some difficulties understanding the meaning of the following code
> fragments in e1000 driver. It seems this is for packet-split and non
> packet-split respectively. But could you shed more lights on the logic
> behind this code fragment?

This isn't for packet split per-se, as thats a term we use when the
hardware actually does layer 3 processing of the packet and puts the
header in a seperate buffer from the data.  See e1000_clean_rx_irq_ps

Now, what this code is doing is effectively fixing our memory
allocations when using jumbo frames (so we don't allocate 32KB per
descriptor to do 9k jumbo frames).  The hardware simply fills each 2k
descriptor with incoming data, and when that 2k is full it moves to
the next descriptor.  For the last descriptor the EOP (end of packet)
bit is set.  This code just chains each descriptor together into a
chain of skbs for indication to the stack.

say you're using ifconfig eth0 mtu 9000

descriptor 1 gets 2k
  - driver sets rx_skb_top

descriptor 2 gets 2k
descriptor 3 gets 2k
descriptor 4 gets 2k
 - driver notices skb top set, and appends skb

descriptor 5 gets 1k (or so)
 - driver notices skb top set, and appends skb
 - driver sees EOP and indicates packet to stack
 - reset state machine and continue.

Jesse
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to