diff options
author | Mark Johnston <markj@FreeBSD.org> | 2018-10-29 21:16:26 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2018-10-29 21:16:26 +0000 |
commit | da7d7778b06a92b7f0263537328942a9f0460757 (patch) | |
tree | 5444156920caf4dd63c8a7b17875fae6b215bfcf | |
parent | 2fa224b17de008093f790d00a401a8db1e1c5feb (diff) | |
download | src-da7d7778b06a92b7f0263537328942a9f0460757.tar.gz src-da7d7778b06a92b7f0263537328942a9f0460757.zip |
Expose some netdump configuration parameters through sysctl.
Reviewed by: cem
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D17755
Notes
Notes:
svn path=/head/; revision=339883
-rw-r--r-- | share/man/man4/netdump.4 | 15 | ||||
-rw-r--r-- | sys/netinet/netdump/netdump_client.c | 24 |
2 files changed, 26 insertions, 13 deletions
diff --git a/share/man/man4/netdump.4 b/share/man/man4/netdump.4 index 31618b7f4e37..4c47dbce72ce 100644 --- a/share/man/man4/netdump.4 +++ b/share/man/man4/netdump.4 @@ -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 , diff --git a/sys/netinet/netdump/netdump_client.c b/sys/netinet/netdump/netdump_client.c index a662fa86e9c7..9df2e731fa6e 100644 --- a/sys/netinet/netdump/netdump_client.c +++ b/sys/netinet/netdump/netdump_client.c @@ -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 |