From nobody Wed Mar 2 17:04:21 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 080AA19F434D for ; Wed, 2 Mar 2022 17:04:43 +0000 (UTC) (envelope-from fbsd@opal.com) Received: from mail.opal.com (tunnel103479-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:113d::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.opal.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K80pf15bJz4Tdl; Wed, 2 Mar 2022 17:04:42 +0000 (UTC) (envelope-from fbsd@opal.com) Received: from localhost (vpn-2.opal.com [IPv6:2001:470:8cb8:4:0:0:0:2]) (authenticated bits=0) by mail.opal.com (8.16.1/8.16.1) with ESMTPSA id 222H4QJ3038399 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 2 Mar 2022 12:04:27 -0500 (EST) (envelope-from fbsd@opal.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=opal.com; s=mail; t=1646240667; bh=VMsNvyGt1RHuC25XwQLc+D8BQnaGcQPpbUwqexAitic=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=uHzH/NYNpsO/tJTVy0LvE69zPd8C+kxw9bpqVTIOliXPSe2qXDk956zY65Qu4Lxo+ bfnkmvYVE5lsMuSLDnclykVe8WpLB7tzLr/fhc5ntPP63V8ilwFY+e9M84WCfWp4EY g+iWl1d5kNb1MPi9qEI/RhgMhEe2Dqy+njq5zdMo= Date: Wed, 2 Mar 2022 12:04:21 -0500 From: "J.R. Oldroyd" To: Lutz Donnerhacke Cc: tuexen@freebsd.org, freebsd-net@freebsd.org Subject: Re: em(4) does not autonegotiate when fixed media is set Message-ID: <20220302120421.3c4d24e1@opal.com> In-Reply-To: <20220302162122.GA23140@belenus.iks-jena.de> References: <20220302103331.3a50e443@opal.com> <20220302162122.GA23140@belenus.iks-jena.de> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/bRS9Yx+eLYPrvnCw/JE=mYy"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.opal.com [IPv6:2001:470:8cb8:2:0:0:0:1]); Wed, 02 Mar 2022 12:04:27 -0500 (EST) X-Rspamd-Queue-Id: 4K80pf15bJz4Tdl X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=opal.com header.s=mail header.b="uHzH/NYN"; dmarc=none; spf=pass (mx1.freebsd.org: domain of fbsd@opal.com designates 2001:470:1f06:113d::2 as permitted sender) smtp.mailfrom=fbsd@opal.com X-Spamd-Result: default: False [-5.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[opal.com:s=mail]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[opal.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[opal.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-net]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --Sig_/bRS9Yx+eLYPrvnCw/JE=mYy Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 2 Mar 2022 17:21:22 +0100 Lutz Donnerhacke wr= ote: > > On Wed, Mar 02, 2022 at 04:40:38PM +0100, tuexen@freebsd.org wrote: > > Is that what is expected? When using the above command I would expect > > that 100MBit/sec is used, not that the card negotiates with the peer > > something else. But my expectations might be wrong... =20 >=20 > Negotation of a given subset is useful. Some devices do not work without > negotiation enabled, others refuse to work in this case. Standard requires > autonegotiation for 1000TX, recommends it for lower speeds (otherwise ass= ume > half duplex). For 1000FX the situation is unclear, depends on the year the > device was manufactured ... Today autoneg is expected on all interfaces e= ven > with a limited subset of capabilies. >=20 The patch enables autonegotiation for just the configured setting, not full autonegotiation. The intent is to let the other end know that we only have the one configured setting. At present, the other end appears to be syncing to the 100baseTX speed but it does indeed appear to be choosing half-duplex, so the link does not work when the FreeBSD end has been configured for full-duplex. The only thing I am not sure about is whether or not the wait_to_complete parameter should be cleared in this case. I suspect it should be. There is the case that the other end may not attempt any autonegotiation dialog either, and we do not want to hang waiting for it. I am not able to test this situation, though. -jr --Sig_/bRS9Yx+eLYPrvnCw/JE=mYy Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQRDpBgkWdwkfOVaGdSWzfe6uvSTiQUCYh+jlQAKCRCWzfe6uvST iVvPAJ0djND82n6DVmSD5TO3r4NW5CN/MACgrbZNAGxVHtc877fdaOwmvJnU7bU= =le/q -----END PGP SIGNATURE----- --Sig_/bRS9Yx+eLYPrvnCw/JE=mYy--