Commit daf63408 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net_sched-skbprio-remove-overly-strict-queue-assertions'

Cong Wang says:

====================
net_sched: skbprio: Remove overly strict queue assertions
====================

Link: https://patch.msgid.link/20250329222536.696204-1-xiyou.wangcong@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 078aabd5 076c7009
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -123,8 +123,6 @@ static int skbprio_enqueue(struct sk_buff *skb, struct Qdisc *sch,
	/* Check to update highest and lowest priorities. */
	if (skb_queue_empty(lp_qdisc)) {
		if (q->lowest_prio == q->highest_prio) {
			/* The incoming packet is the only packet in queue. */
			BUG_ON(sch->q.qlen != 1);
			q->lowest_prio = prio;
			q->highest_prio = prio;
		} else {
@@ -156,7 +154,6 @@ static struct sk_buff *skbprio_dequeue(struct Qdisc *sch)
	/* Update highest priority field. */
	if (skb_queue_empty(hpq)) {
		if (q->lowest_prio == q->highest_prio) {
			BUG_ON(sch->q.qlen);
			q->highest_prio = 0;
			q->lowest_prio = SKBPRIO_MAX_PRIORITY - 1;
		} else {
+33 −1
Original line number Diff line number Diff line
@@ -126,5 +126,37 @@
            "$TC qdisc del dev $DUMMY root handle 1: drr",
            "$IP addr del 10.10.10.10/24 dev $DUMMY"
        ]
    },
    {
        "id": "c024",
        "name": "Test TBF with SKBPRIO - catch qlen corner cases",
        "category": [
            "qdisc",
            "tbf",
            "skbprio"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link set dev $DUMMY up || true",
            "$IP addr add 10.10.10.10/24 dev $DUMMY || true",
            "$TC qdisc add dev $DUMMY handle 1: root tbf rate 100bit burst 2000 limit 1000",
            "$TC qdisc add dev $DUMMY parent 1: handle 10: skbprio limit 1",
            "ping -c 1 -W 0.1 -Q 0x00 -s 1400 -I $DUMMY 10.10.10.1 > /dev/null || true",
            "ping -c 1 -W 0.1 -Q 0x1c -s 1400 -I $DUMMY 10.10.10.1 > /dev/null || true",
            "ping -c 1 -W 0.1 -Q 0x00 -s 1400 -I $DUMMY 10.10.10.1 > /dev/null || true",
            "ping -c 1 -W 0.1 -Q 0x1c -s 1400 -I $DUMMY 10.10.10.1 > /dev/null || true",
            "sleep 0.5"
        ],
        "cmdUnderTest": "$TC -s qdisc show dev $DUMMY",
        "expExitCode": "0",
        "verifyCmd": "$TC -s qdisc show dev $DUMMY | grep -A 5 'qdisc skbprio'",
        "matchPattern": "dropped [1-9][0-9]*",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP addr del 10.10.10.10/24 dev $DUMMY || true"
        ]
    }
]