PING problem

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

PING problem

ttc
I have the following problem with lwip-2.1.2

I have implemented the socket API so that it can be used, but in rare cases
the connection is broken.
While investigating the cause, I discovered that the PING response was
interrupted on the way.
Attach the image at that time.
<http://lwip.100.n7.nabble.com/file/t2330/ping.jpg>

When ping became abnormal, we logged with waireshark.
<http://lwip.100.n7.nabble.com/file/t2330/wireshark.jpg>

If you check the log, you can see that the reply is delayed for the request.
For example, a reply of No. 165 is returned for a request of No. 149.

I think Requests and replies are recorded alternately under normal
conditions, but there are some places where this is not the case.

what I can see to understand the problem?



--
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: PING problem

Mario Luzeiro
I think I had similar issues, the problem was a bug in the DMA libraries used by Ethernet driver.

Mario

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of ttc <[hidden email]>
Sent: 24 December 2019 06:16
To: [hidden email]
Subject: [lwip-users] PING problem

I have the following problem with lwip-2.1.2

I have implemented the socket API so that it can be used, but in rare cases
the connection is broken.
While investigating the cause, I discovered that the PING response was
interrupted on the way.
Attach the image at that time.
<http://lwip.100.n7.nabble.com/file/t2330/ping.jpg>

When ping became abnormal, we logged with waireshark.
<http://lwip.100.n7.nabble.com/file/t2330/wireshark.jpg>

If you check the log, you can see that the reply is delayed for the request.
For example, a reply of No. 165 is returned for a request of No. 149.

I think Requests and replies are recorded alternately under normal
conditions, but there are some places where this is not the case.

what I can see to understand the problem?



--
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
ttc
Reply | Threaded
Open this post in threaded view
|

Re: PING problem

ttc
Mario

Thank you for answering.

But I don't use DMA with Ethernet driver.
I think we should use DMA, but we haven't implemented it yet.



--
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: PING problem

Jens Nielsen-2
In reply to this post by ttc
It's much easier to analyze if you attach the wireshark capture instead
of screenshots of the wireshark capture (or both if you insist)

Sounds to me like your driver doesn't feed lwip incoming packets as they
arrive. A classic error is to signal a semaphore from interrupt and then
from a task process only one packet before waiting on semaphore again.
If two packets arrive (two interrupts) before task is woken, the second
packet and all packets thereafter will be delayed and the symptoms will
look something like this

In any case: check your driver or add debug to find where your packets
are delayed

/Jens

On 2019-12-24 07:16, ttc wrote:

> I have the following problem with lwip-2.1.2
>
> I have implemented the socket API so that it can be used, but in rare cases
> the connection is broken.
> While investigating the cause, I discovered that the PING response was
> interrupted on the way.
> Attach the image at that time.
> <http://lwip.100.n7.nabble.com/file/t2330/ping.jpg>
>
> When ping became abnormal, we logged with waireshark.
> <http://lwip.100.n7.nabble.com/file/t2330/wireshark.jpg>
>
> If you check the log, you can see that the reply is delayed for the request.
> For example, a reply of No. 165 is returned for a request of No. 149.
>
> I think Requests and replies are recorded alternately under normal
> conditions, but there are some places where this is not the case.
>
> what I can see to understand the problem?
>
>
>
> --
> 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