[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #29271] Application can't re-use pbufs
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [bug #29271] Application can't re-use pbufs |
Date: |
Sat, 20 Mar 2010 10:40:30 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2) Gecko/20100115 Firefox/3.6 |
URL:
<http://savannah.nongnu.org/bugs/?29271>
Summary: Application can't re-use pbufs
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: goldsimon
Submitted on: Sa 20 Mär 2010 10:40:29 GMT
Category: pbufs
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: CVS Head
_______________________________________________________
Details:
This has been mentioned multiple times, especially regarding ARP-queueing and
zero-copy netif drivers:
Currently, we have no clear documentation whether an application may reuse a
pbuf passed to udp_send/raw_send. I had the impression it was allowed (which
is the reason ARP-queueing has to copy even single-PBUF_RAM-pbufs when
queueing), but that isn't really correct, as the pbuf's payload is change when
udp_send returns (i.e. from the UDP payload to the ethernet header). After
all, ARP-queueing behaves just like a really slow zero-copy-MAC: it has a
reference on the pbuf until it is sent.
If we wanted to allow this we would:
a) have to limit reusing to p->ref == 1 (if > 1, the pbuf is still queued
somewhere)
b) somehow set back the payload pointer to the original status, which is kind
of hard when the pbuf is queued for sending (cannot set the payload pointer
back while returning from the various send layers since the pbuf might still
be queued).
To sum it up, I think we need to update the documentation so that an
application is not allowed to reuse pbufs passed to send functions. This also
allows easier implementation of TX-zero-copy netif drivers.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?29271>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #29271] Application can't re-use pbufs,
Simon Goldschmidt <=