[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190727212420.GA8637@sasha-vm>
Date: Sat, 27 Jul 2019 17:24:20 -0400
From: Sasha Levin <sashal@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Eric Dumazet <edumazet@...gle.com>,
Cong Wang <xiyou.wangcong@...il.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 5.2 14/66] net_sched: unset TCQ_F_CAN_BYPASS when adding
filters
On Fri, Jul 26, 2019 at 05:24:13PM +0200, Greg Kroah-Hartman wrote:
>From: Cong Wang <xiyou.wangcong@...il.com>
>
>[ Upstream commit 3f05e6886a595c9a29a309c52f45326be917823c ]
>
>For qdisc's that support TC filters and set TCQ_F_CAN_BYPASS,
>notably fq_codel, it makes no sense to let packets bypass the TC
>filters we setup in any scenario, otherwise our packets steering
>policy could not be enforced.
>
>This can be reproduced easily with the following script:
>
> ip li add dev dummy0 type dummy
> ifconfig dummy0 up
> tc qd add dev dummy0 root fq_codel
> tc filter add dev dummy0 parent 8001: protocol arp basic action mirred egress redirect dev lo
> tc filter add dev dummy0 parent 8001: protocol ip basic action mirred egress redirect dev lo
> ping -I dummy0 192.168.112.1
>
>Without this patch, packets are sent directly to dummy0 without
>hitting any of the filters. With this patch, packets are redirected
>to loopback as expected.
>
>This fix is not perfect, it only unsets the flag but does not set it back
>because we have to save the information somewhere in the qdisc if we
>really want that. Note, both fq_codel and sfq clear this flag in their
>->bind_tcf() but this is clearly not sufficient when we don't use any
>class ID.
>
>Fixes: 23624935e0c4 ("net_sched: TCQ_F_CAN_BYPASS generalization")
>Cc: Eric Dumazet <edumazet@...gle.com>
>Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
>Reviewed-by: Eric Dumazet <edumazet@...gle.com>
>Signed-off-by: David S. Miller <davem@...emloft.net>
>Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
There's a fix for this one:
503d81d428bd5 ("net: sched: verify that q!=NULL before setting
q->flags").
--
Thanks,
Sasha
Powered by blists - more mailing lists