10 Jun, 2011

27 commits

  • The message size allocated for rtnl ifinfo dumps was limited to
    a single page. This is not enough for additional interface info
    available with devices that support SR-IOV and caused a bug in
    which VF info would not be displayed if more than approximately
    40 VFs were created per interface.

    Implement a new function pointer for the rtnl_register service that will
    calculate the amount of data required for the ifinfo dump and allocate
    enough data to satisfy the request.

    Signed-off-by: Greg Rose
    Signed-off-by: Jeff Kirsher

    Greg Rose
     
  • This patch changes the way versioning is done for igb in the kernel by
    removing the number after the "k." It has been determined that just the
    "k" is sufficient to identify a kernel version and the following number
    was used in an inconsistent manner.

    Signed-off-by: Carolyn Wyborny
    Tested-by: Jeff Pieper
    Signed-off-by: Jeff Kirsher

    Carolyn Wyborny
     
  • Update the version number to match version conventions. Bump the major
    version to indicate that new hardware support (i350) has been added.

    Signed-off-by: Mitch Williams
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Williams, Mitch A
     
  • Signed-off-by: Bruce Allan
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Bruce Allan
     
  • Commit 5d03078a6804bf4c7f943c5b68bef80468c0717f added a redundant 'select
    CRC32'; remove it.

    Signed-off-by: Bruce Allan
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Bruce Allan
     
  • The Host Wakeup Active bit in the PHY Port General Configuration register
    (page 769 register 17) must be cleared after every PHY reset to prevent an
    unexpected wake signal from the PHY. Originally, this was accomplished by
    simply reading the PHY Wakeup Control register on page 800 which clears the
    Host Wakeup Active bit as a side-effect. Unfortunately, a hardware bug on
    the 82577 and 82578 PHY can cause unexpected behavior when registers on
    page 800 are accessed while in gigabit mode.

    This patch changes the remaining instances when the Host Wakeup Active bit
    needs to be cleared while possibly in gigabit mode by accessing the Port
    General Configuration register directly instead of accessing any register
    on page 800.

    Signed-off-by: Bruce Allan
    Tested-by: Jeff Pieper
    Signed-off-by: Jeff Kirsher

    Bruce Allan
     
  • Doing a PHY page select can take a long time, relatively speaking. This
    can cause a significant delay when updating a number of PHY registers on
    the same page by unnecessarily setting the page for each PHY access. For
    example when going to Sx, all the PHY wakeup registers (WUC, RAR[], MTA[],
    SHRAR[], IP4AT[], IP6AT[], etc.) on 82577/8/9 need to be updated which
    takes a long time which can cause issues when suspending.

    This patch introduces new PHY ops function pointers to allow callers to
    set the page directly and do any number of PHY accesses on that page.
    This feature is currently only implemented for 82577, 82578 and 82579
    PHYs for both the normally addressed registers as well as the special-
    case addressing of the PHY wakeup registers on page 800. For the latter
    registers, the existing function for accessing the wakeup registers has
    been divided up into three- 1) enable access to the wakeup register page,
    2) perform the register access and 3) disable access to the wakeup register
    page. The two functions that enable/disable access to the wakeup register
    page are necessarily available to the caller so that the caller can restore
    the value of the Port Control (a.k.a. Wakeup Enable) register after the
    wakeup register accesses are done.

    All instances of writing to multiple PHY registers on the same page are
    updated to use this new method and to acquire any PHY locking mechanism
    before setting the page and performing the register accesses, and release
    the locking mechanism afterward.

    Some affiliated magic number cleanup is done as well.

    Signed-off-by: Bruce Allan
    Tested-by: Jeff Pieper
    Signed-off-by: Jeff Kirsher

    Bruce Allan
     
  • Start the Tx queue when the interface is brought up in e1000e_up() but do
    not schedule the queue until link is up as detected in the watchdog task
    which sets netif_carrier_on.

    Also flush the descriptors and clean the Tx and Rx rings before resetting
    the hardware when bringing the interface down otherwise there is a small
    window where the watchdog task can be triggered with netif_carrier_off
    and the Tx ring not yet empty which causes an additional and unnecessary
    reset.

    Signed-off-by: Bruce Allan
    Signed-off-by: Jeff Kirsher

    Bruce Allan
     
  • Since EXTCNF_CTRL.SWFLAG (used in the ownership arbitration of shared
    resources, e.g. the PHY shared between the s/w, f/w, and h/w clients)
    can be cleared by any of those clients, log a debug message when
    software attempts to clear it and it is already cleared unexpectedly.
    And since the swflag is cleared by a hardware reset, the driver does
    not need to do that, but the mutex acquired when the bit is set must
    still be cleared.

    Signed-off-by: Bruce Allan
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Bruce Allan
     
  • When repeatedly cycling Sx->S0 states with the network cable unplugged,
    the 82579 PHY may not initialize as expected and may require a full power
    cycle to recover functionality to the device. Workaround this by testing
    access of the PHY registers after resuming; if that returns unexpected
    results toggle the LANPHYPC signal to power cycle the PHY.

    This is implemented in the new function e1000_resume_workarounds_pchlan()
    which calls another new function, e1000_toggle_lanphypc_value_ich8lan(),
    which has been created to reduce code duplication (same functionality
    required by a previous workaround). Also, e1000e_disable_gig_wol_ich8lan
    is now e1000_suspend_workarounds_ich8lan to better reflect what it does.

    Signed-off-by: Bruce Allan
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Bruce Allan
     
  • The ESB2 LAN includes a debug feature that enables far-end loopback (FELB)
    of the SerDes/Kumeran interface. This feature is activated when receiving
    a sequence of symbols that includes a reserved codeword. On a perfect
    link, FELB would never be activated. In the presence of bit errors, there
    is a very small, but non-zero, probability of FELB being activated.

    If the FELB is activated, the SerDes link becomes non-functional and must
    be reset. It could also corrupt the switching tables in the switch since
    the ESB2 is transmitting packets with a different source MAC address.

    This patch disables the FELB feature.

    Signed-off-by: Bruce Allan
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Bruce Allan
     
  • Now all received packets are handled by bond_handle_frame,
    and arp_mon_pt isn't used any more.

    Reviewed-by: WANG Cong
    Signed-off-by: Weiping Pan
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • Now we use agg_select_timer and ad_work.

    Reviewed-by: WANG Cong
    Signed-off-by: Weiping Pan
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • bond_params->ad_select and ad_bond_info->agg_select_mode have the same
    meaning, they are duplicate and need extra synchronization.

    __get_agg_selection_mode() get ad_select from bond_params directly.

    Signed-off-by: Weiping Pan
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • These is also a bug, that if you modify lacp_rate via sysfs,
    and add new slaves in bonding, new slaves won't use the latest lacp_rate,
    since ad_bond_info->lacp_fast is initialized only once,
    in bond_3ad_initialize().

    Since both struct bond_params and ad_bond_info have lacp_fast,
    they are duplicate and need extra synchronization.

    bond_3ad_bind_slave() can use bond_params->lacp_fast to initialize port.
    So we can just remove lacp_fast from struct ad_bond_info.

    Signed-off-by: Weiping Pan
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • There is bug that when you modify lacp_rate via sysfs,
    802.3ad won't use the new value of lacp_rate to transmit packets.
    This is because port->actor_oper_port_state isn't changed.

    Signed-off-by: Weiping Pan
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • Signed-off-by: Christian Benvenuti
    Signed-off-by: Danny Guo
    Signed-off-by: Vasanthy Kolluri
    Signed-off-by: Roopa Prabhu
    Signed-off-by: David Wang
    Signed-off-by: David S. Miller

    Vasanthy Kolluri
     
  • Instead of deriving the index of a transmit/receive interrupt resource
    from the transmit/receive queue index, always save and retrieve it
    using an additional variable.

    Signed-off-by: Christian Benvenuti
    Signed-off-by: Danny Guo
    Signed-off-by: Vasanthy Kolluri
    Signed-off-by: Roopa Prabhu
    Signed-off-by: David Wang
    Signed-off-by: David S. Miller

    Vasanthy Kolluri
     
  • Signed-off-by: Christian Benvenuti
    Signed-off-by: Danny Guo
    Signed-off-by: Vasanthy Kolluri
    Signed-off-by: Roopa Prabhu
    Signed-off-by: David Wang
    Signed-off-by: David S. Miller

    Vasanthy Kolluri
     
  • enic driver currently passes 802.1p bits to the upper layers for packets
    tagged with non-zero vlan ids only. This patch extends such behaviour to
    zero vlan tagged packets also.

    The patch is dependant on the following kernel patches:

    1) vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)
    - net-next-2.6 git commit: ad1afb00393915a51c21b1ae8704562bf036855f
    - Available 2.6.36 and later
    2) vlan: Centralize handling of hardware acceleration.
    - net-next-2.6 git commit: 3701e51382a026cba10c60b03efabe534fba4ca4
    - Available 2.6.37 and later

    Signed-off-by: Christian Benvenuti
    Signed-off-by: Danny Guo
    Signed-off-by: Vasanthy Kolluri
    Signed-off-by: Roopa Prabhu
    Signed-off-by: David Wang
    Signed-off-by: David S. Miller

    Vasanthy Kolluri
     
  • David S. Miller
     
  • The definition NO_FLAGS was introduced to make the code more
    readable and shall be used to initialize flag fields.

    Signed-off-by: Marek Lindner
    Signed-off-by: Sven Eckelmann

    Marek Lindner
     
  • CodingStyle "Chapter 12: Macros, Enums and RTL" recommends to use enums
    for several related constants. Internal states can be used without
    defining the actual value, but all values which are visible to the
    outside must be defined as before. Normal values are assigned as usual
    and flags are defined by shifts of a bit.

    Signed-off-by: Sven Eckelmann

    Sven Eckelmann
     
  • CodingStyle "Chapter 12: Macros, Enums and RTL" highly recommends to use
    functions instead of macros were possible. This ensures type safety and
    prevents shadowing of other variables.

    Signed-off-by: Sven Eckelmann

    Sven Eckelmann
     
  • strict_strtoul as used in parse_gw_bandwidth is defined for unsigned
    long and strict_strtol should be used instead for long.

    Signed-off-by: Sven Eckelmann

    Sven Eckelmann
     
  • gw_node_delete is defined with "void" as return type, but still tries to
    return a value. The called function gw_node_delete is also return as
    void and thus doesn't provide a value for us.

    Signed-off-by: Sven Eckelmann

    Sven Eckelmann
     
  • When a link is saturated (re)broadcasts of OGMs are delayed. Under heavy
    load this delay may exceed the orig interval which leads to OGMs being
    dropped (the code would only accept an OGM rebroadcast if it arrived
    before the next OGM was broadcasted). With this patch batman-adv will
    also accept delayed OGMs in order to avoid a bogus influence on the
    routing metric.

    Signed-off-by: Daniele Furlan
    Signed-off-by: Sven Eckelmann

    Daniele Furlan
     

