From owner-svn-src-all@freebsd.org Mon Oct 29 21:16:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F6B910EA773; Mon, 29 Oct 2018 21:16:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54DB883DD6; Mon, 29 Oct 2018 21:16:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 366CE13CAE; Mon, 29 Oct 2018 21:16:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9TLGRLP047105; Mon, 29 Oct 2018 21:16:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9TLGQ2T047103; Mon, 29 Oct 2018 21:16:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201810292116.w9TLGQ2T047103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 29 Oct 2018 21:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339883 - in head: share/man/man4 sys/netinet/netdump X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: share/man/man4 sys/netinet/netdump X-SVN-Commit-Revision: 339883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2018 21:16:28 -0000 Author: markj Date: Mon Oct 29 21:16:26 2018 New Revision: 339883 URL: https://svnweb.freebsd.org/changeset/base/339883 Log: Expose some netdump configuration parameters through sysctl. Reviewed by: cem MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D17755 Modified: head/share/man/man4/netdump.4 head/sys/netinet/netdump/netdump_client.c Modified: head/share/man/man4/netdump.4 ============================================================================== --- head/share/man/man4/netdump.4 Mon Oct 29 21:14:48 2018 (r339882) +++ head/share/man/man4/netdump.4 Mon Oct 29 21:16:26 2018 (r339883) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2018 +.Dd October 29, 2018 .Dt NETDUMP 4 .Os .Sh NAME @@ -130,6 +130,19 @@ a path of will cause the server to attempt to store dumps from the client in .Pa /var/crash/foo . The server will not automatically create the relative directory. +.It Va net.netdump.polls +The client will poll the configured network interface while waiting for +acknowledgements. +This parameter controls the maximum number of poll attempts before giving +up, which typically results in a re-transmit. +Each poll attempt takes 0.5ms. +.It Va net.netdump.retries +The number of times the client will re-transmit a packet before aborting +a dump due to a lack of acknowledgement. +The default may be too small in environments with lots of packet loss. +.It Va net.netdump.arp_retries +The number of times the client will attempt to learn the MAC address of +the configured gateway or server before giving up and aborting the dump. .El .Sh SEE ALSO .Xr decryptcore 8 , Modified: head/sys/netinet/netdump/netdump_client.c ============================================================================== --- head/sys/netinet/netdump/netdump_client.c Mon Oct 29 21:14:48 2018 (r339882) +++ head/sys/netinet/netdump/netdump_client.c Mon Oct 29 21:16:26 2018 (r339883) @@ -117,18 +117,6 @@ static int restore_gw_addr; static uint64_t rcvd_acks; CTASSERT(sizeof(rcvd_acks) * NBBY == NETDUMP_MAX_IN_FLIGHT); -/* - * Times to poll the NIC (0.5ms each poll) before assuming packetloss - * occurred (default to 1s). - */ -static int nd_polls = 2000; - -/* Times to retransmit lost packets. */ -static int nd_retries = 10; - -/* Number of ARP retries. */ -static int nd_arp_retries = 3; - /* Configuration parameters. */ static struct netdump_conf nd_conf; #define nd_server nd_conf.ndc_server @@ -157,6 +145,18 @@ static char nd_path[MAXPATHLEN]; SYSCTL_STRING(_net_netdump, OID_AUTO, path, CTLFLAG_RW, nd_path, sizeof(nd_path), "Server path for output files"); +static int nd_polls = 2000; +SYSCTL_INT(_net_netdump, OID_AUTO, polls, CTLFLAG_RWTUN, + &nd_polls, 0, + "Number of times to poll before assuming packet loss (0.5ms per poll)"); +static int nd_retries = 10; +SYSCTL_INT(_net_netdump, OID_AUTO, retries, CTLFLAG_RWTUN, + &nd_retries, 0, + "Number of retransmit attempts before giving up"); +static int nd_arp_retries = 3; +SYSCTL_INT(_net_netdump, OID_AUTO, arp_retries, CTLFLAG_RWTUN, + &nd_arp_retries, 0, + "Number of ARP attempts before giving up"); /* * Checks for netdump support on a network interface