---
name: "gen_new_estimator"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/gen_new_estimator"
---

# gen\_new\_estimator(9)

create a new rate estimator

## NAME

gen\_new\_estimator - create a new rate estimator

## SYNOPSIS

**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***);**

## ARGUMENTS

*bstats*

basic statistics

*cpu\_bstats*

bstats per cpu

*rate\_est*

rate estimator statistics

*stats\_lock*

statistics lock

*running*

qdisc running seqcount

*opt*

rate estimator configuration TLV

## DESCRIPTION

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.

Returns 0 on success or a negative error code.

## COPYRIGHT
