git: c6c6d4aff90d - main - cxgbe/tom: Fix the rx channel selection in options2.

From: Navdeep Parhar <np_at_FreeBSD.org>
Date: Wed, 01 May 2024 00:15:00 UTC
The branch main has been updated by np:

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

commit c6c6d4aff90da83a292b4c2bbbe1f4d6e01cd82e
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2024-04-15 20:04:49 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2024-05-01 00:07:15 +0000

    cxgbe/tom: Fix the rx channel selection in options2.
    
    This affects TOE operation when multiple rx c-channels are in use for
    offload, which is an unusual configuration.
    
    MFC after:      1 week
    Sponsored by:   Chelsio Communications
---
 sys/dev/cxgbe/tom/t4_tom.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c
index b2d0b85e4832..ac5bba75f904 100644
--- a/sys/dev/cxgbe/tom/t4_tom.c
+++ b/sys/dev/cxgbe/tom/t4_tom.c
@@ -1200,12 +1200,14 @@ calc_options2(struct vi_info *vi, struct conn_params *cp)
 	MPASS(cp->ecn == 0 || cp->ecn == 1);
 	opt2 |= V_CCTRL_ECN(cp->ecn);
 
-	/* XXX: F_RX_CHANNEL for multiple rx c-chan support goes here. */
-
 	opt2 |= V_TX_QUEUE(TX_MODQ(pi->tx_chan));
 	opt2 |= V_PACE(0);
 	opt2 |= F_RSS_QUEUE_VALID;
 	opt2 |= V_RSS_QUEUE(sc->sge.ofld_rxq[cp->rxq_idx].iq.abs_id);
+	if (chip_id(sc) <= CHELSIO_T6) {
+		MPASS(pi->rx_chan == 0 || pi->rx_chan == 1);
+		opt2 |= V_RX_CHANNEL(pi->rx_chan);
+	}
 
 	MPASS(cp->cong_algo >= 0 && cp->cong_algo <= M_CONG_CNTRL);
 	opt2 |= V_CONG_CNTRL(cp->cong_algo);