Changeset 3bb5735 in mainline for uspace/srv/net/il/ip/ip.c


Ignore:
Timestamp:
2010-11-23T20:50:09Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
442ebbe
Parents:
da9f13f3
git-author:
Radim Vansa <radim.vansa@…> (2010-11-23 20:50:09)
git-committer:
Jakub Jermar <jakub@…> (2010-11-23 20:50:09)
Message:

Cherry pick fixes from changeset lp:~helenos-nicf/helenos/nicf,705.

Original description:
Solved first ping timeout

Cleaned up a little and replaced EBUSY with EAGAIN.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/il/ip/ip.c

    rda9f13f3 r3bb5735  
    115115/** The IP localhost address. */
    116116#define IPV4_LOCALHOST_ADDRESS  htonl((127 << 24) + 1)
     117
     118/** How many times can arp_translate_req respond EAGAIN before IP gives up */
     119#define ARP_EAGAIN_MAX_COUNT 10
    117120
    118121/** IP global data. */
     
    10081011                destination.length = CONVERT_SIZE(dest.s_addr, char, 1);
    10091012
    1010                 rc = arp_translate_req(netif->arp->phone, netif->device_id,
    1011                     SERVICE_IP, &destination, &translation, &data);
     1013                /** Try calling translate several times, then give up */
     1014                int count = 0;
     1015                do {
     1016                        rc = arp_translate_req(netif->arp->phone,
     1017                            netif->device_id, SERVICE_IP, &destination,
     1018                            &translation, &data);
     1019                        count++;
     1020                } while (rc == EAGAIN && count <= ARP_EAGAIN_MAX_COUNT);
    10121021                if (rc != EOK) {
    10131022                        pq_release_remote(ip_globals.net_phone,
Note: See TracChangeset for help on using the changeset viewer.