> 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.

I understand now after reading the source code, that pbuf_clone() will gather
any "fragmented" puf into one piece.

Is there any guarantee that MSS is not exceeded in the copy ?

Or is it useless to ask, because MSS is never exceeded in any pbuf chain ?
Which would makes sense because pbuf stands for PacketBUFfer and a packet
size cannot exceed ~MSS.

Thanks for making lwIP available and maintaining it :)

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

Reply via email to