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
This commit is contained in:
Eric Joyner 2022-03-04 14:11:14 -08:00
parent f7d6e97e4b
commit 61d83041ab
No known key found for this signature in database
GPG Key ID: 96F0C6FD61E05DE3

View File

@ -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)) {