From owner-svn-src-all@freebsd.org Tue Sep 3 14:07:10 2019 Return-Path: Delivered-To: svn-src-all@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 EF73FDCB1A; Tue, 3 Sep 2019 14:06:32 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N7zX4sM3z4Pfs; Tue, 3 Sep 2019 14:06:32 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id 7A9881A80E; Tue, 3 Sep 2019 14:06:11 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id D17E01E4DD; Tue, 9 Apr 2019 17:15:44 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B64C6EE32; Tue, 9 Apr 2019 17:15:44 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 118201E4DC; Tue, 9 Apr 2019 17:15:44 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 12D301E4D8 for ; Tue, 9 Apr 2019 17:15:41 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 8CB066EE2D for ; Tue, 9 Apr 2019 17:15:40 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1554829169; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=d2Wg+h92QOpFq/9Pij5n/R1Q9edVbqeYJKeK0ZbacWR74iQbudedOkvrfVlFY1FfpQowLwf64KoCt raDQowhAG6z5v9kK0txiy89IqCx4zgNSokJPzKCA2+ul8VUA4K5ehF+widZm5ZU8klDghf9Um288Se 64uyXHlEPp5npMHXvv4SXINZ178OjBrUt0Ev6gVZR4y1zZL3F0AdYybB3Gqe2Anw0hW21NyLa4sWiB vc6Oz9BTJOigp4KWvtapPwJ69gPqqNpy6y0QHBfFDV0yGRkpKd8Uuvyh3d+exGr7NgTgYWRxocWOCh s6nUXrucgGEboin5Df556V59OHfOwUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=rY5+W3s15imTg3YRXTL9Y+RET+LF1m22d3E0TSMLMcI=; b=l10ttMr0NkmsMJqNa5ssT5jZqEZxu4kkffmor5bWF/JuQnrrhKjivCpO0PUz30kb37QKvU0k1hWzi QYqklDEqgqtypagwnzFWxgNUVfot9xBl09DAcjj9bzoFRcYo7zUIstEqS2sPPosufhpzYzj2QlQd+J Yhuzcj3jyQn9+b0luIZEx2GANzwIsFaUD0LrCjyehAuknlDajq55VeRZgBIewa3KhGfaJzFeXHHZV0 Qedn+arQE/ip+ze6at44AAT01EWEMfCESnY9gRCwYg1iLvlAn+QBk9r98bxwbKbXVZSHCqpyhl5WBv C7StoX91RbBBVaBGzuGO65Wa9+5jpfg== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=rY5+W3s15imTg3YRXTL9Y+RET+LF1m22d3E0TSMLMcI=; b=DT9h7IFbPj/aSDPwTCE15qIL3r0F4SzQctadc4VpZWcnuR0pjKiaFyjg01w77c7BrxlJ39KEJa9RN cBRf80SCWWQYNC3R1TrgZTzVQemxozFmiKCNBMxAH752Nypd+2OioDGG9n+R9At1Brnsg81RTCwzv0 GrO4ajfoh8bCpjsx8DSkOIdgkEXFGHNn28xQPL8pv/TowF8xrwJKmIlfH4guLH0+0qr151JsDPipqM VIrA0qjYI92OUK8ccq6BeX/8+c5nhRcgvAnIWAR+Ik9SdUCH3cgKALkBO27WBgi2vBWcc5zo8l4b8Y G+i3D2UMZRuW5Uk+YTJO1cyVAdZkNQw== X-MHO-RoutePath: aGlwcGll X-MHO-User: d3b0f649-5ae8-11e9-803b-31925da7267c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id d3b0f649-5ae8-11e9-803b-31925da7267c; Tue, 09 Apr 2019 16:59:25 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x39GxNuO018070; Tue, 9 Apr 2019 10:59:23 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <969703ae8558b4b6f2930208e9c36927b546bb77.camel@freebsd.org> Subject: Re: svn commit: r346052 - head/sys/dev/usb/net From: Ian Lepore To: John Baldwin , Ganbold Tsagaankhuu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <33d96fdb-0218-6555-6f03-3105649a1904@FreeBSD.org> References: <201904091354.x39Ds9e6070857@repo.freebsd.org> <33d96fdb-0218-6555-6f03-3105649a1904@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 2B64C6EE32 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Status: O X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:07:11 -0000 X-Original-Date: Tue, 09 Apr 2019 10:59:23 -0600 X-List-Received-Date: Tue, 03 Sep 2019 14:07:11 -0000 On Tue, 2019-04-09 at 09:33 -0700, John Baldwin wrote: > On 4/9/19 9:17 AM, Ian Lepore wrote: > > On Tue, 2019-04-09 at 09:11 -0700, John Baldwin wrote: > > > On 4/9/19 6:54 AM, Ganbold Tsagaankhuu wrote: > > > > Author: ganbold > > > > Date: Tue Apr 9 13:54:08 2019 > > > > New Revision: 346052 > > > > URL: https://svnweb.freebsd.org/changeset/base/346052 > > > > > > > > Log: > > > > In some cases like NanoPI R1, its second USB ethernet > > > > RTL8152 (chip version URE_CHIP_VER_4C10) doesn't > > > > have hardwired MAC address, in other words, it is all zeros. > > > > This commit fixes it by setting random MAC address > > > > when MAC address is all zeros. > > > > > > > > Reviewed by: kevlo > > > > Differential Revision: > > > > https://reviews.freebsd.org/D19856 > > > > > > It would be best to not use a purely random mac address and to > > > use > > > the > > > function kevans@ added recently. That function generates a MAC > > > address > > > from the FreeBSD OUI using a cryptographic hash so you get a > > > stable address across boots on a given host. > > > > > > > How could that possibly work? If it's not random, you can't have > > two > > such devices on the same network. If it is random, it's not stable > > from one boot to the next. > > It uses the UUID and interface name as input into the hash. > The UUID is per-host. Oh, so it only works on x86 (or I guess any system that has something like a bios that can provide you with a uuid that doesn't change from one boot to the next). -- Ian > In this particular use case, the first USB device will > have a varying MAC address which is an input into the UUID. Though, > the other option this driver could use for this specific case would > be > to just take the first MAC address and +1 to get the second one. >