]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: use idr to allocate u32 filter handles
authorCong Wang <xiyou.wangcong@gmail.com>
Mon, 25 Sep 2017 17:13:51 +0000 (10:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Sep 2017 16:43:41 +0000 (09:43 -0700)
commit207768d9ea1375775669302c5a6f4e9352f40e47
tree756a9810028ce2c9992024883bc6fad21ebe29d9
parentbcadc1d015041249206c9fa10403cd5ef4cdd968
net_sched: use idr to allocate u32 filter handles

Instead of calling u32_lookup_ht() in a loop to find
a unused handle, just switch to idr API to allocate
new handles. u32 filters are special as the handle
could contain a hash table id and a key id, so we
need two IDR to allocate each of them.

Cc: Chris Mi <chrism@mellanox.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_u32.c