Bug 208022 - ixgbe - unexpected "ix0: Invalid advertised speed; valid modes are 0x1 through 0x7" at boot time
Summary: ixgbe - unexpected "ix0: Invalid advertised speed; valid modes are 0x1 throug...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.3-BETA2
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-15 12:28 UTC by Terry Kennedy
Modified: 2016-03-16 02:59 UTC (History)
3 users (show)

See Also:


Attachments
Example console messages and sysctl values (730 bytes, text/plain)
2016-03-15 12:28 UTC, Terry Kennedy
no flags Details
loader.conf (215 bytes, text/plain)
2016-03-15 23:01 UTC, Terry Kennedy
no flags Details
Patch to prevent bogus advertised speed warning on boot (823 bytes, patch)
2016-03-16 00:09 UTC, Steven Hartland
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Kennedy 2016-03-15 12:28:02 UTC
Created attachment 168236 [details]
Example console messages and sysctl values

Somewhere along the line, the ixgbe driver started printing an unexpected "ix0: Invalid advertised speed; valid modes are 0x1 through 0x7" at boot time as shown in the attachment. The hardware is a retail Intel X540-T1 card at the latest firmware revision. The two (why two?) sysctls in the attachment are at their default value. The 2.8.3 driver in earlier 10.3 builds didn't do this, so it is probably due to something in the 3.1.13-k import.

The message seems harmless, but should probably be fixed. Note that simply changing the default value of one / both sysctls may not have the desired effect - a quick look in the driver source shows a bunch of potential error messages when trying to select the advertised speed on (for example) fiber ports.
Comment 1 Steven Hartland freebsd_committer 2016-03-15 21:49:53 UTC
The two sysctls are the global default and the interface specific ones so thats fine.

The error should only be displayed when changing the setting via a sysctl, so if this happens on boot it seems to infer you have an invalid setting in either /boot/loader.conf or /etc/sysctl.conf for this setting.
Comment 2 Terry Kennedy 2016-03-15 23:01:11 UTC
Created attachment 168271 [details]
loader.conf

As you say, 0 is the default value and that's what my sysctls are set at. I don't change them in either loader.conf or sysctl.conf (and sysctl.conf should not matter anyway as this error is happening at probe time while the kernel is starting up). I am attaching my entire loader.conf.
Comment 3 Terry Kennedy 2016-03-15 23:02:59 UTC
Correction - I see you did not say that 0 is the default value for those sysctls.

Mine are 0 and I didn't change them, so it would seem that 0 is the default regardless.
Comment 4 Terry Kennedy 2016-03-15 23:25:32 UTC
Taking a quick look through the code, it seems that ixgbe_set_advertise() is called from 2 places in if_ix.c:

1) ixgbe_sysctl_advertise(), which has a check to see if the value changed and omits the call if it hasn't. So this probably isn't the problem.

2) ixgbe_attach() calls ixgbe_set_advertise() with ixgbe_advertise_speed which is 0 on a system where the default hasn't changed. This unconditionally enters ixgbe_set_advertise() which would seem to trigger the error message.
Comment 5 Steven Hartland freebsd_committer 2016-03-16 00:09:16 UTC
Created attachment 168276 [details]
Patch to prevent bogus advertised speed warning on boot

Sorry my mistake I was looking at ixl not ixgbe, confusing naming ;-)

I can see the issue now, it can be safely ignored but can you try the attached patch to see if it fixes it for you?
Comment 6 Terry Kennedy 2016-03-16 00:39:22 UTC
Yes, that fixes it. Thanks!
Comment 7 commit-hook freebsd_committer 2016-03-16 01:42:04 UTC
A commit references this bug:

Author: smh
Date: Wed Mar 16 01:41:55 UTC 2016
New revision: 296922
URL: https://svnweb.freebsd.org/changeset/base/296922

Log:
  Prevent invalid ixgbe advertise setting warning

  Prevent ixgbe outputting "Invalid advertised speed" warning on boot with
  no customisations by moving test from sysctl handler to set handler.

  PR:		208022
  MFC after:	3 days
  Sponsored by:	Multiplay

Changes:
  head/sys/dev/ixgbe/if_ix.c