[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] Question regarding recent change for bug #3031/task #7896
From: |
Axel Lin |
Subject: |
[lwip-devel] Question regarding recent change for bug #3031/task #7896 |
Date: |
Wed, 24 May 2017 09:54:02 +0800 |
Hi Simon,
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)
After update to current git tree,
I found below test in pbuf_free() won't work:
if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL) {
if (p->type_internal & PBUF_ALLOC_FLAG_RX) {
memp_free(MEMP_PBUF_POOL, p);
} else {
memp_free(MEMP_PBUF_POOL_TX, p);
}
This is because p->type_internal is u8_t but PBUF_ALLOC_FLAG_RX is 0x0100.
(it works if I define PBUF_ALLOC_FLAG_RX to 0x20)
Any suggestion to address this issue?
ps. I know the problem is not in standard lwip code, but in my changes
on top of the standard code.
However, the same question apply to "how do you test
PBUF_ALLOC_FLAG_RX flag if type_internal is u8_t).
Thanks,
Axel
- [lwip-devel] Question regarding recent change for bug #3031/task #7896,
Axel Lin <=