From nobody Sat Mar 2 21:14:02 2024 X-Original-To: virtualization@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 4TnHkz5r36z5CySw for ; Sat, 2 Mar 2024 21:14:03 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TnHkz2MHXz4dk1 for ; Sat, 2 Mar 2024 21:14:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709414043; a=rsa-sha256; cv=none; b=vH8/U3wxgqPim5gGYtFpNiazmjdjC7FU2Udi/uy6+z9FD1xDxXC2arFnEMrrSNApwST7MM f8bpoE/81xHKG81OkskXezv/cmAiNiM7RGcJ9ELtqGuIfKFAaTbXQj3vppenTuAentV3hm qVi/fqIdipoiOlGYO7x6lJHcy1Y6PHShFc79LwKuYhmr02D2i41zQosPJwlKwohsKdYzLh KzZgTble4ajaMK/m+HF+iVpd9fmju65GT3Bpu8bxPYzQA8bffj3SlxRouQ6jqIQZyhKfst U6brb5amr0ZzWFbkvMwYLxjVclEtYCAGOw0Ofcr+676LlZ81gXH0G+edlCTbSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709414043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=boWRFNewnZIodQt8vdHZwmtiSru5/W4Fe+LDYmAaqtM=; b=a5vUIX+ELx3+lbxjEcfBRUr26c+ltZfkboE+Pjp5EOrKKlsPB2nbMtbcOSV1W3I5NaQgeO EzwXOMXVqZgJkEHqkTiWkXKuoayKt3B5HuujZ6aDtThJ0KE7UeL2Et7b4bdQIVUn1arn9r UNIfEOKDZhHV7qRbVhnlzfIEl4G99eVDosRPI3DhIjy4pTlTnHk58u1ZBnpmMbWydZnAtd mRXVPOtFbunocs4IEf7T2/SJhS0Cuof40YBz1lgnBEn3KdnUMUa3DylnDG5sVJ2/qkVvjf Jy3lPrL7XfF8W+M4otNQg+57UQVuUz2SfP2B7ZZxgTTm46TKz/oKJGYKLSWZKg== 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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TnHkz1sbRz1PQ3 for ; Sat, 2 Mar 2024 21:14:03 +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 422LE3U6077260 for ; Sat, 2 Mar 2024 21:14:03 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 422LE39E077253 for virtualization@FreeBSD.org; Sat, 2 Mar 2024 21:14:03 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: virtualization@FreeBSD.org Subject: [Bug 264253] hyperv: ifconfig media autoselect on FreeBSD 13.0 displays error: ifconfig: SIOCSIFMEDIA (media): Operation not supported Date: Sat, 02 Mar 2024 21:14:02 +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: 13.1-RELEASE X-Bugzilla-Keywords: needs-qa, regression X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: mp@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? mfc-stable13? 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 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264253 Mark Peek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mp@FreeBSD.org --- Comment #6 from Mark Peek --- I see the same error across 10.4, 13.0, and 15-current 10.4 =3D=3D=3D=3D # uname -a FreeBSD fbsd10 10.4-RELEASE FreeBSD 10.4-RELEASE #0 r324094: Fri Sep 29 01:45:44 UTC 2017 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GEN= ERIC amd64 # ifconfig -mv hn0 hn0: flags=3D8843 metric 0 mtu 1500 options=3D8051b =20=20=20=20=20=20=20 capabilities=3D48071b ether 00:15:5d:0a:28:00 hwaddr 00:15:5d:0a:28:00 inet6 fe80::215:5dff:fe0a:2800%hn0 prefixlen 64 scopeid 0x2 inet6 2601:601:4000:c4de:215:5dff:fe0a:2800 prefixlen 64 autoconf inet6 fd50:d9bc:e952:6040:215:5dff:fe0a:2800 prefixlen 64 detached autoconf inet 10.1.10.215 netmask 0xffffff00 broadcast 10.1.10.255 nd6 options=3D23 media: Ethernet autoselect (10Gbase-T ) status: active supported media: media autoselect # ifconfig hn0 media autoselect ifconfig: SIOCSIFMEDIA (media): Operation not supported 13.0 =3D=3D=3D=3D # uname -a FreeBSD bsd13 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr 9 04:24:09 UTC 2021=20=20=20=20 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 # ifconfig -mv hn0 hn0: flags=3D8843 metric 0 mtu 1500 options=3D8051b =20=20=20=20=20=20=20 capabilities=3D48071b ether 00:15:5d:0a:28:01 inet 10.1.10.139 netmask 0xffffff00 broadcast 10.1.10.255 media: Ethernet autoselect (10Gbase-T ) status: active supported media: media autoselect nd6 options=3D29 # ifconfig hn0 media autoselect ifconfig: SIOCSIFMEDIA (media): Operation not supported 15-current =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # uname -a FreeBSD FreeBSD-current 15.0-CURRENT FreeBSD 15.0-CURRENT #0 main-n268454-9097284b98be: Thu Feb 22 03:00:34 UTC 2024=20=20=20=20 root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 # ifconfig -mv hn0 hn0: flags=3D1008843 metri= c 0 mtu 1500 options=3D8051b =20=20=20=20=20=20=20 capabilities=3D48071b ether 00:15:5d:0a:28:02 inet 10.1.10.125 netmask 0xffffff00 broadcast 10.1.10.255 inet6 fe80::215:5dff:fe0a:2802%hn0 prefixlen 64 scopeid 0x2 inet6 2601:601:4000:c4de:215:5dff:fe0a:2802 prefixlen 64 autoconf pltime 14400 vltime 86400 inet6 fd50:d9bc:e952:6040:215:5dff:fe0a:2802 prefixlen 64 detached autoconf pltime 1800 vltime 1800 media: Ethernet autoselect (10Gbase-T ) status: active supported media: media autoselect nd6 options=3D23 drivername: hn0 # ifconfig hn0 media autoselect ifconfig: SIOCSIFMEDIA (media): Operation not supported This is not surprising since the hn_ifmedia_upd() callback is the same and returns EOPNOTSUPP. The code for 10.4 is here: https://github.com/freebsd/freebsd-src/blob/releng/10.4/sys/dev/hyperv/netv= sc/if_hn.c#L1008 Since the only media supported is autoselect, it seems reasonable to just return 0 from hn_ifmedia_upd() instead of EOPNOTSUPP. Patched on 15-current, this results in no error for "autoselect" and will error for unregistered m= edia types. # ifconfig hn0 media autoselect # ifconfig hn0 media 100baseT ifconfig: SIOCSIFMEDIA (media): Device not configured An early review D4611 did have hn_ifmedia_upd() return 0 but was abandoned.= A subsequent review D4852 has this function returning EOPNOTSUPP. Allowing selection of the current (and only) registered media type seems reasonable rather than throwing an error. I'm going to try contacting a cou= ple of the contributors to the reviews to see if they agree. --=20 You are receiving this mail because: You are the assignee for the bug.=