fragmentation failure with stm32 if length > 1704

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

fragmentation failure with stm32 if length > 1704

ranran
Hello,

I use a simple echo udp example for STM32 Hal , with stm32h743 EVAL.
I encounter exception (it shows as unaligned exception, but the
address is not anything we allocated.

This failure happen if I increase the packet size from 1704 to 1744 !

tcip_thread->tcip_timeouts_mbox_fetch->sys_check_timeouts->lwip_cyclic_timer->ip_reass_timr->ip_reass_free_complete_datagram
exception error of type unaligned access.

I tried to increase various  size in lwipopts.h but nothing helps.

Is it stm32 issue ?
Any idea ?

Thanks,
ranran

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: fragmentation failure with stm32 if length > 1704

goldsimon@gmx.de
Am 11.12.2019 um 18:55 schrieb Ranran:

> Hello,
>
> I use a simple echo udp example for STM32 Hal , with stm32h743 EVAL.
> I encounter exception (it shows as unaligned exception, but the
> address is not anything we allocated.
>
> This failure happen if I increase the packet size from 1704 to 1744 !
>
> tcip_thread->tcip_timeouts_mbox_fetch->sys_check_timeouts->lwip_cyclic_timer->ip_reass_timr->ip_reass_free_complete_datagram
> exception error of type unaligned access.
>
> I tried to increase various  size in lwipopts.h but nothing helps.
>
> Is it stm32 issue ?
> Any idea ?

Doesn't ring a bell. Last time I tested, fragmentation/reassembly worked
just fine, so I expect this is a platform/config specific issue.

Regards,
Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: fragmentation failure with stm32 if length > 1704

Harrold Spier

It might be a platform issue. I had a fragmentation problem using the standard CubeMx stm32h7 ethernet driver some time ago, but the error message was different. It was easy reproducible by sending large sized pings. See for more info:

I may have found an error in the STM32H7 Ethernet Driver when receiving multiple frames

(Click on the link More Answers at the bottom to complete conversation)

Regards,
Harrold
 

On Wed, Dec 11, 2019 at 10:25 PM [hidden email] <[hidden email]> wrote:
Am 11.12.2019 um 18:55 schrieb Ranran:
> Hello,
>
> I use a simple echo udp example for STM32 Hal , with stm32h743 EVAL.
> I encounter exception (it shows as unaligned exception, but the
> address is not anything we allocated.
>
> This failure happen if I increase the packet size from 1704 to 1744 !
>
> tcip_thread->tcip_timeouts_mbox_fetch->sys_check_timeouts->lwip_cyclic_timer->ip_reass_timr->ip_reass_free_complete_datagram
> exception error of type unaligned access.
>
> I tried to increase various  size in lwipopts.h but nothing helps.
>
> Is it stm32 issue ?
> Any idea ?

Doesn't ring a bell. Last time I tested, fragmentation/reassembly worked
just fine, so I expect this is a platform/config specific issue.

Regards,
Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: fragmentation failure with stm32 if length > 1704

stuart200471
In reply to this post by ranran
Hello Ranran,
   When I have experienced an "exception error of type unaligned access",
this has been due to a stack over flow.
Try increasing the amount of ram you have allocated to the stack.
Regards
Stuart



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: fragmentation failure with stm32 if length > 1704

ranran
Hello,

We see the using packets above ~6000 bytes, lwip get into  unaligned access
exception (it first does not respond to the ~6000 packet from PC, and then
after several seconds , or after sending a small packet again, it gets into
this exception:
->lwip_cyclic_timer
->ip_reass_tmr
->ip_reass_free_complete_datagram
->iprh = (struct ip_reass_helper *)p->payload;
Is this functional issue a chip issue or lwip issue ?

I am using latest CubeH7 (ver 1.5) , which also includes the udp echo
example.

Thing I've tried:
1. CubeH7 1.5 comes with lwip 2.0.3, I've tried to upgrade to lwip 2.1.2,
but it did not change result.
2. I have tried to increase PBUF various size, but it did not help, I am not
sure why.

This issue can very easily be reproduced with eval or nucleo board for
stm32h7.

Thank you for any idea,
Ran





--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: fragmentation failure with stm32 if length > 1704

Zachar Papkov
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */

 

&sharppragma location=0x30040060
Increase heap size DMARxDscrTab

On Sun, Dec 15, 2019, 16:52 ranran <[hidden email]> wrote:
Hello,

We see the using packets above ~6000 bytes, lwip get into  unaligned access
exception (it first does not respond to the ~6000 packet from PC, and then
after several seconds , or after sending a small packet again, it gets into
this exception:
->lwip_cyclic_timer
->ip_reass_tmr
->ip_reass_free_complete_datagram
->iprh = (struct ip_reass_helper *)p->payload;
Is this functional issue a chip issue or lwip issue ?

I am using latest CubeH7 (ver 1.5) , which also includes the udp echo
example.

Thing I've tried:
1. CubeH7 1.5 comes with lwip 2.0.3, I've tried to upgrade to lwip 2.1.2,
but it did not change result.
2. I have tried to increase PBUF various size, but it did not help, I am not
sure why.

This issue can very easily be reproduced with eval or nucleo board for
stm32h7.

Thank you for any idea,
Ran





--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: fragmentation failure with stm32 if length > 1704

ranran
Hi,

I've solved this issue after increasing size as was suggested here. Thanks !
(The issue was also posted here:
https://community.st.com/s/question/0D50X0000BozSc5SQE/ethernet-fragmentation-issues)

Yet, whenever lwip receives (from PC) big packet , above its limit, it gets
into exception as was described above.

This seems like a high security issue.

Any idea how it can be solved ?

Thanks



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: fragmentation failure with stm32 if length > 1704

goldsimon@gmx.de
ranran wrote:
> Hi,
>
> I've solved this issue after increasing size as was suggested here. Thanks !
> (The issue was also posted here:
> https://community.st.com/s/question/0D50X0000BozSc5SQE/ethernet-fragmentation-issues)
>
> Yet, whenever lwip receives (from PC) big packet , above its limit, it gets
> into exception as was described above.

I didn't quite get the post which seemed to suggest to increase some size, but
this still seems like a driver issue. lwIP does *not* in general have problems
with this!

>
> This seems like a high security issue.

Yes, it is!

>
> Any idea how it can be solved ?

Fix your driver :-)

Maybe your MAC just accepts jumbo packets? The idea of fragmentation is that
jumbo packets are split into multiple packets of 1514 bytes max each...

Regards,
Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users