Re: [PATCH bpf-next] selftests/bpf: Fix tc_redirect_dtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 1, 2022 at 4:40 PM Martin KaFai Lau <kafai@xxxxxx> wrote:
>
> tc_redirect_dtime was reported flaky from time to time.  It
> always fails at the udp test and complains about the bpf@tc-ingress
> got a skb->tstamp when handling udp packet.  It is unexpected
> because the skb->tstamp should have been cleared when crossing
> different netns.
>
> The most likely cause is that the skb is actually a tcp packet
> from the earlier tcp test.  It could be the final TCP_FIN handling.
>
> This patch tightens the skb->tstamp check in the bpf prog.  It ensures
> the skb is the current testing traffic.  First, it checks that skb
> matches the IPPROTO of the running test (i.e. tcp vs udp).
> Second, it checks the server port (dst_ns_port).  The server
> port is unique for each test (50000 + test_enum).
>
> Also fixed a typo in test_udp_dtime(): s/P100/P101/
>
> Fixes: c803475fd8dd ("bpf: selftests: test skb->tstamp in redirect_neigh")
> Reported-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
> Signed-off-by: Martin KaFai Lau <kafai@xxxxxx>

Acked-by: Song Liu <songliubraving@xxxxxx>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux