[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Zero Copy Ethernet interface
From: |
Paul Black |
Subject: |
[lwip-users] Zero Copy Ethernet interface |
Date: |
Wed, 19 Sep 2007 14:42:55 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070728) |
I'm trying to get to grips with lwip and one of the things I'm looking
at is how data moves between the stack and the ethernet interface.
For input:
The examples ethernetif.c has a function called low_level_input which
copies data from somewhere into a chain of pbufs that are then passed up.
I'm thinking that I can do something like the following:
- Allocate several pbufs in advance for incoming packets: can I
allocate a single pbuf as I would need to dechain them otherwise. How
do I allocate a pbuf of maximum size or find the maximum space in a
single pbuf?
- When the packet comes in, find out how many pbufs were used - I'm
guessing I can then chain them together again with pbuf_cat()?
- Pass this to wherever.
For output:
I get passed a chain of pbufs:
- Because I want to hang on to these until an interrupt has fired, I
guess I need to call pbuf_ref()?
- It might make my code easier for tidying up after transmission if I
split the chain into its constituent parts - for this I would call
pbuf_dechain()?
Am I thinking along the right lines?
Cheers
--
Paul
- [lwip-users] Zero Copy Ethernet interface,
Paul Black <=
- Re: [lwip-users] Zero Copy Ethernet interface, Jonathan Larmour, 2007/09/19
- Re: [lwip-users] Zero Copy Ethernet interface, Andrew Dennison, 2007/09/19
- RE: [lwip-users] Zero Copy Ethernet interface, Goldschmidt Simon, 2007/09/20
- Re: [lwip-users] Zero Copy Ethernet interface, Andrew Dennison, 2007/09/20
- RE: [lwip-users] Zero Copy Ethernet interface, Goldschmidt Simon, 2007/09/20
- Re: [lwip-users] Zero Copy Ethernet interface, Jonathan Larmour, 2007/09/20
- RE: [lwip-users] Zero Copy Ethernet interface, Goldschmidt Simon, 2007/09/20
- Re: [lwip-users] Zero Copy Ethernet interface, Andrew Dennison, 2007/09/20
Re: [lwip-users] Zero Copy Ethernet interface, Paul Black, 2007/09/20