Netdev List
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Pedro Tammela <pctammela@mojatatu.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com, jiri@resnulli.us,
	quanglex97@gmail.com, mincho@theori.io,
	Cong Wang <cong.wang@bytedance.com>
Subject: Re: [Patch net v2 2/4] selftests/tc-testing: Add a test case for pfifo_head_drop qdisc when limit==0
Date: Fri, 31 Jan 2025 15:13:00 -0800	[thread overview]
Message-ID: <Z51Y/KlsCyYi5VvB@pop-os.localdomain> (raw)
In-Reply-To: <f49814fb-cd69-4c3b-b8d4-c529a99c10e5@mojatatu.com>

On Tue, Jan 28, 2025 at 08:19:54PM -0300, Pedro Tammela wrote:
> On 26/01/2025 01:12, 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 the qdisc.
> > 
> > All test results:
> > 
> > 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
> > 
> > Signed-off-by: Quang Le <quanglex97@gmail.com>
> > Signed-off-by: Cong Wang <cong.wang@bytedance.com>
> > ---
> >   .../tc-testing/tc-tests/qdiscs/fifo.json      | 25 +++++++++++++++++++
> >   1 file changed, 25 insertions(+)
> > 
> > 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..94f6456ab460 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 $DUMMY mtu 1279 type dummy || true",
> 
> You don't need to manually add or remove a dummy device for tdc anymore.
> The nsPlugin is responsible for it.

Thanks for the hint!

> 
> I ran the suite with both of the tests without the link add/del and it's
> working!
> 
> Can you try it?

I tried it, but I saw the following error. I am not sure whether this
error is related to these patches.

multiprocessing.pool.RemoteTraceback:
# """
# Traceback (most recent call last):
#   File "/usr/lib64/python3.12/multiprocessing/pool.py", line 125, in worker
#     result = (True, func(*args, **kwds))
#                     ^^^^^^^^^^^^^^^^^^^
#   File "/usr/lib64/python3.12/multiprocessing/pool.py", line 48, in mapstar
#     return list(map(*args))
#            ^^^^^^^^^^^^^^^^
#   File "/host/tools/testing/selftests/tc-testing/./tdc.py", line 601, in __mp_runner
#     (_, tsr) = test_runner(mp_pm, mp_args, tests)
#                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/host/tools/testing/selftests/tc-testing/./tdc.py", line 535, in test_runner
#     res = run_one_test(pm, args, index, tidx)
#           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/host/tools/testing/selftests/tc-testing/./tdc.py", line 418, in run_one_test
#     pm.call_pre_case(tidx)
#   File "/host/tools/testing/selftests/tc-testing/./tdc.py", line 142, in call_pre_case
#     pgn_inst.pre_case(caseinfo, test_skip)
#   File "/host/tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py", line 63, in pre_case
#     self.prepare_test(test)
#   File "/host/tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py", line 36, in prepare_test
#     self._nl_ns_create()
#   File "/host/tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py", line 130, in _nl_ns_create
#     ip.link('add', ifname=dev1, kind='veth', peer={'ifname': dev0, 'net_ns_fd':'/proc/1/ns/net'})
#   File "/usr/local/lib/python3.12/site-packages/pyroute2/iproute/linux.py", line 1730, in link
#     ret = self.nlm_request(msg, msg_type=msg_type, msg_flags=msg_flags)
#           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/usr/local/lib/python3.12/site-packages/pyroute2/netlink/nlsocket.py", line 875, in nlm_request
#     return tuple(self._genlm_request(*argv, **kwarg))
#            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/usr/local/lib/python3.12/site-packages/pyroute2/netlink/nlsocket.py", line 1248, in nlm_request
#     for msg in self.get(
#                ^^^^^^^^^
#   File "/usr/local/lib/python3.12/site-packages/pyroute2/netlink/nlsocket.py", line 878, in get
#     return tuple(self._genlm_get(*argv, **kwarg))
#            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/usr/local/lib/python3.12/site-packages/pyroute2/netlink/nlsocket.py", line 555, in get
#     raise msg['header']['error']
# pyroute2.netlink.exceptions.NetlinkError: (17, 'File exists')
# """
#
# The above exception was the direct cause of the following exception:
#
# Traceback (most recent call last):
#   File "/host/tools/testing/selftests/tc-testing/./tdc.py", line 1027, in <module>
#     main()
#   File "/host/tools/testing/selftests/tc-testing/./tdc.py", line 1021, in main
#     set_operation_mode(pm, parser, args, remaining)
#   File "/host/tools/testing/selftests/tc-testing/./tdc.py", line 963, in set_operation_mode
#     catresults = test_runner_mp(pm, args, alltests)
#                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/host/tools/testing/selftests/tc-testing/./tdc.py", line 623, in test_runner_mp
#     pres = p.map(__mp_runner, batches)
#            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/usr/lib64/python3.12/multiprocessing/pool.py", line 367, in map
#     return self._map_async(func, iterable, mapstar, chunksize).get()
#            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/usr/lib64/python3.12/multiprocessing/pool.py", line 774, in get
#     raise self._value
# pyroute2.netlink.exceptions.NetlinkError: (17, 'File exists')


  reply	other threads:[~2025-01-31 23:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-26  4:12 [Patch net v2 0/4] net_sched: two security bug fixes and test cases Cong Wang
2025-01-26  4:12 ` [Patch net v2 1/4] pfifo_tail_enqueue: Drop new packet when sch->limit == 0 Cong Wang
2025-01-26  4:12 ` [Patch net v2 2/4] selftests/tc-testing: Add a test case for pfifo_head_drop qdisc when limit==0 Cong Wang
2025-01-27 16:57   ` Jakub Kicinski
2025-01-28  1:08     ` Cong Wang
2025-01-28  4:25       ` Cong Wang
2025-01-28 22:00         ` Jakub Kicinski
2025-01-28 23:19   ` Pedro Tammela
2025-01-31 23:13     ` Cong Wang [this message]
2025-01-26  4:12 ` [Patch net v2 3/4] netem: update sch->q.qlen before qdisc_tree_reduce_backlog() Cong Wang
2025-01-26  4:12 ` [Patch net v2 4/4] selftests/tc-testing: add a test case for qdisc_tree_reduce_backlog() Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z51Y/KlsCyYi5VvB@pop-os.localdomain \
    --to=xiyou.wangcong@gmail.com \
    --cc=cong.wang@bytedance.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=mincho@theori.io \
    --cc=netdev@vger.kernel.org \
    --cc=pctammela@mojatatu.com \
    --cc=quanglex97@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox