From nobody Tue May 03 17:28:56 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8B41B1AC751D; Tue, 3 May 2022 17:28:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kt6Q11gNtz3DTr; Tue, 3 May 2022 17:28:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651598937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qM+5dqhyL/FSmvYFwMIGgkHxAYcI/4+dq6yGXu2/yfg=; b=QVlvWU9r5y/rvv5AF5ChErClM1+SbMK/xZoHf2rIZk+p8nLrw8vMdV8rMPuFAR14/OxLfL JXGnHtxo/IoWENiI26wjm1CW+BrjTRcT1Pkz95TXFP2lIYvlmlSWTAblHngLq99YhoFEfI SR7Xnc1yDVi/48ko3X7OsmdB06xNCVBTAmmjoqRVHAJjkXAGU54Ojx8UeOp58ndimYJzj4 H3LUdDahCWyBlzDECnGx4U7vxDi8TIXDDLUZxgjfzw/b1cRybbx3HE/t8qRXF1I6PM2xKp fzbJogMhHiLlfIMtPt6sBxmbtxvNrXg+71enOCqrBpRXY5wm2fsGysfj/BoUbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02A64226AE; Tue, 3 May 2022 17:28:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 243HSuGL050029; Tue, 3 May 2022 17:28:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 243HSuTd050028; Tue, 3 May 2022 17:28:56 GMT (envelope-from git) Date: Tue, 3 May 2022 17:28:56 GMT Message-Id: <202205031728.243HSuTd050028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marko Zec Subject: git: 894c574ed2f2 - main - Revert "dummynet: use m_rcvif_serialize/restore when queueing packets" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 894c574ed2f2a7f842a891e8f38ec62dec014466 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651598937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qM+5dqhyL/FSmvYFwMIGgkHxAYcI/4+dq6yGXu2/yfg=; b=A5jTJbCv+ZFokm/MKrG9xO7d8LdwVLr6R3d/1dkgmCtvR0MoP3q4czMH10she1TpSfhsKY vJoXwSpGrUNRVIQw7lLwL4kCR+uMZV+vYwGi556oxN4sB6ncQhDfzScgi1gmkT0LBdDvz+ zc3Du7iL7HEHYjnZZKnpYafW74yK9A+cn2/8QQSrpipEfpUtClkbJvCYt9WWA9zn11fjFy m/ISzpek5vtTfxcH4X8tdVpRscmWd5W2Yz+C1NTA7g+I5adAyHWqlaoXsBUNzdvB5wEbGD eVdPqdxFEy0kN8HZEJgT366cc2NMgkS5vKar+8OnQvibDhXXZa9R/qxteM+maQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651598937; a=rsa-sha256; cv=none; b=TlqNBqbs4Yfz+m6gCphApIEI17D8KLvzmYfYKY57lB1opCSjHe3Z0m/3LqET1JHys1nhrN SrvoF2mq7Da6WCZIcewiBQ5Ij2DbFkLfKrffqdWizpSaAlbi3TyaDkRp3Sh+vssS4vhxjr cOj7ykDCbFvE3Oc3NyOl75nzvWsDlv8ib0ud6MKFZ9texoMvm1qjNe8mvE8uiQdiMpkhUp KgJQDUmVTpYZMnUVXGgaoCEiwIuY6ANO/SoMW5xevbyUIcnL9rluezfDlDR6CDz3Xd8yyQ i6DtjyoclWCuyv7uPKr0HmKrR1gwk6u6rnS9/wgqjoIVHGSSd/CE1EQSAo12qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=894c574ed2f2a7f842a891e8f38ec62dec014466 commit 894c574ed2f2a7f842a891e8f38ec62dec014466 Author: Marko Zec AuthorDate: 2022-05-03 14:55:56 +0000 Commit: Marko Zec CommitDate: 2022-05-03 17:11:40 +0000 Revert "dummynet: use m_rcvif_serialize/restore when queueing packets" This reverts commit 165746f4e4bf54c5902a103c2d4a3455e651c58f. Obtained from: github.com/glebius/FreeBSD/commits/backout-ifindex --- sys/netpfil/ipfw/dn_aqm_codel.c | 8 +------- sys/netpfil/ipfw/dn_aqm_pie.c | 8 +------- sys/netpfil/ipfw/dn_sched.h | 10 +--------- sys/netpfil/ipfw/dn_sched_fq_codel.h | 9 ++------- sys/netpfil/ipfw/dn_sched_fq_pie.c | 8 +------- sys/netpfil/ipfw/ip_dn_io.c | 10 +--------- 6 files changed, 7 insertions(+), 46 deletions(-) diff --git a/sys/netpfil/ipfw/dn_aqm_codel.c b/sys/netpfil/ipfw/dn_aqm_codel.c index 2f6d145485c6..79c6afd8b635 100644 --- a/sys/netpfil/ipfw/dn_aqm_codel.c +++ b/sys/netpfil/ipfw/dn_aqm_codel.c @@ -192,9 +192,8 @@ struct mbuf * codel_extract_head(struct dn_queue *q, aqm_time_t *pkt_ts) { struct m_tag *mtag; - struct mbuf *m; + struct mbuf *m = q->mq.head; -next: m = q->mq.head; if (m == NULL) return m; q->mq.head = m->m_nextpkt; @@ -214,11 +213,6 @@ next: m = q->mq.head; *pkt_ts = *(aqm_time_t *)(mtag + 1); m_tag_delete(m,mtag); } - if (m->m_pkthdr.rcvif != NULL && - __predict_false(m_rcvif_restore(m) == NULL)) { - m_freem(m); - goto next; - } return m; } diff --git a/sys/netpfil/ipfw/dn_aqm_pie.c b/sys/netpfil/ipfw/dn_aqm_pie.c index 5c97568b751e..3b80d6e94d38 100644 --- a/sys/netpfil/ipfw/dn_aqm_pie.c +++ b/sys/netpfil/ipfw/dn_aqm_pie.c @@ -328,9 +328,8 @@ static struct mbuf * pie_extract_head(struct dn_queue *q, aqm_time_t *pkt_ts, int getts) { struct m_tag *mtag; - struct mbuf *m; + struct mbuf *m = q->mq.head; -next: m = q->mq.head; if (m == NULL) return m; q->mq.head = m->m_nextpkt; @@ -352,11 +351,6 @@ next: m = q->mq.head; m_tag_delete(m,mtag); } } - if (m->m_pkthdr.rcvif != NULL && - __predict_false(m_rcvif_restore(m) == NULL)) { - m_freem(m); - goto next; - } return m; } diff --git a/sys/netpfil/ipfw/dn_sched.h b/sys/netpfil/ipfw/dn_sched.h index ef7242cd7355..5c506c1d30ac 100644 --- a/sys/netpfil/ipfw/dn_sched.h +++ b/sys/netpfil/ipfw/dn_sched.h @@ -170,10 +170,7 @@ int ipdn_bound_var(int *v, int dflt, int lo, int hi, const char *msg); static __inline struct mbuf* dn_dequeue(struct dn_queue *q) { - struct mbuf *m; - -next: - m = q->mq.head; + struct mbuf *m = q->mq.head; if (m == NULL) return NULL; #ifdef NEW_AQM @@ -193,11 +190,6 @@ next: } if (q->ni.length == 0) /* queue is now idle */ q->q_time = V_dn_cfg.curr_time; - if (m->m_pkthdr.rcvif != NULL && - __predict_false(m_rcvif_restore(m) == NULL)) { - m_freem(m); - goto next; - } return m; } diff --git a/sys/netpfil/ipfw/dn_sched_fq_codel.h b/sys/netpfil/ipfw/dn_sched_fq_codel.h index b84dfe7579fb..2f82a63ca093 100644 --- a/sys/netpfil/ipfw/dn_sched_fq_codel.h +++ b/sys/netpfil/ipfw/dn_sched_fq_codel.h @@ -138,9 +138,8 @@ fq_update_stats(struct fq_codel_flow *q, struct fq_codel_si *si, int len, __inline static struct mbuf * fq_codel_extract_head(struct fq_codel_flow *q, aqm_time_t *pkt_ts, struct fq_codel_si *si) { - struct mbuf *m; + struct mbuf *m = q->mq.head; -next: m = q->mq.head; if (m == NULL) return m; q->mq.head = m->m_nextpkt; @@ -160,11 +159,7 @@ next: m = q->mq.head; *pkt_ts = *(aqm_time_t *)(mtag + 1); m_tag_delete(m,mtag); } - if (m->m_pkthdr.rcvif != NULL && - __predict_false(m_rcvif_restore(m) == NULL)) { - m_freem(m); - goto next; - } + return m; } diff --git a/sys/netpfil/ipfw/dn_sched_fq_pie.c b/sys/netpfil/ipfw/dn_sched_fq_pie.c index f6bb4b6fe6de..65a6dd74b92f 100644 --- a/sys/netpfil/ipfw/dn_sched_fq_pie.c +++ b/sys/netpfil/ipfw/dn_sched_fq_pie.c @@ -338,9 +338,8 @@ __inline static struct mbuf * fq_pie_extract_head(struct fq_pie_flow *q, aqm_time_t *pkt_ts, struct fq_pie_si *si, int getts) { - struct mbuf *m; + struct mbuf *m = q->mq.head; -next: m = q->mq.head; if (m == NULL) return m; q->mq.head = m->m_nextpkt; @@ -362,11 +361,6 @@ next: m = q->mq.head; m_tag_delete(m,mtag); } } - if (m->m_pkthdr.rcvif != NULL && - __predict_false(m_rcvif_restore(m) == NULL)) { - m_freem(m); - goto next; - } return m; } diff --git a/sys/netpfil/ipfw/ip_dn_io.c b/sys/netpfil/ipfw/ip_dn_io.c index 824e7450fb8f..11ad498505f4 100644 --- a/sys/netpfil/ipfw/ip_dn_io.c +++ b/sys/netpfil/ipfw/ip_dn_io.c @@ -500,8 +500,6 @@ dn_enqueue(struct dn_queue *q, struct mbuf* m, int drop) goto drop; if (f->plr && random() < f->plr) goto drop; - if (m->m_pkthdr.rcvif != NULL) - m_rcvif_serialize(m); #ifdef NEW_AQM /* Call AQM enqueue function */ if (q->fs->aqmfp) @@ -550,11 +548,7 @@ transmit_event(struct mq *q, struct delay_line *dline, uint64_t now) break; dline->mq.head = m->m_nextpkt; dline->mq.count--; - if (m->m_pkthdr.rcvif != NULL && - __predict_false(m_rcvif_restore(m) == NULL)) - m_freem(m); - else - mq_append(q, m); + mq_append(q, m); } if (m != NULL) { dline->oid.subtype = 1; /* in heap */ @@ -623,8 +617,6 @@ serve_sched(struct mq *q, struct dn_sch_inst *si, uint64_t now) si->credit -= len_scaled; /* Move packet in the delay line */ dn_tag_get(m)->output_time = V_dn_cfg.curr_time + s->link.delay ; - if (m->m_pkthdr.rcvif != NULL) - m_rcvif_serialize(m); mq_append(&si->dline.mq, m); }