1. 13 2月, 2019 16 次提交
  2. 11 2月, 2019 2 次提交
  3. 09 2月, 2019 1 次提交
    • G
      net/sched: use struct_size() helper · 8fe5756c
      Gustavo A. R. Silva 提交于
      One of the more common cases of allocation size calculations is finding
      the size of a structure that has a zero-sized array at the end, along
      with memory for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          struct boo entry[];
      };
      
      size = sizeof(struct foo) + count * sizeof(struct boo);
      instance = alloc(size, GFP_KERNEL)
      
      Instead of leaving these open-coded and prone to type mistakes, we can
      now use the new struct_size() helper:
      
      size = struct_size(instance, entry, count);
      instance = alloc(size, GFP_KERNEL)
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8fe5756c
  4. 07 2月, 2019 5 次提交
  5. 05 2月, 2019 1 次提交
  6. 20 1月, 2019 2 次提交
  7. 19 1月, 2019 1 次提交
    • C
      net_sched: add hit counter for matchall · f88c19aa
      Cong Wang 提交于
      Although matchall always matches packets, however, it still
      relies on a protocol match first. So it is still useful to have
      such a counter for matchall. Of course, unlike u32, every time
      we hit a matchall filter, it is always a success, so we don't
      have to distinguish them.
      
      Sample output:
      
      filter protocol 802.1Q pref 100 matchall chain 0
      filter protocol 802.1Q pref 100 matchall chain 0 handle 0x1
        not_in_hw (rule hit 10)
      	action order 1: vlan  pop continue
      	 index 1 ref 1 bind 1 installed 40 sec used 1 sec
      	Action statistics:
      	Sent 836 bytes 10 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      Reported-by: NMartin Olsson <martin.olsson+netdev@sentorsecurity.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f88c19aa
  8. 18 1月, 2019 1 次提交
  9. 17 1月, 2019 1 次提交
  10. 16 1月, 2019 4 次提交
  11. 20 12月, 2018 1 次提交
  12. 16 12月, 2018 1 次提交
  13. 15 12月, 2018 1 次提交
  14. 11 12月, 2018 1 次提交
  15. 10 12月, 2018 1 次提交
  16. 06 12月, 2018 1 次提交