09 Jun, 2011

13 commits

  • Log:
    drivers/net/xilinx_emaclite.c: In function 'xemaclite_open':
    drivers/net/xilinx_emaclite.c:961: error: implicit declaration of function 'request_irq'
    drivers/net/xilinx_emaclite.c: In function 'xemaclite_close':
    drivers/net/xilinx_emaclite.c:995: error: implicit declaration of function 'free_irq'
    make[2]: *** [drivers/net/xilinx_emaclite.o] Error 1
    make[1]: *** [drivers/net] Error 2
    make: *** [drivers] Error 2

    Signed-off-by: Michal Simek
    Signed-off-by: David S. Miller

    Michal Simek
     
  • Perf shows a relatively high rate (about 8%) race in
    spin_lock_irqsave() when doing netperf between external host and
    guest. It's mainly becuase the lock contention between the
    tun_do_read() and tun_xmit_skb(), so this patch do not put self into
    waitqueue to reduce this kind of race. After this patch, it drops to
    4%.

    Signed-off-by: Jason Wang
    Signed-off-by: Amos Kong
    Signed-off-by: David S. Miller

    Amos Kong
     
  • Current standard practice is to not mark most functions as inline
    and let compiler decide instead.

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

    stephen hemminger
     
  • The tun driver allocates skb's to hold data from user and then passes
    the data into the network stack as received data. Most network devices
    allocate the receive skb with routines like dev_alloc_skb() that reserves
    additional space for use by network protocol stack but tun does not.

    Because of the lack of padding, when the packet is passed through bridge
    netfilter a new skb has to be allocated.

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

    stephen hemminger
     
  • Based on earlier patch from Neil Horman

    If iSCSI is not supported on a bnx2 device, bnx2_cnic_probe() will
    return NULL and the cnic device will not be visible to bnx2i. This
    will prevent bnx2i from registering and then unregistering during
    cnic_start() and cause the warning message:

    bnx2 0003:01:00.1: eth1: Failed waiting for ULP up call to complete

    Signed-off-by: Michael Chan
    Cc: Neil Horman
    Signed-off-by: David S. Miller

    Michael Chan
     
  • During NETDEV_UP, we use symbol_get() to get the net driver's cnic
    probe function. This sometimes doesn't work if NETDEV_UP happens
    right after NETDEV_REGISTER and the net driver is still running module
    init code. As a result, the cnic device may not be discovered. We
    fix this by probing on all NETDEV events if the device's netif_running
    state is up.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • This reduces the likelihood of port re-use when re-loading the driver.

    Signed-off-by: Eddie Wai
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Eddie Wai
     
  • During iSCSI connection terminations, if the target is also terminating
    at about the same time, the firmware may not complete the driver's
    request to close or reset the connection. This is fixed by handling
    other events (instead of the expected completion event) as an indication
    that the driver's request has been rejected.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • We need to keep looping until cnic_get_kcqes() returns 0. cnic_get_kcqes()
    returns a maximum of 64 entries. If there are more entries in the queue
    and we don't loop back, the remaining entries may not be serviced for a
    long time.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Profiles show false sharing in addr_compare() because refcnt/dtime
    changes dirty the first inet_peer cache line, where are lying the keys
    used at lookup time. If many cpus are calling inet_getpeer() and
    inet_putpeer(), or need frag ids, addr_compare() is in 2nd position in
    "perf top".

    Before patch, my udpflood bench (16 threads) on my 2x4x2 machine :

    5784.00 9.7% csum_partial_copy_generic [kernel]
    3356.00 5.6% addr_compare [kernel]
    2638.00 4.4% fib_table_lookup [kernel]
    2625.00 4.4% ip_fragment [kernel]
    1934.00 3.2% neigh_lookup [kernel]
    1617.00 2.7% udp_sendmsg [kernel]
    1608.00 2.7% __ip_route_output_key [kernel]
    1480.00 2.5% __ip_append_data [kernel]
    1396.00 2.3% kfree [kernel]
    1195.00 2.0% kmem_cache_free [kernel]
    1157.00 1.9% inet_getpeer [kernel]
    1121.00 1.9% neigh_resolve_output [kernel]
    1012.00 1.7% dev_queue_xmit [kernel]
    # time ./udpflood.sh

    real 0m44.511s
    user 0m20.020s
    sys 11m22.780s

    # time ./udpflood.sh

    real 0m44.099s
    user 0m20.140s
    sys 11m15.870s

    After patch, no more addr_compare() in profiles :

    4171.00 10.7% csum_partial_copy_generic [kernel]
    1787.00 4.6% fib_table_lookup [kernel]
    1756.00 4.5% ip_fragment [kernel]
    1234.00 3.2% udp_sendmsg [kernel]
    1191.00 3.0% neigh_lookup [kernel]
    1118.00 2.9% __ip_append_data [kernel]
    1022.00 2.6% kfree [kernel]
    993.00 2.5% __ip_route_output_key [kernel]
    841.00 2.2% neigh_resolve_output [kernel]
    816.00 2.1% kmem_cache_free [kernel]
    658.00 1.7% ia32_sysenter_target [kernel]
    632.00 1.6% kmem_cache_alloc_node [kernel]

    # time ./udpflood.sh

    real 0m41.587s
    user 0m19.190s
    sys 10m36.370s

    # time ./udpflood.sh

    real 0m41.486s
    user 0m19.290s
    sys 10m33.650s

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

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

    stephen hemminger
     
  • Driver was already keeping 64 bit counters, just not using the new interface.

    Ps: IMHO drivers should not be duplicating network device
    stats into ethtool stats. It is useless duplication.

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

    stephen hemminger
     
  • The device driver already uses 64 bit statistics, it just
    doesn't use the 64 bit interface.

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

    stephen hemminger