Date: Tue, 23 Jun 2020 04:57:27 +0000 From: "neel_neelc.org (Neel Chauhan)" <phabric-noreply@FreeBSD.org> To: Phabricator <phabric-noreply@FreeBSD.org> Cc: freebsd-net@freebsd.org Subject: [Differential] D24937: Add sysctl net.iflib.tx_update_freq to set transmit descriptor update frequency Message-ID: <e27c66cf1cfccaf1dbc1757cb9203e6b@localhost.localdomain> In-Reply-To: <differential-rev-PHID-DREV-sjntqne4ry32ikjhkxqq-req@reviews.freebsd.org> References: <differential-rev-PHID-DREV-sjntqne4ry32ikjhkxqq-req@reviews.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] neel_neelc.org updated this revision to Diff 73493. neel_neelc.org retitled this revision from "Add readonly tunable net.iflib.tx_update_freq to set transmit descriptor update frequency" to "Add sysctl net.iflib.tx_update_freq to set transmit descriptor update frequency". neel_neelc.org edited the summary of this revision. neel_neelc.org edited the test plan for this revision. neel_neelc.org added a comment. I have a new patch making net.iflib.tx_update_freq a sysctl. I attempted to net.iflib.tx_update_freq=32 from 16 (without rebooting!) and it worked. Luckily with a brand-new and fast dev box, I could compile and test quickly. REPOSITORY rS FreeBSD src repository CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D24937?vs=72058&id=73493 CHANGES SINCE LAST ACTION https://reviews.freebsd.org/D24937/new/ REVISION DETAIL https://reviews.freebsd.org/D24937 AFFECTED FILES sys/net/iflib.c CHANGE DETAILS diff --git a/sys/net/iflib.c b/sys/net/iflib.c --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -586,8 +586,11 @@ static int iflib_no_tx_batch = 0; SYSCTL_INT(_net_iflib, OID_AUTO, no_tx_batch, CTLFLAG_RW, &iflib_no_tx_batch, 0, "minimize transmit latency at the possible expense of throughput"); +int iflib_tx_update_freq = IFLIB_DEFAULT_TX_UPDATE_FREQ; +SYSCTL_UINT(_net_iflib, OID_AUTO, tx_update_freq, CTLFLAG_RW, + &iflib_tx_update_freq, IFLIB_DEFAULT_TX_UPDATE_FREQ, + "tramsmit descriptor updates per second"); - #if IFLIB_DEBUG_COUNTERS static int iflib_tx_seen; @@ -1768,8 +1771,7 @@ /* Set number of descriptors available */ txq->ift_qstatus = IFLIB_QUEUE_IDLE; - /* XXX make configurable */ - txq->ift_update_freq = IFLIB_DEFAULT_TX_UPDATE_FREQ; + txq->ift_update_freq = iflib_tx_update_freq; /* Reset indices */ txq->ift_cidx_processed = 0; EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: neel_neelc.org, shurd, #iflib Cc: koobs, imp, ae, melifaro, #contributor_reviews_base, freebsd-net-list, mmacy, kpraveen.lkml_gmail.com, marcnarc_gmail.com, simonvella_gmail.com, novice_techie.com, tommi.pernila_iki.fi, krzysztof.galazka_intel.com, alfix86_gmail.com [-- Attachment #2 --] diff --git a/sys/net/iflib.c b/sys/net/iflib.c --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -586,8 +586,11 @@ static int iflib_no_tx_batch = 0; SYSCTL_INT(_net_iflib, OID_AUTO, no_tx_batch, CTLFLAG_RW, &iflib_no_tx_batch, 0, "minimize transmit latency at the possible expense of throughput"); +int iflib_tx_update_freq = IFLIB_DEFAULT_TX_UPDATE_FREQ; +SYSCTL_UINT(_net_iflib, OID_AUTO, tx_update_freq, CTLFLAG_RW, + &iflib_tx_update_freq, IFLIB_DEFAULT_TX_UPDATE_FREQ, + "tramsmit descriptor updates per second"); - #if IFLIB_DEBUG_COUNTERS static int iflib_tx_seen; @@ -1768,8 +1771,7 @@ /* Set number of descriptors available */ txq->ift_qstatus = IFLIB_QUEUE_IDLE; - /* XXX make configurable */ - txq->ift_update_freq = IFLIB_DEFAULT_TX_UPDATE_FREQ; + txq->ift_update_freq = iflib_tx_update_freq; /* Reset indices */ txq->ift_cidx_processed = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e27c66cf1cfccaf1dbc1757cb9203e6b>
