From owner-freebsd-net@freebsd.org Sun Apr 5 07:43:16 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 440522AED1F for ; Sun, 5 Apr 2020 07:43:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48w5Hz5ttrz42wD for ; Sun, 5 Apr 2020 07:43:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id A23392AED0A; Sun, 5 Apr 2020 07:43:01 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 920992AED09 for ; Sun, 5 Apr 2020 07:43:01 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48w5Hn2FVjz42sX for ; Sun, 5 Apr 2020 07:43:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C67B8B9B for ; Sun, 5 Apr 2020 07:42:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 0357gpa6004588 for ; Sun, 5 Apr 2020 07:42:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0357gpOR004587 for net@FreeBSD.org; Sun, 5 Apr 2020 07:42:51 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 241470] dummynet: setting bandwidth and delay causes repeatable panic: mpanic: Assertion in_epoch(net_epoch_preempt) Date: Sun, 05 Apr 2020 07:42:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: crash, needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kp@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2020 07:43:17 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241470 Kristof Provost changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Open |Closed Resolution|--- |FIXED --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Sun Apr 5 12:33:39 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 725CE2B5B88 for ; Sun, 5 Apr 2020 12:33:39 +0000 (UTC) (envelope-from dk@neveragain.de) Received: from mail.neveragain.de (chao.neveragain.de [94.16.113.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48wCks1Dgfz4sL3; Sun, 5 Apr 2020 12:33:23 +0000 (UTC) (envelope-from dk@neveragain.de) Received: from [IPv6:2a02:908:113b:fb5c:6c37:8e76:914:9f97] (unknown [IPv6:2a02:908:113b:fb5c:6c37:8e76:914:9f97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.neveragain.de (Postfix) with ESMTPSA id 2F5422332F7; Sun, 5 Apr 2020 14:33:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=neveragain.de; s=2015-10; t=1586089993; bh=bs1MDp3zX50qujI2HPCwOV9qkjPsX8ZwHc+S/Wra6IM=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=jBh9gXyEfrb/njdAKAqg5N0kPcYAGf0NoCjEPIa9zHQ0THOdXqf+ef6gKpSPeJc1O MOKZeDJoGbhSgB/HlW6ltcjXVkUitUhDERN8ls3fQRh1RWnxvJNTOSM7hDVuQ5AYVb serJmQJx8dSggfHvzOZ1g8K+6I6nPqN+jwElORHtB49RPgo4xNBf3Y1ACfnvtOSjDN 8PNfU+dA092NbkaeIdlS/OnN376DXfWxLwawaleuPuii2UlkGfW8LHWLAzoIkuTI+H EhH18me6ZhjVZymyGKzB3Xs06z+v0DhhzP7mg2ObUCNqCzXjrO1ElcR7wk2JiSYavj VQvU+FNqOQ+AA== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Revisiting FreeBSD-SA-08:10.nd6 (or: avoiding IPv6 pain) From: =?utf-8?Q?Dennis_K=C3=B6gel?= In-Reply-To: Date: Sun, 5 Apr 2020 14:33:13 +0200 Cc: freebsd-net@freebsd.org, Hiroki Sato , "Bjoern A. Zeeb" Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Philip Homburg X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 48wCks1Dgfz4sL3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=neveragain.de header.s=2015-10 header.b=jBh9gXyE; dmarc=pass (policy=none) header.from=neveragain.de; spf=pass (mx1.freebsd.org: domain of dk@neveragain.de designates 94.16.113.56 as permitted sender) smtp.mailfrom=dk@neveragain.de X-Spamd-Result: default: False [-2.63 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[neveragain.de:s=2015-10]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.neveragain.de]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[neveragain.de:+]; DMARC_POLICY_ALLOW(-0.50)[neveragain.de,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.13)[asn: 197540(-0.61), country: DE(-0.02)]; ASN(0.00)[asn:197540, ipnet:94.16.112.0/21, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2020 12:33:39 -0000 Dear all, Am 05.03.2020 um 13:27 schrieb Philip Homburg = : > In your letter dated Wed, 4 Mar 2020 21:10:09 +0100 you wrote: >> This flag was introduced in a 2008 Security Advisory, because = "non-neighbors"=20 >> could abuse Neighbor Discovery to potentially cause denial-of-service = situatio >> ns. >> In my situation it caused valid Neighbor Solicitation packets from my = provider >> to be silently dropped, making the connection effectively unusable. > [...] > That said, there is a specific check in processing Neighbor Discovery = packets > that the hop limit is equal to 255. In that sense any node that = manages to > send a packet with hop limit 255 is a neighbor, so I don't quite see = how there > could be an attack by non-neighbors. some time has passed, therefore I'd like to ask if and how we should = proceed on this issue. AFAICT nobody came up with a good reason to keep the current default, at = least for host nodes. Given that the default causes weird issues in some few environments, it = puts FreeBSD at a disadvantage -- other OS, even some other BSDs, "just = work". Another factor is that this problem appears only intermittently and is = very not-obvious to figure out. Basically, 1) change default to NOT ignore those NSol requests -- or 2) always print the corresponding warning message (instead of debug=3D1) = -- or 3) do nothing. I'm not too familiar with FreeBSD procedures, should I open an issue in = bugzilla? And/or submit a patch? Thanks in advance, - D. From owner-freebsd-net@freebsd.org Sun Apr 5 19:57:48 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90C94269158 for ; Sun, 5 Apr 2020 19:57:48 +0000 (UTC) (envelope-from fernando@gont.com.ar) Received: from fgont.go6lab.si (fgont.go6lab.si [91.239.96.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48wPbT1TB7z4Vfw for ; Sun, 5 Apr 2020 19:57:39 +0000 (UTC) (envelope-from fernando@gont.com.ar) Received: from [192.168.0.10] (unknown [181.45.84.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by fgont.go6lab.si (Postfix) with ESMTPSA id 0A3A580977; Sun, 5 Apr 2020 21:57:28 +0200 (CEST) Subject: Re: Revisiting FreeBSD-SA-08:10.nd6 (or: avoiding IPv6 pain) To: =?UTF-8?Q?Dennis_K=c3=b6gel?= , freebsd-net@freebsd.org References: <523BA6CF-C2C3-4E55-B81C-CB8816E56DDE@neveragain.de> From: Fernando Gont Message-ID: <327cf281-ca39-7c2f-3545-0edd3b40808f@gont.com.ar> Date: Sun, 5 Apr 2020 16:28:32 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <523BA6CF-C2C3-4E55-B81C-CB8816E56DDE@neveragain.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48wPbT1TB7z4Vfw X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fernando@gont.com.ar designates 91.239.96.14 as permitted sender) smtp.mailfrom=fernando@gont.com.ar X-Spamd-Result: default: False [-5.80 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gont.com.ar]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[14.96.239.91.list.dnswl.org : 127.0.10.0]; IP_SCORE(-3.50)[ip: (-9.28), ipnet: 91.239.96.0/23(-4.64), asn: 198644(-3.61), country: SI(0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:198644, ipnet:91.239.96.0/23, country:SI]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2020 19:57:48 -0000 Hello, FWIW, I just skimmed through this email. The problem here seems to be this: ND messages are not routable. So Solictations must come from an address that is on-line. A link-local address is of link, of course. Or, if e.g. a global address is employed, and the nodes knos it's on-link (e.g. there was a PIO with th L flag set), then that's also okay. However, when a packet from an "off-link" network is employed, the sending node has no way of knowing where to send the packet, unless it simply swaps the src and dst mac addresses, and uses the source address of the packet as the destination addresses. As such, it would seem to me it would be okay to drop the packet... BUt... of course, if there's a buggy box and responding as described solves the problem.... Thanks, Fernando On 4/3/20 17:10, Dennis Kögel wrote: > Hi, > > I‘ve spent quite some time debugging weird intermittent IPv6 connectivity issues over the last few days. > > It turned out that net.inet6.icmp6.nd6_onlink_ns_rfc4861=1 fixed those problems. > > This flag was introduced in a 2008 Security Advisory, because "non-neighbors" could abuse Neighbor Discovery to potentially cause denial-of-service situations. > In my situation it caused valid Neighbor Solicitation packets from my provider to be silently dropped, making the connection effectively unusable. > > In the comments in nd6_nbr.c[0] it says that IETF discussion on this issue is still ongoing. > > In the meantime, 12 years have passed. There are several reports on similar connection issues over the years, each time due to this default setting. > > An OpenBSD discussion from 2013 [1] explains the effects in depth, but ultimately ends up nowhere. The key takeaway from this thread is RFC 4861 sect. 7.2.2, which states that any address "should" be used as source. > > Dragonfly decided to disable this protection by default in 2018 [2]. > > I‘d propose to do the same in FreeBSD, given that the issue 1) is rather hard to debug 2) breaks interop with RFC-compliant setups again and again and 3) I cannot see any harm here (Solicitation can only originate from the rather trusted local network, i.e. from a neighbor). > > What do you think? Am I missing something? > > Thanks, > - D. > > > [0]: https://github.com/freebsd/freebsd/blob/master/sys/netinet6/nd6_nbr.c#L188 > > [1]: http://openbsd-archive.7691.n7.nabble.com/OpenBSD-ignoring-RFC-compliant-IPv6-neighbor-solicitation-td223348.html > > [2]: https://www.mail-archive.com/commits@dragonflybsd.org/msg14496.html > > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > -- Fernando Gont e-mail: fernando@gont.com.ar || fgont@si6networks.com PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1 From owner-freebsd-net@freebsd.org Sun Apr 5 21:01:11 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC00726B89E for ; Sun, 5 Apr 2020 21:01:11 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48wR0h1xdgz3RDn for ; Sun, 5 Apr 2020 21:01:07 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id 898E126B88B; Sun, 5 Apr 2020 21:01:06 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E6DC26B878 for ; Sun, 5 Apr 2020 21:01:06 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48wR0d43ZMz3RCy for ; Sun, 5 Apr 2020 21:01:05 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0956E1BF8C for ; Sun, 5 Apr 2020 21:00:21 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 035L0K0B058646 for ; Sun, 5 Apr 2020 21:00:20 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 035L0KfK058645 for net@FreeBSD.org; Sun, 5 Apr 2020 21:00:20 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <202004052100.035L0KfK058645@kenobi.freebsd.org> X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f From: bugzilla-noreply@FreeBSD.org To: net@FreeBSD.org Subject: Problem reports for net@FreeBSD.org that need special attention Date: Sun, 5 Apr 2020 21:00:20 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2020 21:01:12 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- In Progress | 221146 | [ixgbe] Problem with second laggport In Progress | 235700 | oce(4) driver causes fatal trap 12 on boot with e New | 204438 | setsockopt() handling of kern.ipc.maxsockbuf limi New | 205592 | TCP processing in IPSec causes kernel panic New | 213410 | [carp] service netif restart causes hang only whe Open | 7556 | ppp: sl_compress_init() will fail if called anyth Open | 187835 | ngctl(8) strange behavior when adding more than 5 Open | 193452 | Dell PowerEdge 210 II -- Kernel panic bce (broadc Open | 194453 | dummynet(4): pipe config bw parameter limited to Open | 202510 | [CARP] advertisements sourced from CARP IP cause Open | 207261 | netmap: Doesn't do TX sync with kqueue Open | 210726 | tcp connect() can return invalid EADDRINUSE (Eg: Open | 222273 | igb(4): Kernel panic (fatal trap 12) due to netwo Open | 225438 | panic in6_unlink_ifa() due to race Open | 225792 | ECMP is broken since tryforward() Open | 227720 | Kernel panic in ppp server Open | 230807 | if_alc(4): Driver not working for Killer Networki Open | 235524 | igb(4): Ethernet interface loses active link stat Open | 236888 | ppp daemon: Allow MTU to be overridden for PPPoE Open | 236983 | bnxt(4) VLAN not operational unless explicit "ifc Open | 237072 | netgraph(4): performance issue [on HardenedBSD]? Open | 237391 | route get returns no result for network addresses Open | 237840 | Removed dummynet dependency on ipfw Open | 238324 | Add XG-C100C/AQtion AQC107 10GbE NIC driver Open | 240530 | netgraph/ng_source: Allow ng_source to inject int Open | 240944 | em(4): Crash with Intel 82571EB NIC with AMD Pile Open | 240969 | netinet6: Neighbour reachability detection broken Open | 241106 | tun/ppp: panic: vm_fault: fault on nofault entry Open | 241162 | Panic in closefp() triggered by nginx (uwsgi with Open | 241191 | route flush panic with RADIX_MPATH Open | 243463 | ix0: Watchdog timeout Open | 244066 | divert: Add sysctls for divert socket send and re Open | 118111 | rc: network.subr Add MAC address based interface 33 problems total for which you should take action. From owner-freebsd-net@freebsd.org Mon Apr 6 15:22:59 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A787F2B2DB7 for ; Mon, 6 Apr 2020 15:22:59 +0000 (UTC) (envelope-from pch-b9D3CB0F5@u-1.phicoh.com) Received: from stereo.hq.phicoh.net (stereo6-tun.hq.phicoh.net [IPv6:2001:888:1044:10:2a0:c9ff:fe9f:17a9]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48wvS256tlz4CH5 for ; Mon, 6 Apr 2020 15:22:57 +0000 (UTC) (envelope-from pch-b9D3CB0F5@u-1.phicoh.com) Received: from stereo.hq.phicoh.net (localhost [::ffff:127.0.0.1]) by stereo.hq.phicoh.net with esmtp (TLS version=TLSv1.2 cipher=ECDHE-RSA-CHACHA20-POLY1305) (Smail #157) id m1jLTaK-0000KhC; Mon, 6 Apr 2020 17:22:48 +0200 Message-Id: To: freebsd-net@freebsd.org Subject: Re: Revisiting FreeBSD-SA-08:10.nd6 (or: avoiding IPv6 pain) From: Philip Homburg Sender: pch-b9D3CB0F5@u-1.phicoh.com In-reply-to: Your message of "Sun, 5 Apr 2020 16:28:32 -0300 ." <327cf281-ca39-7c2f-3545-0edd3b40808f@gont.com.ar> Date: Mon, 06 Apr 2020 17:22:48 +0200 X-Rspamd-Queue-Id: 48wvS256tlz4CH5 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of pch-b9D3CB0F5@u-1.phicoh.com has no SPF policy when checking 2001:888:1044:10:2a0:c9ff:fe9f:17a9) smtp.mailfrom=pch-b9D3CB0F5@u-1.phicoh.com X-Spamd-Result: default: False [2.69 / 15.00]; ARC_NA(0.00)[]; SUBJECT_ENDS_SPACES(0.50)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[phicoh.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.37)[0.372,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.62)[0.621,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[pch-fbsd-2@u-1.phicoh.com,pch-b9D3CB0F5@u-1.phicoh.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:3265, ipnet:2001:888::/32, country:NL]; FROM_NEQ_ENVFROM(0.00)[pch-fbsd-2@u-1.phicoh.com,pch-b9D3CB0F5@u-1.phicoh.com]; IP_SCORE(-0.00)[asn: 3265(-0.04), country: NL(0.03)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 15:22:59 -0000 >However, when a packet from an "off-link" network is employed, the >sending node has no way of knowing where to send the packet, unless it >simply swaps the src and dst mac addresses, and uses the source address >of the packet as the destination addresses. No, a node can just use the normal IPv6 send mechnisms to send a NA message. If the destination is off-link then the packet gets sent to the default router. Then, if the default router considers the destination on-link, it will forward the packet and send a redirect. The redirect should have a link layer address to allow the target host to send future traffic directly. From owner-freebsd-net@freebsd.org Mon Apr 6 15:40:22 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C6832B3A11 for ; Mon, 6 Apr 2020 15:40:22 +0000 (UTC) (envelope-from fernando@gont.com.ar) Received: from fgont.go6lab.si (fgont.go6lab.si [91.239.96.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48wvr50ST1z4D4H for ; Mon, 6 Apr 2020 15:40:20 +0000 (UTC) (envelope-from fernando@gont.com.ar) Received: from [192.168.0.10] (unknown [181.45.84.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by fgont.go6lab.si (Postfix) with ESMTPSA id BD4AD808C3; Mon, 6 Apr 2020 17:40:16 +0200 (CEST) Subject: Re: Revisiting FreeBSD-SA-08:10.nd6 (or: avoiding IPv6 pain) To: Philip Homburg , freebsd-net@freebsd.org References: From: Fernando Gont Message-ID: Date: Mon, 6 Apr 2020 12:40:03 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48wvr50ST1z4D4H X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fernando@gont.com.ar designates 91.239.96.14 as permitted sender) smtp.mailfrom=fernando@gont.com.ar X-Spamd-Result: default: False [-5.81 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gont.com.ar]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[14.96.239.91.list.dnswl.org : 127.0.10.0]; IP_SCORE(-3.51)[ip: (-9.29), ipnet: 91.239.96.0/23(-4.65), asn: 198644(-3.62), country: SI(0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:198644, ipnet:91.239.96.0/23, country:SI]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 15:40:22 -0000 On 6/4/20 12:22, Philip Homburg wrote: >> However, when a packet from an "off-link" network is employed, the >> sending node has no way of knowing where to send the packet, unless it >> simply swaps the src and dst mac addresses, and uses the source address >> of the packet as the destination addresses. > > No, a node can just use the normal IPv6 send mechnisms to send a NA > message. If the destination is off-link then the packet gets sent to the > default router. Agreed. I missed this. Although there might be corner cases where this doesn't apply -- i.e., for some reason you have no routes. But yes: use normal IPv6 send mechanisms. And also probably motivate that nodes use the address of the sending interface (strong-end system model, per RFC1122). Thanks, -- Fernando Gont e-mail: fernando@gont.com.ar || fgont@si6networks.com PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1 From owner-freebsd-net@freebsd.org Mon Apr 6 16:38:16 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F32422B49AE for ; Mon, 6 Apr 2020 16:38:16 +0000 (UTC) (envelope-from fernando@gont.com.ar) Received: from fgont.go6lab.si (fgont.go6lab.si [91.239.96.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48wx6v4Qgfz4H8W for ; Mon, 6 Apr 2020 16:38:14 +0000 (UTC) (envelope-from fernando@gont.com.ar) Received: from [192.168.0.10] (unknown [181.45.84.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by fgont.go6lab.si (Postfix) with ESMTPSA id BAEC1805BE; Mon, 6 Apr 2020 18:38:11 +0200 (CEST) Subject: Re: [PATCH] Implement the upcoming RFC4941bis (IPv6 SLAAC temporary addresses/privacy extensions) To: FreeBSD Net References: <93726ba6-6d96-2b45-81c5-6fd8a83f95a9@gont.com.ar> From: Fernando Gont Message-ID: Date: Mon, 6 Apr 2020 13:09:19 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <93726ba6-6d96-2b45-81c5-6fd8a83f95a9@gont.com.ar> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48wx6v4Qgfz4H8W X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fernando@gont.com.ar designates 91.239.96.14 as permitted sender) smtp.mailfrom=fernando@gont.com.ar X-Spamd-Result: default: False [-5.81 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gont.com.ar]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-3.52)[ip: (-9.31), ipnet: 91.239.96.0/23(-4.65), asn: 198644(-3.63), country: SI(0.01)]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[14.96.239.91.list.dnswl.org : 127.0.10.0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:198644, ipnet:91.239.96.0/23, country:SI]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 16:38:17 -0000 Folks, Any thoughts? On 2/4/20 22:55, Fernando Gont wrote: > Folks/Hiroki, > > I've implemented the upcoming revision of RFC4941 > (https://tools.ietf.org/html/draft-ietf-6man-rfc4941bis-08) for FreeBSD. > > The main changes are this: > > * Reduce the Valid Lifetime from 1 week to 2 days. This effectively > limits the number of concurrent temporary addresses per prefix to 2 > > * Use different interface-ids for each temporary address, to prevent > correlation of network activity among temporary addresses corresponding > to different prefixes. > > P.S.: The patch is also available here: > > > > ---- cut here ---- > diff --git sys/netinet6/in6_ifattach.c sys/netinet6/in6_ifattach.c > index 91ef544d8b2..c093b53974a 100644 > --- sys/netinet6/in6_ifattach.c > +++ sys/netinet6/in6_ifattach.c > @@ -87,7 +87,6 @@ VNET_DECLARE(struct inpcbinfo, ripcbinfo); >  #define    V_ripcbinfo            VNET(ripcbinfo) > >  static int get_rand_ifid(struct ifnet *, struct in6_addr *); > -static int generate_tmp_ifid(u_int8_t *, const u_int8_t *, u_int8_t *); >  static int get_ifid(struct ifnet *, struct ifnet *, struct in6_addr *); >  static int in6_ifattach_linklocal(struct ifnet *, struct ifnet *); >  static int in6_ifattach_loopback(struct ifnet *); > @@ -152,84 +151,6 @@ get_rand_ifid(struct ifnet *ifp, struct in6_addr *in6) >      return 0; >  } > > -static int > -generate_tmp_ifid(u_int8_t *seed0, const u_int8_t *seed1, u_int8_t *ret) > -{ > -    MD5_CTX ctxt; > -    u_int8_t seed[16], digest[16], nullbuf[8]; > -    u_int32_t val32; > - > -    /* If there's no history, start with a random seed. */ > -    bzero(nullbuf, sizeof(nullbuf)); > -    if (bcmp(nullbuf, seed0, sizeof(nullbuf)) == 0) { > -        int i; > - > -        for (i = 0; i < 2; i++) { > -            val32 = arc4random(); > -            bcopy(&val32, seed + sizeof(val32) * i, sizeof(val32)); > -        } > -    } else > -        bcopy(seed0, seed, 8); > - > -    /* copy the right-most 64-bits of the given address */ > -    /* XXX assumption on the size of IFID */ > -    bcopy(seed1, &seed[8], 8); > - > -    if (0) {        /* for debugging purposes only */ > -        int i; > - > -        printf("generate_tmp_ifid: new randomized ID from: "); > -        for (i = 0; i < 16; i++) > -            printf("%02x", seed[i]); > -        printf(" "); > -    } > - > -    /* generate 16 bytes of pseudo-random value. */ > -    bzero(&ctxt, sizeof(ctxt)); > -    MD5Init(&ctxt); > -    MD5Update(&ctxt, seed, sizeof(seed)); > -    MD5Final(digest, &ctxt); > - > -    /* > -     * RFC 3041 3.2.1. (3) > -     * Take the left-most 64-bits of the MD5 digest and set bit 6 (the > -     * left-most bit is numbered 0) to zero. > -     */ > -    bcopy(digest, ret, 8); > -    ret[0] &= ~EUI64_UBIT; > - > -    /* > -     * XXX: we'd like to ensure that the generated value is not zero > -     * for simplicity.  If the caclculated digest happens to be zero, > -     * use a random non-zero value as the last resort. > -     */ > -    if (bcmp(nullbuf, ret, sizeof(nullbuf)) == 0) { > -        nd6log((LOG_INFO, > -            "generate_tmp_ifid: computed MD5 value is zero.\n")); > - > -        val32 = arc4random(); > -        val32 = 1 + (val32 % (0xffffffff - 1)); > -    } > - > -    /* > -     * RFC 3041 3.2.1. (4) > -     * Take the rightmost 64-bits of the MD5 digest and save them in > -     * stable storage as the history value to be used in the next > -     * iteration of the algorithm. > -     */ > -    bcopy(&digest[8], seed0, 8); > - > -    if (0) {        /* for debugging purposes only */ > -        int i; > - > -        printf("to: "); > -        for (i = 0; i < 16; i++) > -            printf("%02x", digest[i]); > -        printf("\n"); > -    } > - > -    return 0; > -} > >  /* >   * Get interface identifier for the specified interface. > @@ -798,58 +719,15 @@ in6_ifdetach_destroy(struct ifnet *ifp) >      _in6_ifdetach(ifp, 0); >  } > > -int > -in6_get_tmpifid(struct ifnet *ifp, u_int8_t *retbuf, > -    const u_int8_t *baseid, int generate) > -{ > -    u_int8_t nullbuf[8]; > -    struct nd_ifinfo *ndi = ND_IFINFO(ifp); > - > -    bzero(nullbuf, sizeof(nullbuf)); > -    if (bcmp(ndi->randomid, nullbuf, sizeof(nullbuf)) == 0) { > -        /* we've never created a random ID.  Create a new one. */ > -        generate = 1; > -    } > - > -    if (generate) { > -        bcopy(baseid, ndi->randomseed1, sizeof(ndi->randomseed1)); > - > -        /* generate_tmp_ifid will update seedn and buf */ > -        (void)generate_tmp_ifid(ndi->randomseed0, ndi->randomseed1, > -            ndi->randomid); > -    } > -    bcopy(ndi->randomid, retbuf, 8); > - > -    return (0); > -} > - >  void >  in6_tmpaddrtimer(void *arg) >  { >      CURVNET_SET((struct vnet *) arg); > -    struct nd_ifinfo *ndi; > -    u_int8_t nullbuf[8]; > -    struct ifnet *ifp; > >      callout_reset(&V_in6_tmpaddrtimer_ch, >          (V_ip6_temp_preferred_lifetime - V_ip6_desync_factor - >          V_ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, curvnet); > > -    bzero(nullbuf, sizeof(nullbuf)); > -    CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { > -        if (ifp->if_afdata[AF_INET6] == NULL) > -            continue; > -        ndi = ND_IFINFO(ifp); > -        if (bcmp(ndi->randomid, nullbuf, sizeof(nullbuf)) != 0) { > -            /* > -             * We've been generating a random ID on this interface. > -             * Create a new one. > -             */ > -            (void)generate_tmp_ifid(ndi->randomseed0, > -                ndi->randomseed1, ndi->randomid); > -        } > -    } > - >      CURVNET_RESTORE(); >  } > > diff --git sys/netinet6/in6_ifattach.h sys/netinet6/in6_ifattach.h > index 1e038fa8319..b9983200447 100644 > --- sys/netinet6/in6_ifattach.h > +++ sys/netinet6/in6_ifattach.h > @@ -40,7 +40,6 @@ void in6_ifattach(struct ifnet *, struct ifnet *); >  void in6_ifattach_destroy(void); >  void in6_ifdetach(struct ifnet *); >  void in6_ifdetach_destroy(struct ifnet *); > -int in6_get_tmpifid(struct ifnet *, u_int8_t *, const u_int8_t *, int); >  void in6_tmpaddrtimer(void *); >  int in6_get_hw_ifid(struct ifnet *, struct in6_addr *); >  int in6_nigroup(struct ifnet *, const char *, int, struct in6_addr *); > diff --git sys/netinet6/nd6.h sys/netinet6/nd6.h > index 857657f6e20..c88f37288a2 100644 > --- sys/netinet6/nd6.h > +++ sys/netinet6/nd6.h > @@ -185,7 +185,7 @@ struct    in6_ndifreq { >  #define RETRANS_TIMER            1000    /* msec */ >  #define MIN_RANDOM_FACTOR        512    /* 1024 * 0.5 */ >  #define MAX_RANDOM_FACTOR        1536    /* 1024 * 1.5 */ > -#define DEF_TEMP_VALID_LIFETIME        604800    /* 1 week */ > +#define DEF_TEMP_VALID_LIFETIME        172800    /* 2 days */ >  #define DEF_TEMP_PREFERRED_LIFETIME    86400    /* 1 day */ >  #define TEMPADDR_REGEN_ADVANCE        5    /* sec */ >  #define MAX_TEMP_DESYNC_FACTOR        600    /* 10 min */ > diff --git sys/netinet6/nd6_rtr.c sys/netinet6/nd6_rtr.c > index d678a53233e..179238257bb 100644 > --- sys/netinet6/nd6_rtr.c > +++ sys/netinet6/nd6_rtr.c > @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); >  #include >  #include >  #include > +#include > >  #include >  #include > @@ -77,6 +78,7 @@ static struct nd_defrouter *defrtrlist_update(struct > nd_defrouter *); >  static int prelist_update(struct nd_prefixctl *, struct nd_defrouter *, >      struct mbuf *, int); >  static int nd6_prefix_onlink(struct nd_prefix *); > +static int in6_get_tmp_ifid(struct in6_aliasreq *); > >  TAILQ_HEAD(nd6_drhead, nd_defrouter); >  VNET_DEFINE_STATIC(struct nd6_drhead, nd6_defrouter); > @@ -2248,6 +2250,51 @@ nd6_prefix_offlink(struct nd_prefix *pr) >      return (error); >  } > > +/* > + * Get a randomized interface identifier for a temporary address > + * , Section 3.3.1. > + */ > +static int > +in6_get_tmp_ifid(struct in6_aliasreq *ifra) > +{ > +    struct in6_addr *addr; > + > +    if(!is_random_seeded()){ > +        return 1; > +    } > + > +    addr = &(ifra->ifra_addr.sin6_addr); > +regen: > +    ifra->ifra_addr.sin6_addr.s6_addr32[2] |= > +        (arc4random() & ~(ifra->ifra_prefixmask.sin6_addr.s6_addr32[2])); > +    ifra->ifra_addr.sin6_addr.s6_addr32[3] |= > +        (arc4random() & ~(ifra->ifra_prefixmask.sin6_addr.s6_addr32[3])); > + > +    /* > +     *  check if generated address is not inappropriate: > +     * > +     *  - Reserved IPv6 Interface Identifers > +     * > (http://www.iana.org/assignments/ipv6-interface-ids/ipv6-interface-ids.xhtml) > > +     */ > + > +    /* Subnet-router anycast: 0000:0000:0000:0000 */ > +    if (!(addr->s6_addr32[2] | addr->s6_addr32[3])) > +        goto regen; > + > +    /* IANA Ethernet block: 0200:5EFF:FE00:0000-0200:5EFF:FE00:5212 > +       Proxy Mobile IPv6:   0200:5EFF:FE00:5213 > +       IANA Ethernet block: 0200:5EFF:FE00:5214-0200:5EFF:FEFF:FFFF > +    */ > +    if (ntohl(addr->s6_addr32[2]) == 0x02005eff && > (ntohl(addr->s6_addr32[3]) & 0Xff000000) == 0xfe000000) > +        goto regen; > + > +    /* Reserved subnet anycast addresses */ > +    if (ntohl(addr->s6_addr32[2]) == 0xfdffffff && > ntohl(addr->s6_addr32[3]) >= 0Xffffff80) > +        goto regen; > + > +    return 0; > +} > + >  /* >   * ia0 - corresponding public address >   */ > @@ -2260,7 +2307,6 @@ in6_tmpifadd(const struct in6_ifaddr *ia0, int > forcegen, int delay) >      int error; >      int trylimit = 3;    /* XXX: adhoc value */ >      int updateflags; > -    u_int32_t randid[2]; >      time_t vltime0, pltime0; > >      in6_prepare_ifra(&ifra, &ia0->ia_addr.sin6_addr, > @@ -2272,16 +2318,11 @@ in6_tmpifadd(const struct in6_ifaddr *ia0, int > forcegen, int delay) >          &ifra.ifra_prefixmask.sin6_addr); > >    again: > -    if (in6_get_tmpifid(ifp, (u_int8_t *)randid, > -        (const u_int8_t *)&ia0->ia_addr.sin6_addr.s6_addr[8], forcegen)) { > +    if (in6_get_tmp_ifid(&ifra) != 0) { >          nd6log((LOG_NOTICE, "%s: failed to find a good random IFID\n", >              __func__)); >          return (EINVAL); >      } > -    ifra.ifra_addr.sin6_addr.s6_addr32[2] |= > -        (randid[0] & ~(ifra.ifra_prefixmask.sin6_addr.s6_addr32[2])); > -    ifra.ifra_addr.sin6_addr.s6_addr32[3] |= > -        (randid[1] & ~(ifra.ifra_prefixmask.sin6_addr.s6_addr32[3])); > >      /* >       * in6_get_tmpifid() quite likely provided a unique interface ID. > @@ -2289,7 +2330,6 @@ in6_tmpifadd(const struct in6_ifaddr *ia0, int > forcegen, int delay) >       * there may be a time lag between generation of the ID and > generation >       * of the address.  So, we'll do one more sanity check. >       */ > - >      if (in6_localip(&ifra.ifra_addr.sin6_addr) != 0) { >          if (trylimit-- > 0) { >              forcegen = 1; > ---- cut here ---- > > > Thanks! > > Cheers, -- Fernando Gont e-mail: fernando@gont.com.ar || fgont@si6networks.com PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1 From owner-freebsd-net@freebsd.org Mon Apr 6 21:20:04 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E667027BF50 for ; Mon, 6 Apr 2020 21:20:04 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48x3N40J7lz4bqJ; Mon, 6 Apr 2020 21:20:03 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mail-qk1-f180.google.com with SMTP id v7so17944523qkc.0; Mon, 06 Apr 2020 14:20:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8jOdbtAu6cmEJUYsd9Nrsm2p4ZC32Q2ZCeN77ItEYRw=; b=ToXjctrB8S5jwHWS9nslaRSR46kN6iUlYSC1Vrj/wdtsNm1uzUcQrEfUcLlMCFAj1O 672nOxjQ1mlBTlORrr36sqfAaJj/6qc0uZPU6k022SViDjEEaRT7pBxfeUecNYdDMGTm XQRwZEvxMh8+Uqw1pwx1Tsx0ZDpLnlxMOzOQWnKrfi2F4ElZOUJcBq5J/bSrb4YzXF3k v0+ytLtNCFch6Hl9RBhGVq+HPgkgJhDW4orFbP2n9N3d7qDnJl8D90R5duvW2jmslEFx FKPzUdcVsRgctp2dM793f10aVNfLyKWvit3HO1klFKmCnDjDlu1BzZs3uL15yDh0rssg R/rw== X-Gm-Message-State: AGi0PubVWY212vEcEv/BEF1kB57iycZjz4PmIn2Wf9DUyio2v3qpEeAi 6Qw2WFMMcQRceQ1yN1hmMcvi3ReAkDk= X-Google-Smtp-Source: APiQypIVxpouogPDaapzGvOJ27jsXu4zrXCk/cEL9asGUn9ipovHO6IOOszAJ7d1WJWnYk83+xgbRg== X-Received: by 2002:a05:620a:2231:: with SMTP id n17mr24364336qkh.189.1586208002727; Mon, 06 Apr 2020 14:20:02 -0700 (PDT) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com. [209.85.160.171]) by smtp.gmail.com with ESMTPSA id x24sm3361671qth.80.2020.04.06.14.20.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2020 14:20:02 -0700 (PDT) Received: by mail-qt1-f171.google.com with SMTP id a5so1053907qtw.10; Mon, 06 Apr 2020 14:20:02 -0700 (PDT) X-Received: by 2002:ac8:3659:: with SMTP id n25mr1582232qtb.254.1586208001826; Mon, 06 Apr 2020 14:20:01 -0700 (PDT) MIME-Version: 1.0 References: <20200130030911.GA15281@spy> <20200212222219.GE83892@raichu> <20200328225150.GA82767@raichu> <20200331192024.GE97238@raichu> In-Reply-To: <20200331192024.GE97238@raichu> From: Eric Joyner Date: Mon, 6 Apr 2020 14:19:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Issue with epoch_drain_callbacks and unloading iavf(4) [using iflib] To: Mark Johnston Cc: Hans Petter Selasky , John Baldwin , Drew Gallatin , freebsd-net@freebsd.org, shurd X-Rspamd-Queue-Id: 48x3N40J7lz4bqJ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ricera10@gmail.com designates 209.85.222.180 as permitted sender) smtp.mailfrom=ricera10@gmail.com X-Spamd-Result: default: False [-1.79 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-0.99)[-0.994,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DMARC_NA(0.00)[freebsd.org]; URI_COUNT_ODD(1.00)[9]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[180.222.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.80)[ip: (-3.14), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[erj@freebsd.org,ricera10@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[180.222.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[erj@freebsd.org,ricera10@gmail.com]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 21:20:05 -0000 On Tue, Mar 31, 2020 at 12:28 PM Mark Johnston wrote: > On Tue, Mar 31, 2020 at 12:14:20PM -0700, Eric Joyner wrote: > > Mark, > > > > I tried out a kernel with the tip of CURRENT with both D24214 and D24215 > > applied, and I still see the problem. As well, after doing a "sysctl > > debug.kdb.enter=1" and viewing the stack trace there for kldunload, it > > appears to be similar to the one I posted in my last post. > > Can you show it? I don't see how it could be the same, since with the > patch we are no longer calling sched_bind() from the epoch scan call > back. > > > > > - Eric > > > > On Mon, Mar 30, 2020 at 1:19 PM Eric Joyner wrote: > > > > > On Sat, Mar 28, 2020 at 3:52 PM Mark Johnston > wrote: > > > > > >> On Wed, Mar 11, 2020 at 04:32:40PM -0700, Eric Joyner wrote: > > >> > Mark, > > >> > > > >> > I did get some time to get back and retry this; however your second > > >> patch > > >> > still doesn't solve the problem. Looking into it a bit, it looks > like > > >> the > > >> > kldunload process isn't hitting the code you've changed; it's > hanging in > > >> > epoch_wait_preempt() in if_detach_internal(), which is immediately > > >> before > > >> > epoch_drain_callbacks(). > > >> > > > >> > I did a kernel dump while it was hanging, and this is the backtrace > for > > >> the > > >> > kldunload process: > > >> > > >> I see. I think the callback can be made much simpler and avoid the > > >> problematic sched_bind() calls. I wrote a patch that allows waiting > > >> threads to lend scheduling priority to a preempted thread blocked in > an > > >> epoch section, based on some code I wrote to implement preemptible SMR > > >> sections. If waiting for a running thread, the callback just spins. > > >> > > >> This might be enough to solve your problem, I posted the two lightly > > >> tested patches here: > > >> https://reviews.freebsd.org/D24214 > > >> https://reviews.freebsd.org/D24215 > > >> > > >> If we hit a situation where a reader is preempted and then its CPU is > > >> hogged by a high-priority kernel thread, this still won't be enough, > but > > >> I suspect it'll solve your case. Would you be able to test? > > >> > > > > > > Yeah, I'll try them out. > > > > > > - Eric > > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > Mark, I think I was mistaken about the backtrace looking the same. I was looking at it from within ddb, and I think I focused on the epoch_block_handler_preempt line and didn't notice that it only stopped there this time. Here's the new one I've got from kgdb: #0 cpustop_handler () at /usr/src/sys/x86/x86/mp_x86.c:1448 #1 0xffffffff80ff2f79 in ipi_nmi_handler () at /usr/src/sys/x86/x86/mp_x86.c:1405 #2 0xffffffff810294a6 in trap (frame=0xfffffe003b9b6f30) at /usr/src/sys/amd64/amd64/trap.c:201 #3 #4 epoch_block_handler_preempt (global=0xfffff80003de0100, cr=0xfffffe00dee85900, arg=0x0) at /usr/src/sys/kern/subr_epoch.c:507 #5 0xffffffff803b576d in epoch_block (global=0xfffff80003de0100, cr=0xfffffe00dee85900, cb=0xffffffff80bcf190 , ct=0x0) at /usr/src/sys/contrib/ck/src/ck_epoch.c:416 #6 ck_epoch_synchronize_wait (global=0xfffff80003de0100, cb=, ct=) at /usr/src/sys/contrib/ck/src/ck_epoch.c:465 #7 0xffffffff80bcf03c in epoch_wait_preempt (epoch=0xfffff80003de0100) at /usr/src/sys/kern/subr_epoch.c:529 #8 0xffffffff80c9410a in if_detach_internal (ifp=0xfffff80067ed4000, vmove=0, ifcp=0x0) at /usr/src/sys/net/if.c:1123 #9 0xffffffff80c93ebd in if_detach (ifp=0xfffff80003de0100) at /usr/src/sys/net/if.c:1063 #10 0xffffffff80cafa56 in iflib_device_deregister (ctx=0xfffff80088c91800) at /usr/src/sys/net/iflib.c:5104 #11 0xffffffff80bc1e2e in DEVICE_DETACH (dev=0xfffff80004706a00) at ./device_if.h:234 #12 device_detach (dev=0xfffff80004706a00) at /usr/src/sys/kern/subr_bus.c:3049 #13 0xffffffff80bc13fd in devclass_driver_deleted (busclass=0xfffff80004352900, dc=0xfffff80004385a00, driver=0xffffffff823329e0 ) at /usr/src/sys/kern/subr_bus.c:1235 #14 0xffffffff80bc12ef in devclass_delete_driver (busclass=0xfffff80004352900, driver=0xffffffff823329e0 ) at /usr/src/sys/kern/subr_bus.c:1310 #15 0xffffffff80bc721c in driver_module_handler (mod=0xfffff80015cd8680, what=1, arg=0xffffffff823329b0 ) at /usr/src/sys/kern/subr_bus.c:5229 #16 0xffffffff80b67b82 in module_unload (mod=0xfffff80015cd8680) at /usr/src/sys/kern/kern_module.c:261 #17 0xffffffff80b5895b in linker_file_unload (file=0xfffff8016da69a00, flags=0) at /usr/src/sys/kern/kern_linker.c:700 #18 0xffffffff80b59dad in kern_kldunload (td=, fileid=5, flags=0) at /usr/src/sys/kern/kern_linker.c:1153 #19 0xffffffff8102aa40 in syscallenter (td=) at /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:162 #20 amd64_syscall (td=0xfffffe00e839f100, traced=0) at /usr/src/sys/amd64/amd64/trap.c:1161 #21 #22 0x00000008002ddcba in ?? () Backtrace stopped: Cannot access memory at address 0x7fffffffe188 - Eric From owner-freebsd-net@freebsd.org Mon Apr 6 21:29:12 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAE1D27CA6D for ; Mon, 6 Apr 2020 21:29:12 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48x3Zc4yDPz4ccc; Mon, 6 Apr 2020 21:29:12 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x730.google.com with SMTP id 130so2783089qke.4; Mon, 06 Apr 2020 14:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RjN4jiC2V+JPfRA1yEM2LLUKc8p9VVBZFRpbztpvLnk=; b=lObHRdti5rJ7UCuFRhfJjCfNB1qojWTWREwN/+zhMAIfio/dBqgZ65suNKuvJ7sVBr U+8KkH8PPQlaOlD1Qk7kwpQX2tLLbtZuvnWqJQo4a4nkZPS7eH0jd8QI3Cxy+e5QNFjV +UXgUqT15LKByuf+xAnhcUE+FXWlv0EiK8Q2nSMm+6s+NXY5jzjB8qxOuQFxlayakwq2 PJ6Xi5DI6uIVaCUdvrSt4XsaMHdmknA5dRR9MbgET2dHdpOAlzivzypTJhCMkxgohjlv wmi3lGD9w8iOBn0wOy7ypTnahXjjiitd+xIXqHCmJEmLzBna9SgumCfeRAtyNOWN7nlC whSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=RjN4jiC2V+JPfRA1yEM2LLUKc8p9VVBZFRpbztpvLnk=; b=hZsSlfNfw4bikpbEqXdU4eV0SsES2DrOhYbY0tdSPf5xrG4EkzZcuQ6ob96QOrC5Ns DflSAjKeL5VGKWVRGECQ+eZ7bFEEuKy7ew+eeNpJk/iSbU9WTutLehfY2f3JGcKn5Ag8 my5GbQw+/nmB5NzCJVIvzG2dmJxnH9NWmVoa84FKdk0JPzOz2vhvGqsOuhR9RiHCx4Hz 3c4i72+mVokNcApuQAiYarAnFq4rwgap2n0FUboWQJBpwzliVDJXaZ2LFCmVUKDkwgWG Y2Zob/hlqoaCTLrSWKtmixLf40laDGp92y3ffj5hLxsPxsIa8O1+H2uRbWvMbD/kW/8E NwEA== X-Gm-Message-State: AGi0PuYJr6OmHl/P3NmFszvy1+m2vsvenrj7Dp+bRv8/hxFFLYeVbjgf SsarAqggrvW8m66P5FSE77dCwTAUDSM= X-Google-Smtp-Source: APiQypLcxfGO0AL58BrsR7GYeb1gHRRPXlI+ryWi7WKE+PNUaHUTUjXuDbDfNWZU2SsEZwhcKwDGfg== X-Received: by 2002:a37:4548:: with SMTP id s69mr24223387qka.63.1586208551159; Mon, 06 Apr 2020 14:29:11 -0700 (PDT) Received: from raichu (toroon0560w-lp130-10-174-94-17-182.dsl.bell.ca. [174.94.17.182]) by smtp.gmail.com with ESMTPSA id x43sm4791448qtj.65.2020.04.06.14.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 14:29:10 -0700 (PDT) Sender: Mark Johnston Date: Mon, 6 Apr 2020 17:29:03 -0400 From: Mark Johnston To: Eric Joyner Cc: Hans Petter Selasky , John Baldwin , Drew Gallatin , freebsd-net@freebsd.org, shurd Subject: Re: Issue with epoch_drain_callbacks and unloading iavf(4) [using iflib] Message-ID: <20200406212903.GA55712@raichu> References: <20200130030911.GA15281@spy> <20200212222219.GE83892@raichu> <20200328225150.GA82767@raichu> <20200331192024.GE97238@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 48x3Zc4yDPz4ccc X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 21:29:12 -0000 On Mon, Apr 06, 2020 at 02:19:25PM -0700, Eric Joyner wrote: > Mark, > > I think I was mistaken about the backtrace looking the same. I was looking > at it from within ddb, and I think I focused on the > epoch_block_handler_preempt line and didn't notice that it only stopped > there this time. Here's the new one I've got from kgdb: Thanks. Could you try to print "td->td_name" from frame 4? It should also be available as er->er_blockedtd. Basically, I'm trying to verify that the interrupt thread itself isn't the one that we're waiting for, else there is another bug to be fixed. If you can provide kernel symbols and vmcore, I'd be happy to look at it myself. > #0 cpustop_handler () at /usr/src/sys/x86/x86/mp_x86.c:1448 > #1 0xffffffff80ff2f79 in ipi_nmi_handler () at > /usr/src/sys/x86/x86/mp_x86.c:1405 > #2 0xffffffff810294a6 in trap (frame=0xfffffe003b9b6f30) at > /usr/src/sys/amd64/amd64/trap.c:201 > #3 > #4 epoch_block_handler_preempt (global=0xfffff80003de0100, > cr=0xfffffe00dee85900, arg=0x0) at /usr/src/sys/kern/subr_epoch.c:507 > #5 0xffffffff803b576d in epoch_block (global=0xfffff80003de0100, > cr=0xfffffe00dee85900, cb=0xffffffff80bcf190 , > ct=0x0) at /usr/src/sys/contrib/ck/src/ck_epoch.c:416 > #6 ck_epoch_synchronize_wait (global=0xfffff80003de0100, cb= out>, ct=) at /usr/src/sys/contrib/ck/src/ck_epoch.c:465 > #7 0xffffffff80bcf03c in epoch_wait_preempt (epoch=0xfffff80003de0100) at > /usr/src/sys/kern/subr_epoch.c:529 > #8 0xffffffff80c9410a in if_detach_internal (ifp=0xfffff80067ed4000, > vmove=0, ifcp=0x0) at /usr/src/sys/net/if.c:1123 > #9 0xffffffff80c93ebd in if_detach (ifp=0xfffff80003de0100) at > /usr/src/sys/net/if.c:1063 > #10 0xffffffff80cafa56 in iflib_device_deregister (ctx=0xfffff80088c91800) > at /usr/src/sys/net/iflib.c:5104 > #11 0xffffffff80bc1e2e in DEVICE_DETACH (dev=0xfffff80004706a00) at > ./device_if.h:234 > #12 device_detach (dev=0xfffff80004706a00) at > /usr/src/sys/kern/subr_bus.c:3049 > #13 0xffffffff80bc13fd in devclass_driver_deleted > (busclass=0xfffff80004352900, dc=0xfffff80004385a00, > driver=0xffffffff823329e0 ) at > /usr/src/sys/kern/subr_bus.c:1235 > #14 0xffffffff80bc12ef in devclass_delete_driver > (busclass=0xfffff80004352900, driver=0xffffffff823329e0 > ) at /usr/src/sys/kern/subr_bus.c:1310 > #15 0xffffffff80bc721c in driver_module_handler (mod=0xfffff80015cd8680, > what=1, arg=0xffffffff823329b0 ) at > /usr/src/sys/kern/subr_bus.c:5229 > #16 0xffffffff80b67b82 in module_unload (mod=0xfffff80015cd8680) at > /usr/src/sys/kern/kern_module.c:261 > #17 0xffffffff80b5895b in linker_file_unload (file=0xfffff8016da69a00, > flags=0) at /usr/src/sys/kern/kern_linker.c:700 > #18 0xffffffff80b59dad in kern_kldunload (td=, fileid=5, > flags=0) at /usr/src/sys/kern/kern_linker.c:1153 > #19 0xffffffff8102aa40 in syscallenter (td=) at > /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:162 > #20 amd64_syscall (td=0xfffffe00e839f100, traced=0) at > /usr/src/sys/amd64/amd64/trap.c:1161 > #21 > #22 0x00000008002ddcba in ?? () > Backtrace stopped: Cannot access memory at address 0x7fffffffe188 > > - Eric From owner-freebsd-net@freebsd.org Mon Apr 6 21:35:28 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84E7927CDE4 for ; Mon, 6 Apr 2020 21:35:28 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48x3jr31lSz4d6l; Mon, 6 Apr 2020 21:35:28 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mail-qk1-f180.google.com with SMTP id k134so7359983qke.2; Mon, 06 Apr 2020 14:35:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LRMPWtlFd7xtQcUHydZoAwbELF/yi0rOw6kHRBShR+o=; b=Kaidcj7lDchvQbbYfIsQmZiQeutGFIv+irtTKfeLNmUEpyoB9U1CmPmGwckRuUSjSb P8Sa7FHT0NT29dDz0VuVG8gLWxSVQTXAsHeVe5Vjgm4whH9pBy0iMHGXu3DPL6G2yTA8 G3KV7ONpu7Ih7sQvfUmad1MW9U33PLZtLCmTB3bnGJE7t0FYC8LpZk/7cslU4pqIsdof n3haZuN6U1RxlRXt8QucDw3OO48uk6UUAtEfiVNSBEc8h02F8JPZSQPQRSLTdVrbPjs/ IpYn3wfSJgFAplZisq19ACQ+tdtOINtZ2ouh/VLBzXB0M/EyD0fIqxVP/69rz3Krhdfq sFzQ== X-Gm-Message-State: AGi0PuYlBrpU54JesmEfduWz32b2zXHcknot0uwQ/B1CKx6KYbtNxgxs rzLapNSjc3I3nCVetAm3c1TPnoQ5yz4= X-Google-Smtp-Source: APiQypJYeM2/e2Dpg32VVZE105nXBoZ2FZgQtfmCmx3w96Lunp7ZU4OlWZN5KBFrarNxb5CI84LmRw== X-Received: by 2002:a37:624d:: with SMTP id w74mr7050638qkb.172.1586208927384; Mon, 06 Apr 2020 14:35:27 -0700 (PDT) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com. [209.85.160.172]) by smtp.gmail.com with ESMTPSA id y132sm15663064qka.19.2020.04.06.14.35.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2020 14:35:27 -0700 (PDT) Received: by mail-qt1-f172.google.com with SMTP id z12so1124642qtq.5; Mon, 06 Apr 2020 14:35:26 -0700 (PDT) X-Received: by 2002:ac8:3659:: with SMTP id n25mr1632217qtb.254.1586208926579; Mon, 06 Apr 2020 14:35:26 -0700 (PDT) MIME-Version: 1.0 References: <20200130030911.GA15281@spy> <20200212222219.GE83892@raichu> <20200328225150.GA82767@raichu> <20200331192024.GE97238@raichu> <20200406212903.GA55712@raichu> In-Reply-To: <20200406212903.GA55712@raichu> From: Eric Joyner Date: Mon, 6 Apr 2020 14:34:50 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Issue with epoch_drain_callbacks and unloading iavf(4) [using iflib] To: Mark Johnston Cc: Hans Petter Selasky , freebsd-net@freebsd.org, shurd , John Baldwin , Drew Gallatin X-Rspamd-Queue-Id: 48x3jr31lSz4d6l X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 21:35:28 -0000 On Mon, Apr 6, 2020 at 2:29 PM Mark Johnston wrote: > On Mon, Apr 06, 2020 at 02:19:25PM -0700, Eric Joyner wrote: > > Mark, > > > > I think I was mistaken about the backtrace looking the same. I was > looking > > at it from within ddb, and I think I focused on the > > epoch_block_handler_preempt line and didn't notice that it only stopped > > there this time. Here's the new one I've got from kgdb: > > Thanks. Could you try to print "td->td_name" from frame 4? It should > also be available as er->er_blockedtd. Basically, I'm trying to verify > that the interrupt thread itself isn't the one that we're waiting for, > else there is another bug to be fixed. > > If you can provide kernel symbols and vmcore, I'd be happy to look at it > myself. > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > Here's what I get: (kgdb) frame 4 #4 epoch_block_handler_preempt (global=0xfffff80003de0100, cr=0xfffffe00dee85900, arg=0x0) at /usr/src/sys/kern/subr_epoch.c:507 507 } (kgdb) print td->td_name $1 = "if_io_tqg_31\000\000\000\000\000\000\000" (kgdb) print er->er_blockedtd $2 = (struct thread *) 0x0 - Eric From owner-freebsd-net@freebsd.org Tue Apr 7 03:21:20 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AE932A6DAB for ; Tue, 7 Apr 2020 03:21:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48xCNv71hXz40qf for ; Tue, 7 Apr 2020 03:21:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id F0F732A6DAA; Tue, 7 Apr 2020 03:21:19 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0BD12A6DA7 for ; Tue, 7 Apr 2020 03:21:19 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48xCNv670tz40qd for ; Tue, 7 Apr 2020 03:21:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDA022D08 for ; Tue, 7 Apr 2020 03:21:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 0373LJL8005394 for ; Tue, 7 Apr 2020 03:21:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0373LJQa005388 for net@FreeBSD.org; Tue, 7 Apr 2020 03:21:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 245181] Proxy ARP (net.link.ether.inet.proxyall) does not work for FIB other than 0 Date: Tue, 07 Apr 2020 03:21:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: koobs@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: melifaro@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? mfc-stable12? mfc-stable11? X-Bugzilla-Changed-Fields: keywords Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 03:21:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245181 Kubilay Kocak changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs-qa | --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-net@freebsd.org Tue Apr 7 14:23:16 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E405E2B7F49 for ; Tue, 7 Apr 2020 14:23:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48xV4h5pH0z3CBw for ; Tue, 7 Apr 2020 14:23:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id C52B72B7F48; Tue, 7 Apr 2020 14:23:16 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4F022B7F47 for ; Tue, 7 Apr 2020 14:23:16 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48xV4h4pjfz3CBv for ; Tue, 7 Apr 2020 14:23:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A07DFB0FE for ; Tue, 7 Apr 2020 14:23:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 037ENGew083613 for ; Tue, 7 Apr 2020 14:23:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 037ENGWh083612 for net@FreeBSD.org; Tue, 7 Apr 2020 14:23:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 236724] igb(4): Interfaces fail to switch active to inactive state Date: Tue, 07 Apr 2020 14:23:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: IntelNetworking, regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: julien@perdition.city X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: marius@FreeBSD.org X-Bugzilla-Flags: mfc-stable12+ X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 14:23:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236724 Julien Cigar changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julien@perdition.city --- Comment #38 from Julien Cigar --- +1 for an EN, as lagg is unable to detect when the interface is down (and t= hus unusable..) --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-net@freebsd.org Tue Apr 7 17:21:53 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC637276786 for ; Tue, 7 Apr 2020 17:21:53 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48xZ2n4vRdz3ytk for ; Tue, 7 Apr 2020 17:21:53 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by mailman.nyi.freebsd.org (Postfix) id A63D5276784; Tue, 7 Apr 2020 17:21:53 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5E99276782; Tue, 7 Apr 2020 17:21:53 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48xZ2m4YQKz3ytZ; Tue, 7 Apr 2020 17:21:52 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id B514A3C0199; Tue, 7 Apr 2020 17:21:51 +0000 (UTC) Date: Tue, 7 Apr 2020 17:21:51 +0000 From: Brooks Davis To: arch@freebsd.org, net@freebsd.org Subject: additional ifreq accessors? Message-ID: <20200407172151.GB72584@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LpQ9ahxlCli8rRTG" Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48xZ2m4YQKz3ytZ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net X-Spamd-Result: default: False [-5.53 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[freebsd.org]; IP_SCORE(-3.63)[ip: (-9.53), ipnet: 199.48.128.0/22(-4.76), asn: 36236(-3.81), country: US(-0.05)]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCVD_COUNT_ZERO(0.00)[0]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 17:21:54 -0000 --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In r331797 I added a public accessor for the ifru_data member of struct ifreq (using a union to access the right version of the struct depending on the caller's ABI and creating a pointer from the 32-bit version's integer representation). I've also recently exposed versions for ifru_buffer. All non-pointer members are currently accessed by treating the structure as a struct ifreq (even it's a struct ifreq32.) This works because the structure layout doesn't differ for other members and I believe it is safe even in the present of aggressive LTO because the actual type of the object in userspace can never be observed by the compiler. In CheriBSD, our initial port used 256-bit (wide and aligned) pointers. This caused padding to be inserted between ifr_name and ifr_ifru making the aliasing approach not work. As such I switched all access to ifr_ifru members to use accessors. We have decided that 256-bit is not viable for commercial deployment (duh) and are slowly removing 256-bit specific things from our tree. The full set of accessors can be seen at (just pretend the __capability qualifiers aren't there):=20 https://github.com/CTSRD-CHERI/cheribsd/blob/602d2c547b1cf917998833003ada80= b564861153/sys/net/if_var.h#L828-L849 My question for the lists is: should we adopt the more-technically-correct accessors in FreeBSD or stick with slightly-cheaper and more conventional aliasing approach[0]? If the former, I'll prepare a diff, if the latter I'll reduce my diffs locally. -- Brooks [0] To ensure use of the accessors in the kernel we don't define the macros used to make ifr_ifru pseudo-transparent when _KERNEL is defined. --LpQ9ahxlCli8rRTG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJejLauAAoJEKzQXbSebgfA1c8H/13DiXcKM4hvzMo2h8sUJORC 5OPkZ0PFN8cMY0Q0W/xKmZdHVCyExCu5SLyNt0pJg0CI9EiCqi6xmffanXTQxOJE qS6tDZ/G0fjxkcqT+a+AR//DaJ5TLioA0t4uRYnr9bP5twNq0CiG6H2buRWh7wn/ eAmz250hihJDMUsShHT5qjL5euoTyom2OXsid7RZwe2o0nArm2XKNfjLC8Aq3BRl rLCOhNfomUAm+lElzHYyoSPwY20JVylbkeZaE9PwG/G9egXZbXevko52z/Ya4r9G Weai1VMDoBe/vlm9MWtDV49GKsJzNptm5PBt0P3BBOHYkNXdgPjNpSB13D1QEYk= =p2o3 -----END PGP SIGNATURE----- --LpQ9ahxlCli8rRTG-- From owner-freebsd-net@freebsd.org Tue Apr 7 17:26:52 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17AAC276C6F for ; Tue, 7 Apr 2020 17:26:52 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48xZ8W57jQz40LX for ; Tue, 7 Apr 2020 17:26:51 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: by mailman.nyi.freebsd.org (Postfix) id AE567276C6E; Tue, 7 Apr 2020 17:26:51 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADC7B276C6B; Tue, 7 Apr 2020 17:26:51 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48xZ8V3j8Pz40LM; Tue, 7 Apr 2020 17:26:50 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id 69DB51AF13D; Tue, 7 Apr 2020 17:26:38 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id 037HQbd8062338 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 7 Apr 2020 17:26:38 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id 037HQbkk062337; Tue, 7 Apr 2020 17:26:37 GMT (envelope-from phk) To: Brooks Davis cc: arch@freebsd.org, net@freebsd.org Subject: Re: additional ifreq accessors? In-reply-to: <20200407172151.GB72584@spindle.one-eyed-alien.net> From: "Poul-Henning Kamp" References: <20200407172151.GB72584@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <62335.1586280397.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Tue, 07 Apr 2020 17:26:37 +0000 Message-ID: <62336.1586280397@critter.freebsd.dk> X-Rspamd-Queue-Id: 48xZ8V3j8Pz40LM X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of phk@critter.freebsd.dk designates 130.225.244.222 as permitted sender) smtp.mailfrom=phk@critter.freebsd.dk X-Spamd-Result: default: False [-0.56 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.79)[-0.794,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.dk]; NEURAL_HAM_LONG(-0.81)[-0.813,0]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(0.04)[ip: (0.06), ipnet: 130.225.0.0/16(0.08), asn: 1835(0.09), country: EU(-0.01)]; FORGED_SENDER(0.30)[phk@phk.freebsd.dk,phk@critter.freebsd.dk]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_NEQ_ENVFROM(0.00)[phk@phk.freebsd.dk,phk@critter.freebsd.dk] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 17:26:52 -0000 -------- In message <20200407172151.GB72584@spindle.one-eyed-alien.net>, Brooks Dav= is writes: >My question for the lists is: should we adopt the >more-technically-correct accessors in FreeBSD or stick with >slightly-cheaper and more conventional aliasing approach[0]? The accessors buys us much more code-isolation, so that would be my vote. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-freebsd-net@freebsd.org Tue Apr 7 17:32:50 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3FC427708A for ; Tue, 7 Apr 2020 17:32:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48xZHQ2f0nz40pY for ; Tue, 7 Apr 2020 17:32:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: by mailman.nyi.freebsd.org (Postfix) id 58DE5277089; Tue, 7 Apr 2020 17:32:50 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 586E2277086; Tue, 7 Apr 2020 17:32:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48xZHP59VTz40pV; Tue, 7 Apr 2020 17:32:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 519D2260253; Tue, 7 Apr 2020 19:32:47 +0200 (CEST) Subject: Re: additional ifreq accessors? To: Poul-Henning Kamp , Brooks Davis Cc: arch@freebsd.org, net@freebsd.org References: <20200407172151.GB72584@spindle.one-eyed-alien.net> <62336.1586280397@critter.freebsd.dk> From: Hans Petter Selasky Message-ID: Date: Tue, 7 Apr 2020 19:32:37 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <62336.1586280397@critter.freebsd.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48xZHP59VTz40pV X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.98 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-2.68)[ip: (-9.21), ipnet: 2a01:4f8::/29(-2.61), asn: 24940(-1.58), country: DE(-0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 17:32:50 -0000 On 2020-04-07 19:26, Poul-Henning Kamp wrote: > -------- > In message <20200407172151.GB72584@spindle.one-eyed-alien.net>, Brooks Davis writes: > >> My question for the lists is: should we adopt the >> more-technically-correct accessors in FreeBSD or stick with >> slightly-cheaper and more conventional aliasing approach[0]? > > The accessors buys us much more code-isolation, so that would be my vote. > Is there a reason for using "void *" here? char *ifr_addr_get_data(void *ifrp); --HPS From owner-freebsd-net@freebsd.org Tue Apr 7 17:45:24 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FEFA277815 for ; Tue, 7 Apr 2020 17:45:24 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48xZYw0vCZz41cZ for ; Tue, 7 Apr 2020 17:45:24 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by mailman.nyi.freebsd.org (Postfix) id 1C685277813; Tue, 7 Apr 2020 17:45:24 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C17A277811; Tue, 7 Apr 2020 17:45:24 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48xZYv33Rzz41cG; Tue, 7 Apr 2020 17:45:23 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 9ADCD3C0199; Tue, 7 Apr 2020 17:45:22 +0000 (UTC) Date: Tue, 7 Apr 2020 17:45:22 +0000 From: Brooks Davis To: Hans Petter Selasky Cc: Poul-Henning Kamp , arch@freebsd.org, net@freebsd.org Subject: Re: additional ifreq accessors? Message-ID: <20200407174522.GC72584@spindle.one-eyed-alien.net> References: <20200407172151.GB72584@spindle.one-eyed-alien.net> <62336.1586280397@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DIOMP1UsTsWJauNi" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48xZYv33Rzz41cG X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net X-Spamd-Result: default: False [-5.53 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCVD_COUNT_ZERO(0.00)[0]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; IP_SCORE(-3.63)[ip: (-9.53), ipnet: 199.48.128.0/22(-4.75), asn: 36236(-3.81), country: US(-0.05)] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 17:45:24 -0000 --DIOMP1UsTsWJauNi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 07, 2020 at 07:32:37PM +0200, Hans Petter Selasky wrote: > On 2020-04-07 19:26, Poul-Henning Kamp wrote: > > -------- > > In message <20200407172151.GB72584@spindle.one-eyed-alien.net>, Brooks = Davis writes: > >=20 > >> My question for the lists is: should we adopt the > >> more-technically-correct accessors in FreeBSD or stick with > >> slightly-cheaper and more conventional aliasing approach[0]? > >=20 > > The accessors buys us much more code-isolation, so that would be my vot= e. > >=20 >=20 > Is there a reason for using "void *" here? >=20 > char *ifr_addr_get_data(void *ifrp); Because the type is unknown at this point (it may be struct ifreq or struct ifreq32 (or in CheriBSD struct ifreq64)). By using "void *" here we avoid the need to insert a wrong cast. -- Brooks --DIOMP1UsTsWJauNi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJejLwxAAoJEKzQXbSebgfA6+8IAIYFrD81n/WNk0RSBzd1nxK3 TErSKOycIHe7/v6D7DUd0o9fSco7vIR7wLMbEmMkp/10ceNhD0/FlbSc1FTeqGL9 B7LiEH7pN9eKnuUqKZX/UbrAs2OAinxxNmvO4a0uQ/x72gp00Z0UqjYAM8gGCJl8 McqXdwEjY5VFFMdPywLC0SR1BiuExOghYHgpAAVa+P2mFYx+7AY+m2DsR0gJ4ZzE qhcF6IpapYJ4yKzcz9vRz10C9v22fZngz49ibmHxe0u0plFqKd3B/RTiELcvvs4K QeNd+GBjqj3djeipFHVo8YGv5kWpaq13Yl3ldXXFIkGc5ADaHoiSBD1PzeYFr1U= =80lf -----END PGP SIGNATURE----- --DIOMP1UsTsWJauNi-- From owner-freebsd-net@freebsd.org Tue Apr 7 19:03:31 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CD2E279D8E for ; Tue, 7 Apr 2020 19:03:31 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48xcJ258SGz45hV for ; Tue, 7 Apr 2020 19:03:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id AEE1F279D8B; Tue, 7 Apr 2020 19:03:30 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE7AE279D89; Tue, 7 Apr 2020 19:03:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48xcJ249N7z45hS; Tue, 7 Apr 2020 19:03:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f47.google.com with SMTP id x11so4291504otp.6; Tue, 07 Apr 2020 12:03:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=eUU7SXd9GSS3bbC8wDkfGY6FXFGD9w1iaFFvmAupod0=; b=o5iZvVUN+1DqtPic03w0Ci1JMPc6tCReTJtgMtbsWYfARZ1+cPT2DgmITZy4IEXydz he/Zh7g7P1pirM67YGha8JxJHFohp+T/DjQBQgqEIdUsMa5rh+nng9u1lWaqKebrnXjn S73zbwTsw9vAoKpf2sH85shxPjOJqgTuSmYi3qZKCsQLRUr195gb6deiYWjAxEKszvUZ Z9QQvMRtyoX5/fy8jp0R4RbUuLXd3CmOpNW9WkwUfQwkSi1tYrPZ744mpuwR8BbzdE0Q nOhVg+oHR9aLHGPA52YA0GjsEsP+BUmvQgTatI34ZkRkdSloFoweVk9Jl8MJyW182KC8 /WeA== X-Gm-Message-State: AGi0PuYBj7NhHpQCexNM1kFhIYicTvtNvn1qb1uLTKnywU+35jj4PT61 t5xRsfomTzxzwvJ5tvxiNoroBvC4 X-Google-Smtp-Source: APiQypJCIEvNF3aoT94tnPKAlSvydmLJbKlZYeB0faxzD0N0FWQI74KKMb1He9YhsRH9Og2cChP1ig== X-Received: by 2002:a9d:68c5:: with SMTP id i5mr2949906oto.266.1586286208271; Tue, 07 Apr 2020 12:03:28 -0700 (PDT) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com. [209.85.210.44]) by smtp.gmail.com with ESMTPSA id a3sm1358331oop.36.2020.04.07.12.03.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Apr 2020 12:03:28 -0700 (PDT) Received: by mail-ot1-f44.google.com with SMTP id 60so1396891otl.12; Tue, 07 Apr 2020 12:03:28 -0700 (PDT) X-Received: by 2002:a05:6830:1f39:: with SMTP id e25mr2894767oth.135.1586286207862; Tue, 07 Apr 2020 12:03:27 -0700 (PDT) MIME-Version: 1.0 References: <20200407172151.GB72584@spindle.one-eyed-alien.net> <62336.1586280397@critter.freebsd.dk> <20200407174522.GC72584@spindle.one-eyed-alien.net> In-Reply-To: <20200407174522.GC72584@spindle.one-eyed-alien.net> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 7 Apr 2020 12:03:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: additional ifreq accessors? To: Brooks Davis Cc: Hans Petter Selasky , "freebsd-arch@freebsd.org" , net@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48xcJ249N7z45hS X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 19:03:31 -0000 On Tue, Apr 7, 2020 at 10:45 AM Brooks Davis wrote: > On Tue, Apr 07, 2020 at 07:32:37PM +0200, Hans Petter Selasky wrote: > > Is there a reason for using "void *" here? > > > > char *ifr_addr_get_data(void *ifrp); > > Because the type is unknown at this point (it may be struct ifreq or > struct ifreq32 (or in CheriBSD struct ifreq64)). By using "void *" here > we avoid the need to insert a wrong cast. I think the question (or my question anyway) is: why void*, and not a union pointer? A union pointer would never be a wrong cast for the caller, and inherent in this design is essentially treating the pointer as a union on the callee side of things. Thanks, Conrad From owner-freebsd-net@freebsd.org Tue Apr 7 23:23:56 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F1EA2A260D for ; Tue, 7 Apr 2020 23:23:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48xk4W0rm0z4Nsp; Tue, 7 Apr 2020 23:23:54 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x741.google.com with SMTP id i186so1351161qke.1; Tue, 07 Apr 2020 16:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=CItCDAt+A6Mb0edkAfeYbxBpgxVn4xq4v1V9FoPrY4Y=; b=SL/MeVrlOfCCp8V4IkyV0drAU+b5GSrDA60MGHZMufCHlKKNmidh+u2mDMrnAbNeDu 1UmnqYveF7/L0O+altpwdDissQro6fM3m4HAfKLi4BfoBhpUIbDZKp6SJ2k4j7yl7ivw YANjIoar4S6zPyAtP6UN1juUcpfBaw+n2YeGrEoy25oo9y2lknfGw3EiLUh8gx/EjfET WAFpu0HpfV7b9KZX+4aSCbm50YcE9nNXdyOV0WFxf5p6lHM7xEPMct+w37yzdrpG7t9z COwcbFrJcXrbFpPQpAJzRPVwvTvsCmLwuNzu4DfvZe01d4JteNzn4kgPbOIOOVHpFrMY SZFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=CItCDAt+A6Mb0edkAfeYbxBpgxVn4xq4v1V9FoPrY4Y=; b=NjIznFIOVhKMbVFdW6Ih00ksk3vTtn0tfYIcQdq9tFDdtcgcYSOGnh911mHVaQoIkV 6QwQLDXpFxv18YwsNgS2jGt7sWQDIrkIqo3cwXikD7qUAKoQAPNAGpjh5thGD8SocAYR f6g1rTbo7WnvGXPT48W4VaeU9itwu5Xte7sQnjh6UC5UVzlUnqPSTMbzpyPbU8kpJwNq M2tCOCjLsAM2UNacb6U6ArGmtgy5gylhOW8pQfeng7gwCqkMHh6WwPywjnz8y0ys1gz9 0ObtLx4DrTgxqEpT+MpgfSbpRy/szxrcizT11LY/RnV7X/3o27Z9KAVTDS6Gww6mlONx vHEg== X-Gm-Message-State: AGi0PuZ+8iY2CHxbqfVZ5YHYq+KTCWGHa4nurx3ZlFzNnR/o8ylUnXeU Av3UxfNza+yS+7EeXLOvHR2Rhbd9 X-Google-Smtp-Source: APiQypLcel3QNAYxx3HYLoQ9mRzRVEF+fSWn+5hce0YpZc7rVMP/RF3D5qlIY0AeuDHQLjCQHQxIFQ== X-Received: by 2002:a37:9e17:: with SMTP id h23mr4697146qke.315.1586301833488; Tue, 07 Apr 2020 16:23:53 -0700 (PDT) Received: from raichu (toroon0560w-lp130-10-174-94-17-182.dsl.bell.ca. [174.94.17.182]) by smtp.gmail.com with ESMTPSA id b195sm1777201qkg.108.2020.04.07.16.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 16:23:52 -0700 (PDT) Sender: Mark Johnston Date: Tue, 7 Apr 2020 19:23:47 -0400 From: Mark Johnston To: Eric Joyner Cc: Hans Petter Selasky , freebsd-net@freebsd.org, shurd , John Baldwin , Drew Gallatin Subject: Re: Issue with epoch_drain_callbacks and unloading iavf(4) [using iflib] Message-ID: <20200407232347.GA5605@raichu> References: <20200212222219.GE83892@raichu> <20200328225150.GA82767@raichu> <20200331192024.GE97238@raichu> <20200406212903.GA55712@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 48xk4W0rm0z4Nsp X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=SL/MeVrl; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::741 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-1.84 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.99)[-0.986,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[1.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.16)[ip: (0.01), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 23:23:56 -0000 On Mon, Apr 06, 2020 at 02:34:50PM -0700, Eric Joyner wrote: > On Mon, Apr 6, 2020 at 2:29 PM Mark Johnston wrote: > > > On Mon, Apr 06, 2020 at 02:19:25PM -0700, Eric Joyner wrote: > > > Mark, > > > > > > I think I was mistaken about the backtrace looking the same. I was > > looking > > > at it from within ddb, and I think I focused on the > > > epoch_block_handler_preempt line and didn't notice that it only stopped > > > there this time. Here's the new one I've got from kgdb: > > > > Thanks. Could you try to print "td->td_name" from frame 4? It should > > also be available as er->er_blockedtd. Basically, I'm trying to verify > > that the interrupt thread itself isn't the one that we're waiting for, > > else there is another bug to be fixed. > > > > If you can provide kernel symbols and vmcore, I'd be happy to look at it > > myself. > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > > Here's what I get: > > (kgdb) frame 4 > #4 epoch_block_handler_preempt (global=0xfffff80003de0100, > cr=0xfffffe00dee85900, arg=0x0) at /usr/src/sys/kern/subr_epoch.c:507 > 507 } > (kgdb) print td->td_name > $1 = "if_io_tqg_31\000\000\000\000\000\000\000" > (kgdb) print er->er_blockedtd > $2 = (struct thread *) 0x0 I spent some time looking at the core. It looks like we have yet another problem: the gtaskqueue code won't exit the net epoch if it is constantly running a net task. Could you please retry with the patches from before, and this one included? diff --git a/sys/kern/subr_gtaskqueue.c b/sys/kern/subr_gtaskqueue.c index f52f32204644..2b1386a612ee 100644 --- a/sys/kern/subr_gtaskqueue.c +++ b/sys/kern/subr_gtaskqueue.c @@ -345,7 +345,7 @@ gtaskqueue_run_locked(struct gtaskqueue *queue) struct epoch_tracker et; struct gtaskqueue_busy tb; struct gtask *gtask; - bool in_net_epoch; + bool in net_epoch; KASSERT(queue != NULL, ("tq is NULL")); TQ_ASSERT_LOCKED(queue); @@ -361,20 +361,19 @@ gtaskqueue_run_locked(struct gtaskqueue *queue) TQ_UNLOCK(queue); KASSERT(gtask->ta_func != NULL, ("task->ta_func is NULL")); - if (!in_net_epoch && TASK_IS_NET(gtask)) { - in_net_epoch = true; + if (TASK_IS_NET(gtask)) { NET_EPOCH_ENTER(et); - } else if (in_net_epoch && !TASK_IS_NET(gtask)) { + in_net_epoch = true; + } + gtask->ta_func(gtask->ta_context); + if (in_net_epoch) { NET_EPOCH_EXIT(et); in_net_epoch = false; } - gtask->ta_func(gtask->ta_context); TQ_LOCK(queue); wakeup(gtask); } - if (in_net_epoch) - NET_EPOCH_EXIT(et); LIST_REMOVE(&tb, tb_link); } From owner-freebsd-net@freebsd.org Wed Apr 8 01:05:01 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1FCA2A4E23 for ; Wed, 8 Apr 2020 01:05:01 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48xmK86HjJz4TZg; Wed, 8 Apr 2020 01:05:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3E217260277; Wed, 8 Apr 2020 03:04:58 +0200 (CEST) Subject: Re: Issue with epoch_drain_callbacks and unloading iavf(4) [using iflib] To: Mark Johnston , Eric Joyner Cc: freebsd-net@freebsd.org, shurd , John Baldwin , Drew Gallatin References: <20200212222219.GE83892@raichu> <20200328225150.GA82767@raichu> <20200331192024.GE97238@raichu> <20200406212903.GA55712@raichu> <20200407232347.GA5605@raichu> From: Hans Petter Selasky Message-ID: <2220ccb5-7c32-bf90-b50c-42f60fb94ace@selasky.org> Date: Wed, 8 Apr 2020 03:03:24 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200407232347.GA5605@raichu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48xmK86HjJz4TZg X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-5.42 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-3.12)[ip: (-9.30), ipnet: 88.99.0.0/16(-4.71), asn: 24940(-1.58), country: DE(-0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2020 01:05:01 -0000 On 2020-04-08 01:23, Mark Johnston wrote: > On Mon, Apr 06, 2020 at 02:34:50PM -0700, Eric Joyner wrote: >> On Mon, Apr 6, 2020 at 2:29 PM Mark Johnston wrote: >> >>> On Mon, Apr 06, 2020 at 02:19:25PM -0700, Eric Joyner wrote: >>>> Mark, >>>> >>>> I think I was mistaken about the backtrace looking the same. I was >>> looking >>>> at it from within ddb, and I think I focused on the >>>> epoch_block_handler_preempt line and didn't notice that it only stopped >>>> there this time. Here's the new one I've got from kgdb: >>> >>> Thanks. Could you try to print "td->td_name" from frame 4? It should >>> also be available as er->er_blockedtd. Basically, I'm trying to verify >>> that the interrupt thread itself isn't the one that we're waiting for, >>> else there is another bug to be fixed. >>> >>> If you can provide kernel symbols and vmcore, I'd be happy to look at it >>> myself. >>> _______________________________________________ >>> freebsd-net@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-net >>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >>> >> >> Here's what I get: >> >> (kgdb) frame 4 >> #4 epoch_block_handler_preempt (global=0xfffff80003de0100, >> cr=0xfffffe00dee85900, arg=0x0) at /usr/src/sys/kern/subr_epoch.c:507 >> 507 } >> (kgdb) print td->td_name >> $1 = "if_io_tqg_31\000\000\000\000\000\000\000" >> (kgdb) print er->er_blockedtd >> $2 = (struct thread *) 0x0 > > I spent some time looking at the core. It looks like we have yet > another problem: the gtaskqueue code won't exit the net epoch if it is > constantly running a net task. Could you please retry with the patches > from before, and this one included? > There is the same issue in kern_intr.c (FYI). --HPS From owner-freebsd-net@freebsd.org Thu Apr 9 06:36:53 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D4632AFF0F for ; Thu, 9 Apr 2020 06:36:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48yWdd0yKdz49m5 for ; Thu, 9 Apr 2020 06:36:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 1EED92AFF0E; Thu, 9 Apr 2020 06:36:53 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1EB382AFF0D for ; Thu, 9 Apr 2020 06:36:53 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48yWdd02kJz49m4 for ; Thu, 9 Apr 2020 06:36:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF54786DE for ; Thu, 9 Apr 2020 06:36:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 0396aq5b078362 for ; Thu, 9 Apr 2020 06:36:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0396aq7h078361 for net@FreeBSD.org; Thu, 9 Apr 2020 06:36:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 240609] iflib: Panic with INVARIANTS: sleeping in an epoch section (12.1-pre-QA) (vlan + lagg involved) Date: Thu, 09 Apr 2020 06:36:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: crash, needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ml@netfence.it X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: glebius@FreeBSD.org X-Bugzilla-Flags: mfc-stable12? mfc-stable11? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 06:36:53 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240609 --- Comment #5 from ml@netfence.it --- Just a "me too" here. I'm running 12.1p3/amd64 (with vlan + lagg + em, throw even bridge in) and = I'm experiencing deadlocks (VFS related I suspect). So I turned on INVARIANTS, WITNESS, etc..., but could not boot without this patch. --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-net@freebsd.org Thu Apr 9 09:17:50 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3FC2A2B4242; Thu, 9 Apr 2020 09:17:50 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ybCK1zhMz4MKn; Thu, 9 Apr 2020 09:17:49 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: by mail-vs1-xe34.google.com with SMTP id s25so4546144vsp.11; Thu, 09 Apr 2020 02:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=FgjZI4jL1xLNR5LM153d7T1DCZM6A4aTeSpQ3y6uNwo=; b=L6NExeWbyYj+Xv91sPaExtoi4RWR+en1Xj+te3KDo+Yab++q4Z6T1OF8cjKjU8o2Zb 9S5t9yaBr3I45Z6zqcm4o3t3Vw+dalV2KQx2vqw9Kx8C/R9YJS5s9sj+jGj9C0oX4oPk vWJpsi+j/Fu4uXuli+UH9nW5Zk2azpGRSISPT5kvuh0s7j7MQ8gggqEcBhWaIvNUPiw9 lEmVmoy/KbDajz0bSeUdNV1QuW0BrWGXJhYx0wsknVlkpSvpDC80meuhhJV/RvLAY+Th UACNX02lnk+ODID1Jizn8rIYZEqTycHrvTN3nFSw0qL2tVo3523ygO/9zWP8Hm/Kke7/ B6XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=FgjZI4jL1xLNR5LM153d7T1DCZM6A4aTeSpQ3y6uNwo=; b=gmUCEiSjcwGzEqUnx36EEYAff9TN/ZFGyZ/xB0+zK1dM7Oj870oSTOinZ6WDp0mSA2 WxbEtMzKOUCoFtIJ14vZJHFRyYHDq1X8fZIE9MU9+rADPrX3en+AXI17Ug2k9ppsVwD3 lc3vIxKrtCg/uQCA5FGUorBYsN08Uca857Ys+NEVbl3eb4nLKo0CZmb24//rCfgi6QpB 7cWrxe0ImzjpPG7YocZ5TcxrvEXSs8tzGNQdAPvrLPpLG3ncyfB1R3qiHL0Od1FIolzt ywhwkNBTmjX51fJYrl6EGZyNax6UkpYQbrLXFM/Wscttlf+oscD1r5a7gKJxN5LeMxfR wiYA== X-Gm-Message-State: AGi0PuaugVO0YhAm0d7+Ug6wQZ43aX14MPj54wNX0VjkRvSKYsp/Tl5q nqkPRylLrjeY650u6FjgqEDE3gHnlroa3RAsEG2BNE1f X-Google-Smtp-Source: APiQypJWKgINDnWNqi4Qk7Nvs3nbzrdzaTLLtB989bxtzym2H3uuyQRwdjUYJfy+PvkWq/WYts6mqaRbm8IF9bcozOY= X-Received: by 2002:a67:80d1:: with SMTP id b200mr7285256vsd.76.1586423867796; Thu, 09 Apr 2020 02:17:47 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Date: Thu, 9 Apr 2020 12:17:35 +0300 Message-ID: Subject: dummynet performance To: freebsd-net@freebsd.org, freebsd-ipfw Cc: Luigi Rizzo , "Andrey V. Elsukov" X-Rspamd-Queue-Id: 48ybCK1zhMz4MKn X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=L6NExeWb; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ozkankirik@gmail.com designates 2607:f8b0:4864:20::e34 as permitted sender) smtp.mailfrom=ozkankirik@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE(0.00)[ip: (-9.63), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; URI_COUNT_ODD(1.00)[3]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[4.3.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 09:17:50 -0000 Hello, I wonder if it is possible to update dummynet code multi-threading capable practically? My idea is below: - A new sysctl tunable will be defined as "net.inet.ip.dummynet.thread_count" (default 1) - To distribute tasks along threads, each sched instance can be assigned to different thread. - By default, all schedulers assigned to thread 0 if no thread_id is set. With a new option named "thr_id" affinity can be set. as below: ipfw sched 1 config type QFQ (by defaut thr_id = 0) ipfw sched 2 config type QFQ thr_id 1 ipfw sched 3 config type QFQ thr_id 2 ipfw sched 4 config type FIFO thr_id 3 ipfw sched 5 config type FIFO thr_id 3 ( sched 4 & 5 assigned to same thread 3 ) I think this approach is more easy then completely rewrite or other solutions. What is the right way to do this? Where to start? I read the explanations in /usr/src/sys/netpfil/ipfw/dummynet.txt On this line below, multiple threads (count can be get from sysctl "net.inet.ip.dummynet. thread_count" tunable) https://github.com/freebsd/freebsd/blob/master/sys/netpfil/ipfw/ip_dummynet.c#L2556 Thanks From owner-freebsd-net@freebsd.org Thu Apr 9 09:44:00 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6DE82B4F5C; Thu, 9 Apr 2020 09:44:00 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ybnW5Vhhz4P08; Thu, 9 Apr 2020 09:43:59 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by mail-vs1-f67.google.com with SMTP id u11so4423888vsu.10; Thu, 09 Apr 2020 02:43:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=FHvxlFpLbd8BKskT+sasAAw6iO0ZGNWtHlC+vKInvWc=; b=D5IBnk2UZ08QqPk93+jVRPOfyy/nwHrEt83KCHPlZnWJ/AYwROEIjEbJ73arX74I57 Miq1Ynw8acKP1zLncprqzZ9pBiOykDrRYEsoepDCc36FTS9lf73h+zYE8sosfWW8q1Ff NjpfHPvRGsf5G1TbkFs+HZBWAgfrc3UzHqornZNov45VRdBBH3PBLo4Bw1rPTqCyDSJl Y7ttYjrll4ZWBPWgqtukRA1u5vrDyquyeZPmSPP2NLX9IlLZo5dXZzB5jl4VFBMyZt4S DoHpjjOJYLfKssiYyiutgfve2xwmYfTKrGOotqY0kBZrv4iD/qanDLD2fB294fPmRgcO zdyA== X-Gm-Message-State: AGi0Puan8h/XXURflOoewLu+nmFSQEsRH49yAFEZY5Az+TR5iTwZnJ1H 2OxMF0zT/I1upRmAxwJ5oUJPKTCd7ZMwfWU1kRA= X-Google-Smtp-Source: APiQypK1U5PJoAFO2uZBqN212h2ebOqfKteej8/etxmH0z45fihjtk9zxVAeaFKD6eqXTBZcQ6McgYlYWWDnLUxRkLQ= X-Received: by 2002:a67:e308:: with SMTP id j8mr3978629vsf.74.1586425438195; Thu, 09 Apr 2020 02:43:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luigi Rizzo Date: Thu, 9 Apr 2020 02:43:47 -0700 Message-ID: Subject: Re: dummynet performance To: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Cc: "freebsd-net@freebsd.org" , freebsd-ipfw , "Andrey V. Elsukov" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48ybnW5Vhhz4P08 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rizzounipi@gmail.com designates 209.85.217.67 as permitted sender) smtp.mailfrom=rizzounipi@gmail.com X-Spamd-Result: default: False [-0.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; FORGED_SENDER(0.30)[rizzo@iet.unipi.it,rizzounipi@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[rizzo@iet.unipi.it,rizzounipi@gmail.com]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.84)[-0.844,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-0.99)[-0.986,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[unipi.it]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[67.217.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.17)[ip: (0.02), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; RWL_MAILSPIKE_POSSIBLE(0.00)[67.217.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 09:44:00 -0000 On Thu, Apr 9, 2020 at 2:18 AM =C3=96zkan KIRIK wro= te: > > Hello, > > I wonder if it is possible to update dummynet code multi-threading capabl= e > practically? > My idea is below: > - A new sysctl tunable will be defined as > "net.inet.ip.dummynet.thread_count" (default 1) > - To distribute tasks along threads, each sched instance can be assigned = to > different thread. > ... What are you trying to achieve ? In general, the scheduler needs to know the state of all flows to perform correct scheduling of traffic. You could in principle split the load on multiple threads under specific, very restrictive conditions (each thread runs a different scheduler, they cannot share the excess bandwidth, and the total bw does not exceed the link's capacity, each scheduler has a different queue on the NIC). cheers luigi From owner-freebsd-net@freebsd.org Thu Apr 9 10:00:36 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7096D2B544A; Thu, 9 Apr 2020 10:00:36 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: from mail-ua1-x92a.google.com (mail-ua1-x92a.google.com [IPv6:2607:f8b0:4864:20::92a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48yc8g3X10z4Pjv; Thu, 9 Apr 2020 10:00:35 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: by mail-ua1-x92a.google.com with SMTP id a6so3741773uao.2; Thu, 09 Apr 2020 03:00:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PCNbLgVyXxAXTIz1/iOVQxWmSnoXMJB9VH6o4RqZxkU=; b=GAWFEClTm6N8qQNCRSo90CdPI10JuKRNffZJhClveOCXIjuTzSaCVtJLd0KRkYbPH/ LMcLoseCLqHtpugODuA8g9gLcQ82/S0hETbdtWmx2tBy4v8xTlGeZYEbRfeM/F6k48wL M1h1hL6mWXVu2kkahNizGwKJ3+6G+px7GtGyDci5XNVciCdSz5T5dJ1fQetFX1QI/aVr 3wwvvtqBjxi6tDTaytadYEoEZVSBH7Yeq8n4pGezFAZ+MN8pg4tdbqkunfUc151Kyu3e c5ldMguu60xYmZYkQzCheTmjGfcYZGW5kwaGv32NnjZ+ZjYBse0i+J5zQV9gZNzQDVmr Vlng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PCNbLgVyXxAXTIz1/iOVQxWmSnoXMJB9VH6o4RqZxkU=; b=G2MzHhCnN1G10Zj1SbzG+4cKKeZ/z69V6v8R7G+nESX3hUAU2TSyU/k46UR82k9tkB 41GDTlhFQOp8+D/0F8iMnaswYekdUKklGH8uQnZI64CW4JXfG5HUSpe2mNMtXEAmmHLz VOVX9h85cwI0QdbUVep/HFn4/S655HcMG4VI98T7zFIgJrVCZCNAJM0Az5kQ+YDeBrGI weeHKubmOr7awLkkAXT+a0M1GNQLQV9K6m5lmwo8sZ/rHt14EpHeWIbUDKsF3eMgd4v9 tsXmdw6/l1tuBhBeHjhIE3HFMhmgEgJNqQY3Dpov/xAJ09nquJPxub0XMCEKDbs5JsE8 pw0w== X-Gm-Message-State: AGi0PuY9lb/+N7tn+hcayZ4VZ4uuqoswbM82CckKB1E1gshHrAnXvZZf CBYAjH12BRAxITw9tq60QSHyy4NFgLi48U+iJwA= X-Google-Smtp-Source: APiQypLfFBo2rGiF8q5QCEMNY8tjGo89HrM+kP9iSItRigJiX9xbImMGvE/QdMDRBZXEqb/WPXf8ebDtRCwytZAuU6M= X-Received: by 2002:ab0:5550:: with SMTP id u16mr3626438uaa.62.1586426434505; Thu, 09 Apr 2020 03:00:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Date: Thu, 9 Apr 2020 13:00:22 +0300 Message-ID: Subject: Re: dummynet performance To: Luigi Rizzo Cc: "freebsd-net@freebsd.org" , freebsd-ipfw , "Andrey V. Elsukov" X-Rspamd-Queue-Id: 48yc8g3X10z4Pjv X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=GAWFEClT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ozkankirik@gmail.com designates 2607:f8b0:4864:20::92a as permitted sender) smtp.mailfrom=ozkankirik@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE(0.00)[ip: (-9.73), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[a.2.9.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 10:00:36 -0000 In my production environment there are many schedulers and pipes & queues belongs to this scheds. dummynet uses %90-100 percent of single cpu. (ie. 20 scheds, 30 pipes, 35 queues total. Each pipe has max 30-100Mbps) In my idea, by distributing schedulers to different threads, all pipes that belongs to same scheduler also should run on same thread. By this way, dummynet can manage much higher total bandwidths. Thanks for greate explanation. In another way, for each scheduler we can create a new taskqueue_thread, Is it possible if dummnet_io() function will stay as is (in main thread), and it should call the right schedulers enqueue function that runs different thread? cheers Ozkan On Thu, Apr 9, 2020 at 12:43 PM Luigi Rizzo wrote: > On Thu, Apr 9, 2020 at 2:18 AM =C3=96zkan KIRIK w= rote: > > > > Hello, > > > > I wonder if it is possible to update dummynet code multi-threading > capable > > practically? > > My idea is below: > > - A new sysctl tunable will be defined as > > "net.inet.ip.dummynet.thread_count" (default 1) > > - To distribute tasks along threads, each sched instance can be assigne= d > to > > different thread. > > ... > > What are you trying to achieve ? In general, the scheduler needs to > know the state of all flows to perform correct scheduling of traffic. > You could in principle split the load on multiple threads under specific, > very restrictive conditions (each thread runs a different scheduler, they > cannot share the excess bandwidth, and the total bw does not exceed the > link's capacity, each scheduler has a different queue on the NIC). > > cheers > luigi > From owner-freebsd-net@freebsd.org Thu Apr 9 15:38:48 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08AC82BD804 for ; Thu, 9 Apr 2020 15:38:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48ylfv5vH1z3GWr for ; Thu, 9 Apr 2020 15:38:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id CA5B82BD7FC; Thu, 9 Apr 2020 15:38:47 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA0CF2BD7FB for ; Thu, 9 Apr 2020 15:38:47 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ylfv3JCCz3GWp for ; Thu, 9 Apr 2020 15:38:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6ACB7F0F6 for ; Thu, 9 Apr 2020 15:38:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 039FclqU092998 for ; Thu, 9 Apr 2020 15:38:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 039Fcl9D092997 for net@FreeBSD.org; Thu, 9 Apr 2020 15:38:47 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 236383] [ral] Kernel panic in ral(4) Date: Thu, 09 Apr 2020 15:38:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: panic, patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: eugen@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 15:38:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236383 Eugene Grosbein changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |avos@freebsd.org Status|Open |In Progress --- Comment #6 from Eugene Grosbein --- Multiple cases for panincs in kernel code for wireless support were fixed recently. Please update your system for 12.1-STABLE and re-test. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Thu Apr 9 15:53:39 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44F762BDE6C; Thu, 9 Apr 2020 15:53:39 +0000 (UTC) (envelope-from lutz@donnerhacke.de) Received: from annwfn.iks-jena.de (annwfn.iks-jena.de [IPv6:2001:4bd8::19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48ym0206Ypz3HQk; Thu, 9 Apr 2020 15:53:37 +0000 (UTC) (envelope-from lutz@donnerhacke.de) X-SMTP-Sender: IPv6:2001:4bd8:59:1:172:27:107:102 Received: from lyoness (lyoness.intern.iks-service.de [IPv6:2001:4bd8:59:1:172:27:107:102]) by annwfn.iks-jena.de (8.15.2/8.15.2) with ESMTP id 039FrVE7014556; Thu, 9 Apr 2020 17:53:32 +0200 From: "Lutz Donnerhacke" To: "=?UTF-8?Q?'=C3=96zkan_KIRIK'?=" , "'Luigi Rizzo'" Cc: , "'Andrey V. Elsukov'" , "'freebsd-ipfw'" References: In-Reply-To: Subject: AW: dummynet performance Date: Thu, 9 Apr 2020 17:53:31 +0200 Message-ID: <001501d60e87$05345d60$0f9d1820$@donnerhacke.de> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: de Thread-Index: AQHgQLB+JflcKPVCqeLysoA/Iqzj0AIoT9GQAbiA3uOoPYW0gA== X-Rspamd-Queue-Id: 48ym0206Ypz3HQk X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of lutz@donnerhacke.de has no SPF policy when checking 2001:4bd8::19) smtp.mailfrom=lutz@donnerhacke.de X-Spamd-Result: default: False [4.02 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[donnerhacke.de]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_SPAM_MEDIUM(0.91)[0.908,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-0.00)[country: DE(-0.02)]; NEURAL_SPAM_LONG(0.71)[0.713,0]; RCVD_IN_DNSWL_NONE(0.00)[9.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.d.b.4.1.0.0.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15725, ipnet:2001:4bd8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; SUSPICIOUS_RECIPS(1.50)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 15:53:39 -0000 > In my production environment there are many schedulers and pipes & > queues belongs to this scheds. > dummynet uses %90-100 percent of single cpu. (ie. 20 scheds, 30 pipes, > 35 queues total. Each pipe has max 30-100Mbps) If the perfomance issue is urgent, you may give netgraph (ng_car, = ng_pipe) a try. From owner-freebsd-net@freebsd.org Thu Apr 9 16:26:45 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0B752BEE33 for ; Thu, 9 Apr 2020 16:26:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48ymkF5Fz0z3M5L for ; Thu, 9 Apr 2020 16:26:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id B46562BEE32; Thu, 9 Apr 2020 16:26:45 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B42C42BEE31 for ; Thu, 9 Apr 2020 16:26:45 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ymkF4Mbmz3M5K for ; Thu, 9 Apr 2020 16:26:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90E28FA97 for ; Thu, 9 Apr 2020 16:26:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 039GQjxr091675 for ; Thu, 9 Apr 2020 16:26:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 039GQjUB091658 for net@FreeBSD.org; Thu, 9 Apr 2020 16:26:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 236383] [ral] Kernel panic in ral(4) Date: Thu, 09 Apr 2020 16:26:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: panic, patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: admin@5034.ru X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 16:26:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236383 --- Comment #7 from Sergey Anokhin --- (In reply to Eugene Grosbein from comment #6) Thank you for the support. Unfortunately, I changed my wireless network car= d to ath already. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Thu Apr 9 16:41:26 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F22F82BF327 for ; Thu, 9 Apr 2020 16:41:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48yn3B6DsFz3Mrm for ; Thu, 9 Apr 2020 16:41:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id D61412BF326; Thu, 9 Apr 2020 16:41:26 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5DC82BF325 for ; Thu, 9 Apr 2020 16:41:26 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48yn3B5Mt5z3Mrl for ; Thu, 9 Apr 2020 16:41:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3D45FCF3 for ; Thu, 9 Apr 2020 16:41:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 039GfQBs071916 for ; Thu, 9 Apr 2020 16:41:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 039GfQSY071915 for net@FreeBSD.org; Thu, 9 Apr 2020 16:41:26 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 236383] [ral] Kernel panic in ral(4) Date: Thu, 09 Apr 2020 16:41:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: panic, patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: eugen@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Unable to Reproduce X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 16:41:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236383 Eugene Grosbein changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |Unable to Reproduce Status|In Progress |Closed --- Comment #8 from Eugene Grosbein --- Closing as submitter is not in position to reproduce the problem anymore and the problem assumed to be fixed with anti-panic commits to net80211 by avos= . If not, feel free to reopen this. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Thu Apr 9 17:29:14 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70C97278270; Thu, 9 Apr 2020 17:29:14 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-vs1-f65.google.com (mail-vs1-f65.google.com [209.85.217.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48yp6K3wqCz3QcV; Thu, 9 Apr 2020 17:29:13 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by mail-vs1-f65.google.com with SMTP id u9so7432535vsp.6; Thu, 09 Apr 2020 10:29:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+FiWlM0JvZZqa9MBjftqXtQ47GZYrye0Dadae5IeD9A=; b=VrcrF67ujkrKA4xJYBYPOUWkdLPdq+Q0vics3EjvNZ48t0Mzom9vMgUT6GF+n54Xsu 8W2bvYqEOZDqzaFvCg+sadFmhVCmHM7zN0jb78N5DpqgimQdnUxx9aC0NbzVEQP83ID7 l8wZFDlybBCCMUZjRwsjToIE6Ah0UHrLwYGtY297v389EJQIH8qdq93qOBfwznviJLEd EbFvd/vZDOClxzg72MVMI1olM+W03qUhfvEPpbgcjbtCKSyLY9Bp2bqfC5M06retFwXt 2oxM4eH6lUc/FKt32b2R0yFKmF8ipYhgaPp37FERUaL7my7lk3DOb8RZ+hWR7FF/mc4F 49KQ== X-Gm-Message-State: AGi0PuaTCJoRZ9Nxif4W1djYb8wA/QrNIC/lvWUtqKjeRy9puEwLSrod SfHBCUKAJZHAY2aRjfxclTivE3kfZScaIFk722A= X-Google-Smtp-Source: APiQypJJcaJARD6KtFR7oFpCExpZLtjvDgbCL89zQbl2u8LzumyvXWN5YuFLqePfsF+J9TZzqzZH0KExcZsP9qfSyjM= X-Received: by 2002:a67:e308:: with SMTP id j8mr922317vsf.74.1586453352440; Thu, 09 Apr 2020 10:29:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luigi Rizzo Date: Thu, 9 Apr 2020 10:28:56 -0700 Message-ID: Subject: Re: dummynet performance To: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Cc: "freebsd-net@freebsd.org" , freebsd-ipfw , "Andrey V. Elsukov" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48yp6K3wqCz3QcV X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rizzounipi@gmail.com designates 209.85.217.65 as permitted sender) smtp.mailfrom=rizzounipi@gmail.com X-Spamd-Result: default: False [-0.49 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; FORGED_SENDER(0.30)[rizzo@iet.unipi.it,rizzounipi@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[rizzo@iet.unipi.it,rizzounipi@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.84)[-0.839,0]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-0.99)[-0.986,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[unipi.it]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[65.217.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.16)[ip: (0.05), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; RWL_MAILSPIKE_POSSIBLE(0.00)[65.217.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 17:29:14 -0000 On Thu, Apr 9, 2020 at 2:18 AM =C3=96zkan KIRIK wro= te: > > Hello, > > I wonder if it is possible to update dummynet code multi-threading capabl= e > practically? > My idea is below: > - A new sysctl tunable will be defined as > "net.inet.ip.dummynet.thread_count" (default 1) > - To distribute tasks along threads, each sched instance can be assigned = to > different thread. > - By default, all schedulers assigned to thread 0 if no thread_id is set. > With a new option named "thr_id" affinity can be set. as below: > ipfw sched 1 config type QFQ (by defaut thr_id =3D 0) > ipfw sched 2 config type QFQ thr_id 1 > ipfw sched 3 config type QFQ thr_id 2 > ipfw sched 4 config type FIFO thr_id 3 > ipfw sched 5 config type FIFO thr_id 3 ( sched 4 & 5 assigned to same > thread 3 ) > > I think this approach is more easy then completely rewrite or other > solutions. > This change may not be completely trivial given that dummynet was designed = as single threaded and protected by a single lock. If you want to proceed, you should do as follows: - some members of struct dn_parms need to be duplicated for each thread, including prev_t, evheap, curr_time, the locks, and perhaps others. Probably may be useful to create a new struct for them, with a back pointer to the parent dn_parms, and include a refcount. - add another rwlock to protect access to dn_cfg - dummynet_io() does the initial demultiplexing calling dn_ht_find(), currently protected DN_BH_WLOCK(). This could be changed to an RWLOCK and I believe this initial step could be protected by a read lock (maybe there are corner cases where you need to create a new entry so you need to drop the lock, acquire in write mode and retry...) - once the demux has returned a dn_fsk, maybe you can use a refcount to avoid the object being destroyed, release the read lock on dn_cfg.fshash, acquire an exclusive lock on the thread handling the dn_fsk, and proceed from there. - the kernel thread that process the heap should now run each on one instance of the evheap cheers luigi From owner-freebsd-net@freebsd.org Thu Apr 9 21:03:31 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 550DC27F17B for ; Thu, 9 Apr 2020 21:03:31 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ytsZ1Fnsz4HFX; Thu, 9 Apr 2020 21:03:29 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mail-qt1-f181.google.com with SMTP id x2so34676qtr.0; Thu, 09 Apr 2020 14:03:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DEpqqMiS0VlcooFzj+AdhFPwq2ztQlvhJ2xzksMbiKM=; b=R7yu0TurirgjjEbS6VI46+SUr/g7SJg2W+FK++3ptvrTU1wTbBQf51+6/KSbzf7Yft EfdJxqD+KwNAa4JKSFodYxXJ5b8g/KC3VaBlPR7cJ0+7RMTgtcdu5qLBQTAqEhFqfXbj VIAH96CLChiviOdQXF4S4PJ+6QxE927aXj9NwjTxl+bdchlZdw2LqW2bel1hGc7XYUtJ scllvCW88m5zVBoQoA+6I5sQuO3F9YcAmfuHVxJAXolTZ/pcVzr71WATgOtQXHyFLTOg fyob/GVy4+/eErWusw2umbXQPGyb37T7h6mdi/weujQtpO+PIkQ6xpdCDVrN2mXh9VO5 /dJA== X-Gm-Message-State: AGi0PuaIckBIghRuhocLO6ioHoPcdsxOXGsEz0EEJggpJwHU3vABfgag FcpjaS0r+LMxmmw6Ex0SmAg6ZFVnoGw= X-Google-Smtp-Source: APiQypIpOTZBilMM28G6hWtbh+CYMujQtwW97yB1XS5WATWO5uRRLr9X9LqmDKWz40SYmO11SQIGxw== X-Received: by 2002:ac8:691a:: with SMTP id e26mr1418977qtr.58.1586466208839; Thu, 09 Apr 2020 14:03:28 -0700 (PDT) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com. [209.85.160.179]) by smtp.gmail.com with ESMTPSA id u7sm29434qkj.51.2020.04.09.14.03.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Apr 2020 14:03:28 -0700 (PDT) Received: by mail-qt1-f179.google.com with SMTP id m33so19022qtb.3; Thu, 09 Apr 2020 14:03:28 -0700 (PDT) X-Received: by 2002:aed:2046:: with SMTP id 64mr1375970qta.187.1586466207838; Thu, 09 Apr 2020 14:03:27 -0700 (PDT) MIME-Version: 1.0 References: <20200212222219.GE83892@raichu> <20200328225150.GA82767@raichu> <20200331192024.GE97238@raichu> <20200406212903.GA55712@raichu> <20200407232347.GA5605@raichu> In-Reply-To: <20200407232347.GA5605@raichu> From: Eric Joyner Date: Thu, 9 Apr 2020 14:02:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Issue with epoch_drain_callbacks and unloading iavf(4) [using iflib] To: Mark Johnston Cc: Hans Petter Selasky , freebsd-net@freebsd.org, shurd , John Baldwin , Drew Gallatin X-Rspamd-Queue-Id: 48ytsZ1Fnsz4HFX X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ricera10@gmail.com designates 209.85.160.181 as permitted sender) smtp.mailfrom=ricera10@gmail.com X-Spamd-Result: default: False [-2.83 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RWL_MAILSPIKE_GOOD(0.00)[181.160.85.209.rep.mailspike.net : 127.0.0.18]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[181.160.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.83)[ip: (-3.29), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[erj@freebsd.org,ricera10@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[erj@freebsd.org,ricera10@gmail.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 21:03:31 -0000 On Tue, Apr 7, 2020 at 4:24 PM Mark Johnston wrote: > On Mon, Apr 06, 2020 at 02:34:50PM -0700, Eric Joyner wrote: > > On Mon, Apr 6, 2020 at 2:29 PM Mark Johnston wrote: > > > > > On Mon, Apr 06, 2020 at 02:19:25PM -0700, Eric Joyner wrote: > > > > Mark, > > > > > > > > I think I was mistaken about the backtrace looking the same. I was > > > looking > > > > at it from within ddb, and I think I focused on the > > > > epoch_block_handler_preempt line and didn't notice that it only > stopped > > > > there this time. Here's the new one I've got from kgdb: > > > > > > Thanks. Could you try to print "td->td_name" from frame 4? It should > > > also be available as er->er_blockedtd. Basically, I'm trying to verify > > > that the interrupt thread itself isn't the one that we're waiting for, > > > else there is another bug to be fixed. > > > > > > If you can provide kernel symbols and vmcore, I'd be happy to look at > it > > > myself. > > > _______________________________________________ > > > freebsd-net@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-net > > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > > > > > Here's what I get: > > > > (kgdb) frame 4 > > #4 epoch_block_handler_preempt (global=0xfffff80003de0100, > > cr=0xfffffe00dee85900, arg=0x0) at /usr/src/sys/kern/subr_epoch.c:507 > > 507 } > > (kgdb) print td->td_name > > $1 = "if_io_tqg_31\000\000\000\000\000\000\000" > > (kgdb) print er->er_blockedtd > > $2 = (struct thread *) 0x0 > > I spent some time looking at the core. It looks like we have yet > another problem: the gtaskqueue code won't exit the net epoch if it is > constantly running a net task. Could you please retry with the patches > from before, and this one included? > > diff --git a/sys/kern/subr_gtaskqueue.c b/sys/kern/subr_gtaskqueue.c > index f52f32204644..2b1386a612ee 100644 > --- a/sys/kern/subr_gtaskqueue.c > +++ b/sys/kern/subr_gtaskqueue.c > @@ -345,7 +345,7 @@ gtaskqueue_run_locked(struct gtaskqueue *queue) > struct epoch_tracker et; > struct gtaskqueue_busy tb; > struct gtask *gtask; > - bool in_net_epoch; > + bool in net_epoch; > > KASSERT(queue != NULL, ("tq is NULL")); > TQ_ASSERT_LOCKED(queue); > @@ -361,20 +361,19 @@ gtaskqueue_run_locked(struct gtaskqueue *queue) > TQ_UNLOCK(queue); > > KASSERT(gtask->ta_func != NULL, ("task->ta_func is NULL")); > - if (!in_net_epoch && TASK_IS_NET(gtask)) { > - in_net_epoch = true; > + if (TASK_IS_NET(gtask)) { > NET_EPOCH_ENTER(et); > - } else if (in_net_epoch && !TASK_IS_NET(gtask)) { > + in_net_epoch = true; > + } > + gtask->ta_func(gtask->ta_context); > + if (in_net_epoch) { > NET_EPOCH_EXIT(et); > in_net_epoch = false; > } > - gtask->ta_func(gtask->ta_context); > > TQ_LOCK(queue); > wakeup(gtask); > } > - if (in_net_epoch) > - NET_EPOCH_EXIT(et); > LIST_REMOVE(&tb, tb_link); > } > > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > Yeah, I'll give it a spin and try to get back to you before the end of the week. - Eric From owner-freebsd-net@freebsd.org Thu Apr 9 21:30:25 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7449627FB1E for ; Thu, 9 Apr 2020 21:30:25 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48yvSc3Jkyz4Jf3; Thu, 9 Apr 2020 21:30:24 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mail-qk1-f173.google.com with SMTP id 130so312461qke.4; Thu, 09 Apr 2020 14:30:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=opP9GzyBjH7Nt/IbuwJ+UmQLVljxM9gBzOMd3RwMCTE=; b=oR3npWBJhBBteh9URfQupEvZaYNt6ThQCNXiTXvEjPWihHGo7IlkWjzvs3GVU527pj weV/FCzCq3lVOvPTDbgDJdwL3FGPyBtVwcOk/9G2fkdYrLAKVPOhQAFghQoUgxV8CRdD lewlroeN17tsybxqBJRX1kNDh6jpjfrLtLH0QKTbAazGWKCFyJxhHhtXPckcd0hPYTL7 zufgcWrf7BUJqAZtYKOnAbqugyFVB1/9/1h6FvqMkHgnBOGHhtQoe0H+j6ZMP03j8VvO nQjwVfCqTN1iDem6N4lvSmBTcjx+BN+sjJpryVxvS0+KaURrOOgjiZuPkXw7fZV12Yya 1kAQ== X-Gm-Message-State: AGi0PuZZvmwfC2e7KnIsi1NI6wTwBavXX9F2880HFpWqiStDrFwcN6xL YAxLwDin/92slbHeLcUky9Z4oRqyfA4= X-Google-Smtp-Source: APiQypLRfB5CIHL+udgXhAjX0X0AqBfVUTh2VOs+FVsm0D6888JrmbYnFIj8Z+H8dZ7a02ADBggjeA== X-Received: by 2002:a37:690:: with SMTP id 138mr1004889qkg.414.1586467822917; Thu, 09 Apr 2020 14:30:22 -0700 (PDT) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com. [209.85.160.173]) by smtp.gmail.com with ESMTPSA id q5sm81760qkn.59.2020.04.09.14.30.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Apr 2020 14:30:22 -0700 (PDT) Received: by mail-qt1-f173.google.com with SMTP id z90so42766qtd.10; Thu, 09 Apr 2020 14:30:22 -0700 (PDT) X-Received: by 2002:ac8:27a5:: with SMTP id w34mr1571719qtw.124.1586467821961; Thu, 09 Apr 2020 14:30:21 -0700 (PDT) MIME-Version: 1.0 References: <20200212222219.GE83892@raichu> <20200328225150.GA82767@raichu> <20200331192024.GE97238@raichu> <20200406212903.GA55712@raichu> <20200407232347.GA5605@raichu> In-Reply-To: From: Eric Joyner Date: Thu, 9 Apr 2020 14:29:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Issue with epoch_drain_callbacks and unloading iavf(4) [using iflib] To: Mark Johnston Cc: Hans Petter Selasky , freebsd-net@freebsd.org, shurd , John Baldwin , Drew Gallatin X-Rspamd-Queue-Id: 48yvSc3Jkyz4Jf3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ricera10@gmail.com designates 209.85.222.173 as permitted sender) smtp.mailfrom=ricera10@gmail.com X-Spamd-Result: default: False [-2.67 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[173.222.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.67)[ip: (-2.51), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[erj@freebsd.org,ricera10@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[173.222.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[erj@freebsd.org,ricera10@gmail.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 21:30:25 -0000 On Thu, Apr 9, 2020 at 2:02 PM Eric Joyner wrote: > On Tue, Apr 7, 2020 at 4:24 PM Mark Johnston wrote: > >> On Mon, Apr 06, 2020 at 02:34:50PM -0700, Eric Joyner wrote: >> > On Mon, Apr 6, 2020 at 2:29 PM Mark Johnston wrote: >> > >> > > On Mon, Apr 06, 2020 at 02:19:25PM -0700, Eric Joyner wrote: >> > > > Mark, >> > > > >> > > > I think I was mistaken about the backtrace looking the same. I was >> > > looking >> > > > at it from within ddb, and I think I focused on the >> > > > epoch_block_handler_preempt line and didn't notice that it only >> stopped >> > > > there this time. Here's the new one I've got from kgdb: >> > > >> > > Thanks. Could you try to print "td->td_name" from frame 4? It should >> > > also be available as er->er_blockedtd. Basically, I'm trying to >> verify >> > > that the interrupt thread itself isn't the one that we're waiting for, >> > > else there is another bug to be fixed. >> > > >> > > If you can provide kernel symbols and vmcore, I'd be happy to look at >> it >> > > myself. >> > > _______________________________________________ >> > > freebsd-net@freebsd.org mailing list >> > > https://lists.freebsd.org/mailman/listinfo/freebsd-net >> > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org >> " >> > > >> > >> > Here's what I get: >> > >> > (kgdb) frame 4 >> > #4 epoch_block_handler_preempt (global=0xfffff80003de0100, >> > cr=0xfffffe00dee85900, arg=0x0) at /usr/src/sys/kern/subr_epoch.c:507 >> > 507 } >> > (kgdb) print td->td_name >> > $1 = "if_io_tqg_31\000\000\000\000\000\000\000" >> > (kgdb) print er->er_blockedtd >> > $2 = (struct thread *) 0x0 >> >> I spent some time looking at the core. It looks like we have yet >> another problem: the gtaskqueue code won't exit the net epoch if it is >> constantly running a net task. Could you please retry with the patches >> from before, and this one included? >> >> diff --git a/sys/kern/subr_gtaskqueue.c b/sys/kern/subr_gtaskqueue.c >> index f52f32204644..2b1386a612ee 100644 >> --- a/sys/kern/subr_gtaskqueue.c >> +++ b/sys/kern/subr_gtaskqueue.c >> @@ -345,7 +345,7 @@ gtaskqueue_run_locked(struct gtaskqueue *queue) >> struct epoch_tracker et; >> struct gtaskqueue_busy tb; >> struct gtask *gtask; >> - bool in_net_epoch; >> + bool in net_epoch; >> >> KASSERT(queue != NULL, ("tq is NULL")); >> TQ_ASSERT_LOCKED(queue); >> @@ -361,20 +361,19 @@ gtaskqueue_run_locked(struct gtaskqueue *queue) >> TQ_UNLOCK(queue); >> >> KASSERT(gtask->ta_func != NULL, ("task->ta_func is >> NULL")); >> - if (!in_net_epoch && TASK_IS_NET(gtask)) { >> - in_net_epoch = true; >> + if (TASK_IS_NET(gtask)) { >> NET_EPOCH_ENTER(et); >> - } else if (in_net_epoch && !TASK_IS_NET(gtask)) { >> + in_net_epoch = true; >> + } >> + gtask->ta_func(gtask->ta_context); >> + if (in_net_epoch) { >> NET_EPOCH_EXIT(et); >> in_net_epoch = false; >> } >> - gtask->ta_func(gtask->ta_context); >> >> TQ_LOCK(queue); >> wakeup(gtask); >> } >> - if (in_net_epoch) >> - NET_EPOCH_EXIT(et); >> LIST_REMOVE(&tb, tb_link); >> } >> >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > > Yeah, I'll give it a spin and try to get back to you before the end of the > week. > > - Eric > I was able to try it out just now, and it looks this (and all of the other patches) finally causes the problem to not appear! I can unload the driver while iavf1 is receiving heavy traffic! - Eric From owner-freebsd-net@freebsd.org Fri Apr 10 01:07:16 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F9AD2AC829 for ; Fri, 10 Apr 2020 01:07:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48z0Gr1vLgz4Y01 for ; Fri, 10 Apr 2020 01:07:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 3EF6E2AC828; Fri, 10 Apr 2020 01:07:16 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EBAA2AC827 for ; Fri, 10 Apr 2020 01:07:16 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48z0Gr0z3cz4Xyy for ; Fri, 10 Apr 2020 01:07:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1CDB31DEB7 for ; Fri, 10 Apr 2020 01:07:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 03A17FGl078297 for ; Fri, 10 Apr 2020 01:07:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 03A17F4a078296 for net@FreeBSD.org; Fri, 10 Apr 2020 01:07:15 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 236383] [ral] Kernel panic in ral(4) Date: Fri, 10 Apr 2020 01:07:15 +0000 X-Bugzilla-Reason: AssignedTo CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: crash X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: koobs@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Overcome By Events X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: eugen@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to cc resolution keywords Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 01:07:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236383 Kubilay Kocak changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|net@FreeBSD.org |eugen@freebsd.org CC| |net@FreeBSD.org Resolution|Unable to Reproduce |Overcome By Events Keywords|panic, patch |crash --- Comment #9 from Kubilay Kocak --- ^Triage:=20 - Assign to committer that resolved - Set slightly more precise resolution (OBE by way of no longer having hardware) --=20 You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug.= From owner-freebsd-net@freebsd.org Fri Apr 10 06:50:07 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85CA52B425E; Fri, 10 Apr 2020 06:50:07 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48z7tQ61WPz4sd6; Fri, 10 Apr 2020 06:50:06 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: by mail-vs1-xe2f.google.com with SMTP id z63so830859vsz.2; Thu, 09 Apr 2020 23:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NTwHza1u6b+yBmZ78FAaw25N6tPR3oz5c1qG88t/lcs=; b=uAnOQeqvVjaYv2qwMTrmJmIWz8EwiWrZCV1xTDSjtXem6R4R3n7G+X1Aa/cOqFMwhJ 4WZPNfTTsYeSXMDM4dg5CpiOX3+KrcpKN2c9/R2ppntRzW9lFG8u8G5S4tUd+E48YxQk V2ilA4eKilyUP1sRE8w6m0Hw8YZbzKY0pPhxvgqplhTtFvOYH1McvNtLSSRdf7oIRCxC qqWO2PHeSUw17YekJ4wf9wpwXE+5+7Yok2YE1O1ufziTifb7+bEZEoodig10Hww6YLbh okaV2dCiKRlCqqbNx0HGvbis9vDGTB6EMCwi+SSgcs7OXTuOlHiahX6T382YW26iGLGV zPdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NTwHza1u6b+yBmZ78FAaw25N6tPR3oz5c1qG88t/lcs=; b=UDDcKnrp/yrHTlrDnWYq2dbYCBVPgYyrXj0LF7k7kpXYhOrZCGFGoSBrEXPJyahLWS DJTHbZKwq8V2v5y2BIKHOkrqYspr+6a+jpyrzjvdxR+OSYV246amiNo/zOrcUgbuxAmA l6dZucocPOsJctUFI59fq94ZGcaOsCvHWT+XY4x6+eHuF77weR47MK14iU9X9JJVULxo LiNQHU10l4KD4wb122DVjwpDp/WdZ1sY26PIN5uPVEh2izo4xiunKPjWmFrnpyVWeui6 l6SDs8eX/bSB74j4Q1P/abjrThPkIR94KD3Y7jnGJbx9q1g8NMphqgijKr+NKsCwZm4T Swag== X-Gm-Message-State: AGi0PuYCRGow2Y+9PpiczZDFCMgHytAFcIAc75qO/YYoi0pGGN1rX53O Rl/qOQPJL3ENr7IAaodCYZliLVsO87hBo1JiAro= X-Google-Smtp-Source: APiQypLJVtGw/w3u+DsawnbE+BVr+JMm2BUGyitChGct2zLSr8Cirvrir52zHTjAPCW/WaYoZw1YwpjrFCDpXHevh58= X-Received: by 2002:a05:6102:10c9:: with SMTP id t9mr2654873vsr.41.1586501405689; Thu, 09 Apr 2020 23:50:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Date: Fri, 10 Apr 2020 09:49:51 +0300 Message-ID: Subject: Re: dummynet performance To: Luigi Rizzo Cc: "freebsd-net@freebsd.org" , freebsd-ipfw , "Andrey V. Elsukov" X-Rspamd-Queue-Id: 48z7tQ61WPz4sd6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=uAnOQeqv; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ozkankirik@gmail.com designates 2607:f8b0:4864:20::e2f as permitted sender) smtp.mailfrom=ozkankirik@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE(0.00)[ip: (-9.54), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[f.2.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 06:50:07 -0000 Thanks! On Thu, Apr 9, 2020 at 8:29 PM Luigi Rizzo wrote: > On Thu, Apr 9, 2020 at 2:18 AM =C3=96zkan KIRIK w= rote: > > > > Hello, > > > > I wonder if it is possible to update dummynet code multi-threading > capable > > practically? > > My idea is below: > > - A new sysctl tunable will be defined as > > "net.inet.ip.dummynet.thread_count" (default 1) > > - To distribute tasks along threads, each sched instance can be assigne= d > to > > different thread. > > - By default, all schedulers assigned to thread 0 if no thread_id is se= t. > > With a new option named "thr_id" affinity can be set. as below: > > ipfw sched 1 config type QFQ (by defaut thr_id =3D 0) > > ipfw sched 2 config type QFQ thr_id 1 > > ipfw sched 3 config type QFQ thr_id 2 > > ipfw sched 4 config type FIFO thr_id 3 > > ipfw sched 5 config type FIFO thr_id 3 ( sched 4 & 5 assigned to sam= e > > thread 3 ) > > > > I think this approach is more easy then completely rewrite or other > > solutions. > > > > This change may not be completely trivial given that dummynet was designe= d > as > single threaded and protected by a single lock. > > If you want to proceed, you should do as follows: > - some members of struct dn_parms need to be duplicated for each thread, > including prev_t, evheap, curr_time, the locks, and perhaps others. > Probably may be useful to create a new struct for them, with a back > pointer to the parent dn_parms, and include a refcount. > > - add another rwlock to protect access to dn_cfg > > - dummynet_io() does the initial demultiplexing calling dn_ht_find(), > currently protected DN_BH_WLOCK(). This could be changed to an RWLOCK > and I believe this initial step could be protected by a read lock > (maybe there are corner cases where you need to create a new entry > so you need to drop the lock, acquire in write mode and retry...) > > - once the demux has returned a dn_fsk, maybe you can use a refcount > to avoid the object being destroyed, release the read lock on > dn_cfg.fshash, acquire an exclusive lock on the thread handling the > dn_fsk, and proceed from there. > > - the kernel thread that process the heap should now run each on > one instance of the evheap > > cheers > luigi > From owner-freebsd-net@freebsd.org Fri Apr 10 07:07:43 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA8E62B4F6B for ; Fri, 10 Apr 2020 07:07:43 +0000 (UTC) (envelope-from reshadpatuck1@gmail.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48z8Gk5bTmz4vCv for ; Fri, 10 Apr 2020 07:07:42 +0000 (UTC) (envelope-from reshadpatuck1@gmail.com) Received: by mail-wm1-x32f.google.com with SMTP id x4so1570054wmj.1 for ; Fri, 10 Apr 2020 00:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=OOCLe5TsHtoca+MAZULXJea86aDFO8EKZ4a9AE77y44=; b=YNDFXd0NnQiMSNst8xTy4plIdaATWNh8RyfHv36alq8ypblzPKMkMAnyHzCv+gLdBE 7C61dXhEHCtJ/MKofkcXZfpvGZa3x1HWlexlAFkMTnjcWwAF8b/lt0sHi09VWyJsFw3f lSa/U0Cy7Augtz/DCG9WC3j4+IaV14pc+qkF6aqD8V269xX/hIQIxPedLqJIFLidSvj8 dw0QRXizUqigg/+ysTpnA0Vp3GxH2jWVnP9AQ+t6U4uPmx0cfyTnoGtYvnVeRPwYCiZZ jpjrsFElyhzEC9JEFrxoI0b3amlxGTYZO8qxOhXw68KgWSkAd+xUzfFfmqgqcvH4tjPj d4Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OOCLe5TsHtoca+MAZULXJea86aDFO8EKZ4a9AE77y44=; b=tXIGcpY5me7ZVNRFomN79yx2uwj0Sd9G7TnSUsrbVQFXqzNOrJ+DUtHbZfF+M+c1FC GDwt0Zt1x+Dm4BMmxr7krAYqykU+xcnroilM2Tn2jpFZsCTe3XRLLk15g25GSGG1Ezi0 OtV/D0WzSWqhGeKGki/PH55sdgFtzYMlcWZFcrifYBqhAa6VRU0n94y7S30vlQKY64kk ZX7ydtvq9ERy0m/Y4C2YR8ffoFo4vvYtEGDjWyfCuD92IuhBf/Z1XYCtGcaecwxGOk1O 2CHtNhNkkJIaVJXiwYxzhtE89KDPUXbH2FLk2II10rqxXlx/vUs/jArCb4dUkivn9UM5 XNGg== X-Gm-Message-State: AGi0PubtlMwmIuY8+4pvvt4L5PW7cWIKgCJvqfwdDthadqeRAg8SkZZm ERxczoI2kEOixJvctQi69VPG0Gc9sDfS8VI1ZBcFZpeI X-Google-Smtp-Source: APiQypLePAur0T+JSXwXkeu4i69Mcxk/uZFzLcGYVn8XH0YV23qPFqGiM8NtGyYPjgrbjt5kFkCKz4kinXSU9OXzvCg= X-Received: by 2002:a7b:c118:: with SMTP id w24mr3556425wmi.173.1586502460940; Fri, 10 Apr 2020 00:07:40 -0700 (PDT) MIME-Version: 1.0 From: Reshad Patuck Date: Fri, 10 Apr 2020 12:37:28 +0530 Message-ID: Subject: Netgraph VLANs on Hyper-V To: freebsd-net@freebsd.org X-Rspamd-Queue-Id: 48z8Gk5bTmz4vCv X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=YNDFXd0N; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of reshadpatuck1@gmail.com designates 2a00:1450:4864:20::32f as permitted sender) smtp.mailfrom=reshadpatuck1@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; TO_DN_NONE(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(0.00)[ip: (-8.92), ipnet: 2a00:1450::/32(-2.36), asn: 15169(-0.43), country: US(-0.05)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[f.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 07:07:43 -0000 Hi, I am trying to use ng_vlan on Hyper-V to deploy vnet jails. The "Enable MAC address Spoofing" setting on the Hyper-V host is enabled. However when I try to use ng_vlan I am not able to reach the jail. If I change this to if_vlan instead everything works fine. Is there something that creating a VLAN using ifconfig does that ng_vlan does not. The same setup works well on VMware ESXi, Xen and KVM. I am not sure if this is relevant to my issue but the hn1 devices sysrc's changes when I use different vlan methods: no vlan: dev.hn.1.rxfilter: 9 dev.hn.1.hwassist: 17 if_vlan: dev.hn.1.rxfilter: 20 dev.hn.1.hwassist: 17 ng_vlan: dev.hn.1.rxfilter: 9 dev.hn.1.hwassist: 0 All the other sysrc's either stay the same or seem to be counters. I can provide you with scripts to setup vlans and jails with both if_vlan and ng_vlan if that helps. Any help understanding what these sysrc's do, or on how I could get ng_vlan to work would be very appreciated. Best, Reshad From owner-freebsd-net@freebsd.org Fri Apr 10 11:10:17 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 386C52BA8E2 for ; Fri, 10 Apr 2020 11:10:17 +0000 (UTC) (envelope-from sodynet1@gmail.com) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48zFfc1YXrz3QBF for ; Fri, 10 Apr 2020 11:10:15 +0000 (UTC) (envelope-from sodynet1@gmail.com) Received: by mail-qk1-x729.google.com with SMTP id h14so1744014qke.5 for ; Fri, 10 Apr 2020 04:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NsCz8K39ApaUL/ZeON60DQeK2o3wQMe/rXnyVwVYSJE=; b=nCr6BB5FVb7fX2uuiBJ1k0m5ByFEKgqmvuthlAe8FlxnHuXHjtSGWB8vlxHnbJsAgR +muLqYDFnB1EGqW17lq4XIcST1lYEk6h5CJ/VD/Y1qATjtr5PxeAuzH4WANK7mHlTuXT L4h5yrmBycpZ7bRbZhVXclT0hz8t8i+Gm+OjeHIxS0yj5TfJvUQpzT9ku71Hgzq/ih8p SBZFUlZQT8b6eQNmQAp3e/JX331JzGqtU/+Ifnd4BcCai395S1FWeMx70+iB+vQ337XY jV5h1oCPNI2r+xffO4BjuLmx4qibtnAn77OIJ1VyBCRNWN6ovN0TCYiDb8J+3cwnvwJT 3wbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NsCz8K39ApaUL/ZeON60DQeK2o3wQMe/rXnyVwVYSJE=; b=qnut6BNrH9M9DiqEMbFve44zriIHPXao6Nbf6eOWKrBj5IfdjjlD7lNI3YbhPw66SS abFom2lA+SWWGz1EXDphcbTLRwmGefHp1HjNZGtSjuHgwxTfVonfCruSdp6VKBPiiyyz zR2UwvNK3J2GA8lBdGOKczZP38JydPFHP6MKfyQfEBViNG2G/tTWac2DexucPwVoTkXC wtJF7rklj6aqp5aN7/wjsz5HAhSHGPLe9wNmi8xkdaHuLFC5vQfq2eJqH34OrQdQ2bsY emaSZ6zdNUcxcw3j5EAyWZnxxf03BcOf/FjE9RTvoSknA2xunrWKeVlDT9kV8fSHK2Ip 6pKA== X-Gm-Message-State: AGi0PuY9Je6yZw0wEv0aFWEjOJDWAeRTd+zAYiG+DMBEadLG6QrDkQGH BQrR15hbyyZuVcp0qOobNEDODDYBlVjEdUbkzB7jYw== X-Google-Smtp-Source: APiQypJ2jAib2y1m25kPpEHGUijoq6Nw5UEatIHLZ2dHRsbtTyQUcGBsZUqCcva9hx0mj/yql4+pFGsE/aBLmIvXYZE= X-Received: by 2002:ae9:ee18:: with SMTP id i24mr3475707qkg.325.1586517014914; Fri, 10 Apr 2020 04:10:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sami Halabi Date: Fri, 10 Apr 2020 14:10:02 +0300 Message-ID: Subject: Re: Netgraph VLANs on Hyper-V To: Reshad Patuck Cc: freebsd-net@freebsd.org X-Rspamd-Queue-Id: 48zFfc1YXrz3QBF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=nCr6BB5F; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of sodynet1@gmail.com designates 2607:f8b0:4864:20::729 as permitted sender) smtp.mailfrom=sodynet1@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; URI_COUNT_ODD(1.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.03), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[9.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 11:10:17 -0000 Hi, If I recall correctly it has something to do with Mac addresses netgraph expose not recognized by Hyper-v and maybe other Hypetvisors. Myabe someone can shed more light on it. Sami =D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=95=D7=B3, 10 = =D7=91=D7=90=D7=A4=D7=A8=D7=B3 2020, 10:07, =D7=9E=D7=90=D7=AA Reshad Patuc= k =E2=80=8F< reshadpatuck1@gmail.com>: > Hi, > > I am trying to use ng_vlan on Hyper-V to deploy vnet jails. > The "Enable MAC address Spoofing" setting on the Hyper-V host is enabled. > However when I try to use ng_vlan I am not able to reach the jail. > If I change this to if_vlan instead everything works fine. > > Is there something that creating a VLAN using ifconfig does that ng_vlan > does not. > The same setup works well on VMware ESXi, Xen and KVM. > > I am not sure if this is relevant to my issue but the hn1 devices sysrc's > changes when I use different vlan methods: > > no vlan: > dev.hn.1.rxfilter: 9 > dev.hn.1.hwassist: 17 > > if_vlan: > dev.hn.1.rxfilter: 20 > dev.hn.1.hwassist: 17 > > ng_vlan: > dev.hn.1.rxfilter: 9 > dev.hn.1.hwassist: 0 > > All the other sysrc's either stay the same or seem to be counters. > I can provide you with scripts to setup vlans and jails with both if_vlan > and ng_vlan if that helps. > > Any help understanding what these sysrc's do, or on how I could get ng_vl= an > to work would be very appreciated. > > Best, > > Reshad > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@freebsd.org Fri Apr 10 11:34:09 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0B5B2BB173 for ; Fri, 10 Apr 2020 11:34:09 +0000 (UTC) (envelope-from reshadpatuck1@gmail.com) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48zGB84Spxz3wb0 for ; Fri, 10 Apr 2020 11:34:08 +0000 (UTC) (envelope-from reshadpatuck1@gmail.com) Received: by mail-wm1-x32a.google.com with SMTP id y24so2446152wma.4 for ; Fri, 10 Apr 2020 04:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KgcCmLQIlwuZy6fUZXDcEQiL1wWLgYZTok56sx25+Lc=; b=JrE6gpCHAGFmsMFaM4tQDk515hWjMHy0joIB1PVlf/HwOYT0IEd/e/geN+R6pTCFsL lHdgAFmeVJOctHfe6tu/vuCpxmVt02GcBMTOK/jHRwAbSUJ70xR+X/jfNku/sylDzxZF SkdTr7spMx4wjnYMF64i4abkY9xuancve3/1hC4qZFnU4OlOWJxbePQbmm0qRFmueQ6O fh2tFIf2LxPLVS/VWzisCNofHXg84aPyDV1FYOdx+4pKTZRIv5ZrnY5SahzHkVs2LyWE ufHDl0bAWWqqG7PGbtyLWfses/kzXKvgTckxc/F7Y3abaa0d+XdAEADe9O2Skc8VIBrG 0jmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KgcCmLQIlwuZy6fUZXDcEQiL1wWLgYZTok56sx25+Lc=; b=gKS+Pj9q53QK6zTyYCyt/pjaLNaKgsrN1dYFBE7ebj5cm21BStApworXP31bhLVpl+ mYcKA9wvKf3NdB5nJMjc/vHAfkZlZXhdBhO7aPKRK3TgHJRmdZowUfeFhsDQJHq6h8Up Bqu82fpPy6M8BSNkE7GT0xZTQfUid/cYRkcy4Yv+lxNKveFe1s+Apm7sJHeaCUJF4wEQ Tqhmr+A5APgfB+G7lY5SIxz+JXtM+n+U3SZfszIyuSt8aHJ4pAE+rHswwOqL9nmljRJG bLiq9uCguoejbB/7IWP+Qkfgz9so2UnLesg9Npv+1RR13Bcm45PjOivt/A1K7WF+afe3 9oaQ== X-Gm-Message-State: AGi0PubQClY687LKwHCoXztCVbN9GRQICWNfKtbHXQvN5v/kwrvYeNzp 746tKKlNiNFXv9Abpikkn570EXue3FU0XZMSjMs= X-Google-Smtp-Source: APiQypL8f01wh14JECbCNqrkFdn2tEw1mzmiJ/QcHs2rAyybNwTzm33F9FR56Y7ia3cFNNp4DMCxqoYcpxlJp6UJ3RI= X-Received: by 2002:a1c:1f96:: with SMTP id f144mr4568767wmf.114.1586518446256; Fri, 10 Apr 2020 04:34:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Reshad Patuck Date: Fri, 10 Apr 2020 17:03:53 +0530 Message-ID: Subject: Re: Netgraph VLANs on Hyper-V To: Sami Halabi Cc: freebsd-net@freebsd.org X-Rspamd-Queue-Id: 48zGB84Spxz3wb0 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=JrE6gpCH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of reshadpatuck1@gmail.com designates 2a00:1450:4864:20::32a as permitted sender) smtp.mailfrom=reshadpatuck1@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; URI_COUNT_ODD(1.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.41), ipnet: 2a00:1450::/32(-2.36), asn: 15169(-0.43), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[a.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 11:34:09 -0000 Hi Sami, I the interfaces in the VNET jails are both epair interfaces with auto-generated mac addresses in the 02:xx:xx:xx:xx:xx range. When I use if_vlan I can connect to the IP address in the jail. For ng_vlan I can not connect to the IP address in the jail. I will test again using a mac address statically set to: - mac address of hn1 interface - mac address of hn1 + 1 I will drop my results here in a bit. Thanks for your help. Reshad On Fri, 10 Apr, 2020, 16:40 Sami Halabi, wrote: > Hi, > If I recall correctly it has something to do with Mac addresses netgraph > expose not recognized by Hyper-v and maybe other Hypetvisors. > > Myabe someone can shed more light on it. > > Sami > > =D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=95=D7=B3, 10 = =D7=91=D7=90=D7=A4=D7=A8=D7=B3 2020, 10:07, =D7=9E=D7=90=D7=AA Reshad Patuc= k =E2=80=8F< > reshadpatuck1@gmail.com>: > >> Hi, >> >> I am trying to use ng_vlan on Hyper-V to deploy vnet jails. >> The "Enable MAC address Spoofing" setting on the Hyper-V host is enabled= . >> However when I try to use ng_vlan I am not able to reach the jail. >> If I change this to if_vlan instead everything works fine. >> >> Is there something that creating a VLAN using ifconfig does that ng_vlan >> does not. >> The same setup works well on VMware ESXi, Xen and KVM. >> >> I am not sure if this is relevant to my issue but the hn1 devices sysrc'= s >> changes when I use different vlan methods: >> >> no vlan: >> dev.hn.1.rxfilter: 9 >> dev.hn.1.hwassist: 17 >> >> if_vlan: >> dev.hn.1.rxfilter: 20 >> dev.hn.1.hwassist: 17 >> >> ng_vlan: >> dev.hn.1.rxfilter: 9 >> dev.hn.1.hwassist: 0 >> >> All the other sysrc's either stay the same or seem to be counters. >> I can provide you with scripts to setup vlans and jails with both if_vla= n >> and ng_vlan if that helps. >> >> Any help understanding what these sysrc's do, or on how I could get >> ng_vlan >> to work would be very appreciated. >> >> Best, >> >> Reshad >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > From owner-freebsd-net@freebsd.org Fri Apr 10 12:07:04 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FF892BC6B9 for ; Fri, 10 Apr 2020 12:07:04 +0000 (UTC) (envelope-from paul@prt.org) Received: from smtp1.mail.clearhost.co.uk (smtp1.mail.clearhost.co.uk [IPv6:2001:1420::25:101]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.mail.clearhost.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48zGw65JNNz3ygQ for ; Fri, 10 Apr 2020 12:07:02 +0000 (UTC) (envelope-from paul@prt.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=prt.org; s=dkim1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version: Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WYTSdR5QXNX0I2Tl9EyD+5OnwkbTTLSQT5cnBondNYc=; b=m8+V3/MTzYhcg8PTXLFGYWEeC1 ZbRgTLzkPwsFK3KB40gff4DgGhjxMAtc7gEgBMKmqzI8JQamXvziK+Ql8Y8A8wYH8kIA8INWJAXRR eQMbqRaJR9eQ9a2R3v27UA7JVAlweeTJBU6leB671Sr1XilXp5qzCqABwmlK+nSLO+UI=; Received: from [2001:1420:a:104:3a60:77ff:fec5:7509] (port=51621) by smtp1.mail.clearhost.co.uk with esmtpsa (TLSv1:ECDHE-RSA-AES128-SHA:128) (Exim 4.92) (envelope-from ) id 1jMsQv-0006BL-3l for freebsd-net@freebsd.org; Fri, 10 Apr 2020 12:06:53 +0000 Subject: Re: Netgraph VLANs on Hyper-V To: freebsd-net@freebsd.org References: From: Paul Thornton Message-ID: <9bef042b-3697-325f-a98b-07f3c6a768f5@prt.org> Date: Fri, 10 Apr 2020 13:09:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-ClearHost-AuthUser: paul@prt.org X-ClearHost-AuthDomain: prt.org X-Rspamd-Queue-Id: 48zGw65JNNz3ygQ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=prt.org header.s=dkim1 header.b=m8+V3/MT; dmarc=none; spf=pass (mx1.freebsd.org: domain of paul@prt.org designates 2001:1420::25:101 as permitted sender) smtp.mailfrom=paul@prt.org X-Spamd-Result: default: False [-2.43 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[prt.org:s=dkim1]; NEURAL_HAM_MEDIUM(-0.92)[-0.917,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:smtp.mail.clearhost.co.uk]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[prt.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; DKIM_TRACE(0.00)[prt.org:+]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.01)[country: GB(-0.07)]; ASN(0.00)[asn:8676, ipnet:2001:1420::/32, country:GB]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 12:07:04 -0000 Hi, I have recently been testing with jails, vnet and netgraph on ESXi - so not Hyper-V - but to make this work I needed to: ngctl msg vmx0: setpromisc 1 ngctl msg vmx0: setautosrc 0 outside of the jail when setting up netgraph (where vmx0 is the "real" NIC that the ng_vlans are part of). and then I had to set the mac address for the ngeth interface that was set to be put into the jail ifconfig ngeth0 ether 02:00:01:02:03:04 Once done, and the jail started, ngeth0 worked as expected. In ESXi, the portgroup that vmx0 is connected to allowed spoofing and promiscuous mode. Paul. On 10/04/2020 08:07, Reshad Patuck wrote: > Hi, > > I am trying to use ng_vlan on Hyper-V to deploy vnet jails. > The "Enable MAC address Spoofing" setting on the Hyper-V host is enabled. > However when I try to use ng_vlan I am not able to reach the jail. > If I change this to if_vlan instead everything works fine. > > Is there something that creating a VLAN using ifconfig does that ng_vlan > does not. > The same setup works well on VMware ESXi, Xen and KVM. > > I am not sure if this is relevant to my issue but the hn1 devices sysrc's > changes when I use different vlan methods: > > no vlan: > dev.hn.1.rxfilter: 9 > dev.hn.1.hwassist: 17 > > if_vlan: > dev.hn.1.rxfilter: 20 > dev.hn.1.hwassist: 17 > > ng_vlan: > dev.hn.1.rxfilter: 9 > dev.hn.1.hwassist: 0 > > All the other sysrc's either stay the same or seem to be counters. > I can provide you with scripts to setup vlans and jails with both if_vlan > and ng_vlan if that helps. > > Any help understanding what these sysrc's do, or on how I could get ng_vlan > to work would be very appreciated. > > Best, > > Reshad > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" -- Paul Thornton From owner-freebsd-net@freebsd.org Sat Apr 11 13:49:06 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B9C82BA21A for ; Sat, 11 Apr 2020 13:49:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48zx7Q3Dmhz4fHQ for ; Sat, 11 Apr 2020 13:49:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 6D3222BA219; Sat, 11 Apr 2020 13:49:06 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CFA12BA218 for ; Sat, 11 Apr 2020 13:49:06 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48zx7Q2Mqvz4fHP for ; Sat, 11 Apr 2020 13:49:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B54718F6E for ; Sat, 11 Apr 2020 13:49:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 03BDn6kw032324 for ; Sat, 11 Apr 2020 13:49:06 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 03BDn6gm032323 for net@FreeBSD.org; Sat, 11 Apr 2020 13:49:06 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 243703] fe80 route need to add manually and NDP doesn't populate itself Date: Sat, 11 Apr 2020 13:49:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: boris.tassou@securmail.fr X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2020 13:49:06 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D243703 --- Comment #1 from Boris Tassou --- Hi, The problem is still present. [root@vultr-paris ~]# ping6 fe80::2bd:6ff:fe17:ff00%tap0 ping6: UDP connect: Network is unreachable [root@vultr-paris ~]# route -6 add fe80::%tap0/64 -iface tap0 -nostatic add net fe80::%tap0/64: gateway tap0 [root@vultr-paris ~]# ping6 fe80::2bd:6ff:fe17:ff00%tap0 PING6(56=3D40+8+8 bytes) fe80::2bd:87ff:fe16:ff00%tap0 --> fe80::2bd:29ff:fe17:ff00%tap0 ^C --- fe80::2bd:29ff:fe17:ff00%tap0 ping6 statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss [root@vultr-paris ~]# ping6 fe80::2bd:6ff:fe17:ff00%tap0 PING6(56=3D40+8+8 bytes) fe80::2bd:87ff:fe16:ff00%tap0 --> fe80::2bd:6ff:fe17:ff00%tap0 16 bytes from fe80::2bd:6ff:fe17:ff00%tap0, icmp_seq=3D0 hlim=3D64 time=3D1= 2.385 ms 16 bytes from fe80::2bd:6ff:fe17:ff00%tap0, icmp_seq=3D1 hlim=3D64 time=3D1= 1.540 ms ^C --- fe80::2bd:6ff:fe17:ff00%tap0 ping6 statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss I need to add the route on the target and it's works. Thanks --=20 You are receiving this mail because: You are the assignee for the bug.=