OSDN Git Service

sch_cake: Fix TC filter flow override and expand it to hosts as well
authorToke Høiland-Jørgensen <toke@toke.dk>
Wed, 22 Aug 2018 10:29:43 +0000 (12:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Aug 2018 04:39:45 +0000 (21:39 -0700)
commit93cfb6c17690c465509967aeb237717d10513a88
treef28c723e458955719803be8b5e398465c40b29ce
parent3d0371b313b84ba7c16ebf2526a7a34f1c57b19e
sch_cake: Fix TC filter flow override and expand it to hosts as well

The TC filter flow mapping override completely skipped the call to
cake_hash(); however that meant that the internal state was not being
updated, which ultimately leads to deadlocks in some configurations. Fix
that by passing the overridden flow ID into cake_hash() instead so it can
react appropriately.

In addition, the major number of the class ID can now be set to override
the host mapping in host isolation mode. If both host and flow are
overridden (or if the respective modes are disabled), flow dissection and
hashing will be skipped entirely; otherwise, the hashing will be kept for
the portions that are not set by the filter.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_cake.c