git: 938c076b9b0b - main - ixgbe: Fix MRQC register value.

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Sun, 12 Apr 2026 04:51:07 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=938c076b9b0bc458a3877b52535527d37199fc09

commit 938c076b9b0bc458a3877b52535527d37199fc09
Author:     Yuichiro NAITO <naito.yuichiro@gmail.com>
AuthorDate: 2026-04-07 15:25:09 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-04-12 04:50:28 +0000

    ixgbe: Fix MRQC register value.
    
    Focus on the MRQE field of the MRQC register, which is 4 bits wide,
    and we use these 3 types of values.
    
      - IXGBE_MRQC_RSSEN 0x1  (non VF mode)
      - IXGBE_MRQC_VMDQRSS32EN 0xA (less than 33 VFs)
      - IXGBE_MRQC_VMDQRSS64EN 0xB (less than 65 VFs)
    
    If we always take a bitwise OR with IXGBE_MRQC_RSSEN,
    IXGBE_MRQC_VMDQRSS32EN will never be chosen.
    Select these 3 types of values for the proper case.
    
    Signed-off-by: Yuichiro NAITO <naito.yuichiro@gmail.com>
    
    MFC after:      1 week
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/2132
---
 sys/dev/ixgbe/if_ix.c       | 4 ++--
 sys/dev/ixgbe/if_sriov.c    | 2 +-
 sys/dev/ixgbe/ixgbe_sriov.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index 9a1ed66ad6a8..829fbba48a72 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -709,7 +709,7 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc)
 		    RSS_HASHTYPE_RSS_TCP_IPV6_EX;
 	}
 
-	mrqc = IXGBE_MRQC_RSSEN;
+	mrqc = ixgbe_get_mrqc(sc->iov_mode);
 	if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4)
 		mrqc |= IXGBE_MRQC_RSS_FIELD_IPV4;
 	if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV4)
@@ -728,7 +728,7 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc)
 		mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6_UDP;
 	if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX)
 		mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP;
-	mrqc |= ixgbe_get_mrqc(sc->iov_mode);
+
 	IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc);
 } /* ixgbe_initialize_rss_mapping */
 
diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c
index 1998cdb016f7..47f1a1279e2f 100644
--- a/sys/dev/ixgbe/if_sriov.c
+++ b/sys/dev/ixgbe/if_sriov.c
@@ -170,7 +170,7 @@ ixgbe_get_mrqc(int iov_mode)
 		mrqc = IXGBE_MRQC_VMDQRSS32EN;
 		break;
 	case IXGBE_NO_VM:
-		mrqc = 0;
+		mrqc = IXGBE_MRQC_RSSEN;
 		break;
 	default:
 		panic("Unexpected SR-IOV mode %d", iov_mode);
diff --git a/sys/dev/ixgbe/ixgbe_sriov.h b/sys/dev/ixgbe/ixgbe_sriov.h
index e5a78a7220cc..3c456ee819f2 100644
--- a/sys/dev/ixgbe/ixgbe_sriov.h
+++ b/sys/dev/ixgbe/ixgbe_sriov.h
@@ -94,7 +94,7 @@ u32  ixgbe_get_mrqc(int);
 #define ixgbe_align_all_queue_indices(_a)
 #define ixgbe_vf_que_index(_a, _b, _c) (_c)
 #define ixgbe_get_mtqc(_a) IXGBE_MTQC_64Q_1PB
-#define ixgbe_get_mrqc(_a) 0
+#define ixgbe_get_mrqc(_a) IXGBE_MRQC_RSSEN
 
 #endif /* PCI_IOV */