1. 14 5月, 2015 14 次提交
  2. 13 5月, 2015 26 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 110bc767
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Handle max TX power properly wrt VIFs and the MAC in iwlwifi, from
          Avri Altman.
      
       2) Use the correct FW API for scan completions in iwlwifi, from Avraham
          Stern.
      
       3) FW monitor in iwlwifi accidently uses unmapped memory, fix from Liad
          Kaufman.
      
       4) rhashtable conversion of mac80211 station table was buggy, the
          virtual interface was not taken into account.  Fix from Johannes
          Berg.
      
       5) Fix deadlock in rtlwifi by not using a zero timeout for
          usb_control_msg(), from Larry Finger.
      
       6) Update reordering state before calculating loss detection, from
          Yuchung Cheng.
      
       7) Fix off by one in bluetooth firmward parsing, from Dan Carpenter.
      
       8) Fix extended frame handling in xiling_can driver, from Jeppe
          Ledet-Pedersen.
      
       9) Fix CODEL packet scheduler behavior in the presence of TSO packets,
          from Eric Dumazet.
      
      10) Fix NAPI budget testing in fm10k driver, from Alexander Duyck.
      
      11) macvlan needs to propagate promisc settings down the the lower
          device, from Vlad Yasevich.
      
      12) igb driver can oops when changing number of rings, from Toshiaki
          Makita.
      
      13) Source specific default routes not handled properly in ipv6, from
          Markus Stenberg.
      
      14) Use after free in tc_ctl_tfilter(), from WANG Cong.
      
      15) Use softirq spinlocking in netxen driver, from Tony Camuso.
      
      16) Two ARM bpf JIT fixes from Nicolas Schichan.
      
      17) Handle MSG_DONTWAIT properly in ring based AF_PACKET sends, from
          Mathias Kretschmer.
      
      18) Fix x86 bpf JIT implementation of FROM_{BE16,LE16,LE32}, from Alexei
          Starovoitov.
      
      19) ll_temac driver DMA maps TX packet header with incorrect length, fix
          from Michal Simek.
      
      20) We removed pm_qos bits from netdevice.h, but some indirect
          references remained.  Kill them.  From David Ahern.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (90 commits)
        net: Remove remaining remnants of pm_qos from netdevice.h
        e1000e: Add pm_qos header
        net: phy: micrel: Fix regression in kszphy_probe
        net: ll_temac: Fix DMA map size bug
        x86: bpf_jit: fix FROM_BE16 and FROM_LE16/32 instructions
        netns: return RTM_NEWNSID instead of RTM_GETNSID on a get
        Update be2net maintainers' email addresses
        net_sched: gred: use correct backlog value in WRED mode
        pppoe: drop pppoe device in pppoe_unbind_sock_work
        net: qca_spi: Fix possible race during probe
        net: mdio-gpio: Allow for unspecified bus id
        af_packet / TX_RING not fully non-blocking (w/ MSG_DONTWAIT).
        bnx2x: limit fw delay in kdump to 5s after boot
        ARM: net: delegate filter to kernel interpreter when imm_offset() return value can't fit into 12bits.
        ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction.
        mpls: Change reserved label names to be consistent with netbsd
        usbnet: avoid integer overflow in start_xmit
        netxen_nic: use spin_[un]lock_bh around tx_clean_lock (2)
        net: xgene_enet: Set hardware dependency
        net: amd-xgbe: Add hardware dependency
        ...
      110bc767
    • D
      net: Remove remaining remnants of pm_qos from netdevice.h · 01d460dd
      David Ahern 提交于
      Commit e2c65448 removed pm_qos from struct net_device but left the
      comment and header file. Remove those.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Thomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01d460dd
    • D
      e1000e: Add pm_qos header · 5684044f
      David Ahern 提交于
      Commit e2c65448 moved pm_qos_req to e1000_adapter. Add the header file
      that defines the struct.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Thomas Graf <tgraf@suug.ch>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5684044f
    • Y
      net: make skb_dst_pop routine static · 9449c3cd
      Ying Xue 提交于
      As xfrm_output_one() is the only caller of skb_dst_pop(), we should
      make skb_dst_pop() localized.
      Signed-off-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9449c3cd
    • N
      net: phy: micrel: Fix regression in kszphy_probe · bced8701
      Niklas Cassel 提交于
      Don't do clock-mode-select if clk == NULL,
      since when building without CONFIG_HAVE_CLK,
      clk_get returns NULL and clk_get_rate returns 0.
      
      Doing clock-mode-select in this cause causes kszphy_probe to
      return -EINVAL and thus prevents the device from being probed.
      
      The original code (before regression) would return 0
      when building without CONFIG_HAVE_CLK.
      
      Cc: stable <stable@vger.kernel.org> # 3.18+
      Fixes: 1fadee0c ("net/phy: micrel: Add clock support for
      KSZ8021/KSZ8031")
      Reviewed-by: NFabio Estevam <fabio.estevam@freescale.com>
      Reviewed-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NNiklas Cassel <niklass@axis.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bced8701
    • M
      net: ll_temac: Fix DMA map size bug · 44d4f8d7
      Michal Simek 提交于
      DMA allocates skb->len instead of headlen
      which is used for DMA.
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      44d4f8d7
    • M
      test_bpf: add 173 new testcases for eBPF · cffc642d
      Michael Holzheu 提交于
      add an exhaustive set of eBPF tests bringing total to:
      test_bpf: Summary: 233 PASSED, 0 FAILED, [0/226 JIT'ed]
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cffc642d
    • B
      samples/bpf: fix in-source build of samples with clang · b88c06e3
      Brenden Blanco 提交于
      in-source build of 'make samples/bpf/' was incorrectly
      using default compiler instead of invoking clang/llvm.
      out-of-source build was ok.
      
      Fixes: a8085782 ("samples: bpf: trivial eBPF program in C")
      Signed-off-by: NBrenden Blanco <bblanco@plumgrid.com>
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b88c06e3
    • A
      x86: bpf_jit: fix FROM_BE16 and FROM_LE16/32 instructions · 343f845b
      Alexei Starovoitov 提交于
      FROM_BE16:
      'ror %reg, 8' doesn't clear upper bits of the register,
      so use additional 'movzwl' insn to zero extend 16 bits into 64
      
      FROM_LE16:
      should zero extend lower 16 bits into 64 bit
      
      FROM_LE32:
      should zero extend lower 32 bits into 64 bit
      
      Fixes: 89aa0758 ("net: sock: allow eBPF programs to be attached to sockets")
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      343f845b
    • H
      cxgb4/cxgb4vf: Cleanup macros, add comments and add new MACROS · 1ecc7b7a
      Hariprasad Shenai 提交于
      Cleanup few MACROS left out in t4_hw.h to be consistent with the
      existing ones. Also replace few hardcoded values with MACROS. Also
      update comments for some code
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ecc7b7a
    • K
      hv_netvsc: Use the xmit_more skb flag to optimize signaling the host · 82fa3c77
      KY Srinivasan 提交于
      Based on the information given to this driver (via the xmit_more skb flag),
      we can defer signaling the host if more packets are on the way. This will help
      make the host more efficient since it can potentially process a larger batch of
      packets. Implement this optimization.
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82fa3c77
    • A
      pktgen: fix packet generation · 9eea9222
      Alexei Starovoitov 提交于
      pkt_gen->last_ok was not set properly, so after the first burst
      pktgen instead of allocating new packet, will reuse old one, advance
      eth_type_trans further, which would mean the stack will be seeing very
      short bogus packets.
      
      Fixes: 62f64aed ("pktgen: introduce xmit_mode '<start_xmit|netif_receive>'")
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9eea9222
    • D
      Merge branch 'systemport-irq-coalesce' · 147ef3e2
      David S. Miller 提交于
      Florian Fainelli says:
      
      ====================
      net: systemport: interrupt coalescing support
      
      This patch series adds support for RX & TX interrupt coalescing in the
      systemport driver.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      147ef3e2
    • F
      net: systemport: Implement RX coalescing control knobs · d0634868
      Florian Fainelli 提交于
      Similarly to the TX path, allow the RX path to be configured with both
      'rx-frames' and 'rx-usecs' coalescing parameters.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0634868
    • F
      net: systemport: Implement TX coalescing control knobs · b1a15e86
      Florian Fainelli 提交于
      Add the ability to configure both 'tx-frames' which controls how many frames
      are doing to trigger a single interrupt and 'tx-usecs' which dictates how long
      to wait before an interrupt should be services.
      
      Since our timer resolution is close to 8.192 us, we round up to the nearest
      value the 'tx-usecs' timeout value.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b1a15e86
    • D
      net: deinline netif_tx_stop_all_queues(), remove WARN_ON in netif_tx_stop_queue() · a2029240
      Denys Vlasenko 提交于
      These functions compile to 60 bytes of machine code each.
      With this .config: http://busybox.net/~vda/kernel_config
      there are 617 calls of netif_tx_stop_queue()
      and 49 calls of netif_tx_stop_all_queues() in vmlinux.
      
      To fix this, remove WARN_ON in netif_tx_stop_queue()
      as suggested by davem, and deinline netif_tx_stop_all_queues().
      
      Change in code size is about 20k:
      
         text      data      bss       dec     hex filename
      82426986 22255416 20627456 125309858 77813a2 vmlinux.before
      82406248 22255416 20627456 125289120 777c2a0 vmlinux
      
      gcc-4.7.2 still creates deinlined version of netif_tx_stop_queue
      sometimes:
      
      $ nm --size-sort vmlinux | grep netif_tx_stop_queue | wc -l
      190
      
      ffffffff81b558a8 <netif_tx_stop_queue>:
      ffffffff81b558a8:       55                      push   %rbp
      ffffffff81b558a9:       48 89 e5                mov    %rsp,%rbp
      ffffffff81b558ac:       f0 80 8f e0 01 00 00    lock orb $0x1,0x1e0(%rdi)
      ffffffff81b558b3:       01
      ffffffff81b558b4:       5d                      pop    %rbp
      ffffffff81b558b5:       c3                      retq
      
      This needs additional fixing.
      Signed-off-by: NDenys Vlasenko <dvlasenk@redhat.com>
      CC: Alexei Starovoitov <alexei.starovoitov@gmail.com>
      CC: Alexander Duyck <alexander.duyck@gmail.com>
      CC: Joe Perches <joe@perches.com>
      CC: David S. Miller <davem@davemloft.net>
      CC: Jiri Pirko <jpirko@redhat.com>
      CC: linux-kernel@vger.kernel.org
      CC: netdev@vger.kernel.org
      CC: netfilter-devel@vger.kernel.org
      Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a2029240
    • J
      macvtap add missing ioctls - fix wrapping · b5082083
      Justin Cormack 提交于
      The macvtap driver tries to emulate all the ioctls supported by a normal
      tun/tap driver, however it was missing the generic SIOCGIFHWADDR and
      SIOCSIFHWADDR ioctls to get and set the mac address that are supported
      by tun/tap. This patch adds these.
      Signed-off-by: NJustin Cormack <justin@netbsd.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5082083
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 6c9d370c
      Linus Torvalds 提交于
      Pull MIPS fixes from Ralf Baechle:
       "One build fix for build breakage of all MIPS SMP kernels caused by
        Rusty's fix of obsolete use of cpu mask helpers, another to fix the FP
        ABI selection when loading an ELF binary"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: fix FP mode selection in lieu of .MIPS.abiflags data
        MIPS: SMP: Fix build error.
      6c9d370c
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 03906ca3
      Linus Torvalds 提交于
      Pull rdma fixes from Doug Ledford:
       - update MAINTAINERS git repo pointer
       - printk garbage fix
       - fix for qib and iw_cxgb4 bugs introduced in 4.1 window
       - fix for an older iWARP netlink bug
       - fix a memcpy issue in ehca driver
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        infiniband: Remove duplicated KERN_<LEVEL> from pr_<level> uses
        IB/qib: fix test of unsigned variable
        RDMA/core: Fix for parsing netlink string attribute
        MAINTAINERS: update the official rdma git repo
        iw_cxgb4: use wildcard mapping for getting remote addr info
        IB/ehca: use correct destination for memcpy
      03906ca3
    • N
      netns: return RTM_NEWNSID instead of RTM_GETNSID on a get · e3d8ecb7
      Nicolas Dichtel 提交于
      Usually, RTM_NEWxxx is returned on a get (same as a dump).
      
      Fixes: 0c7aecd4 ("netns: add rtnl cmd to add and get peer netns ids")
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3d8ecb7
    • L
      Merge tag 'for-v4.1-rc' of git://git.infradead.org/battery-2.6 · cc49e8c9
      Linus Torvalds 提交于
      Pull power supply and reset fixes from Sebastian Reichel:
       "misc fixes"
      
      * tag 'for-v4.1-rc' of git://git.infradead.org/battery-2.6:
        power: bq27x00_battery: Add missing MODULE_ALIAS
        power: reset: Add MFD_SYSCON depends for brcmstb
        power: reset: ltc2952: Remove bogus hrtimer_start() return value checks
        power_supply: fix oops in collie_battery driver
        power/reset: at91: fix return value check in at91_reset_platform_probe()
        MAINTAINERS: Add me as maintainer of Nokia N900 power supply drivers
        axp288_fuel_gauge: Add original author details
      cc49e8c9
    • D
      Merge branch 'switchdev_spring_cleanup' · a62b70dd
      David S. Miller 提交于
      Scott Feldman says:
      
      ====================
      switchdev: spring cleanup
      
      v7:
      
      Address review comments:
      
       - [Jiri] split the br_setlink and br_dellink reverts into their own patches
       - [Jiri] some parameter cleanup of rocker's memory allocators
       - [Jiri] pass trans mode as formal parameter rather than hanging off of
           rocker_port.
      
      v6:
      
      Address review comments:
      
       - [Jiri] split a couple of patches into one-logical-change per patch
       - [Joe Perches] revert checkpatch -f changes for wrapped lines with long
           symbols.
      
      v5:
      
      Address review comments:
      
       - [Jiri] include Jiri's s/swdev/switchdev rename patches up front.
       - [Jiri] squash some patches.  Now setlink/dellink/getlink patches are in
           three parts: new implementation, convert drivers to new, delete old impl.
       - [Jiri] some minor variable renames
       - [Jiri] use BUG_ON rather than WARN when COMMIT phase fails when PREPARE
           phase said it was safe to come into the water.
       - [Simon] rocker: fix a few transaction prepare-commit cases that were wrong.
           This was the bulk of the changes in v5.
      
      v4:
      
      Well, it was a lot of work, but now prepare-commit transaction model is how
      davem advises: if prepare fails, abort the transaction.  The driver must do
      resource reservations up front in prepare phase and return those resources if
      aborting.  Commit phase would use reserved resources.  The good news is the
      driver code (for rocker) now handles resource allocation failures better by not
      leaving partially device or driver states.  This is a side-effect of the
      prepare phase where state isn't modified; only validation of inputs and
      resource reservations happen in the prepare phase.  Since we're supporting
      setting attrs and add objs across lower devs in the stacked case, we need to
      hold rtnl_lock (or ensure rtnl_lock is held) so lower devs don't move on us
      during the prepare-commit transaction.  DSA driver code skips the prepare phase
      and goes straight for the commit phase since no up-front allocations are done
      and no device failures (that could be detected in the prepare phase) can
      happen.
      
      Remove NETIF_F_HW_SWITCH_OFFLOAD from rocker and the swdev_attr_set/get
      wrappers.  DSA doesn't set NETIF_F_HW_SWITCH_OFFLOAD, so it can't be in
      swdev_attr_set/get.  rocker doesn't need it; or rather can't support
      NETIF_F_HW_SWITCH_OFFLOAD being set/cleared at run-time after the device
      port is already up and offloading L2/L3.  NETIF_F_HW_SWITCH_OFFLOAD is still
      left as a feature flag for drivers that can use it.
      
      Drop the renaming patch for netdev_switch_notifier.  Other renames are a
      result of moving to the attr get/set or obj add/del model.  Everything
      but the netdev_switch_notifier is still prefixed with "swdev_".
      
      v3:
      
      Move to two-phase prepare-commit transaction model for attr set and obj add.
      Driver gets a change in prepare phase to NACK transaction if lack of resources
      or support in device.
      
      v2:
      
      Address review comments:
      
       - [Jiri] squash a few related patches
       - [Roopa] don't remove NETIF_F_HW_SWITCH_OFFLOAD
       - [Roopa] address VLAN setlink/dellink
       - [Ronen] print warning is attr set revert fails
      
      Not address:
      
       - Using something other than "swdev_" prefix
       - Vendor extentions
      
      The patch set grew a bit to not only support port attr get/set but also add
      support for port obj add/del.  Example of port objs are VLAN, FDB entries, and
      FIB entries.  The VLAN support now allows the swdev driver to get VLAN ranges
      and flags like PVID and "untagged".  Sridhar will be adding FDB obj support
      in follow-on patch.
      
      v1:
      
      The main theme of this patch set is to cleanup swdev in preparation for
      new features or fixes to be added soon.  We have a pretty good idea now how
      to handle stacked drivers in swdev, but there where some loose ends.  For
      example, if a set failed in the middle of walking the lower devs, we would
      leave the system in an undefined state...there was no way to recover back to
      the previous state.  Speaking of sets, also recognize a pattern that most
      swdev API accesses are gets or sets of port attributes, so go ahead and make
      port attr get/set the central swdev API, and convert everything that is
      set-ish/get-ish to this new API.
      
      Features/fixes that should follow from this cleanup:
      
       - solve the duplicate pkt forwarding issue
       - get/set bridge attrs, like ageing_time, from/to device
       - get/set more bridge port attrs from/to device
      
      There are some rename cleanups tagging along at the end, to give swdev
      consistent naming.
      
      And finally, some much needed updates to the switchdev.txt documentation to
      hopefully capture the state-of-the-art of swdev.  Hopefully, we can do a better
      job keeping this document up-to-date.
      
      Tested with rocker, of course, to make sure nothing functional broke.  There
      are a couple minor tweaks to DSA code for getting switch ID and setting STP
      updates to use new API, but not expecting amy breakage there.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a62b70dd
    • S
      switchdev: bring documentation up-to-date · 4ceec22d
      Scott Feldman 提交于
      Much need updated of switchdev documentation to cover what's been
      implmented to-date.  There are some XXX comments in the text for
      unimplemented or broken items.  I'd like to keep these in there (poor-man's
      TODO list) and update the document once each issue is resolved.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Acked-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ceec22d
    • S
      rocker: make checkpatch -f clean · 4725ceb9
      Scott Feldman 提交于
      Well almost clean: ignore the CHECKs for space after cast operator and some
      longer-than-80 char cases where for readability it's better to keep as-is.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Acked-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4725ceb9
    • S
      switchdev: remove NETIF_F_HW_SWITCH_OFFLOAD feature flag · 7889cbee
      Scott Feldman 提交于
      Roopa said remove the feature flag for this series and she'll work on
      bringing it back if needed at a later date.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Acked-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7889cbee
    • S
      switchdev: convert fib_ipv4_add/del over to switchdev_port_obj_add/del · 58c2cb16
      Scott Feldman 提交于
      The IPv4 FIB ops convert nicely to the switchdev objs and we're left with
      only four switchdev ops: port get/set and port add/del.  Other objs will
      follow, such as FDB.  So go ahead and convert IPv4 FIB over to switchdev
      obj for consistency, anticipating more objs to come.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Acked-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58c2cb16