Adding Speed Parameters to X550 Config

Started by spetrillo, September 16, 2025, 09:18:30 PM

Previous topic - Next topic
Quote from: pfry on September 17, 2025, 04:58:01 PMNice. Nitpick: I'd probably reset bit 1 (10BASE-T) on ix, as some of Intel's docs suggest that it's not supported. Of course, you could always try it. I don't know if anyone would need/want to set bit 2 (100BASE-TX half-duplex), but it's there.
I posted the Intel doc a few posts back. It only runs 4 speeds. My guess is the nvm image is the final say so. If the ix supports a setting for 10 or 100, my guess is the nvm laughs at the request. NBASE-T is suppose to be 802.3bz compliant, but I don't see it called out anywhere in Intel docs.

I would craft the tunable number to support these 4 speeds.
Quote5 Gb/s (NBASE-T mode)
• 2.5 Gb/s (NBASE-T mode)
• 1 Gb/s (1000BASE-T mode)
• 100 Mb/s (100BASE-TX mode)
Mini-pc N150 i226-V, GOD BLESS CHARLIE KIRK

September 17, 2025, 10:53:03 PM #16 Last Edit: September 17, 2025, 11:14:43 PM by BrandyWine
Quote from: meyergru on September 17, 2025, 10:26:23 AMBTW: The FreeBSD Intel ix driver has a section in it that reads:

Quoteif (hw->mac.type == ixgbe_mac_X550 &&
            hw->phy.autoneg_advertised == 0) {
            /*
            * 2.5G and 5G autonegotiation speeds on X550
            * are disabled by default due to reported
            * interoperability issues with some switches.
            *
            * The second condition checks if any operations
            * involving setting autonegotiation speeds have
            * been performed prior to this ixgbe_config_link()
            * call.
            *
            * If hw->phy.autoneg_advertised does not
            * equal 0, this means that the user might have
            * set autonegotiation speeds via the sysctl
            * before bringing the interface up. In this
            * case, we should not disable 2.5G and 5G
            * since that speeds might be selected by the
            * user.
            *
            * Otherwise (i.e. if hw->phy.autoneg_advertised
            * is set to 0), it is the first time we set
            * autonegotiation preferences and the default
            * set of speeds should exclude 2.5G and 5G.
            */
            autoneg &= ~(IXGBE_LINK_SPEED_2_5GB_FULL |
                IXGBE_LINK_SPEED_5GB_FULL);
        }


Thus, I assume that "hw.ix.advertise_speed = 0x0CAA" or "hw.ix.advertise_speed = 3242" might do the trick, but I haven't tried.

You always bring up info that makes me wonder if coders are good or not.
If the tunable for phy.autoneg_advertised = 0, then why would coders think they should choose an arbitrary set of speeds to include or exclude? Makes no sense. If it's set to 0 then why would autonegotiate even happen? Would make more sense to just set a number (the default) that equals the math used to define what speeds should be advertised. And then we must ask, why disable speeds (by default) for the reason of "some switches were having an issue negotiating", just leave all the speeds active and when that rare switch has an issue there's a ReleaseNotes doc that explains how to set the tunable to exclude one or more speeds. And better yet, if they know autoneg for 2.5 a 5 are having issues, then why not actually fix that issue instead of band-aid that disables speeds most people want to use.


I guess from coding view they use "ixgbe", but the driver for freeBSD is "ix". Linux uses "ixbge"

But check this out. Looks like there's a driver issue where although it negotiated correctly, it did not report the actual speed. A fix as of Sep 12 2025. So the freeBSD might be lying about actual speed. Probably not related to actual speed if the switch port also says it's only 1G.
https://cgit.freebsd.org/src/commit/?h=stable/14&id=7dc494e6377451469763a8a687032dee2b8324b2
Quoteixgbe: Fix incomplete speed coverage in link status logging
Originally ixgbe_if_update_admin_status() only handled 1G and 10G speeds,
causing any other speeds to display as "1 Gbps" in link status logs.
Mini-pc N150 i226-V, GOD BLESS CHARLIE KIRK

