Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Feb 2022 15:48:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 261866] ixgbe(4) with optics not setting media type
Message-ID:  <bug-261866-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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 <full-duplex>)
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 <full-duplex>)
Note if I try this on a 1GbE igb driver, the configured media type is
displayed:
# ifconfig igb0 media 100baseTX
       media: Ethernet 100baseTX (100baseTX <half-duplex>)

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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-261866-227>