I am working on a change to the IBM 405 Ethernet driver. The Ethernet
allows us to define buffer sizes smaller than the MTU size. If a packet
comes in larger than the buffer size, it will be received across multiple
buffers. The current driver is a zero copy driver, it uses buffers of the
MTU size, where we allocate a SKB for each descriptor and have the
descriptor buffer pointer point to the SKB's data buffer. This allows the
driver to avoid memory to memory moves.
I would like to implement the same zero copy but I want to use smaller
buffers. I would like to have each descriptor point to the buffer area of a
separate SKB. When a large packet is received and it is received into
multiple SKB's. I would like to pass these multiple SKBs to the stack. I
want to avoid using memcopies. I think frag_list is what I want to use.
If frag_list are what I want:
Will frag_list work when receiving a packet and passing it to the stack? I
only see drivers using frag_list for transmit.
If it will work, what functions should I use to put the multiple skb's into
a frag_list? Can you point me to an example or any documentation?
Any pointer will be greatly appreciated.
Thanks,
Mark K. Wisner
Advisory Software Engineer
IBM Microelectronics
3039 Cornwallis Rd
RTP, NC 27709
Tel. 919-254-7191
Fax 919-543-7575
|