[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] Question regarding recent change for bug #3031/task #78
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-devel] Question regarding recent change for bug #3031/task #7896 |
Date: |
Wed, 24 May 2017 08:34:04 +0200 |
Axel Lin wrote:
> I have below changes for my device.
> i.e. a dedicated pbuf pool for tx.
>
> I add PBUF_POOL_TX in pbuf_type:
> PBUF_POOL = (PBUF_ALLOC_FLAG_RX | PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS |
> PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL),
> PBUF_POOL_TX = (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS |
> PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL)
Maybe the documentation on the flags isn't clear enough, but this change should
explicitly help to cleanly solve
situations like yours: Your new pool type should use a new SRC_MASK (i.e. not
PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL
but one of
[PBUF_TYPE_ALLOC_SRC_MASK_APP_MIN..PBUF_TYPE_ALLOC_SRC_MASK_APP_MAX]).
As the documentation says, PBUF_ALLOC_FLAG_RX is used as a marker to implement
different levels for TX and RX on the same pool!
However, pbuf_free does indeed not yet support freeing such pbufs, I'll have to
implement that soon.
How do you allocate your new pbuf anyway? Have you changed pbuf_alloc() for
that?
Simon