selftests/tc-testing: Add selftests for qdisc DualPI2Update configuration of tc-tests and preload DualPI2 module for self-tests,and add following self-test cases for DualPI2: Test a4c7: Create
selftests/tc-testing: Add selftests for qdisc DualPI2Update configuration of tc-tests and preload DualPI2 module for self-tests,and add following self-test cases for DualPI2: Test a4c7: Create DualPI2 with default setting Test 1ea4: Create DualPI2 with memlimit Test 2130: Create DualPI2 with typical_rtt and max_rtt Test 90c1: Create DualPI2 with max_rtt Test 7b3c: Create DualPI2 with any_ect option Test 49a3: Create DualPI2 with overflow option Test d0a1: Create DualPI2 with drop_enqueue option Test f051: Create DualPI2 with no_split_gso option Test 456b: Create DualPI2 with packet step_thresh Test 610c: Create DualPI2 with packet min_qlen_step Test b4fa: Create DualPI2 with packet coupling_factor Test 37f1: Create DualPI2 with packet classic_protectionSigned-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>Reviewed-by: Victor Nogueira <victor@mojatatu.com>Link: https://patch.msgid.link/20250722095915.24485-6-chia-yu.chang@nokia-bell-labs.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
selftests/tc-testing: Add tests for restrictions on netem duplicationEnsure that a duplicating netem cannot exist in a tree with other netemsin both qdisc addition and change. This is meant to pre
selftests/tc-testing: Add tests for restrictions on netem duplicationEnsure that a duplicating netem cannot exist in a tree with other netemsin both qdisc addition and change. This is meant to prevent the softlockup and OOM loop scenario discussed in [1]. Also adjust a HFSC'sre-entrancy test case with netem for this new restriction - KASANstill triggers upon its failure.[1] https://lore.kernel.org/netdev/8DuRWwfqjoRDLDmBMlIfbrsZg9Gx50DHJc1ilxsEBNe2D6NMoigR_eIRIG0LOjMc3r10nUUZtArXx4oZBIdUfZQrwjcQhdinnMis_0G7VEk=@willsroot.io/Signed-off-by: William Liu <will@willsroot.io>Reviewed-by: Savino Dicanosa <savy@syst3mfailure.io>Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>Link: https://patch.msgid.link/20250708164219.875521-1-will@willsroot.ioSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/tc-testing: sfq: check perturb timer valuesAdd one test to check that the kernel rejects a negative perturb timer.Add a second test checking that the kernel rejectsa too big perturb ti
selftests/tc-testing: sfq: check perturb timer valuesAdd one test to check that the kernel rejects a negative perturb timer.Add a second test checking that the kernel rejectsa too big perturb timer.All test results:1..2ok 1 cdc1 - Check that a negative perturb timer is rejectedok 2 a9f0 - Check that a too big perturb timer is rejectedSigned-off-by: Eric Dumazet <edumazet@google.com>Reviewed-by: Simon Horman <horms@kernel.org>Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>Link: https://patch.msgid.link/20250613064136.3911944-1-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/tc-testing: Add qdisc limit trimming testsAdded new test cases for FQ, FQ_CODEL, FQ_PIE, and HHF qdiscs to verify queuetrimming behavior when the qdisc limit is dynamically reduced.Eac
selftests/tc-testing: Add qdisc limit trimming testsAdded new test cases for FQ, FQ_CODEL, FQ_PIE, and HHF qdiscs to verify queuetrimming behavior when the qdisc limit is dynamically reduced.Each test injects packets, reduces the qdisc limit, and checks that the newlimit is enforced. This is still best effort since timing qdisc backlogis not easy.Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>Signed-off-by: David S. Miller <davem@davemloft.net>
selftests/tc-testing: sfq: check that a derived limit of 1 is rejectedBecause the limit is updated indirectly when other parameters areupdated, there are cases where even though the user requests
selftests/tc-testing: sfq: check that a derived limit of 1 is rejectedBecause the limit is updated indirectly when other parameters areupdated, there are cases where even though the user requests a limitof 2 it can actually be set to 1.Add the following test cases to check that the kernel rejects them:- limit 2 depth 1 flows 1- limit 2 depth 1 divisor 1Signed-off-by: Octavian Purdila <tavip@google.com>Acked-by: Cong Wang <xiyou.wangcong@gmail.com>Signed-off-by: David S. Miller <davem@davemloft.net>
selftests/tc-testing: Add a test case for DRR class with TC_H_ROOTIntegrate the reproduer from Mingi to TDC.All test results:1..4ok 1 0385 - Create DRR with default settingok 2 2375 - Delete
selftests/tc-testing: Add a test case for DRR class with TC_H_ROOTIntegrate the reproduer from Mingi to TDC.All test results:1..4ok 1 0385 - Create DRR with default settingok 2 2375 - Delete DRR with handleok 3 3092 - Show DRR classok 4 4009 - Reject creation of DRR class with classid TC_H_ROOTCc: Mingi Cho <mincho@theori.io>Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>Reviewed-by: Simon Horman <horms@kernel.org>Link: https://patch.msgid.link/20250306232355.93864-3-xiyou.wangcong@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/tc-testing: Add a test case for pfifo_head_drop qdisc when limit==0When limit == 0, pfifo_tail_enqueue() must drop new packet andincrease dropped packets count of the qdisc.All test re
selftests/tc-testing: Add a test case for pfifo_head_drop qdisc when limit==0When limit == 0, pfifo_tail_enqueue() must drop new packet andincrease dropped packets count of the qdisc.All test results:1..16ok 1 a519 - Add bfifo qdisc with system default parameters on egressok 2 585c - Add pfifo qdisc with system default parameters on egressok 3 a86e - Add bfifo qdisc with system default parameters on egress with handle of maximum valueok 4 9ac8 - Add bfifo qdisc on egress with queue size of 3000 bytesok 5 f4e6 - Add pfifo qdisc on egress with queue size of 3000 packetsok 6 b1b1 - Add bfifo qdisc with system default parameters on egress with invalid handle exceeding maximum valueok 7 8d5e - Add bfifo qdisc on egress with unsupported argumentok 8 7787 - Add pfifo qdisc on egress with unsupported argumentok 9 c4b6 - Replace bfifo qdisc on egress with new queue sizeok 10 3df6 - Replace pfifo qdisc on egress with new queue sizeok 11 7a67 - Add bfifo qdisc on egress with queue size in invalid formatok 12 1298 - Add duplicate bfifo qdisc on egressok 13 45a0 - Delete nonexistent bfifo qdiscok 14 972b - Add prio qdisc on egress with invalid format for handlesok 15 4d39 - Delete bfifo qdisc twiceok 16 d774 - Check pfifo_head_drop qdisc enqueue behaviour when limit == 0Signed-off-by: Quang Le <quanglex97@gmail.com>Signed-off-by: Cong Wang <cong.wang@bytedance.com>Link: https://patch.msgid.link/20250204005841.223511-3-xiyou.wangcong@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/tc-testing: sfq: test that kernel rejects limit of 1Add test to check that the kernel rejects a configuration with thelimit set to 1.Signed-off-by: Octavian Purdila <tavip@google.com>
selftests/tc-testing: sfq: test that kernel rejects limit of 1Add test to check that the kernel rejects a configuration with thelimit set to 1.Signed-off-by: Octavian Purdila <tavip@google.com>Link: https://patch.msgid.link/20241204030520.2084663-3-tavip@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched: taprio: extend minimum interval restriction to entire cycle tooIt is possible for syzbot to side-step the restriction imposed by theblamed commit in the Fixes: tag, because the taprio U
net/sched: taprio: extend minimum interval restriction to entire cycle tooIt is possible for syzbot to side-step the restriction imposed by theblamed commit in the Fixes: tag, because the taprio UAPI permits acycle-time different from (and potentially shorter than) the sum ofentry intervals.We need one more restriction, which is that the cycle time itself mustbe larger than N * ETH_ZLEN bit times, where N is the number of scheduleentries. This restriction needs to apply regardless of whether the cycletime came from the user or was the implicit, auto-calculated value, sowe move the existing "cycle == 0" check outside the "if "(!new->cycle_time)"branch. This way covers both conditions and scenarios.Add a selftest which illustrates the issue triggered by syzbot.Fixes: b5b73b26b3ca ("taprio: Fix allowing too small intervals")Reported-by: syzbot+a7d2b1d5d1af83035567@syzkaller.appspotmail.comCloses: https://lore.kernel.org/netdev/0000000000007d66bc06196e7c66@google.com/Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>Link: https://lore.kernel.org/r/20240527153955.553333-2-vladimir.oltean@nxp.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched: taprio: make q->picos_per_byte available to fill_sched_entry()In commit b5b73b26b3ca ("taprio: Fix allowing too small intervals"), acomparison of user input against length_to_duration(q
net/sched: taprio: make q->picos_per_byte available to fill_sched_entry()In commit b5b73b26b3ca ("taprio: Fix allowing too small intervals"), acomparison of user input against length_to_duration(q, ETH_ZLEN) wasintroduced, to avoid RCU stalls due to frequent hrtimers.The implementation of length_to_duration() depends on q->picos_per_bytebeing set for the link speed. The blamed commit in the Fixes: tag hasmoved this too late, so the checks introduced above are ineffective.The q->picos_per_byte is zero at parse_taprio_schedule() ->parse_sched_list() -> parse_sched_entry() -> fill_sched_entry() time.Move the taprio_set_picos_per_byte() call as one of the first things intaprio_change(), before the bulk of the netlink attribute parsing isdone. That's because it is needed there.Add a selftest to make sure the issue doesn't get reintroduced.Fixes: 09dbdf28f9f9 ("net/sched: taprio: fix calculation of maximum gate durations")Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>Reviewed-by: Eric Dumazet <edumazet@google.com>Link: https://lore.kernel.org/r/20240527153955.553333-1-vladimir.oltean@nxp.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests: tc-testing: adjust fq test to latest iproute2Adjust the fq verify regex to the latest iproute2Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Reviewed-by: Davide Caratti <dcaratt
selftests: tc-testing: adjust fq test to latest iproute2Adjust the fq verify regex to the latest iproute2Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Reviewed-by: Davide Caratti <dcaratti@redhat.com>Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>Reviewed-by: Davide Caratti <dcaratti@redhat.com>Link: https://lore.kernel.org/r/20240124181933.75724-4-pctammela@mojatatu.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests: tc-testing: check if 'jq' is available in taprio testsIf 'jq' is not available the taprio tests might enter an infinite loop,use the "dependsOn" feature from tdc to check if jq is prese
selftests: tc-testing: check if 'jq' is available in taprio testsIf 'jq' is not available the taprio tests might enter an infinite loop,use the "dependsOn" feature from tdc to check if jq is present. If it'snot the test is skipped.Suggested-by: Davide Caratti <dcaratti@redhat.com>Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Reviewed-by: Davide Caratti <dcaratti@redhat.com>Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>Reviewed-by: Davide Caratti <dcaratti@redhat.com>Link: https://lore.kernel.org/r/20240124181933.75724-3-pctammela@mojatatu.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests: tc-testing: add test for 'rt' upgrade on hfscAdd a test to check if inner rt curves are upgraded to sc curves.Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Signed-off-by: David
selftests: tc-testing: add test for 'rt' upgrade on hfscAdd a test to check if inner rt curves are upgraded to sc curves.Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Signed-off-by: David S. Miller <davem@davemloft.net>
selftests: tc-testing: move auxiliary scripts to a dedicated folderSome taprio tests need auxiliary scripts to wait for workqueue events toprocess. Move them to a dedicated folder in order to pack
selftests: tc-testing: move auxiliary scripts to a dedicated folderSome taprio tests need auxiliary scripts to wait for workqueue events toprocess. Move them to a dedicated folder in order to package them forthe kselftests tarball.Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Link: https://lore.kernel.org/r/20231017152309.3196320-3-pctammela@mojatatu.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/tc-testing: update test definitions for local resourcesWith resources localized on a per test basis, some tests definitionseither contain redundant commands, were wrong or could be simpl
selftests/tc-testing: update test definitions for local resourcesWith resources localized on a per test basis, some tests definitionseither contain redundant commands, were wrong or could be simplified.Update all of them to match the new requirements.Tested-by: Davide Caratti <dcaratti@redhat.com>Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>Signed-off-by: Paolo Abeni <pabeni@redhat.com>
selftests/tc-testing: verify that a qdisc can be grafted onto a taprio classThe reason behind commit af7b29b1deaa ("Revert "net/sched: taprio: makeqdisc_leaf() see the per-netdev-queue pfifo child
selftests/tc-testing: verify that a qdisc can be grafted onto a taprio classThe reason behind commit af7b29b1deaa ("Revert "net/sched: taprio: makeqdisc_leaf() see the per-netdev-queue pfifo child qdiscs"") was that thepatch it reverted caused a crash when attaching a CBS shaper to one ofthe taprio classes. Prevent that from happening again by adding a testcase for it, which now passes correctly in both offload and softwaremodes.Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>Link: https://lore.kernel.org/r/20230807193324.4128292-12-vladimir.oltean@nxp.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/tc-testing: test that taprio can only be attached as rootCheck that the "Can only be attached as root qdisc" error message fromtaprio is effective by attempting to attach it to a class o
selftests/tc-testing: test that taprio can only be attached as rootCheck that the "Can only be attached as root qdisc" error message fromtaprio is effective by attempting to attach it to a class of anothertaprio qdisc. That operation should fail.In the bug that was squashed by change "net/sched: taprio: try again toreport q->qdiscs[] to qdisc_leaf()", grafting a child taprio to a rootsoftware taprio would be misinterpreted as a change() to the roottaprio. Catch this by looking at whether the base-time of the roottaprio has changed to follow the base-time of the child taprio,something which should have absolutely never happened assuming correctsemantics.Vinicius points out that looking at "base_time" in the tc qdisc showoutput is unreliable because user space is in a race with the kernelapplying the setting. So we create a helper bash script which waitswhile there is any pending schedule.Link: https://lore.kernel.org/netdev/87il9w0xx7.fsf@intel.com/Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>Link: https://lore.kernel.org/r/20230807193324.4128292-11-vladimir.oltean@nxp.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched: taprio: dump class stats for the actual q->qdiscs[]This makes a difference for the software scheduling mode, wheredev_queue->qdisc_sleeping is the same as the taprio root Qdisc itself,
net/sched: taprio: dump class stats for the actual q->qdiscs[]This makes a difference for the software scheduling mode, wheredev_queue->qdisc_sleeping is the same as the taprio root Qdisc itself,but when we're talking about what Qdisc and stats get reported for atraffic class, the root taprio isn't what comes to mind, but q->qdiscs[]is.To understand the difference, I've attempted to send 100 packets insoftware mode through class 8001:5, and recorded the stats before andafter the change.Here is before:$ tc -s class show dev eth0class taprio 8001:1 root leaf 8001: Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:2 root leaf 8001: Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:3 root leaf 8001: Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:4 root leaf 8001: Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:5 root leaf 8001: Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:6 root leaf 8001: Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:7 root leaf 8001: Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:8 root leaf 8001: Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0and here is after:class taprio 8001:1 root Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:2 root Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:3 root Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:4 root Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:5 root Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:6 root Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:7 root Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0class taprio 8001:8 root leaf 800d: Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 window_drops 0The most glaring (and expected) difference is that before, all classstats reported the global stats, whereas now, they really report justthe counters for that traffic class.Finally, Pedro Tammela points out that there is a tc selftest whichchecks specifically which handle do the child Qdiscs corresponding toeach class have. That's changing here - taprio no longer reportstcm->tcm_info as the same handle "1:" as itself (the root Qdisc), but 0(the handle of the default pfifo child Qdiscs). Since iproute2 does notprint a child Qdisc handle of 0, adjust the test's expected output.Link: https://lore.kernel.org/netdev/3b83fcf6-a5e8-26fb-8c8a-ec34ec4c3342@mojatatu.com/Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>Link: https://lore.kernel.org/r/20230807193324.4128292-6-vladimir.oltean@nxp.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched: taprio: Limit TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME to INT_MAX.syzkaller found zero division error [0] in div_s64_rem() called fromget_cycle_time_elapsed(), where sched->cycle_time is the di
net/sched: taprio: Limit TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME to INT_MAX.syzkaller found zero division error [0] in div_s64_rem() called fromget_cycle_time_elapsed(), where sched->cycle_time is the divisor.We have tests in parse_taprio_schedule() so that cycle_time will neverbe 0, and actually cycle_time is not 0 in get_cycle_time_elapsed().The problem is that the types of divisor are different; cycle_time iss64, but the argument of div_s64_rem() is s32.syzkaller fed this input and 0x100000000 is cast to s32 to be 0. @TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME={0xc, 0x8, 0x100000000}We use s64 for cycle_time to cast it to ktime_t, so let's keep it andset max for cycle_time.While at it, we prevent overflow in setup_txtime() and add anothertest in parse_taprio_schedule() to check if cycle_time overflows.Also, we add a new tdc test case for this issue.[0]:divide error: 0000 [#1] PREEMPT SMP KASAN NOPTICPU: 1 PID: 103 Comm: kworker/1:3 Not tainted 6.5.0-rc1-00330-g60cc1f7d0605 #3Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014Workqueue: ipv6_addrconf addrconf_dad_workRIP: 0010:div_s64_rem include/linux/math64.h:42 [inline]RIP: 0010:get_cycle_time_elapsed net/sched/sch_taprio.c:223 [inline]RIP: 0010:find_entry_to_transmit+0x252/0x7e0 net/sched/sch_taprio.c:344Code: 3c 02 00 0f 85 5e 05 00 00 48 8b 4c 24 08 4d 8b bd 40 01 00 00 48 8b 7c 24 48 48 89 c8 4c 29 f8 48 63 f7 48 99 48 89 74 24 70 <48> f7 fe 48 29 d1 48 8d 04 0f 49 89 cc 48 89 44 24 20 49 8d 85 10RSP: 0018:ffffc90000acf260 EFLAGS: 00010206RAX: 177450e0347560cf RBX: 0000000000000000 RCX: 177450e0347560cfRDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000100000000RBP: 0000000000000056 R08: 0000000000000000 R09: ffffed10020a0934R10: ffff8880105049a7 R11: ffff88806cf3a520 R12: ffff888010504800R13: ffff88800c00d800 R14: ffff8880105049a0 R15: 0000000000000000FS: 0000000000000000(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033CR2: 00007f0edf84f0e8 CR3: 000000000d73c002 CR4: 0000000000770ee0PKRU: 55555554Call Trace: <TASK> get_packet_txtime net/sched/sch_taprio.c:508 [inline] taprio_enqueue_one+0x900/0xff0 net/sched/sch_taprio.c:577 taprio_enqueue+0x378/0xae0 net/sched/sch_taprio.c:658 dev_qdisc_enqueue+0x46/0x170 net/core/dev.c:3732 __dev_xmit_skb net/core/dev.c:3821 [inline] __dev_queue_xmit+0x1b2f/0x3000 net/core/dev.c:4169 dev_queue_xmit include/linux/netdevice.h:3088 [inline] neigh_resolve_output net/core/neighbour.c:1552 [inline] neigh_resolve_output+0x4a7/0x780 net/core/neighbour.c:1532 neigh_output include/net/neighbour.h:544 [inline] ip6_finish_output2+0x924/0x17d0 net/ipv6/ip6_output.c:135 __ip6_finish_output+0x620/0xaa0 net/ipv6/ip6_output.c:196 ip6_finish_output net/ipv6/ip6_output.c:207 [inline] NF_HOOK_COND include/linux/netfilter.h:292 [inline] ip6_output+0x206/0x410 net/ipv6/ip6_output.c:228 dst_output include/net/dst.h:458 [inline] NF_HOOK.constprop.0+0xea/0x260 include/linux/netfilter.h:303 ndisc_send_skb+0x872/0xe80 net/ipv6/ndisc.c:508 ndisc_send_ns+0xb5/0x130 net/ipv6/ndisc.c:666 addrconf_dad_work+0xc14/0x13f0 net/ipv6/addrconf.c:4175 process_one_work+0x92c/0x13a0 kernel/workqueue.c:2597 worker_thread+0x60f/0x1240 kernel/workqueue.c:2748 kthread+0x2fe/0x3f0 kernel/kthread.c:389 ret_from_fork+0x2c/0x50 arch/x86/entry/entry_64.S:308 </TASK>Modules linked in:Fixes: 4cfd5779bd6e ("taprio: Add support for txtime-assist mode")Reported-by: syzkaller <syzkaller@googlegroups.com>Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>Co-developed-by: Eric Dumazet <edumazet@google.com>Co-developed-by: Pedro Tammela <pctammela@mojatatu.com>Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>Signed-off-by: David S. Miller <davem@davemloft.net>
selftests: tc-testing: add test for qfq with stab overheadA packet with stab overhead greater than QFQ_MAX_LMAX should be droppedby the QFQ qdisc as it can't handle such lengths.Signed-off-by: J
selftests: tc-testing: add test for qfq with stab overheadA packet with stab overhead greater than QFQ_MAX_LMAX should be droppedby the QFQ qdisc as it can't handle such lengths.Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Reviewed-by: Simon Horman <simon.horman@corigine.com>Tested-by: Zhengchao Shao <shaozhengchao@huawei.com>Signed-off-by: Paolo Abeni <pabeni@redhat.com>
selftests: tc-testing: add tests for qfq mtu sanity checkQFQ only supports a certain bound of MTU size so make surewe check for this requirement in the tests.Acked-by: Jamal Hadi Salim <jhs@moja
selftests: tc-testing: add tests for qfq mtu sanity checkQFQ only supports a certain bound of MTU size so make surewe check for this requirement in the tests.Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Reviewed-by: Simon Horman <simon.horman@corigine.com>Tested-by: Zhengchao Shao <shaozhengchao@huawei.com>Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netCross-merge networking fixes after downstream PR.Conflicts:include/linux/mlx5/driver.h 617f5db1a626 ("RDMA/mlx5: Fix affinity ass
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netCross-merge networking fixes after downstream PR.Conflicts:include/linux/mlx5/driver.h 617f5db1a626 ("RDMA/mlx5: Fix affinity assignment") dc13180824b7 ("net/mlx5: Enable devlink port for embedded cpu VF vports")https://lore.kernel.org/all/20230613125939.595e50b8@canb.auug.org.au/tools/testing/selftests/net/mptcp/mptcp_join.sh 47867f0a7e83 ("selftests: mptcp: join: skip check if MIB counter not supported") 425ba803124b ("selftests: mptcp: join: support RM_ADDR for used endpoints or not") 45b1a1227a7a ("mptcp: introduces more address related mibs") 0639fa230a21 ("selftests: mptcp: add explicit check for new mibs")https://lore.kernel.org/netdev/20230609-upstream-net-20230610-mptcp-selftests-support-old-kernels-part-3-v1-0-2896fe2ee8a3@tessares.net/No adjacent changes.Signed-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/tc-testing: Fix SFB db testSetting very small value of db like 10ms introduces rounding errors whenconverting to/from jiffies on some kernel configs. For example, on 250hzthe actual val
selftests/tc-testing: Fix SFB db testSetting very small value of db like 10ms introduces rounding errors whenconverting to/from jiffies on some kernel configs. For example, on 250hzthe actual value will be set to 12ms which causes the test to fail: # $ sudo ./tdc.py -d eth2 -e 3410 # -- ns/SubPlugin.__init__ # Test 3410: Create SFB with db setting # # All test results: # # 1..1 # not ok 1 3410 - Create SFB with db setting # Could not match regex pattern. Verify command output: # qdisc sfb 1: root refcnt 2 rehash 600s db 12ms limit 1000p max 25p target 20p increment 0.000503548 decrement 4.57771e-05 penalty_rate 10pps penalty_burst 20pSet the value to 100ms instead which currently seem to work on 100hz,250hz, 300hz and 1000hz kernel configs.Fixes: 6ad92dc56fca ("selftests/tc-testing: add selftests for sfb qdisc")Signed-off-by: Vlad Buslov <vladbu@nvidia.com>Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>Signed-off-by: Jakub Kicinski <kuba@kernel.org>
selftests/tc-testing: replace mq with invalid parent IDThe test case shown in [1] triggers the kernel to access the null pointer.Therefore, add related test cases to mq.The test results are as fo
selftests/tc-testing: replace mq with invalid parent IDThe test case shown in [1] triggers the kernel to access the null pointer.Therefore, add related test cases to mq.The test results are as follows:./tdc.py -e 05311..1ok 1 0531 - Replace mq with invalid parent ID./tdc.py -c mq1..8ok 1 ce7d - Add mq Qdisc to multi-queue device (4 queues)ok 2 2f82 - Add mq Qdisc to multi-queue device (256 queues)ok 3 c525 - Add duplicate mq Qdiscok 4 128a - Delete nonexistent mq Qdiscok 5 03a9 - Delete mq Qdisc twiceok 6 be0f - Add mq Qdisc to single-queue deviceok 7 1023 - Show mq classok 8 0531 - Replace mq with invalid parent ID[1] https://lore.kernel.org/all/20230527093747.3583502-1-shaozhengchao@huawei.com/Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>Link: https://lore.kernel.org/r/20230601012250.52738-1-shaozhengchao@huawei.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests: tc-testing: add more tests for sch_qfqThe QFQ qdisc class has parameter bounds that are not beingchecked for correctness.Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>Signed-off-by: P
selftests: tc-testing: add more tests for sch_qfqThe QFQ qdisc class has parameter bounds that are not beingchecked for correctness.Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>Signed-off-by: David S. Miller <davem@davemloft.net>
123