lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Zero-copy TX


From: Mason
Subject: [lwip-users] Zero-copy TX
Date: Fri, 28 Oct 2011 17:49:45 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110928 Firefox/7.0.1 SeaMonkey/2.4.1

Simon wrote:

> After looking at the code, the cleaner solution is to define
> MEM_LIBC_MALLOC to 1 and then define mem_malloc (etc.) to your
> own functions (see mem.h in the upper half).

I've started looking at the TX side, and I don't understand
your suggestion.

My driver manages TX buffers (within a larger control struct,
to be able to manage asynchronous operations).

I don't think it's possible to use mem_malloc as a packet
buffer allocator, as there are other types of uses, e.g.

  dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp));
  autoip = (struct autoip *)mem_malloc(sizeof(struct autoip));

What I'd like is to be able to "redirect" pbuf_alloc to use
my buffer allocator, but the pbuf struct and the payload buffer
would not be contiguous, which violates the implicit assumptions
of PBUF_RAM pbufs, IIUC.

For the record, I've defined
MEM_LIBC_MALLOC=1
MEMP_MEM_MALLOC=0

-- 
Regards.



reply via email to

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