Index | Thread | Search

From:
Alexander Bluhm <bluhm@openbsd.org>
Subject:
Re: ice(4): print no. of queues
To:
Jan Klemkow <jan@openbsd.org>
Cc:
tech@openbsd.org
Date:
Fri, 3 Oct 2025 00:06:37 +0200

Download raw body.

Thread
On Thu, Oct 02, 2025 at 06:40:46PM +0200, Jan Klemkow wrote:
> Hi,
> 
> The ice(4) driver misses the output of queue as other driver like ix(4)
> or ixl(4) do it.  So, this diff adds the print of queues similar to the
> other drivers.
> 
> ok?

Works for me.

ice0: fw 7.8.2 api 1.7 nvm 4.80 etid 80020543 netlist 4.4.2000-3.27.0.597b7167 oem 1.3805.0 ddp 1.3.41.0, 8 queues, address 6c:fe:54:9b:12:e8
ice1: fw 7.8.2 api 1.7 nvm 4.80 etid 80020543 netlist 4.4.2000-3.27.0.597b7167 oem 1.3805.0 ddp 1.3.41.0, 8 queues, address 6c:fe:54:9b:12:e9

OK bluhm@

> Index: dev/pci/if_ice.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/if_ice.c,v
> diff -u -p -r1.59 if_ice.c
> --- dev/pci/if_ice.c	17 Sep 2025 12:54:19 -0000	1.59
> +++ dev/pci/if_ice.c	2 Oct 2025 16:23:22 -0000
> @@ -17937,9 +17937,10 @@ ice_print_nvm_version(struct ice_softc *
>  
>  	ice_os_pkg_version_str(hw, os_pkg, sizeof(os_pkg));
>  
> -	printf("%s: %s%s%s, address %s\n", sc->sc_dev.dv_xname,
> +	printf("%s: %s%s%s, %u queue%s, address %s\n", sc->sc_dev.dv_xname,
>  	    ice_nvm_version_str(hw, buf, sizeof(buf)),
>  	    os_pkg[0] ? " ddp " : "", os_pkg[0] ? os_pkg : "",
> +	    sc->sc_nqueues, sc->sc_nqueues > 1 ? "s" : "",
>  	    ether_sprintf(hw->port_info->mac.perm_addr));
>  }
>  
> @@ -30480,8 +30481,6 @@ ice_attach_hook(struct device *self)
>  		goto deinit_hw;
>  	}
>  
> -	ice_print_nvm_version(sc);
> -
>  	ice_setup_scctx(sc);
>  	if (ice_is_bit_set(sc->feat_en, ICE_FEATURE_SAFE_MODE))
>  		ice_set_safe_mode_caps(hw);
> @@ -30509,6 +30508,8 @@ ice_attach_hook(struct device *self)
>  	DPRINTF("%s: %d MSIx vector%s available, using %d queue%s\n", __func__,
>  	    sc->sc_nmsix, sc->sc_nmsix > 1 ? "s" : "",
>  	    sc->sc_nqueues, sc->sc_nqueues > 1 ? "s" : "");
> +
> +	ice_print_nvm_version(sc);
>  
>  	/* Initialize the Tx queue manager */
>  	err = ice_resmgr_init(&sc->tx_qmgr, sc->sc_nqueues);