1. 09 Jun, 2015 2 commits
    • David S. Miller's avatar
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 5879ae5f
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix stack allocation in s390 BPF JIT, from Michael Holzheu.
      
       2) Disable LRO on openvswitch paths, from Jiri Benc.
      
       3) UDP early demux doesn't handle multicast group membership properly,
          fix from Shawn Bohrer.
      
       4) Fix TX queue hang due to incorrect handling of mixed sized fragments
          and linearlization in i40e driver, from Anjali Singhai Jain.
      
       5) Cannot use disable_irq() in timer handler of AMD xgbe driver, from
          Thomas Lendacky.
      
       6) b2net driver improperly assumes pci_alloc_consistent() gives zero'd
          out memory, use dma_zalloc_coherent().  From Sriharsha Basavapatna.
      
       7) Fix use-after-free in MPLS and ipv6, from Robert Shearman.
      
       8) Missing neif_napi_del() calls in cleanup paths of b44 driver, from
          Hauke Mehrtens.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net: replace last open coded skb_orphan_frags with function call
        net: bcmgenet: power on MII block for all MII modes
        ipv6: Fix protocol resubmission
        ipv6: fix possible use after free of dev stats
        b44: call netif_napi_del()
        bridge: disable softirqs around br_fdb_update to avoid lockup
        Revert "bridge: use _bh spinlock variant for br_fdb_update to avoid lockup"
        mpls: fix possible use after free of device
        be2net: Replace dma/pci_alloc_coherent() calls with dma_zalloc_coherent()
        bridge: use _bh spinlock variant for br_fdb_update to avoid lockup
        amd-xgbe: Use disable_irq_nosync from within timer function
        rhashtable: add missing import <linux/export.h>
        i40e: Make sure to be in VEB mode if SRIOV is enabled at probe
        i40e: start up in VEPA mode by default
        i40e/i40evf: Fix mixed size frags and linearization
        ipv4/udp: Verify multicast group is ours in upd_v4_early_demux()
        openvswitch: disable LRO
        s390/bpf: fix bpf frame pointer setup
        s390/bpf: fix stack allocation
      5879ae5f
  2. 08 Jun, 2015 28 commits
  3. 07 Jun, 2015 10 commits
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 866e6441
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "Eight fixes across arch/mips.  Nothing stands particuarly out nor is
        complicated but fixes keep coming in at a higher than comfortable
        rate"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: KVM: Do not sign extend on unsigned MMIO load
        MIPS: BPF: Fix stack pointer allocation
        MIPS: Loongson-3: Fix a cpu-hotplug issue in loongson3_ipi_interrupt()
        MIPS: Fix enabling of DEBUG_STACKOVERFLOW
        MIPS: c-r4k: Fix typo in probe_scache()
        MIPS: Avoid an FPE exception in FCSR mask probing
        MIPS: ath79: Add a missing new line in log message
        MIPS: ralink: Fix clearing the illegal access interrupt
      866e6441
    • Sriharsha Basavapatna's avatar
      be2net: Replace dma/pci_alloc_coherent() calls with dma_zalloc_coherent() · e51000db
      Sriharsha Basavapatna authored
      There are several places in the driver (all in control paths) where
      coherent dma memory is being allocated using either dma_alloc_coherent()
      or the deprecated pci_alloc_consistent(). All these calls should be
      changed to use dma_zalloc_coherent() to avoid uninitialized fields in
      data structures backed by this memory.
      Reported-by: default avatarJoerg Roedel <jroedel@suse.de>
      Tested-by: default avatarJoerg Roedel <jroedel@suse.de>
      Signed-off-by: default avatarSriharsha Basavapatna <sriharsha.basavapatna@avagotech.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e51000db
    • Fugang Duan's avatar
      net: fec: ptp: correct the ENET_ATCOR value · 34270f5f
      Fugang Duan authored
      The current driver adjust freq formula is:
      fe * diff = ppb * pc
      Note:
        fe: ENET ref clock frequency in Hz
        diff = inc_corr - inc: difference between default increment and correction increment
        ppb: parts per billion adjustment from base
        pc: correction period (in number of fe clock cycles)
      
      The correction increment will be used after N cycles of regular increments,
      not every N cycles (with N being the correction period). For example, set ENET_ATCOR=4,
      INC=8, INC_CORR=9, there will be 4 increments of 8 (ENET_ATINC[INC]) , followed by 1
      increment of 9 (ENET_ATINC[INC_CORR]).
      
      So, the correct formula is:
      	fe * diff = ppb * (pc + 1)
      
      For ENET_ATCOR, a value 0 disables the correction counter and no corrections occur.
      So base on the origin formula, set pc = pc > 1 ? pc - 1 : pc.
      Signed-off-by: default avatarFugang Duan <B38611@freescale.com>
      Signed-off-by: default avatarFrank Li <Frank.Li@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34270f5f
    • Wilson Kok's avatar
      bridge: use _bh spinlock variant for br_fdb_update to avoid lockup · 1d7c4903
      Wilson Kok authored
      br_fdb_update() can be called in process context in the following way:
      br_fdb_add() -> __br_fdb_add() -> br_fdb_update() (if NTF_USE flag is set)
      so we need to use spin_lock_bh because there are softirq users of the
      hash_lock. One easy way to reproduce this is to modify the bridge utility
      to set NTF_USE, enable stp and then set maxageing to a low value so
      br_fdb_cleanup() is called frequently and then just add new entries in
      a loop. This happens because br_fdb_cleanup() is called from timer/softirq
      context. These locks were _bh before commit f8ae737d
      ("[BRIDGE]: forwarding remove unneeded preempt and bh diasables")
      and at the time that commit was correct because br_fdb_update() couldn't be
      called from process context, but that changed after commit:
      292d1398 ("bridge: add NTF_USE support")
      Signed-off-by: default avatarWilson Kok <wkok@cumulusnetworks.com>
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Fixes: 292d1398 ("bridge: add NTF_USE support")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d7c4903
    • Michal Simek's avatar
      net: ll_temac: Remove sparse warnings · 84ea0ded
      Michal Simek authored
      Remove sparse warnings:
      drivers/net/ethernet/xilinx/ll_temac_main.c:65:16: warning: cast removes
      address space of expression
      drivers/net/ethernet/xilinx/ll_temac_main.c:70:9: warning: cast removes
      address space of expression
      drivers/net/ethernet/xilinx/ll_temac_main.c:127:16: warning: cast
      removes address space of expression
      drivers/net/ethernet/xilinx/ll_temac_main.c:137:9: warning: cast removes
      address space of expression
      drivers/net/ethernet/xilinx/ll_temac_main.c:409:3: warning: symbol
      'temac_options' was not declared. Should it be static?
      drivers/net/ethernet/xilinx/ll_temac_main.c:590:6: warning: symbol
      'temac_adjust_link' was not declared. Should it be static?
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84ea0ded
    • Eric Dumazet's avatar
      tcp: get_cookie_sock() consolidation · b80c0e78
      Eric Dumazet authored
      IPv4 and IPv6 share same implementation of get_cookie_sock(),
      and there is no point inlining it.
      
      We add tcp_ prefix to the common helper name and export it.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b80c0e78
    • Florian Fainelli's avatar
      net: bcmgenet: improve TX timeout · 13ea6578
      Florian Fainelli authored
      Dump useful ring statistics along with interrupt status, software
      maintained pointers and hardware registers to help troubleshoot TX queue
      stalls.
      
      When a timeout occurs, disable TX NAPI for the rings, dump their states
      while interrupts are disabled, re-enable interrupts, NAPI and queue flow
      control to help with the recovery.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13ea6578
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Fix deadlock by double lock · 80edb722
      Andrew Lunn authored
      ethtool -S on a DSA interface can deadlock for some switches because
      the same lock is taken twice. Use the register read function which
      expects the lock to be already held.
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Fixes: 31888234 ("net: dsa: mv88e6xxx: Replace stats mutex with SMI mutex")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      80edb722
    • Alexei Starovoitov's avatar
      bpf: allow programs to write to certain skb fields · d691f9e8
      Alexei Starovoitov authored
      allow programs read/write skb->mark, tc_index fields and
      ((struct qdisc_skb_cb *)cb)->data.
      
      mark and tc_index are generically useful in TC.
      cb[0]-cb[4] are primarily used to pass arguments from one
      program to another called via bpf_tail_call() which can
      be seen in sockex3_kern.c example.
      
      All fields of 'struct __sk_buff' are readable to socket and tc_cls_act progs.
      mark, tc_index are writeable from tc_cls_act only.
      cb[0]-cb[4] are writeable by both sockets and tc_cls_act.
      
      Add verifier tests and improve sample code.
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d691f9e8
    • Alexei Starovoitov's avatar
      bpf: make programs see skb->data == L2 for ingress and egress · 3431205e
      Alexei Starovoitov authored
      eBPF programs attached to ingress and egress qdiscs see inconsistent skb->data.
      For ingress L2 header is already pulled, whereas for egress it's present.
      This is known to program writers which are currently forced to use
      BPF_LL_OFF workaround.
      Since programs don't change skb internal pointers it is safe to do
      pull/push right around invocation of the program and earlier taps and
      later pt->func() will not be affected.
      Multiple taps via packet_rcv(), tpacket_rcv() are doing the same trick
      around run_filter/BPF_PROG_RUN even if skb_shared.
      
      This fix finally allows programs to use optimized LD_ABS/IND instructions
      without BPF_LL_OFF for higher performance.
      tc ingress + cls_bpf + samples/bpf/tcbpf1_kern.o
             w/o JIT   w/JIT
      before  20.5     23.6 Mpps
      after   21.8     26.6 Mpps
      
      Old programs with BPF_LL_OFF will still work as-is.
      
      We can now undo most of the earlier workaround commit:
      a166151c ("bpf: fix bpf helpers to use skb->mac_header relative offsets")
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3431205e