git: 61d83041ab11 - main - ice(4): Fix build error when ALTQ is enabled

From: Eric Joyner <erj_at_FreeBSD.org>
Date: Fri, 04 Mar 2022 22:14:18 UTC
The branch main has been updated by erj:

URL: https://cgit.FreeBSD.org/src/commit/?id=61d83041ab111fe491409f2eca2b528108b9ec29

commit 61d83041ab111fe491409f2eca2b528108b9ec29
Author:     Eric Joyner <erj@FreeBSD.org>
AuthorDate: 2022-03-04 22:11:14 +0000
Commit:     Eric Joyner <erj@FreeBSD.org>
CommitDate: 2022-03-04 22:11:14 +0000

    ice(4): Fix build error when ALTQ is enabled
    
    The previous commit (56429daea2) that updated the driver included a
    bug where a variable was undefined when ALTQ was enabled; this fixes
    that issue to declare the missing variable. This wasn't caught before
    because we don't use ALTQ, and so it fell on the Jenkins CI's LINT
    builds to catch it.
    
    Signed-off-by: Eric Joyner <erj@FreeBSD.org>
    
    Reported by:    Jenkins CI
    MFC after:      3 days
    MFC with:       56429daea2
    Sponsored by:   Intel Corporation
---
 sys/dev/ice/ice_iflib_txrx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/dev/ice/ice_iflib_txrx.c b/sys/dev/ice/ice_iflib_txrx.c
index 7b5c2a9733fc..52c4364a2430 100644
--- a/sys/dev/ice/ice_iflib_txrx.c
+++ b/sys/dev/ice/ice_iflib_txrx.c
@@ -415,9 +415,13 @@ ice_ift_queue_select(void *arg, struct mbuf *m)
 	u16 tc_base_queue, tc_qcount;
 	u8 up, tc;
 
+#ifdef ALTQ
+	/* Included to match default iflib behavior */
 	/* Only go out on default queue if ALTQ is enabled */
+	struct ifnet *ifp = (struct ifnet *)iflib_get_ifp(sc->ctx);
 	if (ALTQ_IS_ENABLED(&ifp->if_snd))
 		return (0);
+#endif
 
 	if (!ice_test_state(&sc->state, ICE_STATE_MULTIPLE_TCS)) {
 		if (M_HASHTYPE_GET(m)) {