low_level_output() asserting with "No chained buffers"

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
BeOl_4470266
Level 3
Level 3
25 replies posted 10 replies posted 10 sign-ins

Hello,

I've noticed that, when trying to send data continuously as fast as possible for several minutes, I end up hitting the following assertion "No chained buffers".

 

static err_t low_level_output( struct netif *netif, /*@only@*/ struct pbuf *p )
{
    /*@-noeffect@*/
    UNUSED_PARAMETER( netif );
    /*@+noeffect@*/

    if ( ( (wiced_interface_t) netif->state  == WICED_ETHERNET_INTERFACE ) ||
         ( wwd_wifi_is_ready_to_transceive( (wwd_interface_t) netif->state ) == WWD_SUCCESS ) )
    {
        /* Take a reference to this packet */
        pbuf_ref( p );

        LWIP_ASSERT( "No chained buffers", ( ( p->next == NULL ) && ( ( p->tot_len == p->len ) ) ) );
        wwd_network_send_ethernet_data( p, (wwd_interface_t) netif->state );

        LINK_STATS_INC( link.xmit );

        return (err_t) ERR_OK;
    }
    else
    {
        /* Stop lint warning about packet not being freed - it is not being referenced */ /*@-mustfree@*/
        return (err_t) ERR_INPROGRESS; /* Note that signalling ERR_CLSD or ERR_CONN causes loss of connectivity on a roam */
        /*@+mustfree@*/
    }
}

 

  

Do you know what sort of problem would lead to that?

Thanks for your help,

Ben

0 Likes
1 Solution
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

The fact is lwIP can chain buffers (and you cannot avoid lwIP to do that).
WWD does not support chained buffers, so if you hit this assertion it's clearly a bug.
The WWD needs to take care of handling chained buffers.

View solution in original post

9 Replies