Do I have to make sure the link is up before I try and send packets to the ethernet port?
Or does the ethernet server handle this?
In other words, what would happen if I try and transmit a packet on a port where the link is down?
If I do need to know the link status, is the only way to get that is from the smi interface?
Link Status before sending packet
-
- XCore Addict
- Posts: 204
- Joined: Sun Jun 01, 2014 10:25 pm
-
- XCore Addict
- Posts: 158
- Joined: Thu Mar 20, 2014 8:04 am
Ethernet server does not do the link status checks;gerrykurz wrote:Do I have to make sure the link is up before I try and send packets to the ethernet port?
Or does the ethernet server handle this?
Yes - thru 'smi_get_link_state()'gerrykurz wrote: If I do need to know the link status, is the only way to get that is from the smi interface?
-
- XCore Addict
- Posts: 204
- Joined: Sun Jun 01, 2014 10:25 pm
So what happens if I send packets to a link that is down?
-
- XCore Addict
- Posts: 158
- Joined: Thu Mar 20, 2014 8:04 am
My observation is that send always go through (remove the link cable on a continuous tx application and print/LED toggle for sends)
On the other hand, if the receive side is a XMOS device: checks for the link status in this path.
On the other hand, if the receive side is a XMOS device: checks for the link status in this path.
-
- XCore Addict
- Posts: 204
- Joined: Sun Jun 01, 2014 10:25 pm
Yes it seems that the server sends the packet and returns a timestamp whether the link is up or not.
This is fine as my concern was that the call would block and not return.
This is fine as my concern was that the call would block and not return.
-
- XCore Addict
- Posts: 158
- Joined: Thu Mar 20, 2014 8:04 am
Good to note your feedback as well. Yes, its a non-blocking call.
Can you please update the similar question in the QnA section with your feedback and learning, for the benefit of other users?
Can you please update the similar question in the QnA section with your feedback and learning, for the benefit of other users?
-
- XCore Addict
- Posts: 204
- Joined: Sun Jun 01, 2014 10:25 pm