sch_cake: don't call diffserv parsing code when it is not needed
authorToke Høiland-Jørgensen <toke@redhat.com>
Thu, 25 Jun 2020 20:12:08 +0000 (22:12 +0200)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:35:50 +0000 (15:35 -0400)
commit673b7fff8e1bca71502c76a8f860e5a2f366bf24
tree6b059e26a962ba3037f420e9b9f18aa2f67207b7
parent5ac1c42ef25ed18382b7e9f9f00fe6a3e24ff0fd
sch_cake: don't call diffserv parsing code when it is not needed

[ Upstream commit 8c95eca0bb8c4bd2231a0d581f1ad0d50c90488c ]

As a further optimisation of the diffserv parsing codepath, we can skip it
entirely if CAKE is configured to neither use diffserv-based
classification, nor to zero out the diffserv bits.

Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/sch_cake.c