1. 07 Aug, 2018 9 commits
    • John Hurley's avatar
      nfp: flower: allow matching on ipv4 UDP tunnel tos and ttl · d7ff7ec5
      John Hurley authored
      The addition of FLOW_DISSECTOR_KEY_ENC_IP to TC flower means that the ToS
      and TTL of the tunnel header can now be matched on.
      
      Extend the NFP tunnel match function to include these new fields.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7ff7ec5
    • John Hurley's avatar
      nfp: flower: set ip tunnel ttl from encap action · 2a437471
      John Hurley authored
      The TTL for encapsulating headers in IPv4 UDP tunnels is taken from a
      route lookup. Modify this to first check if a user has specified a TTL to
      be used in the TC action.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a437471
    • David S. Miller's avatar
      Merge branch 'WoL-filters' · 50ee42b9
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: Support Wake-on-LAN using filters
      
      This is technically a v2, but this patch series builds on your feedback
      and defines the following:
      
      - a new WAKE_* bit: WAKE_FILTER which can be enabled alongside other type
        of Wake-on-LAN to support waking up on a programmed filter (match + action)
      - a new RX_CLS_FLOW_WAKE flow action which can be specified by an user when
        inserting a flow using ethtool::rxnfc, similar to the existing RX_CLS_FLOW_DISC
      
      The bcm_sf2 and bcmsysport drivers are updated accordingly to work in concert to
      allow matching packets at the switch level, identified by their filter location
      to be used as a match by the SYSTEM PORT (CPU/management controller) during
      Wake-on-LAN.
      
      Let me know if this looks better than the previous incarnation of the patch
      series.
      
      Attached is also the ethtool patch that I would be submitting once the uapi
      changes are committed.
      
      Thank you!
      
      Changes in v2:
      
      - bail out earlier in bcm_sf2_cfp's get_rxnfc if an error is
        encountered (Andrew)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50ee42b9
    • Florian Fainelli's avatar
      net: systemport: Add support for WAKE_FILTER · bb9051a2
      Florian Fainelli authored
      The SYSTEMPORT MAC allows up to 8 filters to be programmed to wake-up
      from LAN. Verify that we have up to 8 filters and program them to the
      appropriate RXCHK entries to be matched (along with their masks).
      
      We need to update the entry and exit to Wake-on-LAN mode to keep the
      RXCHK engine running to match during suspend, but this is otherwise
      fairly similar to Magic Packet detection.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb9051a2
    • Florian Fainelli's avatar
      net: dsa: bcm_sf2: Propagate ethtool::rxnfc to CPU port · 8a75f4f2
      Florian Fainelli authored
      Allow propagating ethtool::rxnfc programming to the CPU/management port
      such that it is possible for such a CPU to perform e.g: Wake-on-LAN
      using filters configured by the switch. We need a tiny bit of
      cooperation between the switch drivers which is able to do the full flow
      matching, whereas the CPU/management port might not. The CPU/management
      driver needs to return -EOPNOTSUPP to indicate an non critical error,
      any other error code otherwise.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8a75f4f2
    • Florian Fainelli's avatar
      ethtool: Add WAKE_FILTER and RX_CLS_FLOW_WAKE · 6cfef793
      Florian Fainelli authored
      Add the ability to specify through ethtool::rxnfc that a rule location is
      special and will be used to participate in Wake-on-LAN, by e.g: having a
      specific pattern be matched. When this is the case, fs->ring_cookie must
      be set to the special value RX_CLS_FLOW_WAKE.
      
      We also define an additional ethtool::wolinfo flag: WAKE_FILTER which
      can be used to configure an Ethernet adapter to allow Wake-on-LAN using
      previously programmed filters.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6cfef793
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · 1ba98280
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2018-08-07
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      The main changes are:
      
      1) Add cgroup local storage for BPF programs, which provides a fast
         accessible memory for storing various per-cgroup data like number
         of transmitted packets, etc, from Roman.
      
      2) Support bpf_get_socket_cookie() BPF helper in several more program
         types that have a full socket available, from Andrey.
      
      3) Significantly improve the performance of perf events which are
         reported from BPF offload. Also convert a couple of BPF AF_XDP
         samples overto use libbpf, both from Jakub.
      
      4) seg6local LWT provides the End.DT6 action, which allows to
         decapsulate an outer IPv6 header containing a Segment Routing Header.
         Adds this action now to the seg6local BPF interface, from Mathieu.
      
      5) Do not mark dst register as unbounded in MOV64 instruction when
         both src and dst register are the same, from Arthur.
      
      6) Define u_smp_rmb() and u_smp_wmb() to their respective barrier
         instructions on arm64 for the AF_XDP sample code, from Brian.
      
      7) Convert the tcp_client.py and tcp_server.py BPF selftest scripts
         over from Python 2 to Python 3, from Jeremy.
      
      8) Enable BTF build flags to the BPF sample code Makefile, from Taeung.
      
      9) Remove an unnecessary rcu_read_lock() in run_lwt_bpf(), from Taehee.
      
      10) Several improvements to the README.rst from the BPF documentation
          to make it more consistent with RST format, from Tobin.
      
      11) Replace all occurrences of strerror() by calls to strerror_r()
          in libbpf and fix a FORTIFY_SOURCE build error along with it,
          from Thomas.
      
      12) Fix a bug in bpftool's get_btf() function to correctly propagate
          an error via PTR_ERR(), from Yue.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ba98280
    • Alexander Aring's avatar
      ieee802154: hwsim: fix rcu address annotation · c5d99d2b
      Alexander Aring authored
      This patch fixes the following sparse warning about mismatch rcu
      attribute for address space annotation:
      
      ...
      error: incompatible types in comparison expression (different modifiers)
      error: incompatible types in comparison expression (different address spaces)
      ...
      
      Some __rcu annotation was at non-pointers list head structures and one was
      missing in edge information which is used by rcu_assign_pointer() to
      update edge setting information.
      
      Cc: Stefan Schmidt <stefan@datenfreihafen.org>
      Fixes: f25da51f ("ieee802154: hwsim: add replacement for fakelb")
      Signed-off-by: default avatarAlexander Aring <aring@mojatatu.com>
      Signed-off-by: default avatarStefan Schmidt <stefan@datenfreihafen.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c5d99d2b
    • Roman Gushchin's avatar
      bpf: introduce update_effective_progs() · 85fc4b16
      Roman Gushchin authored
      __cgroup_bpf_attach() and __cgroup_bpf_detach() functions have
      a good amount of duplicated code, which is possible to eliminate
      by introducing the update_effective_progs() helper function.
      
      The update_effective_progs() calls compute_effective_progs()
      and then in case of success it calls activate_effective_progs()
      for each descendant cgroup. In case of failure (OOM), it releases
      allocated prog arrays and return the error code.
      Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarSong Liu <songliubraving@fb.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      85fc4b16
  2. 06 Aug, 2018 31 commits