[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] Missing initialization somewhere?
From: |
Sergey Kubushyn |
Subject: |
Re: [lwip-devel] Missing initialization somewhere? |
Date: |
Thu, 13 Oct 2011 10:09:28 -0700 (PDT) |
User-agent: |
Alpine 2.02 (LFD 1266 2009-07-14) |
On Thu, 13 Oct 2011, address@hidden wrote:
Sergey Kubushyn wrote:
Yes, I do have ARP_QUEUING turned on. Why it is not responding to other
packets is simple -- netif (i.e. whatever this pointer points to) has it's
UP flag bit set to zero. So for all practical purposes the interface is
down
and there is no way for the stack to send a packet out.
So does this mean the board responds to ICMP packets when the netif is down
or is it up before that? A netif should be up for any communication other
than DHCP or AutoIP negotiation.
No it doesn't.
The netif is UP and running. If the first packet after reset is ICMP it
keeps running forever. If the first packet after reset is TCP SYN it
_sometimes_ (something like every second reset) makes that netif->flags to
drop its UP flag. If an ICMP packet is in/out (echo req/rply) is processed
before the first TCP SYN everything work fine every time, no failures.
It doesn't look like it has something to do with ARPs but I might be wrong.
The sequence is:
- Remote sends ARP for the MCU IP;
- MCU (lwIP) responds to ARP request properly;
- Remote sends SYN initiating 3-way TCP handshake;
- MCU sends ARP request for the remote IP (only once, not
for every SYN packet);
- Remote responds to that ARP;
- MCU generates a proper SYN/ACK packet and attempts to send it;
- That attempts fails in ip_route() because is_netif_up() tells the
^^^^^^^^^^^^^^^^^^^^^
netif is not up so there is no route out;
- After a timeout remote resends that initial SYN;
- MCU again generates a proper SYN/ACK packet and again attempts to
send it out with exactly the same result.
- That netif is down for ALL packets that is why nothing is going
out of the MCU. And there is nothing there to bring it back up.
At which point does the netif go down here?
I don't know yet. ARP goes out OK and received fine. Then when it is time to
_SEND_ SYN/ACK netif seems to be down.
Reception _STILL WORKS_ , it properly receives the retransmitted SYN,
generates a proper SYN/ACK and tries to send it back but it fails again in
ip_route() because netif is presumably down.
---
******************************************************************
* address@hidden KOI8 Net < > The impossible we do immediately. *
* Las Vegas NV, USA < > Miracles require 24-hour notice. *
******************************************************************
- [lwip-devel] Missing initialization somewhere?, Sergey Kubushyn, 2011/10/12
- Re: [lwip-devel] Missing initialization somewhere?, Kieran Mansley, 2011/10/13
- Re: [lwip-devel] Missing initialization somewhere?, Sergey Kubushyn, 2011/10/13
- Re: [lwip-devel] Missing initialization somewhere?, address@hidden, 2011/10/13
- Re: [lwip-devel] Missing initialization somewhere?,
Sergey Kubushyn <=
- Re: [lwip-devel] Missing initialization somewhere?, address@hidden, 2011/10/13
- Re: [lwip-devel] Missing initialization somewhere?, Sergey Kubushyn, 2011/10/13
- Re: [lwip-devel] Missing initialization somewhere?, Sergey Kubushyn, 2011/10/13