Changeset 8136102 in mainline for uspace/lib/net/netif/netif_skel.c


Ignore:
Timestamp:
2011-01-11T01:33:58Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b22c97
Parents:
6643a19 (diff), 7300c37 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

improve correctness of the NE2000 driver w.r.t. parallelism of the interrupt notification handler

  • by masking off interrupts in the kernel interrupt handler, the core of the interrupt notification handler (fetching frames from the network card itself) always runs single-threaded (thus avoiding the issues with fetching of frames multiple times from different fibrils, causing ICMP replies to be duplicated)
  • the received frames are buffered locally and then sent to the NIL module with the interrupts unmasked again (thus another notification handler will be scheduled if the sending of the frames to the NIL module blocks)

there is still a synchronization issue without any clear root cause when the network card is flood-pinged even before it is being initialized

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/netif/netif_skel.c

    r6643a19 r8136102  
    130130        if (result > NETIF_NULL) {
    131131                int phone = device->nil_phone;
     132                nil_device_state_msg(phone, device_id, result);
    132133                fibril_rwlock_write_unlock(&netif_globals.lock);
    133                 nil_device_state_msg(phone, device_id, result);
    134134                return EOK;
    135135        }
     
    166166        if (result > NETIF_NULL) {
    167167                int phone = device->nil_phone;
     168                nil_device_state_msg(phone, device_id, result);
    168169                fibril_rwlock_write_unlock(&netif_globals.lock);
    169                 nil_device_state_msg(phone, device_id, result);
    170170                return EOK;
    171171        }
Note: See TracChangeset for help on using the changeset viewer.