svn commit: r344931 - stable/12/sys/dev/cxgbe
John Baldwin
jhb at FreeBSD.org
Fri Mar 8 19:03:29 UTC 2019
Author: jhb
Date: Fri Mar 8 19:03:28 2019
New Revision: 344931
URL: https://svnweb.freebsd.org/changeset/base/344931
Log:
MFC 343456: Fix a few more places to handle ofld tx queues for RATELIMIT.
- Drain offload transmit queues when RATELIMIT is enabled but
TCP_OFFLOAD is not.
- Expose the per-VI nofldtxq and first_ofld_txq sysctls when
RATELIMIT is enabled but TCP_OFFLOAD is not.
- Clear offload transmit queue stats as part of a 'cxgbetool clearstats'
request when RATELIMIT is enabled but TCP_OFFLOAD is not.
Modified:
stable/12/sys/dev/cxgbe/t4_main.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/12/sys/dev/cxgbe/t4_main.c Fri Mar 8 19:01:31 2019 (r344930)
+++ stable/12/sys/dev/cxgbe/t4_main.c Fri Mar 8 19:03:28 2019 (r344931)
@@ -5389,6 +5389,8 @@ vi_full_uninit(struct vi_info *vi)
struct sge_txq *txq;
#ifdef TCP_OFFLOAD
struct sge_ofld_rxq *ofld_rxq;
+#endif
+#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
struct sge_wrq *ofld_txq;
#endif
@@ -5404,7 +5406,7 @@ vi_full_uninit(struct vi_info *vi)
quiesce_txq(sc, txq);
}
-#ifdef TCP_OFFLOAD
+#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
for_each_ofld_txq(vi, i, ofld_txq) {
quiesce_wrq(sc, ofld_txq);
}
@@ -6184,15 +6186,9 @@ vi_sysctls(struct vi_info *vi)
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldrxq", CTLFLAG_RD,
&vi->nofldrxq, 0,
"# of rx queues for offloaded TCP connections");
- SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldtxq", CTLFLAG_RD,
- &vi->nofldtxq, 0,
- "# of tx queues for offloaded TCP connections");
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_ofld_rxq",
CTLFLAG_RD, &vi->first_ofld_rxq, 0,
"index of first TOE rx queue");
- SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_ofld_txq",
- CTLFLAG_RD, &vi->first_ofld_txq, 0,
- "index of first TOE tx queue");
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_tmr_idx_ofld",
CTLTYPE_INT | CTLFLAG_RW, vi, 0,
sysctl_holdoff_tmr_idx_ofld, "I",
@@ -6203,6 +6199,16 @@ vi_sysctls(struct vi_info *vi)
"holdoff packet counter index for TOE queues");
}
#endif
+#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
+ if (vi->nofldtxq != 0) {
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldtxq", CTLFLAG_RD,
+ &vi->nofldtxq, 0,
+ "# of tx queues for TOE/ETHOFLD");
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_ofld_txq",
+ CTLFLAG_RD, &vi->first_ofld_txq, 0,
+ "index of first TOE/ETHOFLD tx queue");
+ }
+#endif
#ifdef DEV_NETMAP
if (vi->nnmrxq != 0) {
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nnmrxq", CTLFLAG_RD,
@@ -9867,7 +9873,7 @@ t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t
mp_ring_reset_stats(txq->r);
}
-#ifdef TCP_OFFLOAD
+#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
/* nothing to clear for each ofld_rxq */
for_each_ofld_txq(vi, i, wrq) {
More information about the svn-src-all
mailing list