September 17, 2025, 11:53:27 PM #17 Last Edit: September 17, 2025, 11:58:27 PM by meyergru
I guess at the time of writing that code, Intel assumed that this is a server adapter and that the intermediate NBASE-T speeds would not be needed - they were newly introduced, the X540-T did not have them at all. Furthermore, the first switch implementations came before the finalization of the standard, so they feared problems. I find the lack of documentation way worse that the fact itself.

That adapter is kinda strange, anyways. Under Windows, you can only set speeds explicitely, not limit it. 10 Gbe sometimes is a problem with long cabling and also uses a boatload of power. 5 Gbps mostly works, but you have to disable autonegotiation to use it.

Sigh, drivers.... Today, I had to switch back to the NDIS drivers for my Realtek 8126 NIC under Windows 11 from the more modern NetAdapterCx variant, after I found out that the latter receives only 1.4 Gbps at most (sending was fine). The NDIS drivers can handle the full 5/5 Gbps.
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

Quote from: meyergru on September 17, 2025, 07:51:18 PM@spetrillo: What makes you believe that 23 is the correct value? Do you have any reliable source for that assumption?

It is neither for the Netgate version according to their docs nor is it according to the source code of the ix driver in FreeBSD, which should be the one you use in OpnSense. The value 0x0CAA (or 3242 decimal) will enable autonegotiation for all speeds, 23 is most probably incorrect, IMHO.


I found this in another post on the X550. Here is the post link: https://forum.opnsense.org/index.php?topic=43906.msg218886#quickreply_anchor

Quote from: AhnHEL on December 10, 2024, 02:48:32 AMSee if this helps you.

Quotesysctl dev.ix.X.advertise_speed=N

Where X is the interface number (e.g. for ix0, X=0 in the command above) and N is the sum of the advertised speeds, works.

In hex and decimal:

Control advertised link speed using these flags:
    0x1 - 1 - advertise 100M
    0x2 - 2 - advertise 1G
    0x4 - 4 - advertise 10G
    0x8 - 8 - advertise 10M

    0x10 - 16 - advertise 2.5G
    0x20 - 32 - advertise 5G

    100M and 10M are only supported on certain adapters.

To add advertisement of 2.5G and 5G on ix0:

sysctl dev.ix.0.advertise_speed=55

Since 7 + 16 + 32 = 55.



One thing I did not do on the card was to update the NVM. I updated the card's firmware but not the NVM. I am going to do this now.

Today at 12:27:13 AM #20 Last Edit: Today at 12:29:35 AM by meyergru
That info was:

1. Straight from the pfSense thread: https://forum.netgate.com/topic/146913/nbase-t-support-for-intel-x550/72
2. Not confirmed working in the thread you linked to for OpnSense.

The reason is - as I already told, that those values are not the ones in FreeBSD sources and that pfSense uses their own driver with different values, so: Did you try my proposed value?
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

I have not tried your proposed value...what I did was follow what Patrick Hausen propsed and it sorta worked. I entered the following in /System/Settings/Tunables section: dev.ix.0.advertise_speed and dev.ix.1.advertise_speed with a value of 23. Both ports now show 23 as their setting. Port 0 shows a speed of 2500M but port 1 shows a speed of 100M.

One step forward...sort of!


Well this is weird...but I think I know what has happened.

I went back into the Tunables section and just applied the changes one more time. I then rebooted. Now both ports are registering at 2500M. I would be careful when adding multiple additions in the Tunables. I would do one at a time, apply, and then reboot. Ensure the first change is working. Then rince and repeat with each change.

dev.ix.0.advertise_speed
dev.ix.1.advertise_speed
value is 23 for 2500M

I have an X550 in my firewall and I select the speed via the GUI. See attachment, connects at 2500 to cable modem. Provisioned for 1.2GbE, see speeds at high at 1.55Gb download speeds. I updated the NVM with the latest from Dec, 2024 and use the OPNsense ix driver without issue.

Z00m

