From nobody Sun Aug 16 01:33:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hMz4s2YC7z6pB3k for ; Sun, 16 Aug 2026 01:33:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hMz4s1kkrz3X4C for ; Sun, 16 Aug 2026 01:33:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786844013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxzgNGKSUjPHOaSoHFk/xJW1IJXsIFmD4Fv/a2gnsZg=; b=PJ9MRFl1w2fo8BIF7jcvgAkbTqfnVxwKARWR1RzoViAz3VhftiLrl1p+1RmkcW96nIvc62 JmtK57YFUnuK0K5npXi4osiDjhUulLQiH5kjdT72+yLH+CItudYwzr40gXXeKDxl1CkSVL Ns/uGL8hnOoylJ7Tv1dGWj+JfFDHgJQcMtYH8B0h1+6fFYUiDNkaf+OV677R6s7yJRPAng ovsgfSq2G6JvGUne01l0gmWDLTc6OenRtPhDjcwiEtn+v9mY8cpHjQ8Ez7Sa2L4pGXfj6f ZlnVPOxIc4+K+hgYDNN46qv5i5hpkgf8VPy37fuF1GZUM24m79FNAlHzXFjKhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786844013; a=rsa-sha256; cv=none; b=Lpi8x0+ZY62r0nujTQlype3MQMKmKD+yaHcYCnRFS4uLvRx+KrQOiWAB1k/c2Y9UJnOu4I UsSG8XT1wY2Gb5quu5zSVfNLdh/XVzMQDA+kPQptZj//VNfWeuStguAFLrZws3+ZukJf5Y 2ePAcY8eVWsYnfQR/kk/6SVtD2/HX/+9Ien9syCt6NfbupylcEke6yQWACt9lOntBKV+ew bTlFrLbE5fymh5q5c/fIegKsW6DSjFVoEQ45B9nZef2LAoVPQIlSSzDglIkpWqdzO8uRCx Lk92jx3fqJZYrQA+/49rwzBTdYHPex0P1TKjOyWCZtlGZ1kUn5AI8vILb6bHNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786844013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxzgNGKSUjPHOaSoHFk/xJW1IJXsIFmD4Fv/a2gnsZg=; b=cz/RRoLeS0/giHDpa9YZlDEHcJsuWHlk7oxfq2a3PmnZPUqAsFZGEugCP+tIGablwsujy7 HOKKaaBmgiXbpDpWewNoJ0LUTW1xDY8zyWhqSp0PMUN7pbHiSZtAi8DtylCkB4/MTSPFCG wuaOBNw2ScJ2k8AfYdly+N15PzTwgZ2wDr0iXqMkRNT27kXx3ogEgwO6iMCyZvy5wgBJmC 4JCnPi6XHD6pTnkvPPhqgS8CItUBShj0S/sfzTqgy7ByhE+615lpC4OPALHm6jwjVHIeyZ ls5JImb6/u83UadOjvGf0XvIU9alBVu1GG1o3uVdUn1xMnCFchmLgwcfov5wBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hMz4s0W3kz161c for ; Sun, 16 Aug 2026 01:33:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b770 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 16 Aug 2026 01:33:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 87406f835166 - main - ixgbe: Enable per-pool RSS on X550 family devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87406f8351664aa444851499cda83b00fdc07662 Auto-Submitted: auto-generated Date: Sun, 16 Aug 2026 01:33:33 +0000 Message-Id: <6a81136d.3b770.14d5bc9f@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=87406f8351664aa444851499cda83b00fdc07662 commit 87406f8351664aa444851499cda83b00fdc07662 Author: Kevin Bowling AuthorDate: 2026-08-10 15:55:41 +0000 Commit: Kevin Bowling CommitDate: 2026-08-16 01:31:37 +0000 ixgbe: Enable per-pool RSS on X550 family devices X550 family devices provide a separate RSS key, redirection table, and MRQC register for every VMDq pool. With SR-IOV enabled, the driver continued programming only the global RSS state and never selected MRQC.MULTIPLE_RSS. VF-local RSS programming was therefore ineffective. Enable multiple-RSS mode for X550, X552, X553, and E610. Initialize the PF pool's 64-entry key, redirection table, and RSS hash controls. Leave each VF pool untouched so its driver retains ownership of its RSS key and mapping. E610 folds IPv6 extension-header traffic into its base RSS selectors and reserves the legacy EX selector bits. Translate those requested hash types rather than programming reserved bits. With two E610 VFs active and four PF queue sets, eight fixed TCP flows distributed across all four PF receive queues. E610 uses the same per-pool mode according to the E610 Datasheet, sections 7.1.3.6.2 and 8.2.2.8.20-21. MFC after: 2 weeks Sponsored by: Dirk-Willem van Gulik from Web Weaving (E610 hardware) Sponsored by: BBOX.io --- sys/dev/ixgbe/if_ix.c | 89 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 69 insertions(+), 20 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index f581de8d7abc..25e7e9bdf913 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -662,10 +662,13 @@ static void ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) { struct ixgbe_hw *hw = &sc->hw; - u32 reta = 0, mrqc, rss_key[10]; - int queue_id, reta_queues, table_size, index_mult; - int i, j; + bool per_pool_rss; + u32 reta = 0, mrqc, rss_fields, rss_key[10]; + int i, index_mult, j, queue_id, reta_queues, table_size; u32 rss_hash_config; +#ifdef PCI_IOV + u32 pfmrqc; +#endif if (sc->feat_en & IXGBE_FEATURE_RSS) { /* Fetch the configured RSS key */ @@ -677,6 +680,7 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) /* Set multiplier for RETA setup and table size based on MAC */ index_mult = 0x1; + per_pool_rss = false; table_size = 128; switch (sc->hw.mac.type) { case ixgbe_mac_82598EB: @@ -687,6 +691,12 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) case ixgbe_mac_X550EM_a: case ixgbe_mac_E610: table_size = 512; +#ifdef PCI_IOV + if (sc->iov_mode != IXGBE_NO_VM) { + per_pool_rss = true; + table_size = 64; + } +#endif break; default: break; @@ -694,13 +704,16 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) /* * The global RETA is shared by the PF and VFs on 82599 and X540. - * Program all four queue indices while SR-IOV is active so a VF can - * use its full queue grant even when the PF uses fewer queues. - * PSRTYPE.RQPL limits the subset selected within each pool. + * X550-family devices instead use per-pool tables in multiple-RSS + * mode; initialize only the PF pool here because each VF owns and + * programs its own key and redirection table. + * On the shared tables, program all four queue indices while SR-IOV + * is active so a VF can use its full queue grant even when the PF uses + * fewer queues. PSRTYPE.RQPL limits the subset selected in each pool. */ reta_queues = sc->num_rx_queues; #ifdef PCI_IOV - if (sc->iov_mode != IXGBE_NO_VM) + if (sc->iov_mode != IXGBE_NO_VM && !per_pool_rss) reta_queues = MAX(reta_queues, 4); #endif @@ -727,7 +740,12 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) reta = reta >> 8; reta = reta | (((uint32_t)queue_id) << 24); if ((i & 3) == 3) { - if (i < 128) + if (per_pool_rss) { +#ifdef PCI_IOV + IXGBE_WRITE_REG(hw, + IXGBE_PFVFRETA(i >> 2, sc->pool), reta); +#endif + } else if (i < 128) IXGBE_WRITE_REG(hw, IXGBE_RETA(i >> 2), reta); else IXGBE_WRITE_REG(hw, @@ -737,8 +755,15 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) } /* Now fill our hash function seeds */ - for (i = 0; i < 10; i++) - IXGBE_WRITE_REG(hw, IXGBE_RSSRK(i), rss_key[i]); + for (i = 0; i < 10; i++) { + if (per_pool_rss) { +#ifdef PCI_IOV + IXGBE_WRITE_REG(hw, IXGBE_PFVFRSSRK(i, sc->pool), + rss_key[i]); +#endif + } else + IXGBE_WRITE_REG(hw, IXGBE_RSSRK(i), rss_key[i]); + } /* Perform hash on these packet types */ if (sc->feat_en & IXGBE_FEATURE_RSS) @@ -758,26 +783,50 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) } mrqc = ixgbe_get_mrqc(sc->iov_mode); + rss_fields = 0; if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4) - mrqc |= IXGBE_MRQC_RSS_FIELD_IPV4; + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV4; if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV4) - mrqc |= IXGBE_MRQC_RSS_FIELD_IPV4_TCP; + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV4_TCP; if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) - mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6; + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV6; if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) - mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6_TCP; + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV6_TCP; if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6_EX) - mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6_EX; + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV6_EX; if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6_EX) - mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_TCP; + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_TCP; if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV4) - mrqc |= IXGBE_MRQC_RSS_FIELD_IPV4_UDP; + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV4_UDP; if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) - mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6_UDP; + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV6_UDP; if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) - mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; + if (hw->mac.type == ixgbe_mac_E610) { + /* E610 folds IPv6 extension headers into the base selectors. */ + if (rss_fields & IXGBE_MRQC_RSS_FIELD_IPV6_EX) + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV6; + if (rss_fields & IXGBE_MRQC_RSS_FIELD_IPV6_EX_TCP) + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV6_TCP; + if (rss_fields & IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP) + rss_fields |= IXGBE_MRQC_RSS_FIELD_IPV6_UDP; + rss_fields &= ~(IXGBE_MRQC_RSS_FIELD_IPV6_EX | + IXGBE_MRQC_RSS_FIELD_IPV6_EX_TCP | + IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP); + } + + if (per_pool_rss) { +#ifdef PCI_IOV + mrqc |= IXGBE_MRQC_MULTIPLE_RSS; + IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); - IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); + pfmrqc = IXGBE_MRQC_RSSEN | rss_fields; + IXGBE_WRITE_REG(hw, IXGBE_PFVFMRQC(sc->pool), pfmrqc); +#endif + } else { + mrqc |= rss_fields; + IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); + } } /* ixgbe_initialize_rss_mapping */ /************************************************************************