> The whole point of LWIP_NETIF_TX_SINGLE_PBUF was that the stack tries to do 
> its best.
> A driver should still be prepared to get chained pbufs and copy them into one 
> piece.
> 
> LWIP_NETIF_TX_SINGLE_PBUF should be a performance optmization to e.g. prevent 
> copying
> data into a chained pbuf when we know it has to be copied again later to 
> create a pbuf
> in one piece. Where this doesn't hurt much, I don't currently see a problem 
> to make the
> driver do this.
> 
> You should be able to just use pbuf_clone() if p->next != NULL.
> 
> Of course I'm open to fix the possibly remaining chained pbuf issues, but I 
> can't
> afford the time for this currently.

OK, thanks, I did not know all that.  If there is a solution, there's no
need for source update (or maybe some words in opt.h :).

So I would do that, but I can't find any reference to pbuf_clone() in sources 
(grep) nor in doc:
        http://www.nongnu.org/lwip/2_0_x/globals_func_p.html

Let's say I get a chained pbuf with the first chunk of size <=MSS and a
pbuf->next!=NULL, what would be the semantic of pbuf_clone() ?
Would it cut it into two distinct pbuf, with ->next==NULL at least for the 
first ?

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to