From nobody Thu Feb 10 15:48:29 2022 X-Original-To: bugs@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 3D8A519ADAAA for ; Thu, 10 Feb 2022 15:48:29 +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 4Jvh3w70Tpz4SHW for ; Thu, 10 Feb 2022 15:48:28 +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) 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 D09C822EB9 for ; Thu, 10 Feb 2022 15:48:28 +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 21AFmSZw099618 for ; Thu, 10 Feb 2022 15:48:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 21AFmSBM099617 for bugs@FreeBSD.org; Thu, 10 Feb 2022 15:48:28 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: bugs@FreeBSD.org Subject: [Bug 261866] ixgbe(4) with optics not setting media type Date: Thu, 10 Feb 2022 15:48:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: brian90013@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644508109; 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; bh=buBy/25e5CvCUh4jHQBXzbV3rSwj7/TKbIP2aZq3YFs=; b=rsPyfXkcooZ5YgVhRsdr8GGpXPPQ+s1nrdf1+6HmiUWQODZVgETXPEu23uJm+VN21s2yFm gxPIo1H2AtE7UBcmjUwx2bjaREOx2sojMqYdRDCHtQg2L9AXoqJZvcqdC6L1pIqGD+Kn0o o1ajAZVUJMjXEMj7aReFgyngSPGEIqRvYEHC/peEhmcHS/o+8UaoFV+vdJGL6GfRMp7y4P AEG33XvHsBiOZ1E0QtEXNjBAM7ZBwVRBRD6zDzfOzC/8nyi8X+xD4G8WxdaWFksVUUuKPH 1sIhML/Yq/TJVkiQeshSI+HY6RhviXMwN4tvktfmxJTpJ8CuQkUCiAiJP6iAvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644508109; a=rsa-sha256; cv=none; b=gAvxvAIeBMgdxz4LenPt0jJjysHLLFRvlrGHoaKXi2QV/gfKLLzVoYfSW6xYHkauybi4lo Dv8KSe2jrhP3s36Wzuq8iyBrcxLDlxR3KfNQUY9+XFhKi9UhmkuPrswwDLZFZtIL4h7k2o /TZbidw/2tmGVl3dsN5CfbJyy1TZDF8u+5UAL3Pkm2LcL66hqPKTzR/dB366gO/HuIKf8i gW/6GEbmt5AQ1jlTNhU7WQewms54jgMoOghhg6sm3k7NNQdlrqWs40QWcD+C9mc2DU8SfM 2sWoAUSIbeUw3uNYZdQyAiIqb2SLdlLjIZWJaVBppySqyWG5nYIzPhBlGFL/Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261866 Bug ID: 261866 Summary: ixgbe(4) with optics not setting media type Product: Base System Version: 12.3-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: brian90013@gmail.com Hello, I am testing FreeBSD-12.3 using an '82599ES 10-Gigabit SFI/SFP+ Network Connection' with an 10Gbase-LR transceiver. A similar box at a remote locat= ion was unable to establish a 10GbE link and fell back to 1GbE. I wanted to for= ce the 1000baseLX media type to see if that could be established reliably. Aft= er my testing, I believe ixgbe resets the media type to autoselect immediately after setting any other type - making the 'ifconfig ixl0 media 1000baseLX' command useless. I believe it is revision r312544 that causes this behavior= . I am interested if ixgbe can be reworked so that fixed media types can be applied. Thank you! When linked at 10G, the output of 'ifconfig ixl0' includes: media: Ethernet autoselect (10Gbase-LR ) My understanding is the first 'Ethernet autoselect' reflects what is config= ured while the section in parenthesis '10Gbase-LR' is what is negotiated. I can = try to force the negotiated speed but ifconfig still reports 'Ethernet autosele= ct': # ifconfig ixl0 media 10Gbase-LR media: Ethernet autoselect (10Gbase-LR ) Note if I try this on a 1GbE igb driver, the configured media type is displayed: # ifconfig igb0 media 100baseTX media: Ethernet 100baseTX (100baseTX ) Next, I built the kernel using options 'IFMEDIA_DEBUG' and after booting set 'sysctl debug.ifmedia=3D1'. I added additional logging before the two ifmedia_set() calls in the if_ix.c - in ixgbe_setup_interface() and ixgbe_handl_msf(). Testing showed that after setting a new mode, the link g= oes down then comes back up, and the handle_msf() function is called. That func= tion clears and reloads the available media types then sets the interface to aut= o. That cancels out the forced media type. I traced this problem to r312544 where ifmedia_set() was added to avoid an invalid memory access. Is there a way to retain the configured media state = and attempt to use it after reloading the available types? Otherwise, at least = when using optics, it seems like I am unable to set a media type. I see ixl and = ice drivers don't support setting a media type - perhaps it is related to this problem? --=20 You are receiving this mail because: You are the assignee for the bug.=