07 Dec, 2013

40 commits

  • Update the driver version to 0.3.12-k

    Signed-off-by: Catherine Sullivan
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Catherine Sullivan
     
  • Whitespace fixes

    Change-Id: I95f4d02e4a2a92d6b6fca3ae2b7865c4b916a9bb
    Signed-off-by: Jeff Kirsher
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala

    Jeff Kirsher
     
  • Enable a couple of workarounds based on revision ID that allow the
    driver to work more fully on early hardware.

    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • Add a new flag to the add VEB command which allows the
    driver to request the hardware to filter on L2 parameters.

    This is an implementation of the driver access to a new firmware
    feature.

    Change-Id: Id61d3cad4125bdc68b8fd9d555c448a10c344b6b
    Signed-off-by: Kevin Scott
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Kevin Scott
     
  • Set the media type in the hardware structure, based
    on the external connection type.

    Add Direct Attach to the type of media reported by ethtool.

    Change-Id: I4ad2f5bf882766d6e737fac4477abf049491b3b3
    Signed-off-by: Shannon Nelson
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • The hash is reported correctly in the rss field if and only if
    the filter status is 3. Other values of filter status mean
    different things and we shouldn't depend on a bitwise result.

    The issue was that
    a & b --> returns true for b={1,2,3}
    the fix is
    a & b == b

    Also refactor this function to use constant operations because we
    are in fast path.

    Change-Id: I4e29be87439c1cf8b60bc31bea29dff89596c013
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • In order to get 1588 to work correctly the defines need a bit
    of a tweak.

    Change-Id: Ie50ce2a18e1593441f1560411e5a4f51c6d48aaa
    Signed-off-by: Jacob Keller
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • Add a new check for CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to reduce
    the number of or's used in the ether_addr_equal comparison to very
    slightly improve function performance.

    Simplify the ether_addr_equal_64bits implementation.
    Integrate and remove the zap_last_2bytes helper as it's now
    used only once.

    Remove the now unused compare_ether_addr function.

    Update the unaligned-memory-access documentation to remove the
    compare_ether_addr description and show how unaligned accesses
    could occur with ether_addr_equal.

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

    Joe Perches
     
  • use pr_ instead of printk(LEVEL)

    Signed-off-by: Wang Weidong
    Signed-off-by: David S. Miller

    wangweidong
     
  • Creating an address with this flag set will result in kernel taking care
    of temporary addresses in the same way as if the address was created by
    kernel itself (after RA receive). This allows userspace applications
    implementing the autoconfiguration (NetworkManager for example) to
    implement ipv6 addresses privacy.

    Signed-off-by: Jiri Pirko
    Signed-off-by: Thomas Haller
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • There is no more space in u8 ifa_flags. So do what davem suffested and
    add another netlink attr called IFA_FLAGS for carry more flags.

    Signed-off-by: Jiri Pirko
    Signed-off-by: Thomas Haller
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • Some network drivers use dev_kfree_skb_any() and dev_kfree_skb_irq()
    helpers to free skbs, both for dropped packets and TX completed ones.

    We need to separate the two causes to get better diagnostics
    given by dropwatch or "perf record -e skb:kfree_skb"

    This patch provides two new helpers, dev_consume_skb_any() and
    dev_consume_skb_irq() to be used for consumed skbs.

    __dev_kfree_skb_irq() is slightly optimized to remove one
    atomic_dec_and_test() in fast path, and use this_cpu_{r|w} accessors.

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

    Eric Dumazet
     
  • Signed-off-by: Zhi Yong Wu
    Signed-off-by: David S. Miller

    Zhi Yong Wu
     
  • Signed-off-by: Zhi Yong Wu
    Signed-off-by: David S. Miller

    Zhi Yong Wu
     
  • Signed-off-by: Zhi Yong Wu
    Signed-off-by: David S. Miller

    Zhi Yong Wu
     
  • Since vhost_dev_init() forever return 0, some branches are never run,
    therefore need to be removed.

    Signed-off-by: Zhi Yong Wu
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Zhi Yong Wu
     
  • Signed-off-by: Nithin Nayak Sujir
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Nithin Sujir
     
  • commit 4d95847381228639844c7197deb8b2211274ef22 - "tg3: Workaround
    rx_discards stat bug", added a workaround for miscounted statistics for
    multicast packets. This fix needs to be applied to the 5762.

    Signed-off-by: Nithin Nayak Sujir
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Nithin Sujir
     
  • The APD bit is 14 and not bit 10.

    Signed-off-by: Nithin Nayak Sujir
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Nithin Sujir
     
  • Some link partners have issues if the non-standard 1G half duplex is
    advertised. This patch adds support for an nvram setting to disable the
    advertisement.

    Signed-off-by: Nithin Nayak Sujir
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Nithin Sujir
     
  • rxbds_empty is an informational statistic signifying that a ring full
    condition was observed. It does not mean an overflow has occurred.

    Signed-off-by: Nithin Nayak Sujir
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Nithin Sujir
     
  • Florian Fainelli says:

    ====================
    net: of_mdio improvements

    This patchset contains a few improvements to the MDIO device tree parsing
    code such as refactoring and parsing the "max-speed" property which is
    defined in the ePAPR specification.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The 'max-speed' property is optional but defined in the ePAPR
    specification and now supported by the Linux Device Tree parsing
    infrastructure.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • The ARC emac driver was the only in-tree to parse a PHY device
    'max-speed' property but yet failed to do it correctly because
    'max-speed' is supposed to set a PHY device supported features, not the
    advertising features as it was done.

    Now that of_mdiobus_register() takes care of doing that, remove the
    custom 'max-speed' parsing code.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • The "max-speed" property is defined per the ePAPR specification to
    express the maximum speed a PHY supports. Use that property, if present
    to set the phydev->supported features which properly restricts the PHY
    within the range of defined speeds.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Breakdown the PHY_*_FEATURES into per speed defines such that we can
    easily re-use them individually.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • If irq_of_parse_and_map fails to find an interrupt line for a given PHY,
    we will force the PHY interrupt to be PHY_POLL, completely overriding
    the previous value that the MDIO bus may have set for us (e.g:
    PHY_IGNORE_INTERRUPT). In case of failure, just restore the previous
    value.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Use the PHY_MAX_ADDR constant for checking if a MDIO bus address is
    valid instead of using a plain "32".

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Since commit 779d835e ("net: of_mdio: scan mdiobus for PHYs without reg
    property") we have two foreach loops which do pretty much the same
    thing. Factor the PHY device registration in a function helper:
    of_mdiobus_register_phy() which takes care of the details and allows for
    future PHY specific extensions.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • fix some typos

    Acked-by: Neil Horman
    Signed-off-by: Wang Weidong
    Signed-off-by: David S. Miller

    wangweidong
     
  • sctp_peer_needs_update only return 0 or 1.

    Acked-by: Neil Horman
    Signed-off-by: Wang Weidong
    Signed-off-by: David S. Miller

    wangweidong
     
  • Make the code more simplification.

    Acked-by: Neil Horman
    Suggested-by: Joe Perches
    Signed-off-by: Wang Weidong
    Signed-off-by: David S. Miller

    wangweidong
     
  • kzalloc had initialize the allocated memroy. Therefore, remove the
    initialize with 0 and the memset.

    Acked-by: Neil Horman
    Signed-off-by: Wang Weidong
    Signed-off-by: David S. Miller

    wangweidong
     
  • Jeff Kirsher says:

    ====================
    Intel Wired LAN Driver Updates

    This series contains updates to i40e only.

    Christopher Pau provides a patch to set pf_id based on device and
    function numbers since NICs with ARI enabled can have function
    numbers larger than 8.

    Anjali provides 3 i40e patches to update hardware defines to keep
    in sync with hardware updates.

    Shannon provides the majority of i40e patches, with 7. First patch
    clears the admin queue head and tail registers during admin queue
    shutdown. Then simplifies the admin queue head-tail-len setups to
    use more virtual registers. Provides several patches to cleanup
    and fix driver load and reset procedures to make more robust. Lastly,
    provides an ethtool test for interrupts using the software interrupt.

    Mitch provides some i40e patches which fixes up VF code in the PF
    driver, specifically the number of vectors per VF are reported by the
    hardware does not include vector 0, so we need to account for this
    when checking. In addition, cleans up debugging messages.

    Kamil provides an i40e patch to fix the diagnostics test by restricting
    the diagnostic test length.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • John W. Linville says:

    ====================
    Please pull this batch of updates intended for the 3.14 stream...

    For the mac80211 bits, Johannes says:

    "I have various improvements/cleanups/fixes all over, but the shortlog
    shows that Luis's regulatory work and mesh work from the cozybit folks
    are the biggest ones, along with the CSA fixes."

    Along with that, we have big batches of updates to brcmfmac, rtlwifi,
    and ath9k. There are updates to wcn36xx, rt2x00, and a handful of
    others as well.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • With the introduction of TCP Small Queues, TSO auto sizing, and TCP
    pacing, we can implement Automatic Corking in the kernel, to help
    applications doing small write()/sendmsg() to TCP sockets.

    Idea is to change tcp_push() to check if the current skb payload is
    under skb optimal size (a multiple of MSS bytes)

    If under 'size_goal', and at least one packet is still in Qdisc or
    NIC TX queues, set the TCP Small Queue Throttled bit, so that the push
    will be delayed up to TX completion time.

    This delay might allow the application to coalesce more bytes
    in the skb in following write()/sendmsg()/sendfile() system calls.

    The exact duration of the delay is depending on the dynamics
    of the system, and might be zero if no packet for this flow
    is actually held in Qdisc or NIC TX ring.

    Using FQ/pacing is a way to increase the probability of
    autocorking being triggered.

    Add a new sysctl (/proc/sys/net/ipv4/tcp_autocorking) to control
    this feature and default it to 1 (enabled)

    Add a new SNMP counter : nstat -a | grep TcpExtTCPAutoCorking
    This counter is incremented every time we detected skb was under used
    and its flush was deferred.

    Tested:

    Interesting effects when using line buffered commands under ssh.

    Excellent performance results in term of cpu usage and total throughput.

    lpq83:~# echo 1 >/proc/sys/net/ipv4/tcp_autocorking
    lpq83:~# perf stat ./super_netperf 4 -t TCP_STREAM -H lpq84 -- -m 128
    9410.39

    Performance counter stats for './super_netperf 4 -t TCP_STREAM -H lpq84 -- -m 128':

    35209.439626 task-clock # 2.901 CPUs utilized
    2,294 context-switches # 0.065 K/sec
    101 CPU-migrations # 0.003 K/sec
    4,079 page-faults # 0.116 K/sec
    97,923,241,298 cycles # 2.781 GHz [83.31%]
    51,832,908,236 stalled-cycles-frontend # 52.93% frontend cycles idle [83.30%]
    25,697,986,603 stalled-cycles-backend # 26.24% backend cycles idle [66.70%]
    102,225,978,536 instructions # 1.04 insns per cycle
    # 0.51 stalled cycles per insn [83.38%]
    18,657,696,819 branches # 529.906 M/sec [83.29%]
    91,679,646 branch-misses # 0.49% of all branches [83.40%]

    12.136204899 seconds time elapsed

    lpq83:~# echo 0 >/proc/sys/net/ipv4/tcp_autocorking
    lpq83:~# perf stat ./super_netperf 4 -t TCP_STREAM -H lpq84 -- -m 128
    6624.89

    Performance counter stats for './super_netperf 4 -t TCP_STREAM -H lpq84 -- -m 128':
    40045.864494 task-clock # 3.301 CPUs utilized
    171 context-switches # 0.004 K/sec
    53 CPU-migrations # 0.001 K/sec
    4,080 page-faults # 0.102 K/sec
    111,340,458,645 cycles # 2.780 GHz [83.34%]
    61,778,039,277 stalled-cycles-frontend # 55.49% frontend cycles idle [83.31%]
    29,295,522,759 stalled-cycles-backend # 26.31% backend cycles idle [66.67%]
    108,654,349,355 instructions # 0.98 insns per cycle
    # 0.57 stalled cycles per insn [83.34%]
    19,552,170,748 branches # 488.244 M/sec [83.34%]
    157,875,417 branch-misses # 0.81% of all branches [83.34%]

    12.130267788 seconds time elapsed

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

    Eric Dumazet
     
  • Use PCI standard macro dev_is_pci() instead of hardcoding.

    Signed-off-by: Yijing Wang
    Signed-off-by: David S. Miller

    Yijing Wang
     
  • Replace local macro DFX_BUS_PCI() with PCI standard macro
    dev_is_pci().

    Acked-by: Maciej W. Rozycki
    Signed-off-by: Yijing Wang
    Signed-off-by: David S. Miller

    Yijing Wang
     
  • Compiler doesn't know skb_shinfo(skb) pointer is usually constant.

    By using a temporary variable, we help generating smaller code.

    For example, tcp_init_nondata_skb() is inlined after this patch.

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

    Eric Dumazet
     
  • Remove one useless conditional branch :
    napi->skb is NULL, so nothing bad can happen.

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

    Eric Dumazet