u16_t offset;/*有效数据起始偏移位置*/s32_t rem_len;/* remaining length 剩余长度*/LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE,("pbuf_alloc(length = %"U16_F")\n", length);/* determine header offset */seitch(layer) {/* pbuf的层次 */case PBUF_TRANSPORT:/* add room for transport (of...
void pbuf_realloc(struct pbuf *p, u16_t size); u8_t pbuf_header(struct pbuf *p, s16_t header_size); void pbuf_ref(struct pbuf *p); u8_t pbuf_free(struct pbuf *p); u8_t pbuf_clen(struct pbuf *p); 等,见: 《嵌入式网络那些事-LwIP协议深度剖析与实战演练》,第7章有比较清楚的解释pb...
memp_free(MEMP_PBUF, p); /* type == PBUF_RAM */ } else { mem_free(p); } } count++; //检查下一个是否也需要释放 p = q; } else { //不为0,退出释放 LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, ref))...
void pbuf_realloc( ); u8_t pbuf_header( ); void pbuf_ref( ); void pbuf_ref_chain( ); u8_t pbuf_free( ); u8_t pbuf_clen( ); void pbuf_cat( ); void pbuf_chain( ); struct pbuf *pbuf_dechain( ); err_t pbuf_copy( ); u16_t pbuf_copy_partial( );...
Once modified the pbuf_header function in order to avoid the unlucky sequence of instruction that "fake" the cache controller (just add a dummy read operation before the return statement) we never got the error anymore. Translate 0 Kudos Copy link Reply Altera_Forum Honored Contributor II ...
pbuf_free(a); } END_TESTSTART_TEST(test_pbuf_split_64k_on_small_pbufs) { struct pbuf *p, *rest=NULL; @@ -303,6 +350,7 @@ pbuf_suite(void) TESTFUNC(test_pbuf_alloc_zero_pbufs), TESTFUNC(test_pbuf_copy_zero_pbuf), TESTFUNC(test_pbuf_copy_unmatched_chains), TESTFUNC(test_pbuf...
Once modified the pbuf_header function in order to avoid the unlucky sequence of instruction that "fake" the cache controller (just add a dummy read operation before the return statement) we never got the error anymore. Translate 0 Kudos Copy link Reply Altera_Forum Honored Contributor II ...
room for IP layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN;break;case PBUF_LINK:/* add room for link layer header */ offset = PBUF_LINK_HLEN;break;case PBUF_RAW:offset = 0;break;default:LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0);return NULL;} switch (type) { ...
Since the crash was inside the FreeRtos code, try defining a function for configASSERT (just try searching for it in the FreeRtos source, if you don't know what i mean, just ask again) I was planning anyway to submit a pull request on this, since it's a very useful debugging tool....
/* add room for IP layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN; break; case PBUF_LINK: /* add room for link layer header */ offset = PBUF_LINK_HLEN; break; case PBUF_RAW: offset = 0; break; default: LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); ...