lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #63938] On apprupt tcp interrupten the pcb->next list


From: Maximilian Mayr
Subject: [lwip-devel] [bug #63938] On apprupt tcp interrupten the pcb->next list points to itself
Date: Fri, 17 Mar 2023 09:50:41 -0400 (EDT)

Follow-up Comment #2, bug #63938 (project lwip):


[comment #1 comment #1:]
> This is probably a threading issue, tcp_* API is not thread safe.
> 
> Are you using threads ?
> 
> Are you checking contexts using the LWIP_MARK_TCPIP_THREAD /
LWIP_ASSERT_CORE_LOCKED feature ?
> 
> Common pitfalls for reference:
https://www.nongnu.org/lwip/2_0_x/pitfalls.html

We use a self written interface to LWIP. That ensures everything is called
without beeing interrupted. I added the interfaces


    uint32_t tmp_Context = HItfIhandler::Get()->StartCriticalSection();
    tcp_recved(d->pcb, p->tot_len);
    HItfIhandler::Get()->EndCriticalSection(tmp_Context);

within these critical sections no other interrupts can be executed. And
because we have only a single core there is no direct parallel access. I
Checked it and there is no call to the library without guards. maybe this is
not enough?

(file #54506)

    _______________________________________________________

Additional Item Attachment:

File name: networkInterface.cpp           Size:17 KB
    <https://file.savannah.nongnu.org/file/networkInterface.cpp?file_id=54506>



    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?63938>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/




reply via email to

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