'\" t .\" Title: gen_new_estimator .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "GEN_NEW_ESTIMATOR" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Linux Networking" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" gen_new_estimator \- create a new rate estimator .SH "SYNOPSIS" .HP \w'int\ gen_new_estimator('u .BI "int gen_new_estimator(struct\ gnet_stats_basic_packed\ *\ " "bstats" ", struct\ gnet_stats_basic_cpu\ __percpu\ *\ " "cpu_bstats" ", struct\ gnet_stats_rate_est64\ *\ " "rate_est" ", spinlock_t\ *\ " "stats_lock" ", seqcount_t\ *\ " "running" ", struct\ nlattr\ *\ " "opt" ");" .SH "ARGUMENTS" .PP \fIbstats\fR .RS 4 basic statistics .RE .PP \fIcpu_bstats\fR .RS 4 bstats per cpu .RE .PP \fIrate_est\fR .RS 4 rate estimator statistics .RE .PP \fIstats_lock\fR .RS 4 statistics lock .RE .PP \fIrunning\fR .RS 4 qdisc running seqcount .RE .PP \fIopt\fR .RS 4 rate estimator configuration TLV .RE .SH "DESCRIPTION" .PP Creates a new rate estimator with bstats as source and rate_est as destination\&. A new timer with the interval specified in the configuration TLV is created\&. Upon each interval, the latest statistics will be read from bstats and the estimated rate will be stored in rate_est with the statistics lock grabbed during this period\&. .PP Returns 0 on success or a negative error code\&. .SH "COPYRIGHT" .br