1. 21 Jul, 2015 35 commits
  2. 20 Jul, 2015 5 commits
    • David S. Miller's avatar
      Merge branch 'bpf-push-pop-helpers' · 500322ec
      David S. Miller authored
      Alexei Starovoitov says:
      
      ====================
      bpf: introduce bpf_skb_vlan_push/pop() helpers
      
      Let TC+eBPF programs call skb_vlan_push/pop via helpers.
      
      v1->v2:
      - reworded commit log to better explain correctness of re-caching
        and fixed comparison of mixed endiannes (suggested by Eric)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      500322ec
    • Alexei Starovoitov's avatar
      test_bpf: add bpf_skb_vlan_push/pop() tests · 4d9c5c53
      Alexei Starovoitov authored
      improve accuracy of timing in test_bpf and add two stress tests:
      - {skb->data[0], get_smp_processor_id} repeated 2k times
      - {skb->data[0], vlan_push} x 68 followed by {skb->data[0], vlan_pop} x 68
      
      1st test is useful to test performance of JIT implementation of BPF_LD_ABS
      together with BPF_CALL instructions.
      2nd test is stressing skb_vlan_push/pop logic together with skb->data access
      via BPF_LD_ABS insn which checks that re-caching of skb->data is done correctly.
      
      In order to call bpf_skb_vlan_push() from test_bpf.ko have to add
      three export_symbol_gpl.
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d9c5c53
    • Alexei Starovoitov's avatar
      bpf: introduce bpf_skb_vlan_push/pop() helpers · 4e10df9a
      Alexei Starovoitov authored
      Allow eBPF programs attached to TC qdiscs call skb_vlan_push/pop via
      helper functions. These functions may change skb->data/hlen which are
      cached by some JITs to improve performance of ld_abs/ld_ind instructions.
      Therefore JITs need to recognize bpf_skb_vlan_push/pop() calls,
      re-compute header len and re-cache skb->data/hlen back into cpu registers.
      Note, skb->data/hlen are not directly accessible from the programs,
      so any changes to skb->data done either by these helpers or by other
      TC actions are safe.
      
      eBPF JIT supported by three architectures:
      - arm64 JIT is using bpf_load_pointer() without caching, so it's ok as-is.
      - x64 JIT re-caches skb->data/hlen unconditionally after vlan_push/pop calls
        (experiments showed that conditional re-caching is slower).
      - s390 JIT falls back to interpreter for now when bpf_skb_vlan_push() is present
        in the program (re-caching is tbd).
      
      These helpers allow more scalable handling of vlan from the programs.
      Instead of creating thousands of vlan netdevs on top of eth0 and attaching
      TC+ingress+bpf to all of them, the program can be attached to eth0 directly
      and manipulate vlans as necessary.
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e10df9a
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · f3120acc
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-07-17
      
      This series contains updates to igb, ixgbe, ixgbevf, i40e, bnx2x,
      freescale, siena and dp83640.
      
      Jacob provides several patches to clarify the intended way to implement
      both SIOCSHWTSTAMP and ethtool's get_ts_info().  It is okay to support
      the specific filters in SIOCSHWTSTAMP by upscaling them to the generic
      filters.
      
      Alex Duyck provides a igb patch to pull the time stamp from the fragment
      before it gets added to the skb, to avoid a possible issue in which the
      fragment can possibly be less than IGB_RX_HDR_LEN due to the time stamp
      being pulled after the copybreak check.  Also provides a ixgbevf patch to
      fold the ixgbevf_pull_tail() call into ixgbevf_add_rx_frag(), which gives
      the advantage that the fragment does not have to be modified after it is
      added to the skb.
      
      Fan provides patches for ixgbe/ixgbevf to set the receive hash type
      based on receive descriptor RSS type.
      
      Todd provides a fix for igb where on check for link on any media other
      than copper was not being detected since it was looking on the incorrect
      PHY page (due to the page being used gets switched before the function
      to check link gets executed).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f3120acc
    • David S. Miller's avatar
      Merge branch 'bcmgenet-phy-rework' · 0e55a42a
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: bcmgenet: PHY initialization rework
      
      This patch series reworks how we perform PHY initialization and resets in the
      GENET driver. Although this contains mostly fixes, some of the changes are a
      bit too intrusive to be backported to 'net' at the moment.
      
      Some of the motivations behind these changes were to reduce the time spent in how
      performing MDIO transactions, since it is better to perform then when we have
      interrupts enabled. This reduces the bring-up time of GENET from ~600 msecs down
      to ~8 msecs, and about the same time for suspend/resume.
      
      Since I do not currently have a system which is not DT-aware, can you (Petri,
      Jaedon) give this a try and confirm things keep working as expected?
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e55a42a