1. 08 8月, 2018 9 次提交
    • S
      flow_dissector: allow dissection of tunnel options from metadata · 92e2c405
      Simon Horman 提交于
      Allow the existing 'dissection' of tunnel metadata to 'dissect'
      options already present in tunnel metadata. This dissection is
      controlled by a new dissector key, FLOW_DISSECTOR_KEY_ENC_OPTS.
      
      This dissection only occurs when skb_flow_dissect_tunnel_info()
      is called, currently only the Flower classifier makes that call.
      So there should be no impact on other users of the flow dissector.
      
      This is in preparation for allowing the flower classifier to
      match on Geneve options.
      Signed-off-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
      Reviewed-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92e2c405
    • J
      nfp: flower: allow matching on ipv4 UDP tunnel tos and ttl · d7ff7ec5
      John Hurley 提交于
      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: NJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d7ff7ec5
    • J
      nfp: flower: set ip tunnel ttl from encap action · 2a437471
      John Hurley 提交于
      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: NJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2a437471
    • D
      Merge branch 'WoL-filters' · 50ee42b9
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      50ee42b9
    • F
      net: systemport: Add support for WAKE_FILTER · bb9051a2
      Florian Fainelli 提交于
      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: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bb9051a2
    • F
      net: dsa: bcm_sf2: Propagate ethtool::rxnfc to CPU port · 8a75f4f2
      Florian Fainelli 提交于
      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: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a75f4f2
    • F
      ethtool: Add WAKE_FILTER and RX_CLS_FLOW_WAKE · 6cfef793
      Florian Fainelli 提交于
      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: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6cfef793
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · 1ba98280
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      1ba98280
    • A
      ieee802154: hwsim: fix rcu address annotation · c5d99d2b
      Alexander Aring 提交于
      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: NAlexander Aring <aring@mojatatu.com>
      Signed-off-by: NStefan Schmidt <stefan@datenfreihafen.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5d99d2b
  2. 07 8月, 2018 8 次提交
  3. 06 8月, 2018 23 次提交