Subject: Re: [PATCH net] net/sched: act_mirred: use the backlog for mirred ingress

From: Peilin Ye <[email-masked]>
Date: Fri, 18 Nov 2022 15:07:29 -0800

Hi all,

On Fri, Sep 23, 2022 at 05:11:12PM +0200, Davide Caratti wrote:
> +mirred_egress_to_ingress_tcp_test()
> +{
> +	local tmpfile=$(mktemp) tmpfile1=$(mktemp)
> +
> +	RET=0
> +	dd conv=sparse status=none if=/dev/zero bs=1M count=2 of=$tmpfile
> +	tc filter add dev $h1 protocol ip pref 100 handle 100 egress flower \
> +		ip_proto tcp src_ip 192.0.2.1 dst_ip 192.0.2.2 \
> +			action ct commit nat src addr 192.0.2.2 pipe \
> +			action ct clear pipe \
> +			action ct commit nat dst addr 192.0.2.1 pipe \
> +			action ct clear pipe \
> +			action skbedit ptype host pipe \
> +			action mirred ingress redirect dev $h1

FWIW, I couldn't reproduce the lockup using this test case (with
forwarding.config.sample), but I got the same lockup in tcp_v4_rcv()
using a different (but probably less realistic) TC filter:

	tc filter add dev $h1 protocol ip pref 100 handle 100 egress flower \
		ip_proto tcp src_ip 192.0.2.1 dst_ip 192.0.2.2 \
			action pedit ex munge ip src set 192.0.2.2 pipe \
			action pedit ex munge ip dst set 192.0.2.1 pipe \
			action skbedit ptype host pipe \
			action mirred ingress redirect dev $h1

Thanks,
Peilin Ye