1. 06 Oct, 2014 16 commits
    • Petri Gynther's avatar
      net: bcmgenet: improve bcmgenet_mii_setup() · 5ad6e6c5
      Petri Gynther authored
      bcmgenet_mii_setup() is called from the PHY state machine every 1-2 seconds
      when the PHYs are in PHY_POLL mode.
      
      Improve bcmgenet_mii_setup() so that it touches the MAC registers only when
      the link is up and there was a change to link, speed, duplex, or pause status.
      Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
      Tested-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ad6e6c5
    • David S. Miller's avatar
      Merge branch 'altera_tse' · f13909cd
      David S. Miller authored
      Walter Lozano says:
      
      ====================
      Altera TSE with no PHY
      
      In some scenarios there is no PHY chip present, for example in optical links.
      This serie of patches moves PHY get addr and MDIO create to a new function and
      avoids PHY and MDIO probing in these cases.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f13909cd
    • Walter Lozano's avatar
      Altera TSE: Add support for no PHY · 3354313e
      Walter Lozano authored
      This patch avoids PHY and MDIO probing if no PHY chip is present.
      This is the case mainly in optical links where there is no need for
      PHY chip, and therefore no need of MDIO. In this scenario Ethernet
      MAC is directly connected to an optical module through an external
      SFP transceiver.
      Signed-off-by: default avatarWalter Lozano <walter@vanguardiasur.com.ar>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3354313e
    • Walter Lozano's avatar
      Altera TSE: Move PHY get addr and MDIO create · 004fa118
      Walter Lozano authored
      Move PHY get addr and MDIO create to a new function to improve readability
      and make it easier to avoid its usage. This will be useful for example in
      the case where there is no PHY chip.
      Signed-off-by: default avatarWalter Lozano <walter@vanguardiasur.com.ar>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      004fa118
    • David S. Miller's avatar
      Merge tag 'master-2014-10-02' of... · a4b4a2b7
      David S. Miller authored
      Merge tag 'master-2014-10-02' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
      
      John W. Linville says:
      
      ====================
      pull request: wireless-next 2014-10-03
      
      Please pull tihs batch of updates intended for the 3.18 stream!
      
      For the iwlwifi bits, Emmanuel says:
      
      "I have here a few things that depend on the latest mac80211's changes:
      RRM, TPC, Quiet Period etc...  Eyal keeps improving our rate control
      and we have a new device ID. This last patch should probably have
      gone to wireless.git, but at that stage, I preferred to send it to
      -next and CC stable."
      
      For (most of) the Atheros bits, Kalle says:
      
      "The only new feature is testmode support from me. Ben added a new method
      to crash the firmware with an assert for debug purposes. As usual, we
      have lots of smaller fixes from Michal. Matteo fixed a Kconfig
      dependency with debugfs. I fixed some warnings recently added to
      checkpatch."
      
      For the NFC bits, Samuel says:
      
      "We've had major updates for TI and ST Microelectronics drivers, and a
      few NCI related changes.
      
      For TI's trf7970a driver:
      
      - Target mode support for trf7970a
      - Suspend/resume support for trf7970a
      - DT properties additions to handle different quirks
      - A bunch of fixes for smartphone IOP related issues
      
      For ST Microelectronics' ST21NFCA and ST21NFCB drivers:
      
      - ISO15693 support for st21nfcb
      - checkpatch and sparse related warning fixes
      - Code cleanups and a few minor fixes
      
      Finally, Marvell added ISO15693 support to the NCI stack, together with a
      couple of NCI fixes."
      
      For the Bluetooth bits, Johan says:
      
      "This 3.18 pull request replaces the one I did on Monday ("bluetooth-next
      2014-09-22", which hasn't been pulled yet). The additions since the last
      request are:
      
       - SCO connection fix for devices not supporting eSCO
       - Cleanups regarding the SCO establishment logic
       - Remove unnecessary return value from logging functions
       - Header compression fix for 6lowpan
       - Cleanups to the ieee802154/mrf24j40 driver
      
      Here's a copy from previous request that this one replaces:
      
      '
      Here are some more patches for 3.18. They include various fixes to the
      btusb HCI driver, a fix for LE SMP, as well as adding Jukka to the
      MAINTAINERS file for generic 6LoWPAN (as requested by Alexander Aring).
      
      I've held on to this pull request a bit since we were waiting for a SCO
      related fix to get sorted out first. However, since the merge window is
      getting closer I decided not to wait for it. If we do get the fix sorted
      out there'll probably be a second small pull request later this week.
      '"
      
      And,
      
      "Unless 3.17 gets delayed this will probably be our last -next pull request for
      3.18. We've got:
      
        - New Marvell hardware supportr
        - Multicast support for 6lowpan
        - Several of 6lowpan fixes & cleanups
        - Fix for a (false-positive) lockdep warning in L2CAP
        - Minor btusb cleanup"
      
      On top of all that comes the usual sort of updates to ath5k, ath9k,
      ath10k, brcmfmac, mwifiex, and wil6210.  This time around there are
      also a number of rtlwifi updates to enable some new hardware and
      to reconcile the in-kernel drivers with some newer releases of the
      Realtek vendor drivers.  Also of note is some device tree work for
      the bcma bus.
      
      Please let me know if there are problems!
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4b4a2b7
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 61b37d2f
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS updates for net-next
      
      The following patchset contains another batch with Netfilter/IPVS updates
      for net-next, they are:
      
      1) Add abstracted ICMP codes to the nf_tables reject expression. We
         introduce four reasons to reject using ICMP that overlap in IPv4
         and IPv6 from the semantic point of view. This should simplify the
         maintainance of dual stack rule-sets through the inet table.
      
      2) Move nf_send_reset() functions from header files to per-family
         nf_reject modules, suggested by Patrick McHardy.
      
      3) We have to use IS_ENABLED(CONFIG_BRIDGE_NETFILTER) everywhere in the
         code now that br_netfilter can be modularized. Convert remaining spots
         in the network stack code.
      
      4) Use rcu_barrier() in the nf_tables module removal path to ensure that
         we don't leave object that are still pending to be released via
         call_rcu (that may likely result in a crash).
      
      5) Remove incomplete arch 32/64 compat from nft_compat. The original (bad)
         idea was to probe the word size based on the xtables match/target info
         size, but this assumption is wrong when you have to dump the information
         back to userspace.
      
      6) Allow to filter from prerouting and postrouting in the nf_tables bridge.
         In order to emulate the ebtables NAT chains (which are actually simple
         filter chains with no special semantics), we have support filtering from
         this hooks too.
      
      7) Add explicit module dependency between xt_physdev and br_netfilter.
         This provides a way to detect if the user needs br_netfilter from
         the configuration path. This should reduce the breakage of the
         br_netfilter modularization.
      
      8) Cleanup coding style in ip_vs.h, from Simon Horman.
      
      9) Fix crash in the recently added nf_tables masq expression. We have
         to register/unregister the notifiers to clean up the conntrack table
         entries from the module init/exit path, not from the rule addition /
         deletion path. From Arturo Borrero.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61b37d2f
    • David S. Miller's avatar
      Merge branch 'bridge_default_pvid' · ad9eef52
      David S. Miller authored
      Vladislav Yasevich says:
      
      ====================
      bridge: Add vlan filtering support for default pvid
      
      This series adds default pvid support to vlan filtering in the bridge.
      VLAN 1 (as recommended by 802.1q spec) is used as default pvid on ports.
      Then the user can over-ride this configuration by configuring their
      own vlan information.
      The user can additionally change the default value through the
      sysfs interface (netlink coming shortly).
      The user can turn off default pvid functionality by setting default
      pvid to 0.
      This series changes the default behavior of the bridge when
      vlan filtering is turned on.  Currently, ports without any vlan
      filtering configured will not recevie any traffic at all.  This patch
      changes the behavior of the above ports to receive only untagged traffic.
      
      Since v3:
      - allocated 'changed' bitmap on the heap and re-arrange code to clean it up.
      - remove extra blank lines.
      - Fix patch1 to build by itself.
      - Fix error recover to not add vlan 0.
      - Restructure nbp_vlan_init to remove uneeded variable.
      
      Since v2:
      - Fix handling of invalid values in sysfs interface.
      - Add some additional log messages.
      - Fix default_pvid handling when vlan filtering is compiled out.
      - Fix sparse issues with new code.
      - Fix how we located the old default pvid (added a helper function).
      
      Since v1:
      - Add ability to turn off default_pvid settings.
      - Drop the automiatic filtering support based on configured vlan devices (will
        be its own series)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ad9eef52
    • Vlad Yasevich's avatar
      bridge: Add filtering support for default_pvid · 5be5a2df
      Vlad Yasevich authored
      Currently when vlan filtering is turned on on the bridge, the bridge
      will drop all traffic untill the user configures the filter.  This
      isn't very nice for ports that don't care about vlans and just
      want untagged traffic.
      
      A concept of a default_pvid was recently introduced.  This patch
      adds filtering support for default_pvid.   Now, ports that don't
      care about vlans and don't define there own filter will belong
      to the VLAN of the default_pvid and continue to receive untagged
      traffic.
      
      This filtering can be disabled by setting default_pvid to 0.
      Signed-off-by: default avatarVladislav Yasevich <vyasevic@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5be5a2df
    • Vlad Yasevich's avatar
      bridge: Simplify pvid checks. · 3df6bf45
      Vlad Yasevich authored
      Currently, if the pvid is not set, we return an illegal vlan value
      even though the pvid value is set to 0.  Since pvid of 0 is currently
      invalid, just return 0 instead.  This makes the current and future
      checks simpler.
      Signed-off-by: default avatarVladislav Yasevich <vyasevic@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3df6bf45
    • Vlad Yasevich's avatar
      bridge: Add a default_pvid sysfs attribute · 96a20d9d
      Vlad Yasevich authored
      This patch allows the user to set and retrieve default_pvid
      value.  A new value can only be stored when vlan filtering
      is disabled.
      Signed-off-by: default avatarVladislav Yasevich <vyasevic@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96a20d9d
    • Antoine Ténart's avatar
      net: pxa168_eth: avoid using signed char for bitops · e885439f
      Antoine Ténart authored
      Signedness bugs may occur when using signed char for bitops,
      depending on if the highest bit is ever used.
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e885439f
    • David S. Miller's avatar
      Merge branch 'isdn-next' · 5555dfdc
      David S. Miller authored
      Tilman Schmidt says:
      
      ====================
      ISDN patches for net-next
      
      Here's a series of patches for the ISDN CAPI subsystem and the
      Gigaset ISDN driver.  Please merge via net-next.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5555dfdc
    • Tilman Schmidt's avatar
      isdn/gigaset: use USB API function usb_endpoint_num() · 7b0c67e4
      Tilman Schmidt authored
      Use function usb_endpoint_num() for the bulk endpoint and store
      the endpoint number in the cardstate structure instead of the raw
      endpoint address value.
      Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b0c67e4
    • Tilman Schmidt's avatar
      isdn/gigaset: drop unused cardstate structure member · 434d13ba
      Tilman Schmidt authored
      Field int_in_endpointAddr was set but never used. Drop it.
      Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      434d13ba
    • Tilman Schmidt's avatar
      isdn/gigaset: improve error handling when leaving DLE mode · 5dcd7d84
      Tilman Schmidt authored
      Avoid cascading warnings when leaving DLE mode fails by clearing
      the DLE flag before entering recovery.
      Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5dcd7d84
    • Tilman Schmidt's avatar
      isdn/capi: drop two dead if branches · 51db998f
      Tilman Schmidt authored
      The last branch in command_2_index() cannot be reached since
      c==0xff is already caught by the first "if".
      The empty second branch makes no difference since no other branch
      will be taken for c<0x0f.
      Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51db998f
  2. 05 Oct, 2014 5 commits
    • John Fastabend's avatar
      net: sched: suspicious RCU usage in qdisc_watchdog · 1e203c1a
      John Fastabend authored
      Suspicious RCU usage in qdisc_watchdog call needs to be done inside
      rcu_read_lock/rcu_read_unlock. And then Qdisc destroy operations
      need to ensure timer is cancelled before removing qdisc structure.
      
      [ 3992.191339] ===============================
      [ 3992.191340] [ INFO: suspicious RCU usage. ]
      [ 3992.191343] 3.17.0-rc6net-next+ #72 Not tainted
      [ 3992.191345] -------------------------------
      [ 3992.191347] include/net/sch_generic.h:272 suspicious rcu_dereference_check() usage!
      [ 3992.191348]
      [ 3992.191348] other info that might help us debug this:
      [ 3992.191348]
      [ 3992.191351]
      [ 3992.191351] rcu_scheduler_active = 1, debug_locks = 1
      [ 3992.191353] no locks held by swapper/1/0.
      [ 3992.191355]
      [ 3992.191355] stack backtrace:
      [ 3992.191358] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.17.0-rc6net-next+ #72
      [ 3992.191360] Hardware name:                  /DZ77RE-75K, BIOS GAZ7711H.86A.0060.2012.1115.1750 11/15/2012
      [ 3992.191362]  0000000000000001 ffff880235803e48 ffffffff8178f92c 0000000000000000
      [ 3992.191366]  ffff8802322224a0 ffff880235803e78 ffffffff810c9966 ffff8800a5fe3000
      [ 3992.191370]  ffff880235803f30 ffff8802359cd768 ffff8802359cd6e0 ffff880235803e98
      [ 3992.191374] Call Trace:
      [ 3992.191376]  <IRQ>  [<ffffffff8178f92c>] dump_stack+0x4e/0x68
      [ 3992.191387]  [<ffffffff810c9966>] lockdep_rcu_suspicious+0xe6/0x130
      [ 3992.191392]  [<ffffffff8167213a>] qdisc_watchdog+0x8a/0xb0
      [ 3992.191396]  [<ffffffff810f93f2>] __run_hrtimer+0x72/0x420
      [ 3992.191399]  [<ffffffff810f9bcd>] ? hrtimer_interrupt+0x7d/0x240
      [ 3992.191403]  [<ffffffff816720b0>] ? tc_classify+0xc0/0xc0
      [ 3992.191406]  [<ffffffff810f9c4f>] hrtimer_interrupt+0xff/0x240
      [ 3992.191410]  [<ffffffff8109e4a5>] ? __atomic_notifier_call_chain+0x5/0x140
      [ 3992.191415]  [<ffffffff8103577b>] local_apic_timer_interrupt+0x3b/0x60
      [ 3992.191419]  [<ffffffff8179c2b5>] smp_apic_timer_interrupt+0x45/0x60
      [ 3992.191422]  [<ffffffff8179a6bf>] apic_timer_interrupt+0x6f/0x80
      [ 3992.191424]  <EOI>  [<ffffffff815ed233>] ? cpuidle_enter_state+0x73/0x2e0
      [ 3992.191432]  [<ffffffff815ed22e>] ? cpuidle_enter_state+0x6e/0x2e0
      [ 3992.191437]  [<ffffffff815ed567>] cpuidle_enter+0x17/0x20
      [ 3992.191441]  [<ffffffff810c0741>] cpu_startup_entry+0x3d1/0x4a0
      [ 3992.191445]  [<ffffffff81106fc6>] ? clockevents_config_and_register+0x26/0x30
      [ 3992.191448]  [<ffffffff81033c16>] start_secondary+0x1b6/0x260
      
      Fixes: b26b0d1e ("net: qdisc: use rcu prefix and silence sparse warnings")
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Acked-by: default avatarCong Wang <cwang@twopensource.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e203c1a
    • Florian Fainelli's avatar
      net: dsa: do not call phy_start_aneg · f7d6b96f
      Florian Fainelli authored
      Commit f7f1de51 ("net: dsa: start and stop the PHY state machine")
      add calls to phy_start() in dsa_slave_open() respectively phy_stop() in
      dsa_slave_close().
      
      We also call phy_start_aneg() in dsa_slave_create(), and this call is
      messing up with the PHY state machine, since we basically start the
      auto-negotiation, and later on restart it when calling phy_start().
      phy_start() does not currently handle the PHY_FORCING or PHY_AN states
      properly, but such a fix would be too invasive for this window.
      
      Fixes: f7f1de51 ("net: dsa: start and stop the PHY state machine")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7d6b96f
    • Sébastien Barré's avatar
      Removed unused inet6 address state · dd3619f2
      Sébastien Barré authored
      the inet6 state INET6_IFADDR_STATE_UP only appeared in its definition.
      
      Cc: Christoph Paasch <christoph.paasch@uclouvain.be>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarSébastien Barré <sebastien.barre@uclouvain.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dd3619f2
    • Vijay Subramanian's avatar
      net: Cleanup skb cloning by adding SKB_FCLONE_FREE · c8753d55
      Vijay Subramanian authored
      SKB_FCLONE_UNAVAILABLE has overloaded meaning depending on type of skb.
      1: If skb is allocated from head_cache, it indicates fclone is not available.
      2: If skb is a companion fclone skb (allocated from fclone_cache), it indicates
      it is available to be used.
      
      To avoid confusion for case 2 above, this patch  replaces
      SKB_FCLONE_UNAVAILABLE with SKB_FCLONE_FREE where appropriate. For fclone
      companion skbs, this indicates it is free for use.
      
      SKB_FCLONE_UNAVAILABLE will now simply indicate skb is from head_cache and
      cannot / will not have a companion fclone.
      Signed-off-by: default avatarVijay Subramanian <subramanian.vijay@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c8753d55
    • Eric Dumazet's avatar
      mlx4: add a new xmit_more counter · 9fab426d
      Eric Dumazet authored
      ethtool -S reports a new counter, tracking number of time doorbell
      was not triggered, because skb->xmit_more was set.
      
      $ ethtool -S eth0 | egrep "tx_packet|xmit_more"
           tx_packets: 2413288400
           xmit_more: 666121277
      
      I merged the tso_packet false sharing avoidance in this patch as well.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9fab426d
  3. 03 Oct, 2014 19 commits
    • David S. Miller's avatar
      Merge branch 'gudp' · 6106253e
      David S. Miller authored
      Tom Herbert says:
      
      ====================
      net: Generic UDP Encapsulation
      
      Generic UDP Encapsulation (GUE) is UDP encapsulation protocol which
      encapsulates packets of various IP protocols. The GUE protocol is
      described in http://tools.ietf.org/html/draft-herbert-gue-01.
      
      The receive path of GUE is implemented in the FOU over UDP module (FOU).
      This includes a UDP encap receive function for GUE as well as GUE
      specific GRO functions. Management and configuration of GUE ports shares
      most of the same code with FOU.
      
      For the transmit path, the previous FOU support for IPIP, sit, and GRE
      was simply extended for GUE (when GUE is enabled insert the GUE
      header on transmit in addition to UDP header inserted for FOU).
      
      Semantically GUE is the same as FOU in that the encapsulation (UDP
      and GUE headers) that are inserted on transmission and removed on
      reception so that IP packet is processed with the inner header.
      
      This patch set includes:
       - Some fixes to FOU, removal of IPv4,v6 specific GRO functions
       - Support to configure a GUE receive port
       - Implementation of GUE receive path (normal and GRO)
       - Additions to ip_tunnel netlink to configure GUE
       - GUE header inserion in ip_tunnel transmit path
      
      v2:
       - Include net/gue.h in patch set
      
      Testing:
      
      I ran performance numbers using netperf TCP_RR with 200 streams,
      comparing encapsulation without GUE, encapsulation with GUE, and
      encapsulation with FOU.
      
       GRE
          TCP_STREAM
            IPv4, FOU, UDP checksum enabled
              14.04% TX CPU utilization
              13.17% RX CPU utilization
              9211 Mbps
            IPv4, GUE, UDP checksum enabled
              14.99% TX CPU utilization
              13.79% RX CPU utilization
              9185 Mbps
            IPv4, FOU, UDP checksum disabled
              13.14% TX CPU utilization
              23.18% RX CPU utilization
              9277 Mbps
            IPv4, GUE, UDP checksum disabled
              13.66% TX CPU utilization
              23.57% RX CPU utilization
              9184 Mbps
          TCP_RR
            IPv4, FOU, UDP checksum enabled
              94.2% CPU utilization
              155/249/460 90/95/99% latencies
              1.17018e+06 tps
            IPv4, GUE, UDP checksum enabled
              93.9% CPU utilization
              158/253/472 90/95/99% latencies
              1.15045e+06 tps
      
        IPIP
          TCP_STREAM
            FOU, UDP checksum enabled
              15.28% TX CPU utilization
              13.92% RX CPU utilization
              9342 Mbps
            GUE, UDP checksum enabled
              13.99% TX CPU utilization
              13.34% RX CPU utilization
              9210 Mbps
            FOU, UDP checksum disabled
              15.08% TX CPU utilization
              24.64% RX CPU utilization
              9226 Mbps
            GUE, UDP checksum disabled
              15.90% TX CPU utilization
              24.77% RX CPU utilization
              9197 Mbps
          TCP_RR
            FOU, UDP checksum enabled
              94.23% CPU utilization
              149/237/429 90/95/99% latencies
              1.19553e+06 tps
            GUE, UDP checksum enabled
              93.75% CPU utilization
              152/243/442 90/95/99% latencies
              1.17027e+06 tps
      
        SIT
          TCP_STREAM
            FOU, UDP checksum enabled
              14.47% TX CPU utilization
              14.58% RX CPU utilization
              9106 Mbps
            GUE, UDP checksum enabled
              15.09% TX CPU utilization
              14.84% RX CPU utilization
              9080 Mbps
            FOU, UDP checksum disabled
              15.70% TX CPU utilization
              27.93% RX CPU utilization
              9097 Mbps
            GUE, UDP checksum disabled
              15.04% TX CPU utilization
              27.54% RX CPU utilization
              9073 Mbps
          TCP_RR
            FOU, UDP checksum enabled
              96.9% CPU utilization
              170/281/581 90/95/99% latencies
              1.03372e+06 tps
            GUE, UDP checksum enabled
              97.16% CPU utilization
              172/286/576 90/95/99% latencies
              1.00469e+06 tps
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6106253e
    • Tom Herbert's avatar
      ip_tunnel: Add GUE support · bc1fc390
      Tom Herbert authored
      This patch allows configuring IPIP, sit, and GRE tunnels to use GUE.
      This is very similar to fou excpet that we need to insert the GUE header
      in addition to the UDP header on transmit.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc1fc390
    • Tom Herbert's avatar
      gue: Receive side for Generic UDP Encapsulation · 37dd0247
      Tom Herbert authored
      This patch adds support receiving for GUE packets in the fou module. The
      fou module now supports direct foo-over-udp (no encapsulation header)
      and GUE. To support this a type parameter is added to the fou netlink
      parameters.
      
      For a GUE socket we define gue_udp_recv, gue_gro_receive, and
      gue_gro_complete to handle the specifics of the GUE protocol. Most
      of the code to manage and configure sockets is common with the fou.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37dd0247
    • Tom Herbert's avatar
      fou: eliminate IPv4,v6 specific GRO functions · efc98d08
      Tom Herbert authored
      This patch removes fou[46]_gro_receive and fou[46]_gro_complete
      functions. The v4 or v6 variants were chosen for the UDP offloads
      based on the address family of the socket this is not necessary
      or correct. Alternatively, this patch adds is_ipv6 to napi_gro_skb.
      This is set in udp6_gro_receive and unset in udp4_gro_receive. In
      fou_gro_receive the value is used to select the correct inet_offloads
      for the protocol of the outer IP header.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      efc98d08
    • Tom Herbert's avatar
      ip_tunnel: Account for secondary encapsulation header in max_headroom · 7371e022
      Tom Herbert authored
      When adjusting max_header for the tunnel interface based on egress
      device we need to account for any extra bytes in secondary encapsulation
      (e.g. FOU).
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7371e022
    • Eric Dumazet's avatar
      net: do not export skb_gro_receive() · 01291202
      Eric Dumazet authored
      skb_gro_receive() is only called from tcp_gro_receive() which is
      not in a module.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      01291202
    • Chen Gang's avatar
      drivers/net/irda/Kconfig: Let SH_IRDA depend on HAS_IOMEM · ad2a2a6d
      Chen Gang authored
      SH_IRDA needs HAS_IOMEM, so depend on it. The related error(with
      allmodconfig under um):
      
          CC [M]  drivers/net/irda/sh_irda.o
        drivers/net/irda/sh_irda.c: In function ‘sh_irda_probe’:
        drivers/net/irda/sh_irda.c:776:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration]
          self->membase = ioremap_nocache(res->start, resource_size(res));
          ^
        drivers/net/irda/sh_irda.c:776:16: warning: assignment makes pointer from integer without a cast [enabled by default]
          self->membase = ioremap_nocache(res->start, resource_size(res));
                        ^
        drivers/net/irda/sh_irda.c:821:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
          iounmap(self->membase);
          ^
      Signed-off-by: default avatarChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ad2a2a6d
    • Chen Gang's avatar
      drivers/net/ethernet/marvell/Kconfig: Let PXA168_ETH depend on HAS_IOMEM · 65cb29a4
      Chen Gang authored
      PXA168_ETH need HAS_IOMEM, so depend on it, the related error (with
      allmodconfig under um):
      
          CC [M]  drivers/net/ethernet/marvell/pxa168_eth.o
        drivers/net/ethernet/marvell/pxa168_eth.c: In function ‘pxa168_eth_probe’:
        drivers/net/ethernet/marvell/pxa168_eth.c:1605:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
          iounmap(pep->base);
          ^
      Signed-off-by: default avatarChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      65cb29a4
    • Chen Gang's avatar
      drivers/net/dsa/Kconfig: Let NET_DSA_BCM_SF2 depend on HAS_IOMEM · 28b5533a
      Chen Gang authored
      NET_DSA_BCM_SF2 need HAS_IOMEM, so depend on it, the related error (with
      allmodconfig under um):
      
          CC [M]  drivers/net/dsa/bcm_sf2.o
        drivers/net/dsa/bcm_sf2.c: In function ‘bcm_sf2_sw_setup’:
        drivers/net/dsa/bcm_sf2.c:487:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
           iounmap(*base);
           ^
      Signed-off-by: default avatarChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      28b5533a
    • Chen Gang's avatar
      drivers/net/can/Kconfig: Let CAN_AT91 depend on HAS_IOMEM · 9dc8be28
      Chen Gang authored
      CAN_AT91 needs HAS_IOMEM, so depends on it. The related error (with
      allmodconfig under um):
      
          CC [M]  drivers/net/can/at91_can.o
        drivers/net/can/at91_can.c: In function ‘at91_can_probe’:
        drivers/net/can/at91_can.c:1329:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration]
        addr = ioremap_nocache(res->start, resource_size(res));
          ^
        drivers/net/can/at91_can.c:1329:7: warning: assignment makes pointer from integer without a cast [enabled by default]
          addr = ioremap_nocache(res->start, resource_size(res));
               ^
        drivers/net/can/at91_can.c:1384:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
          iounmap(addr);
          ^
      Signed-off-by: default avatarChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9dc8be28
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · 579899a9
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2014-10-02
      
      This series contains updates to fm10k, igb, ixgbe and i40e.
      
      Alex provides two updates to the fm10k driver.  First reduces the buffer
      size to 2k for all page sizes, since most frames only have a 1500 MTU
      so supporting a buffer size larger than this is somewhat wasteful.
      Second fixes an issue where the number of transmit queues was not being
      updated, so added the lines necessary to update the number of transmit
      queues.
      
      Rick Jones provides two patches to convert ixgbe, igb and i40e to use
      dev_consume_skb_any().
      
      Emil provides two patches for ixgbe, first cleans up a couple of wait
      loops on auto-negotiation that were not needed.  Second fixes an issue
      reported by Fujitsu/Red Hat, which consolidates the logic behind the
      dynamically setting of TXDCTL.WTHRESH depending on interrupt throttle
      rate (ITR) setting regardless of BQL.
      
      Ethan Zhao provides a cleanup patch for ixgbe where he noticed a
      duplicate define.
      
      Bernhard Kaindl provides a patch for igb to remove a source of latency
      spikes by not calling code that uses mdelay() for feeding a PHY stat
      while being called with a spinlock held.
      
      Todd bumps the igb version based on the recent changes.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      579899a9
    • David S. Miller's avatar
      Merge branch 'mlx5-next' · 48fea861
      David S. Miller authored
      Eli Cohen says:
      
      ====================
      mlx5 update for 3.18
      
      This series integrates a new mechanism for populating and extracting field values
      used in the driver/firmware interaction around command mailboxes.
      
      Changes from V1:
       - Remove unused definition of memcpy_cpu_to_be32()
       - Remove definitions of non_existent_*() and use BUILD_BUG_ON() instead.
       - Added a patch one line patch to add support for ConnectX-4 devices.
      
      Changes from V0:
       - trimmed the auto-generated file to a minimum, as required by the reviewers.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48fea861
    • Eli Cohen's avatar
      net/mlx5_core: Add ConnectX-4 to list of supported devices · f832dc82
      Eli Cohen authored
      Add the upcoming ConnectX-4 device to the list of supported devices by then
      mlx5 driver.
      Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f832dc82
    • Eli Cohen's avatar
      net/mlx5_core: Identify resources by their type · 5903325a
      Eli Cohen authored
      This patch puts a common part as the first field of mlx5_core_qp. This field is
      used to identify which resource generated an event. This is required since upcoming
      new resource types such as DC targets are allocated for the same numerical space
      as regular QPs and may generate the same events. By searching the resource in the
      same table we can then look at the common field to identify the resource.
      Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5903325a
    • Eli Cohen's avatar
      net/mlx5_core: use set/get macros in device caps · b775516b
      Eli Cohen authored
      Transform device capabilities related commands to use set/get macros to
      manipulate command mailboxes.
      Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b775516b
    • Eli Cohen's avatar
      net/mlx5_core: Use hardware registers description header file · d29b796a
      Eli Cohen authored
      Add an auto generated header file that describes hardware registers along with
      set of macros that set/get values. The macros do static checks to avoid
      overflow, handle endianess, and overall provide a clean way to code commands.
      Currently the header file is small and we will add structs as we make use of
      the macros.
      A few commands were removed from the commands enum since they are not supported
      currently and will be added when support is available.
      Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d29b796a
    • Eli Cohen's avatar
      net/mlx5_core: Update device capabilities handling · c7a08ac7
      Eli Cohen authored
      Rearrange struct mlx5_caps so it has a "gen" field to represent the current
      capabilities configured for the device. Max capabilities can also be queried
      from the device. Also update capabilities struct to contain more fields as per
      the latest revision if firmware specification.
      Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7a08ac7
    • Eric Dumazet's avatar
      qdisc: validate skb without holding lock · 55a93b3e
      Eric Dumazet authored
      Validation of skb can be pretty expensive :
      
      GSO segmentation and/or checksum computations.
      
      We can do this without holding qdisc lock, so that other cpus
      can queue additional packets.
      
      Trick is that requeued packets were already validated, so we carry
      a boolean so that sch_direct_xmit() can validate a fresh skb list,
      or directly use an old one.
      
      Tested on 40Gb NIC (8 TX queues) and 200 concurrent flows, 48 threads
      host.
      
      Turning TSO on or off had no effect on throughput, only few more cpu
      cycles. Lock contention on qdisc lock disappeared.
      
      Same if disabling TX checksum offload.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55a93b3e
    • Tobias Klauser's avatar
      net: ethernet: Remove superfluous ether_setup after alloc_etherdev · 6a05880a
      Tobias Klauser authored
      There is no need to call ether_setup after alloc_ethdev since it was
      already called there.
      
      Follow commits c706471b ("net: axienet: remove unnecessary
      ether_setup after alloc_etherdev") and 3c87dcbf ("net: ll_temac:
      Remove unnecessary ether_setup after alloc_etherdev") and fix the
      pattern in all remaining ethernet drivers.
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6a05880a