1. 07 2月, 2019 3 次提交
  2. 15 12月, 2018 1 次提交
  3. 20 11月, 2018 3 次提交
  4. 15 11月, 2018 4 次提交
  5. 12 11月, 2018 1 次提交
    • J
      net: sched: register callbacks for indirect tc block binds · 7f76fa36
      John Hurley 提交于
      Currently drivers can register to receive TC block bind/unbind callbacks
      by implementing the setup_tc ndo in any of their given netdevs. However,
      drivers may also be interested in binds to higher level devices (e.g.
      tunnel drivers) to potentially offload filters applied to them.
      
      Introduce indirect block devs which allows drivers to register callbacks
      for block binds on other devices. The callback is triggered when the
      device is bound to a block, allowing the driver to register for rules
      applied to that block using already available functions.
      
      Freeing an indirect block callback will trigger an unbind event (if
      necessary) to direct the driver to remove any offloaded rules and unreg
      any block rule callbacks. It is the responsibility of the implementing
      driver to clean any registered indirect block callbacks before exiting,
      if the block it still active at such a time.
      
      Allow registering an indirect block dev callback for a device that is
      already bound to a block. In this case (if it is an ingress block),
      register and also trigger the callback meaning that any already installed
      rules can be replayed to the calling driver.
      Signed-off-by: NJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f76fa36
  6. 09 11月, 2018 1 次提交
  7. 05 10月, 2018 1 次提交
  8. 25 9月, 2018 1 次提交
  9. 23 8月, 2018 1 次提交
    • A
      net_sched: fix unused variable warning in stmmac · 191672ca
      Arnd Bergmann 提交于
      The new tcf_exts_for_each_action() macro doesn't reference its
      arguments when CONFIG_NET_CLS_ACT is disabled, which leads to
      a harmless warning in at least one driver:
      
      drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: In function 'tc_fill_actions':
      drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c:64:6: error: unused variable 'i' [-Werror=unused-variable]
      
      Adding a cast to void lets us avoid this kind of warning.
      To be on the safe side, do it for all three arguments, not
      just the one that caused the warning.
      
      Fixes: 244cd96a ("net_sched: remove list_head from tc_action")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      191672ca
  10. 22 8月, 2018 1 次提交
  11. 02 8月, 2018 1 次提交
  12. 31 7月, 2018 1 次提交
    • P
      net/tc: introduce TC_ACT_REINSERT. · cd11b164
      Paolo Abeni 提交于
      This is similar TC_ACT_REDIRECT, but with a slightly different
      semantic:
      - on ingress the mirred skbs are passed to the target device
      network stack without any additional check not scrubbing.
      - the rcu-protected stats provided via the tcf_result struct
        are updated on error conditions.
      
      This new tcfa_action value is not exposed to the user-space
      and can be used only internally by clsact.
      
      v1 -> v2: do not touch TC_ACT_REDIRECT code path, introduce
       a new action type instead
      v2 -> v3:
       - rename the new action value TC_ACT_REINJECT, update the
         helper accordingly
       - take care of uncloned reinjected packets in XDP generic
         hook
      v3 -> v4:
       - renamed again the new action value (JiriP)
      v4 -> v5:
       - fix build error with !NET_CLS_ACT (kbuild bot)
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd11b164
  13. 28 7月, 2018 1 次提交
  14. 24 7月, 2018 1 次提交
  15. 23 7月, 2018 1 次提交
  16. 14 7月, 2018 1 次提交
  17. 08 7月, 2018 1 次提交
  18. 27 6月, 2018 1 次提交
    • J
      nfp: reject binding to shared blocks · 951a8ee6
      John Hurley 提交于
      TC shared blocks allow multiple qdiscs to be grouped together and filters
      shared between them. Currently the chains of filters attached to a block
      are only flushed when the block is removed. If a qdisc is removed from a
      block but the block still exists, flow del messages are not passed to the
      callback registered for that qdisc. For the NFP, this presents the
      possibility of rules still existing in hw when they should be removed.
      
      Prevent binding to shared blocks until the kernel can send per qdisc del
      messages when block unbinds occur.
      
      tcf_block_shared() was not used outside of the core until now, so also
      add an empty implementation for builds with CONFIG_NET_CLS=n.
      
      Fixes: 48617387 ("net: sched: introduce shared filter blocks infrastructure")
      Signed-off-by: NJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      951a8ee6
  19. 26 6月, 2018 2 次提交
  20. 29 5月, 2018 2 次提交
  21. 25 5月, 2018 1 次提交
  22. 15 5月, 2018 1 次提交
    • M
      sched: cls: enable verbose logging · 81c7288b
      Marcelo Ricardo Leitner 提交于
      Currently, when the rule is not to be exclusively executed by the
      hardware, extack is not passed along and offloading failures don't
      get logged. The idea was that hardware failures are okay because the
      rule will get executed in software then and this way it doesn't confuse
      unware users.
      
      But this is not helpful in case one needs to understand why a certain
      rule failed to get offloaded. Considering it may have been a temporary
      failure, like resources exceeded or so, reproducing it later and knowing
      that it is triggering the same reason may be challenging.
      
      The ultimate goal is to improve Open vSwitch debuggability when using
      flower offloading.
      
      This patch adds a new flag to enable verbose logging. With the flag set,
      extack will be passed to the driver, which will be able to log the
      error. As the operation itself probably won't fail (not because of this,
      at least), current iproute will already log it as a Warning.
      
      The flag is generic, so it can be reused later. No need to restrict it
      just for HW offloading. The command line will follow the syntax that
      tc-ebpf already uses, tc ... [ verbose ] ... , and extend its meaning.
      
      For example:
      # ./tc qdisc add dev p7p1 ingress
      # ./tc filter add dev p7p1 parent ffff: protocol ip prio 1 \
      	flower verbose \
      	src_mac ed:13:db:00:00:00 dst_mac 01:80:c2:00:00:d0 \
      	src_ip 56.0.0.0 dst_ip 55.0.0.0 action drop
      Warning: TC offload is disabled on net device.
      # echo $?
      0
      # ./tc filter add dev p7p1 parent ffff: protocol ip prio 1 \
      	flower \
      	src_mac ff:13:db:00:00:00 dst_mac 01:80:c2:00:00:d0 \
      	src_ip 56.0.0.0 dst_ip 55.0.0.0 action drop
      # echo $?
      0
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      81c7288b
  23. 01 3月, 2018 1 次提交
  24. 26 1月, 2018 1 次提交
  25. 25 1月, 2018 4 次提交
  26. 23 1月, 2018 2 次提交
  27. 20 1月, 2018 1 次提交