diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-01-10 01:14:02 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-13 20:50:15 +0100 |
commit | 2519a602c273c5254781bc55b6e678a17e469a12 (patch) | |
tree | fcfbf3b98b6e186ea042d8167ddbde5b4fff63f2 /net/sched/em_canid.c | |
parent | net_sched: add struct net pointer to tcf_proto_ops->dump (diff) | |
download | linux-2519a602c273c5254781bc55b6e678a17e469a12.tar.xz linux-2519a602c273c5254781bc55b6e678a17e469a12.zip |
net_sched: optimize tcf_match_indev()
tcf_match_indev() is called in fast path, it is not wise to
search for a netdev by ifindex and then compare by its name,
just compare the ifindex.
Also, dev->name could be changed by user-space, therefore
the match would be always fail, but dev->ifindex could
be consistent.
BTW, this will also save some bytes from the core struct of u32.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/em_canid.c')
0 files changed, 0 insertions, 0 deletions