'\" t .\" Title: gen_new_estimator .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 4.12.2 .\" Language: English .\" .TH "GEN_NEW_ESTIMATOR" "9" "July 2017" "Kernel Hackers Manual 4\&.12\&" "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\ net_rate_estimator\ __rcu\ **\ " "rate_est" ", spinlock_t\ *\ " "stats_lock" ", seqcount_t\ *\ " "running" ", struct\ nlattr\ *\ " "opt" ");" .SH "ARGUMENTS" .PP \fIstruct gnet_stats_basic_packed * bstats\fR .RS 4 basic statistics .RE .PP \fIstruct gnet_stats_basic_cpu __percpu * cpu_bstats\fR .RS 4 bstats per cpu .RE .PP \fIstruct net_rate_estimator __rcu ** rate_est\fR .RS 4 rate estimator statistics .RE .PP \fIspinlock_t * stats_lock\fR .RS 4 statistics lock .RE .PP \fIseqcount_t * running\fR .RS 4 qdisc running seqcount .RE .PP \fIstruct nlattr * opt\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