14 Nov, 2009

23 commits

  • The cu3088-driver used as common base for lcs- and ctcm-devices
    makes it difficult to assign the appropriate driver to an lcs-device
    or a ctcm-device. This patch eliminates the cu3088-driver and thus
    the root device "cu3088". Path /sys/devices/cu3088 is replaced with
    the pathes /sys/devices/lcs and /sys/devices/ctcm.

    Patch is based on a proposal from Cornelia Huck.

    Cc: Cornelia Huck
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • State transition to DEV_STATE_STOPPED indicates all outstanding I/O has
    finished. Add wait queue to wait for this state.

    Signed-off-by: Frank Blaschka
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Frank Blaschka
     
  • If iucv_work_queue is not empty during kernel freeze, a kernel panic
    occurs. This suspend-patch adds flushing of the work queue for
    pending connection requests and severing of remaining pending
    connections.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • While investigating for network latencies, I found inet_getid() was a
    contention point for some workloads, as inet_peer_idlock is shared
    by all inet_getid() users regardless of peers.

    One way to fix this is to make ip_id_count an atomic_t instead
    of __u16, and use atomic_add_return().

    In order to keep sizeof(struct inet_peer) = 64 on 64bit arches
    tcp_ts_stamp is also converted to __u32 instead of "unsigned long".

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • When handling large number of netdevices, inet6_dump_addr()
    is very slow because it has O(N^2) complexity.

    Instead of scanning one single list, we can use the NETDEV_HASHENTRIES
    sub lists of the dev_index hash table, and RCU lookups.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • The first "node" is supposed to be the cursor used in the for_each.

    The second "node" is ment literally and should not be macro expanded:
    it's the name of the hlist_node field from the inet_bind_bucket.

    This currently works because when inet_bind_bucket_for_each is called
    it's argument is still "node".

    Signed-off-by: Lucian Adrian Grijincu
    Signed-off-by: David S. Miller

    Lucian Adrian Grijincu
     
  • Stephen Hemminger a écrit :
    > On Thu, 12 Nov 2009 15:11:36 +0100
    > Eric Dumazet wrote:
    >
    >> When handling large number of netdevices, inet_dump_ifaddr()
    >> is very slow because it has O(N^2) complexity.
    >>
    >> Instead of scanning one single list, we can use the NETDEV_HASHENTRIES
    >> sub lists of the dev_index hash table, and RCU lookups.
    >>
    >> Signed-off-by: Eric Dumazet
    >
    > You might be able to make RCU critical section smaller by moving
    > it into loop.
    >

    Indeed. But we dump at most one skb (
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This patch pairs similar-numbered Rx and Tx queues onto a single
    MSI-X vector. For example, Tx queue 0 and Rx queue 0's interrupt
    with be ethX-RxTx-0. This allows for more efficient cleanup, since
    fewer interrupts will be firing during device operation. It also
    helps with a cleaner CPU affinity for IRQ affinity.

    Signed-off-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    PJ Waskiewicz
     
  • Signed-off-by: Shannon Nelson
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Nelson, Shannon
     
  • This patch makes it so that we only recycle pages when they are from the
    local NUMA node. Non-local pages are freed and replaced with locally
    allocated pages.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • We were previously only checking the first tx ring to see if it had any
    packets in it when the link when down. However we should be checking all
    of the rings so this patch makes it so that all of the rings are now being
    checked.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This patch removes unused variables total_tx_bytes, total_tx_packets,
    total_rx_bytes, and total_rx_packets from the adapter struct.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This patch does some refactoring work that I felt was needed after reviewing
    the changes recently submitted relating to the replacement of net_stats with
    netdev->stats.

    This patch essentially creates two different collections of stats. The
    first handles the adapter specific states and is stored in gstring_stats,
    and the second is for netdev specific stats and is stored in
    gstring_net_stats.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This patch makes it so that nics such as 82576 and newer can support more
    hardware queues when there are more than 4 cpus by combining a tx/rx queue
    pair onto one interrupt so that 8 queue pairs can be supported and thus
    allow for more queues.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Current code is quite large and making igb_probe difficult to read.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Change the type for the ring size values to u16 and use min/max_t instead of
    min/max.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • To fix the bug of checking on signed return value using unsigned statement.
    Thanks Roel Kluin for digging out it.

    Signed-off-by: Roel Kluin
    Signed-off-by: Wan ZongShun
    Signed-off-by: David S. Miller

    Wan ZongShun
     
  • We need to use next_det_device_rcu() in RCU protected section.

    We also can avoid in_dev_get()/in_dev_put() overhead (code size mainly)
    in rcu_read_lock() sections.

    Signed-off-by: Eric Dumazet
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • No longer need read_lock(&dev_base_lock), use RCU instead.
    We also can avoid taking references on inet6_dev structs.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Define two symbols needed in both kernel and user space.

    Remove old (somewhat incorrect) kernel variant that wasn't used in
    most cases. Default should apply to both RMSS and SMSS (RFC2581).

    Replace numeric constants with defined symbols.

    Stand-alone patch, originally developed for TCPCT.

    Signed-off-by: William.Allen.Simpson@gmail.com
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    William Allen Simpson
     
  • Both vlan and macvlan devices usually don't use a qdisc and immediately
    queue packets to the underlying device. Propagate transmission state of
    the underlying device to the upper layers so they can react on congestion
    and/or inform the sending process.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Currently the ->ndo_hard_start_xmit() callbacks are only permitted to return
    one of the NETDEV_TX codes. This prevents any kind of error propagation for
    virtual devices, like queue congestion of the underlying device in case of
    layered devices, or unreachability in case of tunnels.

    This patches changes the NET_XMIT codes to avoid clashes with the NETDEV_TX
    codes and changes the two callers of dev_hard_start_xmit() to expect either
    errno codes, NET_XMIT codes or NETDEV_TX codes as return value.

    In case of qdisc_restart(), all non NETDEV_TX codes are mapped to NETDEV_TX_OK
    since no error propagation is possible when using qdiscs. In case of
    dev_queue_xmit(), the error is propagated upwards.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Untested, no hardware

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

12 Nov, 2009

17 commits

  • We have two implementations of the compat_ioctl handling for ATM, the
    one that we have had for ages in fs/compat_ioctl.c and the one added to
    net/atm/ioctl.c by David Woodhouse. Unfortunately, both versions are
    incomplete, and in practice we use a very confusing combination of the
    two.

    For ioctl numbers that have the same identifier on 32 and 64 bit systems,
    we go directly through the compat_ioctl socket operation, for those that

    differ, we do a conversion in fs/compat_ioctl.c.

    This patch moves both variants into the vcc_compat_ioctl() function,
    while preserving the current behaviour. It also kills off the COMPATIBLE_IOCTL
    definitions that we never use here.
    Doing it this way is clearly not a good solution, but I hope it is a
    step into the right direction, so that someone is able to clean up this
    mess for real.

    Signed-off-by: Arnd Bergmann
    Cc: Eric Dumazet
    Cc: David Woodhouse
    Signed-off-by: David S. Miller

    Arnd Bergmann
     
  • Handling for SIOCSHWTSTAMP is broken on architectures
    with a split user/kernel address space like s390,
    because it passes a real user pointer while using
    set_fs(KERNEL_DS).
    A similar problem might arise the next time somebody
    adds code to dev_ifsioc.

    Split up dev_ifsioc into three separate functions for
    SIOCSHWTSTAMP, SIOC*IFMAP and all other numbers so
    we can get rid of set_fs in all potentially affected
    cases.

    Signed-off-by: Arnd Bergmann
    Cc: Patrick Ohly
    Cc: David S. Miller
    Signed-off-by: David S. Miller

    Arnd Bergmann
     
  • Add support for Wake on LAN (WOL) reception and waking the device up from
    this signal via the ethtool interface. Currently we are only supporting
    the magic-packet variant of wakeup.

    WOL is enabled by specifying a second interrupt resource to the driver
    which indicates where the interrupt for the WOL is being signalled. This
    then enables the necessary ethtool calls to leave the device in a state
    to receive WOL frames when going into suspend.

    Signed-off-by: Ben Dooks
    Signed-off-by: Simtec Linux Team
    Signed-off-by: David S. Miller

    Ben Dooks
     
  • The values of r_idx and rx_ring are not used after the last time they
    are set in ixgbe_msix_clean_rx(), so they can be removed.

    Signed-off-by: Ali Gholami Rudi
    Acked-by: Peter P Waskiewicz Jr
    Signed-off-by: David S. Miller

    Ali Gholami Rudi
     
  • There is no reason for this lock to be reader/writer since
    the reader only has lock held for a very brief period.
    The overhead of read_lock is more expensive than spinlock.

    Compile tested only, I am not a decnet user.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Add missing locking in the case of auto binding to the
    default device. The address list might change while this code is looking
    at the list.

    Compile tested only, I am not a decnet user.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • The full_name_hash function does not produce well distributed values in
    the lower bits, so most code uses hash_32() to fold it. This is really
    a bug introduced when name hashing was added, back in 2.5 when I added
    name hashing.

    hash_32 is all that is needed since full_name_hash returns unsigned int
    which is only 32 bits on 64 bit platforms.

    Also, there is no point in using hash_32 on ifindex, because the is naturally
    sequential and usually well distributed.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Change it to match qlge_xxx convention.

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Force asic to known state at open().

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • We do not need to change the frame routing to direct all frames to the
    management fifo during suspend. This is now done by the firmware.

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Noticed by Thomas GLeixner.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Before calling gfar_clean_tx_ring() the driver grabs an irqsave
    spinlock, and then tries to recycle skbs. But since
    skb_recycle_check() returns 0 with IRQs disabled, we'll never
    recycle any skbs.

    It appears that gfar_clean_tx_ring() and gfar_start_xmit() are
    mostly idependent and can work in parallel, except when they
    modify num_txbdfree.

    So we can drop the lock from most sections and thus fix the skb
    recycling.

    Signed-off-by: Anton Vorontsov
    Acked-by: Kumar Gala
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • gfar_error() can arrive at the middle of gfar_start_xmit() processing,
    and so it can trigger transfers of BDs that we don't yet expect to
    be transmitted.

    Fix this by locking the tx queues in gfar_error().

    Signed-off-by: Anton Vorontsov
    Acked-by: Kumar Gala
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • We obviously want to write a modified 'temp' value back to the
    register, not the saved IRQ flags.

    Signed-off-by: Anton Vorontsov
    Acked-by: Kumar Gala
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • commit fba4ed030cfae7efdb6b79a57b0c5a9d72c9 ("gianfar: Add Multiple
    Queue Support") introduced the following build failure:

    CC gianfar.o
    gianfar.c: In function 'gfar_restore':
    gianfar.c:1249: error: request for member 'napi' in something not a structure or union

    This patch fixes the issue.

    Signed-off-by: Anton Vorontsov
    Acked-by: Kumar Gala
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • It is OK to poll with disabled IRQs, so remove the warning.

    Signed-off-by: Anton Vorontsov
    Acked-by: Kumar Gala
    Signed-off-by: David S. Miller

    Anton Vorontsov