Today at 01:10:10 AM #24 Last Edit: Today at 01:15:24 AM by BrandyWine
Here's your numbers, add them up, insert into tunable, reboot as needed.
2+16+32 = 50
Quote#define IXGBE_SYSCTL_DESC_ADV_SPEED   \
    "\nControl advertised link speed using these flags:\n" \
    "\t0x1 - advertise 100M\n" \
    "\t0x2 - advertise 1G\n" \
    "\t0x4 - advertise 10G\n" \
    "\t0x8 - advertise 10M\n\n" \
    "\t0x10  - advertise 2.5G\n" \
    "\t0x20  - advertise 5G\n\n" \
    "\t100M and 10M are only supported on certain adapters.\n"

Reference:    if_ix.c    and    ixgbe.h
https://cgit.freebsd.org/src/tree/sys/dev/ixgbe?h=stable/14&id=7dc494e6377451469763a8a687032dee2b8324b2
Mini-pc N150 i226-V, GOD BLESS CHARLIE KIRK

Quote from: zz00mm on Today at 12:54:42 AMI have an X550
I think OP has x550T2.

Interesting, in the ixgbe h file I don't find a device ID for x550T2. So a little more sleuth work to be done.

https://cgit.freebsd.org/src/tree/sys/dev/ixgbe/ixgbe_type.h
Mini-pc N150 i226-V, GOD BLESS CHARLIE KIRK

I have an X550 with two RJ-45 ports. I hope that clears things up.

Quote from: BrandyWine on September 17, 2025, 10:53:03 PM
Quote from: meyergru on September 17, 2025, 10:26:23 AMBTW: The FreeBSD Intel ix driver has a section in it that reads:

Quoteif (hw->mac.type == ixgbe_mac_X550 &&
            hw->phy.autoneg_advertised == 0) {
            /*
            * 2.5G and 5G autonegotiation speeds on X550
            * are disabled by default due to reported
            * interoperability issues with some switches.
            *
            * The second condition checks if any operations
            * involving setting autonegotiation speeds have
            * been performed prior to this ixgbe_config_link()
            * call.
            *
            * If hw->phy.autoneg_advertised does not
            * equal 0, this means that the user might have
            * set autonegotiation speeds via the sysctl
            * before bringing the interface up. In this
            * case, we should not disable 2.5G and 5G
            * since that speeds might be selected by the
            * user.
            *
            * Otherwise (i.e. if hw->phy.autoneg_advertised
            * is set to 0), it is the first time we set
            * autonegotiation preferences and the default
            * set of speeds should exclude 2.5G and 5G.
            */
            autoneg &= ~(IXGBE_LINK_SPEED_2_5GB_FULL |
                IXGBE_LINK_SPEED_5GB_FULL);
        }


Thus, I assume that "hw.ix.advertise_speed = 0x0CAA" or "hw.ix.advertise_speed = 3242" might do the trick, but I haven't tried.

You always bring up info that makes me wonder if coders are good or not.
If the tunable for phy.autoneg_advertised = 0, then why would coders think they should choose an arbitrary set of speeds to include or exclude? Makes no sense. If it's set to 0 then why would autonegotiate even happen? Would make more sense to just set a number (the default) that equals the math used to define what speeds should be advertised. And then we must ask, why disable speeds (by default) for the reason of "some switches were having an issue negotiating", just leave all the speeds active and when that rare switch has an issue there's a ReleaseNotes doc that explains how to set the tunable to exclude one or more speeds. And better yet, if they know autoneg for 2.5 a 5 are having issues, then why not actually fix that issue instead of band-aid that disables speeds most people want to use.


I guess from coding view they use "ixgbe", but the driver for freeBSD is "ix". Linux uses "ixbge"

But check this out. Looks like there's a driver issue where although it negotiated correctly, it did not report the actual speed. A fix as of Sep 12 2025. So the freeBSD might be lying about actual speed. Probably not related to actual speed if the switch port also says it's only 1G.
https://cgit.freebsd.org/src/commit/?h=stable/14&id=7dc494e6377451469763a8a687032dee2b8324b2
Quoteixgbe: Fix incomplete speed coverage in link status logging
Originally ixgbe_if_update_admin_status() only handled 1G and 10G speeds,
causing any other speeds to display as "1 Gbps" in link status logs.


This might make sense. What I am seeing now is that the switch is reporting the second port is running at 100M but the firewall is telling me the dev.ix.1.advertise_speed=23, which should mean it should do 2500M.