[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #50064] ARP reply fails with PBUF_REF

From: Daniel Elstner
Subject: [lwip-devel] [bug #50064] ARP reply fails with PBUF_REF
Date: Tue, 17 Jan 2017 10:27:20 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36


                 Summary: ARP reply fails with PBUF_REF
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: danielk
            Submitted on: Tue 17 Jan 2017 11:27:19 AM CET
                Category: ARP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head



After implementing zero-copy DMA in my Ethernet driver with custom PBUF_REF
pbufs, ARP replies stopped working.

It turns out that etharp_input() re-uses the incoming pbuf for ARP replies.
However, this leads to an error later in ethernet_output() because
pbuf_header() refuses to adjust the header size for PBUF_REF pbufs.

As a quick hack, I replaced the pbuf_header() call in ethernet_output() by
pbuf_header_force() and it worked. However, this essentially removes the error
checking for pbufs from any other source, so it is not a proper solution.
Also, it relies on the Ethernet driver to implicitly copy PBUF_REF pbufs to
avoid potentially deadlocking the input queue.

So I think it would be best if etharp_input() itself would create the new
pbuf. Either always (simplicity), or only for PBUF_REF if the small allocation
is a concern.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]