git: 6d30c183117f - stable/15 - ixgbe: supply PF transmit contexts under SR-IOV

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a791e6e.42e9a.2177898c__315.451172512837$1786322590$gmane$org@gitrepo.freebsd.org>
The branch stable/15 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=6d30c183117fb5797d889fb3865e6a0b9d17ae06

commit 6d30c183117fb5797d889fb3865e6a0b9d17ae06
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-08-01 12:41:22 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-08-10 00:42:12 +0000

    ixgbe: supply PF transmit contexts under SR-IOV
    
    X550-family malicious-driver detection validates the transmit
    context selected by a data descriptor with Check Context set.  ixgbe
    sets that bit on every transmit data descriptor, but ordinary PF
    packets without a VLAN or checksum offload do not create a context
    descriptor.  The empty context then reports an invalid MAC-header
    length and blocks the PF queue as soon as MDD is enabled.
    
    Create the existing context descriptor for every PF packet while
    SR-IOV is active.  This supplies the required MAC-header length and
    keeps MDD from mistaking normal PF traffic for a malicious-driver
    event.
    
    (cherry picked from commit 0787b1f5b8bdfcaed97eeee7bfbd7f14ac162b0d)
---
 sys/dev/ixgbe/ix_txrx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/dev/ixgbe/ix_txrx.c b/sys/dev/ixgbe/ix_txrx.c
index 76c718e2c252..3dda3270a2de 100644
--- a/sys/dev/ixgbe/ix_txrx.c
+++ b/sys/dev/ixgbe/ix_txrx.c
@@ -197,6 +197,7 @@ ixgbe_isc_txd_encap(void *arg, if_pkt_info_t pi)
 	TXD = (struct ixgbe_adv_tx_context_desc *) &txr->tx_base[first];
 	if ((pi->ipi_csum_flags & CSUM_OFFLOAD) ||
 	    (sc->feat_en & IXGBE_FEATURE_NEEDS_CTXD) ||
+	    (sc->feat_en & IXGBE_FEATURE_SRIOV) ||
 	    pi->ipi_vtag) {
 		/*********************************************
 		 * Set up the appropriate offload context
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.