29 Nov, 2010

4 commits

  • Cc: netdev@vger.kernel.org
    Signed-off-by: Uwe Kleine-König
    Signed-off-by: David S. Miller

    Uwe Kleine-König
     
  • In kdump environment do not depend on reset_devices
    parameter to reset the device as the parameter may become obsolete.
    Instead use an adapter specific mechanism to determine if the device
    needs a reset.

    Driver maintains a count of number of pci functions probed
    and decrements the count when remove handler of that pci function
    is called. If the first probe, probe of function 0,
    detects the count as non zero then reset the device.

    Signed-off-by: Rajesh Borundia
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Rajesh Borundia
     
  • In kdump environment do not depend upon reset_devices parameter
    to reset the pci function as this parameter may become obsolete.
    Instead use an adapter specific mechanism to determine if the pci
    function needs to be reset.

    Per function refcount is maintained in driver, which is set in probe
    and reset in remove handler of adapter. If the probe detects the count
    as non zero then reset the function.

    Signed-off-by: Rajesh Borundia
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Rajesh Borundia
     
  • These macros have been existed for several years since v2.6.12-rc2.
    But they never be used. So remove them now.

    Signed-off-by: Shan Wei
    Signed-off-by: David S. Miller

    Shan Wei
     

28 Nov, 2010

3 commits

  • As David pointed out correctly, updates to af-specific attributes
    are currently not atomic. If multiple changes are requested and
    one of them fails, previous updates may have been applied already
    leaving the link behind in a undefined state.

    This patch splits the function parse_link_af() into two functions
    validate_link_af() and set_link_at(). validate_link_af() is placed
    to validate_linkmsg() check for errors as early as possible before
    any changes to the link have been made. set_link_af() is called to
    commit the changes later.

    This method is not fail proof, while it is currently sufficient
    to make set_link_af() inerrable and thus 100% atomic, the
    validation function method will not be able to detect all error
    scenarios in the future, there will likely always be errors
    depending on states which are f.e. not protected by rtnl_mutex
    and thus may change between validation and setting.

    Also, instead of silently ignoring unknown address families and
    config blocks for address families which did not register a set
    function the errors EAFNOSUPPORT respectively EOPNOSUPPORT are
    returned to avoid comitting 4 out of 5 update requests without
    notifying the user.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • Use vzalloc() and vzalloc_node() in net drivers

    Signed-off-by: Eric Dumazet
    Acked-by: Jon Mason
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Key changes are:
    - EQ ids are not assigned consecutively in Lancer. So, fix mapping of MSIx
    vector to EQ-id.
    - BAR mapping and some req locations different for Lancer.
    - TCP,UDP,IP checksum fields must be compulsorily set in TX wrb for TSO in
    Lancer.
    - CEV_IST reg not present in Lancer; so, peek into event queue to check for
    new entries
    - cq_create and mcc_create cmd interface is different for Lancer; handle
    accordingly

    Signed-off-by: Padmanabh Ratnakar
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Sathya Perla
     

25 Nov, 2010

