[Differential] D24937: Add readonly tunable net.iflib.tx_update_freq to set transmit descriptor update frequency
neel_neelc.org (Neel Chauhan)
phabric-noreply at FreeBSD.org
Tue Jun 23 03:21:07 UTC 2020
neel_neelc.org created this revision.
neel_neelc.org added a project: network.
Herald added subscribers: Contributor Reviews (base), melifaro, ae, imp.
Herald added a reviewer: shurd.
Herald added a reviewer: iflib.
neel_neelc.org requested review of this revision.
REVISION SUMMARY
Introduce readonly tunable net.iflib.tx_update_freq to allow an user to set the network transmit descriptor update frequency. Previously, this was hardcoded at 16.
Submitted by: Neel Chauhan <neel AT neelc DOT org>
TEST PLAN
Add this to /boot/loader.conf:
net.iflib.tx_update_freq=32
Reboot to see if it works
REPOSITORY
rS FreeBSD src repository
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");
+static int iflib_tx_update_freq = IFLIB_DEFAULT_TX_UPDATE_FREQ;
+SYSCTL_UINT(_net_iflib, OID_AUTO, tx_update_freq, CTLFLAG_RDTUN,
+ &iflib_tx_update_freq, IFLIB_DEFAULT_TX_UPDATE_FREQ,
+ "tramsmit descriptor updates per second");
-
#if IFLIB_DEBUG_COUNTERS
static int iflib_tx_seen;
@@ -1762,8 +1765,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: 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24937.72058.patch
Type: text/x-patch
Size: 896 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20200623/4bf90204/attachment-0001.bin>
More information about the freebsd-net
mailing list