OSDN Git Service

net_sched: use idr to allocate basic filter handles
authorCong Wang <xiyou.wangcong@gmail.com>
Mon, 25 Sep 2017 17:13:50 +0000 (10:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Sep 2017 16:43:41 +0000 (09:43 -0700)
commit1d8134fea2eb460698a281f91c03c400f7e546ce
tree5bacbb640e20cbfefb00402959cf68125b42d3ac
parent76cf546c2802f6e25113ba481d7e85d0298768c6
net_sched: use idr to allocate basic filter handles

Instead of calling basic_get() in a loop to find
a unused handle, just switch to idr API to allocate
new handles.

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_basic.c