lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Support for raw Ethernet packets?


From: Grant Edwards
Subject: Re: [lwip-users] Support for raw Ethernet packets?
Date: Mon, 22 Nov 2021 19:36:32 -0000 (UTC)
User-agent: slrn/1.0.3 (Linux)

On 2021-11-22, goldsimon@gmx.de <goldsimon@gmx.de> wrote:
> Am 22.11.2021 um 18:55 schrieb Grant Edwards:
>>
>> Does lwIP support applications that need to send/receive raw Ethernet
>> packets?

> Not, this is not implemented yet:

Thanks, that's what I thought.

> while it would probably be easy to add that, it seemed overkill for
> the systems using lwIP in the past: every matching packet needs to
> be copied (unless noone else is interested in the pbuf) and sent to
> another thread.

When I've added support for this to other systems in the past, I
always assumed that there is only one consumer for the receive packets
for any particular Ethernet protocol number. Thus zero-copy send and
receive were possible. The code that accepted rx packets from the
Ethernet drivers (which ran in an interrupt context) placed packets
that matched the requested Ethernet protocol number(s) into separate
receive queues from which the application threads could read
them. Technically, mutliple threads could have read from one of those
receive queues, but that was never how it worked in real applications.

> In the past, the answer to request like this was to add a hook into
> input processing to check for matching packets. However, this then
> runs in the tcpip_thread, not in an application thread.
>
> That's not to say I would mind accepting a patch that implemented
> this, it just hasn't really been requested yet...

I don't need it for the new projects where we plan on using LWIP.

There are some existing products that would need it should we decide
we need to migrate from our older (now unsupported) RTOS+stack to
something like FreeRTOS+lwIP.

--
Grant




reply via email to

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