1. 07 2月, 2018 1 次提交
  2. 25 1月, 2018 4 次提交
  3. 23 1月, 2018 2 次提交
  4. 20 1月, 2018 4 次提交
  5. 18 1月, 2018 1 次提交
  6. 06 12月, 2017 1 次提交
  7. 09 11月, 2017 1 次提交
  8. 01 11月, 2017 1 次提交
  9. 29 10月, 2017 1 次提交
  10. 21 10月, 2017 2 次提交
  11. 17 10月, 2017 1 次提交
  12. 12 10月, 2017 1 次提交
  13. 03 10月, 2017 1 次提交
  14. 22 9月, 2017 1 次提交
  15. 01 9月, 2017 1 次提交
    • C
      net_sched: add reverse binding for tc class · 07d79fc7
      Cong Wang 提交于
      TC filters when used as classifiers are bound to TC classes.
      However, there is a hidden difference when adding them in different
      orders:
      
      1. If we add tc classes before its filters, everything is fine.
         Logically, the classes exist before we specify their ID's in
         filters, it is easy to bind them together, just as in the current
         code base.
      
      2. If we add tc filters before the tc classes they bind, we have to
         do dynamic lookup in fast path. What's worse, this happens all
         the time not just once, because on fast path tcf_result is passed
         on stack, there is no way to propagate back to the one in tc filters.
      
      This hidden difference hurts performance silently if we have many tc
      classes in hierarchy.
      
      This patch intends to close this gap by doing the reverse binding when
      we create a new class, in this case we can actually search all the
      filters in its parent, match and fixup by classid. And because
      tcf_result is specific to each type of tc filter, we have to introduce
      a new ops for each filter to tell how to bind the class.
      
      Note, we still can NOT totally get rid of those class lookup in
      ->enqueue() because cgroup and flow filters have no way to determine
      the classid at setup time, they still have to go through dynamic lookup.
      
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      07d79fc7
  16. 31 8月, 2017 1 次提交
    • C
      net/sched: Change cls_flower to use IDR · c15ab236
      Chris Mi 提交于
      Currently, all filters with the same priority are linked in a doubly
      linked list. Every filter should have a unique handle. To make the
      handle unique, we need to iterate the list every time to see if the
      handle exists or not when inserting a new filter. It is time-consuming.
      For example, it takes about 5m3.169s to insert 64K rules.
      
      This patch changes cls_flower to use IDR. With this patch, it
      takes about 0m1.127s to insert 64K rules. The improvement is huge.
      
      But please note that in this testing, all filters share the same action.
      If every filter has a unique action, that is another bottleneck.
      Follow-up patch in this patchset addresses that.
      Signed-off-by: NChris Mi <chrism@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c15ab236
  17. 17 8月, 2017 1 次提交
  18. 12 8月, 2017 1 次提交
  19. 08 8月, 2017 6 次提交
  20. 05 8月, 2017 1 次提交
  21. 08 6月, 2017 1 次提交
  22. 05 6月, 2017 1 次提交
  23. 25 5月, 2017 1 次提交
  24. 01 5月, 2017 1 次提交
  25. 25 4月, 2017 1 次提交
  26. 22 4月, 2017 1 次提交
    • W
      net_sched: move the empty tp check from ->destroy() to ->delete() · 763dbf63
      WANG Cong 提交于
      We could have a race condition where in ->classify() path we
      dereference tp->root and meanwhile a parallel ->destroy() makes it
      a NULL. Daniel cured this bug in commit d9363774
      ("net, sched: respect rcu grace period on cls destruction").
      
      This happens when ->destroy() is called for deleting a filter to
      check if we are the last one in tp, this tp is still linked and
      visible at that time. The root cause of this problem is the semantic
      of ->destroy(), it does two things (for non-force case):
      
      1) check if tp is empty
      2) if tp is empty we could really destroy it
      
      and its caller, if cares, needs to check its return value to see if it
      is really destroyed. Therefore we can't unlink tp unless we know it is
      empty.
      
      As suggested by Daniel, we could actually move the test logic to ->delete()
      so that we can safely unlink tp after ->delete() tells us the last one is
      just deleted and before ->destroy().
      
      Fixes: 1e052be6 ("net_sched: destroy proto tp when all filters are gone")
      Cc: Roi Dayan <roid@mellanox.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      763dbf63
  27. 14 4月, 2017 1 次提交