From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 22937 invoked from network); 21 Apr 2021 07:18:10 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 21 Apr 2021 07:18:10 -0000 Received: from pb-smtp1.pobox.com ([64.147.108.70]) by 1ess; Wed Apr 21 03:11:05 -0400 2021 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 2EEFCD39A2 for <9front@9front.org>; Wed, 21 Apr 2021 03:10:58 -0400 (EDT) (envelope-from unobe@cpan.org) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=message-id:to :subject:date:from:mime-version:content-type :content-transfer-encoding; s=sasl; bh=V4vHsTs7NDKmsr1TH8xe1ryIl as=; b=E1JcmTyyeIrbmUMzffY3yETKRNmYXqSOs+oC4fvKdaaQVIsieYMHre+m9 YBWc7aqZyiIbhHC67/AsZw5wwUT8t0O+mlf8u4gQwVGDuDBi9aFi4NWIpXboZGzY bHI9iPNumrLskiGw/GailDPUsph1ktu4VSHIdeyBGqFdtR0gVE= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 27126D39A1 for <9front@9front.org>; Wed, 21 Apr 2021 03:10:58 -0400 (EDT) (envelope-from unobe@cpan.org) Received: from peregrin (unknown [47.34.135.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 790EAD39A0 for <9front@9front.org>; Wed, 21 Apr 2021 03:10:57 -0400 (EDT) (envelope-from unobe@cpan.org) Message-ID: To: 9front@9front.org Date: Wed, 21 Apr 2021 00:10:55 -0700 From: unobe@cpan.org MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Pobox-Relay-ID: B83CC54A-A270-11EB-A686-D152C8D8090B-09620299!pb-smtp1.pobox.com Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: webscale managed DOM firewall AJAX over ORM enhancement-oriented element-scale engine Subject: [9front] =?utf-8?q?[patch]_fix_port/devloopback.c_so_#=CE=BB_can_be_built?= Reply-To: 9front@9front.org Precedence: bulk loopback(3) describes #=CE=BB, but AFAICT it hasn't been built in the 9front kernels. Granted, this is all new to me, so I could very well be misunderstanding something critical. I didn't add the device to pc/pc and pc64/pc64 because I wasn't sure if the driver should be added back, or if it's only selected for inclusion in the kernel for testing. Clearly, it hadn't been tested in awhile, if ever. I reviewed the logs for devloopback.c and pc/pc and pc/pc64 all the way back to the initial import of the Plan 9 code: it never was included in the initial import of pc/pccpuf, pc/pc64, etc. I did add it to my mbp branch's pc64/pc64mb after ip and tested it by building the kernel and booting; I can now use/see #=CE=BB: @@ -22,6 +22,7 @@ ether netif bridge netif log ip arp chandial ip ipv6 ipaux iproute netlog ethermedium nullmedium pk= tmedium inferno + loopback =20 draw screen vga vgax vgasoft mouse mouse This patch below apply cleanly to the default branch. changeset: 8444:a321ba95666e branch: mbp-2011 user: Romano date: Tue Apr 20 23:55:06 2021 -0700 files: sys/src/9/port/devloopback.c description: devloopback.c didn't compile due to changes in the Timer struct, the Link struct, and referencing devloopbacktab before it was declared. diff -r 2bc7dceab4ef -r a321ba95666e sys/src/9/port/devloopback.c --- a/sys/src/9/port/devloopback.c Tue Apr 20 22:41:52 2021 -0700 +++ b/sys/src/9/port/devloopback.c Tue Apr 20 23:55:06 2021 -0700 @@ -127,7 +127,7 @@ if(dev >=3D Nloopbacks) error(Enodev); =20 - c =3D devattach(loopbackdevtab.dc, spec); + c =3D devattach(L'=CE=BB', spec); if(waserror()){ chanfree(c); nexterror(); @@ -144,9 +144,9 @@ lb->ref++; if(lb->ref =3D=3D 1){ for(chan =3D 0; chan < 2; chan++){ - lb->link[chan].ci.mode =3D Trelative; - lb->link[chan].ci.a =3D &lb->link[chan]; - lb->link[chan].ci.f =3D linkintr; + lb->link[chan].ci.tmode =3D Trelative; + lb->link[chan].ci.ta =3D &lb->link[chan]; + lb->link[chan].ci.tf =3D linkintr; lb->link[chan].limit =3D Loopqlim; q =3D qopen(lb->link[chan].limit, 0, 0, 0); lb->link[chan].iq =3D q; @@ -464,8 +464,8 @@ Link *link; Cmdbuf *volatile cb; Block *volatile bp; - vlong d0, d0ns; - long dn, dnns; + vlong d0ns; + long dnns; =20 switch(TYPE(c->qid.path)){ case Qdata: @@ -580,8 +580,8 @@ { Link *link; =20 - link =3D ci->a; - pushlink(link, ci->ns); + link =3D ci->ta; + pushlink(link, ci->tns); } =20 /* @@ -630,7 +630,7 @@ tin =3D gtime(bp->rp); if(tin > tout) tout =3D tin; - tout =3D tout + (BLEN(bp) - Tmsize) * link->delayn; + tout =3D tout + (BLEN(bp) - Tmsize) * link->delaynns; =20 /* * drop packets @@ -678,7 +678,7 @@ if(!tin || tin > tout && tout) tin =3D tout; =20 - link->ci.ns =3D tin - now; + link->ci.tns =3D tin - now; if(tin){ if(tin < now) panic("loopback unfinished business");