Message ID | 20250124060740.356527-3-xiyou.wangcong@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net_sched: two security bug fixes and test cases | expand |
On Thu, Jan 23, 2025 at 10:07:38PM -0800, Cong Wang wrote: > From: Quang Le <quanglex97@gmail.com> > > When limit == 0, pfifo_tail_enqueue() must drop new packet and > increase dropped packets count of scheduler. > > Signed-off-by: Quang Le <quanglex97@gmail.com> > Signed-off-by: Cong Wang <cong.wang@bytedance.com> Hi Cong, all, This test is reporting "not ok" in the Netdev CI. # not ok 577 d774 - Check pfifo_head_drop qdisc enqueue behaviour when limit == 0 # Could not match regex pattern. Verify command output: # qdisc pfifo_head_drop 1: root refcnt 2 limit 0p # Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) # backlog 0b 0p requeues 0 ...
On Fri, Jan 24, 2025 at 11:37:43AM +0000, Simon Horman wrote: > On Thu, Jan 23, 2025 at 10:07:38PM -0800, Cong Wang wrote: > > From: Quang Le <quanglex97@gmail.com> > > > > When limit == 0, pfifo_tail_enqueue() must drop new packet and > > increase dropped packets count of scheduler. > > > > Signed-off-by: Quang Le <quanglex97@gmail.com> > > Signed-off-by: Cong Wang <cong.wang@bytedance.com> > > Hi Cong, all, > > This test is reporting "not ok" in the Netdev CI. > > # not ok 577 d774 - Check pfifo_head_drop qdisc enqueue behaviour when limit == 0 > # Could not match regex pattern. Verify command output: > # qdisc pfifo_head_drop 1: root refcnt 2 limit 0p > # Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) > # backlog 0b 0p requeues 0 Oops... It worked on my side, let me take a look. Thanks for reporting!
On Sat, Jan 25, 2025 at 07:20:42PM -0800, Cong Wang wrote: > On Fri, Jan 24, 2025 at 11:37:43AM +0000, Simon Horman wrote: > > On Thu, Jan 23, 2025 at 10:07:38PM -0800, Cong Wang wrote: > > > From: Quang Le <quanglex97@gmail.com> > > > > > > When limit == 0, pfifo_tail_enqueue() must drop new packet and > > > increase dropped packets count of scheduler. > > > > > > Signed-off-by: Quang Le <quanglex97@gmail.com> > > > Signed-off-by: Cong Wang <cong.wang@bytedance.com> > > > > Hi Cong, all, > > > > This test is reporting "not ok" in the Netdev CI. > > > > # not ok 577 d774 - Check pfifo_head_drop qdisc enqueue behaviour when limit == 0 > > # Could not match regex pattern. Verify command output: > > # qdisc pfifo_head_drop 1: root refcnt 2 limit 0p > > # Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) > > # backlog 0b 0p requeues 0 > > Oops... It worked on my side, let me take a look. > I ran it again for multiple times, it still worked for me: 1..16 ok 1 a519 - Add bfifo qdisc with system default parameters on egress ok 2 585c - Add pfifo qdisc with system default parameters on egress ok 3 a86e - Add bfifo qdisc with system default parameters on egress with handle of maximum value ok 4 9ac8 - Add bfifo qdisc on egress with queue size of 3000 bytes ok 5 f4e6 - Add pfifo qdisc on egress with queue size of 3000 packets ok 6 b1b1 - Add bfifo qdisc with system default parameters on egress with invalid handle exceeding maximum value ok 7 8d5e - Add bfifo qdisc on egress with unsupported argument ok 8 7787 - Add pfifo qdisc on egress with unsupported argument ok 9 c4b6 - Replace bfifo qdisc on egress with new queue size ok 10 3df6 - Replace pfifo qdisc on egress with new queue size ok 11 7a67 - Add bfifo qdisc on egress with queue size in invalid format ok 12 1298 - Add duplicate bfifo qdisc on egress ok 13 45a0 - Delete nonexistent bfifo qdisc ok 14 972b - Add prio qdisc on egress with invalid format for handles ok 15 4d39 - Delete bfifo qdisc twice ok 16 d774 - Check pfifo_head_drop qdisc enqueue behaviour when limit == 0 Could you provide a link for me to check? Just in case, please make sure patch 1/4 is applied before this test, otherwise packets would not be dropped. Meanwhile, I do need to update this patch anyway, because it hardcoded dummy2... Thanks.
diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json index ae3d286a32b2..f5e08ae9bb7d 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json +++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json @@ -313,6 +313,31 @@ "matchPattern": "qdisc bfifo 1: root", "matchCount": "0", "teardown": [ + ] + }, + { + "id": "d774", + "name": "Check pfifo_head_drop qdisc enqueue behaviour when limit == 0", + "category": [ + "qdisc", + "pfifo_head_drop" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + "$IP link add dev dummy2 mtu 1279 type dummy || true", + "$IP addr add 10.10.10.10/24 dev dummy2 || true", + "$TC qdisc add dev dummy2 root handle 1: pfifo_head_drop limit 0", + "$IP link set dev dummy2 up || true" + ], + "cmdUnderTest": "ping -c10 -W0.01 -I dummy2 10.10.10.1", + "expExitCode": "1", + "verifyCmd": "$TC -s qdisc show dev dummy2", + "matchPattern": "dropped 10", + "matchCount": "1", + "teardown": [ + "$IP link del dev dummy2" ] } ]