1. 29 Sep, 2015 11 commits
  2. 26 Sep, 2015 1 commit
    • Kalle Valo's avatar
      Merge tag 'iwlwifi-next-for-kalle-2015-09-21' of... · 8f6c5b07
      Kalle Valo authored
      Merge tag 'iwlwifi-next-for-kalle-2015-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
      
      * some debugfs improvements;
      * fix signedness in beacon statistics;
      * deinline some functions to reduce size when device tracing is enabled;
      * filter beacons out in AP mode when no stations are associated;
      * deprecate firmwares version -12;
      * fix a runtime PM vs. legacy suspend race;
      * one-liner fix for a ToF bug;
      * clean-ups in the rx code;
      * small debugging improvement;
      * fix WoWLAN with new firmware versions;
      8f6c5b07
  3. 21 Sep, 2015 12 commits
  4. 18 Sep, 2015 16 commits
    • Oleksij Rempel's avatar
      ath9k_htc: introduce support for different fw versions · e904cf6f
      Oleksij Rempel authored
      Current kernel support only one fw name with theoretically only one
      fw version located in “firmware/htc_[9271|7010].fw”. Which is ok so far we
      have only one fw version (1.3). After we realised new fw 1.4, we faced
      compatibility problem which was decided to solve by firmware name and
      location:
      - new firmware is located now in
      	firmware/ath9k_htc/htc_[9271|7010]-1.4.0.fw
      - old version 1.3 should be on old place, so old kernel have no issues
      	with it.
      - new kernels including this patch should be able to try different
      	supported (min..max) fw version.
      - new kernel should be able to support old fw location too. At least for
      	now.
      
      At same time this patch will add new module option which should allow user
      to play with development  fw version without replacing stable one. If user
      will set “ath9k_htc use_dev_fw=1” module will try to find
      firmware/ath9k_htc/htc_[9271|7010]-1.dev.0.fw first and if it fails, use
      stable version: for example...1.4.0.fw.
      Signed-off-by: default avatarOleksij Rempel <linux@rempel-privat.de>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      e904cf6f
    • Eric Dumazet's avatar
      sch_dsmark: improve memory locality · 47bbbb30
      Eric Dumazet authored
      Memory placement in sch_dsmark is silly : Better place mask/value
      in the same cache line.
      
      Also, we can embed small arrays in the first cache line and
      remove a potential cache miss.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      47bbbb30
    • David S. Miller's avatar
      Merge branch 'bcmgenet-irq-coalesce' · 25354001
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: bcmgenet: Interrupt coalescing
      
      This patch series adds support for interrupt coalescing for GENET
      adapters.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25354001
    • Florian Fainelli's avatar
      net: bcmgenet: Implement RX coalescing control knobs · 4a29645b
      Florian Fainelli authored
      Add support for the ethtool rx-frames coalescing parameter which allows
      defining the number of RX interrupts per frames received. The RDMA
      engine supports a configurable timeout with a resolution of
      approximately 8.192 us.
      
      We can no longer enable the BDONE/PDONE interrupts as those would
      fire for each packet/buffer received, which would defeat the MBDONE
      interrupt purpose. The MBDONE interrupt is guaranteed to correspond to a
      PDONE/BDONE interrupt when the threshold is set to 1.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a29645b
    • Florian Fainelli's avatar
      net: bcmgenet: Implement TX coalescing control knobs · 2f913070
      Florian Fainelli authored
      Configuring the ethtool tx-frames property, which translates into N
      packets before a TX interrupt is the simplest configuration scheme
      because it requires no locking neither at the softare nor hardware
      level, and is completely indepedent from the link speed. Since ethtool
      does not allow per-tx queue coalescing parameters, we apply the same
      setting to any transmit queue.
      
      We can no longer enable the BDONE/PDONE interrupts as those would fire
      for each packet/buffer received, which would defeat the MBDONE interrupt
      purpose. The MBDONE interrupt is guaranteed to correspond to a
      PDONE/BDONE interrupt when the threshold is set to 1, but offers
      interrupt coalescing when the value is > 1.
      
      Since the HW is configured to generate an interrupt when the ring
      becomes emtpy, we have to deny any timeout/timer settings coming from
      user-space to indicate we can only generate an interrupt very <N>
      packets.
      
      While we are at it, fix the DMA_INTR_THRESHOLD_MASK value which was off
      by one bit (0xff vs. 0x1ff).
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2f913070
    • Woojung.Huh@microchip.com's avatar
      lan78xx: Remove not defined MAC_CR_GMII_EN_ bit from MAC_CR. · 9110fe4a
      Woojung.Huh@microchip.com authored
      Remove not defined MAC_CR_GMII_EN_ bit from MAC_CR.
      Signed-off-by: default avatarWoojung Huh <woojung.huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9110fe4a
    • Woojung.Huh@microchip.com's avatar
      lan78xx: Create lan78xx_get_mdix_status() and lan78xx_set_mdix_status() for MDIX control. · 758c5c11
      Woojung.Huh@microchip.com authored
      Create lan78xx_get_mdix_status() and lan78xx_set_mdix_status() for MDIX control.
      Signed-off-by: default avatarWoojung Huh <woojung.huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      758c5c11
    • Woojung.Huh@microchip.com's avatar
      lan78xx: Remove phy defines in lan78xx.h and use defines in include/linux/microchipphy.h · bdfba55e
      Woojung.Huh@microchip.com authored
      Remove phy defines in lan78xx.h and use defines in include/linux/microchipphy.h.
      Signed-off-by: default avatarWoojung Huh <woojung.huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bdfba55e
    • Woojung.Huh@microchip.com's avatar
      lan78xx: Update to use phylib instead of mii_if_info. · ce85e13a
      Woojung.Huh@microchip.com authored
      Update to use phylib instead of mii_if_info.
      Signed-off-by: default avatarWoojung Huh <woojung.huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ce85e13a
    • Woojung.Huh@microchip.com's avatar
      lan78xx: Add PHYLIB and MICROCHIP_PHY as default config. · 05fe68c0
      Woojung.Huh@microchip.com authored
      Add PHYLIB and MICROCHIP_PHY as default configuration for lan78xx.
      Signed-off-by: default avatarWoojung Huh <woojung.huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05fe68c0
    • Woojung.Huh@microchip.com's avatar
      lan78xx: Check device ready bit (PMT_CTL_READY_) after reset the PHY · 6c595b03
      Woojung.Huh@microchip.com authored
      Check device ready bit (PMT_CTL_READY_) after reset the PHY.
      Device may not be ready even if PHY_RST_ is cleared depends on configuration.
      Signed-off-by: default avatarWoojung Huh <woojung.huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c595b03
    • David Ahern's avatar
      net: Initialize table in fib result · bde6f9de
      David Ahern authored
      Sergey, Richard and Fabio reported an oops in ip_route_input_noref. e.g., from Richard:
      
      [    0.877040] BUG: unable to handle kernel NULL pointer dereference at 0000000000000056
      [    0.877597] IP: [<ffffffff8155b5e2>] ip_route_input_noref+0x1a2/0xb00
      [    0.877597] PGD 3fa14067 PUD 3fa6e067 PMD 0
      [    0.877597] Oops: 0000 [#1] SMP
      [    0.877597] Modules linked in: virtio_net virtio_pci virtio_ring virtio
      [    0.877597] CPU: 1 PID: 119 Comm: ifconfig Not tainted 4.2.0+ #1
      [    0.877597] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      [    0.877597] task: ffff88003fab0bc0 ti: ffff88003faa8000 task.ti: ffff88003faa8000
      [    0.877597] RIP: 0010:[<ffffffff8155b5e2>]  [<ffffffff8155b5e2>] ip_route_input_noref+0x1a2/0xb00
      [    0.877597] RSP: 0018:ffff88003ed03ba0  EFLAGS: 00010202
      [    0.877597] RAX: 0000000000000046 RBX: 00000000ffffff8f RCX: 0000000000000020
      [    0.877597] RDX: ffff88003fab50b8 RSI: 0000000000000200 RDI: ffffffff8152b4b8
      [    0.877597] RBP: ffff88003ed03c50 R08: 0000000000000000 R09: 0000000000000000
      [    0.877597] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88003fab6f00
      [    0.877597] R13: ffff88003fab5000 R14: 0000000000000000 R15: ffffffff81cb5600
      [    0.877597] FS:  00007f6de5751700(0000) GS:ffff88003ed00000(0000) knlGS:0000000000000000
      [    0.877597] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [    0.877597] CR2: 0000000000000056 CR3: 000000003fa6d000 CR4: 00000000000006e0
      [    0.877597] Stack:
      [    0.877597]  0000000000000000 0000000000000046 ffff88003fffa600 ffff88003ed03be0
      [    0.877597]  ffff88003f9e2c00 697da8c0017da8c0 ffff880000000000 000000000007fd00
      [    0.877597]  0000000000000000 0000000000000046 0000000000000000 0000000400000000
      [    0.877597] Call Trace:
      [    0.877597]  <IRQ>
      [    0.877597]  [<ffffffff812bfa1f>] ? cpumask_next_and+0x2f/0x40
      [    0.877597]  [<ffffffff8158e13c>] arp_process+0x39c/0x690
      [    0.877597]  [<ffffffff8158e57e>] arp_rcv+0x13e/0x170
      [    0.877597]  [<ffffffff8151feec>] __netif_receive_skb_core+0x60c/0xa00
      [    0.877597]  [<ffffffff81515795>] ? __build_skb+0x25/0x100
      [    0.877597]  [<ffffffff81515795>] ? __build_skb+0x25/0x100
      [    0.877597]  [<ffffffff81521ff6>] __netif_receive_skb+0x16/0x70
      [    0.877597]  [<ffffffff81522078>] netif_receive_skb_internal+0x28/0x90
      [    0.877597]  [<ffffffff8152288f>] napi_gro_receive+0x7f/0xd0
      [    0.877597]  [<ffffffffa0017906>] virtnet_receive+0x256/0x910 [virtio_net]
      [    0.877597]  [<ffffffffa0017fd8>] virtnet_poll+0x18/0x80 [virtio_net]
      [    0.877597]  [<ffffffff815234cd>] net_rx_action+0x1dd/0x2f0
      [    0.877597]  [<ffffffff81053228>] __do_softirq+0x98/0x260
      [    0.877597]  [<ffffffff8164969c>] do_softirq_own_stack+0x1c/0x30
      
      The root cause is use of res.table uninitialized.
      
      Thanks to Nikolay for noticing the uninitialized use amongst the maze of
      gotos.
      
      As Nikolay pointed out the second initialization is not required to fix
      the oops, but rather to fix a related problem where a valid lookup should
      be invalidated before creating the rth entry.
      
      Fixes: b7503e0c ("net: Add FIB table id to rtable")
      Reported-by: default avatarSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Reported-by: default avatarRichard Alpe <richard.alpe@ericsson.com>
      Reported-by: default avatarFabio Estevam <festevam@gmail.com>
      Tested-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Tested-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bde6f9de
    • David S. Miller's avatar
      Merge branch 'bpf_avoid_clone' · 41a9802f
      David S. Miller authored
      Alexei Starovoitov says:
      
      ====================
      bpf: performance improvements
      
      v1->v2: dropped redundant iff_up check in patch 2
      
      At plumbers we discussed different options on how to get rid of skb_clone
      from bpf_clone_redirect(), the patch 2 implements the best option.
      Patch 1 adds 'integrated exts' to cls_bpf to improve performance by
      combining simple actions into bpf classifier.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41a9802f
    • Alexei Starovoitov's avatar
      bpf: add bpf_redirect() helper · 27b29f63
      Alexei Starovoitov authored
      Existing bpf_clone_redirect() helper clones skb before redirecting
      it to RX or TX of destination netdev.
      Introduce bpf_redirect() helper that does that without cloning.
      
      Benchmarked with two hosts using 10G ixgbe NICs.
      One host is doing line rate pktgen.
      Another host is configured as:
      $ tc qdisc add dev $dev ingress
      $ tc filter add dev $dev root pref 10 u32 match u32 0 0 flowid 1:2 \
         action bpf run object-file tcbpf1_kern.o section clone_redirect_xmit drop
      so it receives the packet on $dev and immediately xmits it on $dev + 1
      The section 'clone_redirect_xmit' in tcbpf1_kern.o file has the program
      that does bpf_clone_redirect() and performance is 2.0 Mpps
      
      $ tc filter add dev $dev root pref 10 u32 match u32 0 0 flowid 1:2 \
         action bpf run object-file tcbpf1_kern.o section redirect_xmit drop
      which is using bpf_redirect() - 2.4 Mpps
      
      and using cls_bpf with integrated actions as:
      $ tc filter add dev $dev root pref 10 \
        bpf run object-file tcbpf1_kern.o section redirect_xmit integ_act classid 1
      performance is 2.5 Mpps
      
      To summarize:
      u32+act_bpf using clone_redirect - 2.0 Mpps
      u32+act_bpf using redirect - 2.4 Mpps
      cls_bpf using redirect - 2.5 Mpps
      
      For comparison linux bridge in this setup is doing 2.1 Mpps
      and ixgbe rx + drop in ip_rcv - 7.8 Mpps
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27b29f63
    • Daniel Borkmann's avatar
      cls_bpf: introduce integrated actions · 045efa82
      Daniel Borkmann authored
      Often cls_bpf classifier is used with single action drop attached.
      Optimize this use case and let cls_bpf return both classid and action.
      For backwards compatibility reasons enable this feature under
      TCA_BPF_FLAG_ACT_DIRECT flag.
      
      Then more interesting programs like the following are easier to write:
      int cls_bpf_prog(struct __sk_buff *skb)
      {
        /* classify arp, ip, ipv6 into different traffic classes
         * and drop all other packets
         */
        switch (skb->protocol) {
        case htons(ETH_P_ARP):
          skb->tc_classid = 1;
          break;
        case htons(ETH_P_IP):
          skb->tc_classid = 2;
          break;
        case htons(ETH_P_IPV6):
          skb->tc_classid = 3;
          break;
        default:
          return TC_ACT_SHOT;
        }
      
        return TC_ACT_OK;
      }
      
      Joint work with Daniel Borkmann.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      045efa82
    • Junwei Zhang's avatar
      net: only check perm protocol when register proto · f6c53334
      Junwei Zhang authored
      The permanent protocol nodes are at the head of the list,
      So only need check all these nodes.
      
      No matter the new node is permanent or not,
      insert the new node after the last permanent protocol node,
      
      If the new node conflicts with existing permanent node,
      return error.
      Signed-off-by: default avatarMartin Zhang <martinbj2008@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f6c53334