21 commits

  • This patch implements transmit packet steering (XPS) for multiqueue
    devices. XPS selects a transmit queue during packet transmission based
    on configuration. This is done by mapping the CPU transmitting the
    packet to a queue. This is the transmit side analogue to RPS-- where
    RPS is selecting a CPU based on receive queue, XPS selects a queue
    based on the CPU (previously there was an XPS patch from Eric
    Dumazet, but that might more appropriately be called transmit completion
    steering).

    Each transmit queue can be associated with a number of CPUs which will
    use the queue to send packets. This is configured as a CPU mask on a
    per queue basis in:

    /sys/class/net/eth/queues/tx-/xps_cpus

    The mappings are stored per device in an inverted data structure that
    maps CPUs to queues. In the netdevice structure this is an array of
    num_possible_cpu structures where each structure holds and array of
    queue_indexes for queues which that CPU can use.

    The benefits of XPS are improved locality in the per queue data
    structures. Also, transmit completions are more likely to be done
    nearer to the sending thread, so this should promote locality back
    to the socket on free (e.g. UDP). The benefits of XPS are dependent on
    cache hierarchy, application load, and other factors. XPS would
    nominally be configured so that a queue would only be shared by CPUs
    which are sharing a cache, the degenerative configuration woud be that
    each CPU has it's own queue.

    Below are some benchmark results which show the potential benfit of
    this patch. The netperf test has 500 instances of netperf TCP_RR test
    with 1 byte req. and resp.

    bnx2x on 16 core AMD
    XPS (16 queues, 1 TX queue per CPU) 1234K at 100% CPU
    No XPS (16 queues) 996K at 100% CPU

    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • In dev_pick_tx, don't do work in calculating queue
    index or setting
    the index in the sock unless the device has more than one queue. This
    allows the sock to be set only with a queue index of a multi-queue
    device which is desirable if device are stacked like in a tunnel.

    We also allow the mapping of a socket to queue to be changed. To
    maintain in order packet transmission a flag (ooo_okay) has been
    added to the sk_buff structure. If a transport layer sets this flag
    on a packet, the transmit queue can be changed for the socket.
    Presumably, the transport would set this if there was no possbility
    of creating OOO packets (for instance, there are no packets in flight
    for the socket). This patch includes the modification in TCP output
    for setting this flag.

    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • dev_base_lock is the legacy way to lock the device list, and is planned
    to disappear. (writers hold RTNL, readers hold RCU lock)

    Convert rdma_translate_ip() and update_ipv6_gids() to RCU locking.

    Signed-off-by: Eric Dumazet
    Acked-by: Roland Dreier
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Lower SCM_MAX_FD from 255 to 253 so that allocations for scm_fp_list are
    halved. (commit f8d570a4 added two pointers in this structure)

    scm_fp_dup() should not copy whole structure (and trigger kmemcheck
    warnings), but only the used part. While we are at it, only allocate
    needed size.

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

    Eric Dumazet
     
  • ipv6_sk_mc_lock rwlock becomes a spinlock.

    readers (inet6_mc_check()) now takes rcu_read_lock() instead of read
    lock. Writers dont need to disable BH anymore.

    struct ipv6_mc_socklist objects are reclaimed after one RCU grace
    period.

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

    Eric Dumazet
     
  • Signed-off-by: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO
     
  • This patch updates the PM support using the dev_pm_ops
    and reviews the hibernation support.

    Signed-off-by: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO
     
  • This patch adds in the plat_stmmacenet_data
    the init and exit callbacks that can be used
    for invoking specific platform functions.
    For example, on ST targets, these call the
    PAD manager functions to set PIO lines and
    syscfg registers.
    The patch removes the stmmac_claim_resource
    only used on STM Kernels as well.

    Signed-off-by: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO
     
  • This patch tidies-up the stmmac_priv structure
    that had many fileds alredy defined in the
    plat_stmmacenet_data structure.

    Signed-off-by: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO
     
  • Move the interrupt mode configuration and NAPIs adding before a
    register_netdev() call to prevent netdev->open() from running
    before these functions are done.

    Advance a driver version number.

    Signed-off-by: Vladislav Zolotarov
    Signed-off-by: Eilon Greenstein
    Reported-by: Michael Chan
    Signed-off-by: David S. Miller

    Vladislav Zolotarov
     
  • According to Eric's suggestion:
    Disable local BHes to prevent a dead-lock situation between sch_direct_xmit()
    (Soft_IRQ context) and bnx2x_tx_int (called by bnx2x_run_loopback() - syscall
    context), as both are taking a netif_tx_lock().

    Signed-off-by: Eric Dumazet
    Signed-off-by: Vladislav Zolotarov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This structure isn't used anywhere in the driver.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • This patch enables the gphy autopowerdown feature in the phy for all
    new devices that support it.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Using dma_alloc_coherent() permits to use GFP_KERNEL allocations instead
    of GFP_ATOMIC ones. Its better when a machine is out of memory, because
    this allows driver to sleep to get its memory and succeed its init,
    especially when allocating high order pages.

    Signed-off-by: Eric Dumazet
    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • All TSS bugs have been fixed in the 5719. This patch reenables the
    feature.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The multiple DMA read engine bugs have been fixed on the 5719. This
    patch reenables support for this feature.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • This patch reorders and realigns the tg3_napi members for a ~3-4%
    performance improvement on small packet performance tests.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Under load, there an internal FIFO can overflow on the 5719. The fix is
    to scale back the PCIe maximum read request size based on the current
    link speed and width.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The APE needs certain bits in the mac_mode register to be enabled for
    traffic to flow correctly. This patch changes the code to always enable
    these bits in the presence of the APE.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Commit d309a46e42542223946d3a9e4e239fdc945cb53e, entitled
    "tg3: 5719: Prevent tx data corruption", was supposed to contain the tx
    margin adjustment but it looks like it somehow was omitted. This patch
    fixes the problem.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Commit a977dbe8445b8a81d6127c4aa9112a2c29a1a008, entitled
    "tg3: Reduce 57765 core clock when link at 10Mbps" needs to be applied
    to all revisions of the 57765 asic rev, not just the A0 revision.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     

24 Nov, 2010

2 commits

  • The SELinux ip postroute code indicates when policy rejected a packet and
    passes the error back up the stack. The compat code does not. This patch
    sends the same kind of error back up the stack in the compat code.

    Based-on-patch-by: Paul Moore
    Signed-off-by: Eric Paris
    Reviewed-by: Paul Moore
    Signed-off-by: David S. Miller

    Eric Paris
     
  • Some of the SELinux netlink code returns a fatal error when the error might
    actually be transient. This patch just silently drops packets on
    potentially transient errors but continues to return a permanant error
    indicator when the denial was because of policy.

    Based-on-comments-by: Paul Moore
    Signed-off-by: Eric Paris
    Reviewed-by: Paul Moore
    Signed-off-by: David S. Miller

    Eric Paris
     

23 Nov, 2010

10 commits