---
name: "netif_napi_add"
section: "9"
platform: "linux"
package: "linux-manual-2.6.26"
version: "2.6.26-29"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/netif_napi_add"
---

# netif\_napi\_add(9)

initialize a napi context

## NAME

netif\_napi\_add - initialize a napi context

## SYNOPSIS

**void netif\_napi\_add(struct net\_device \*** *dev***, struct napi\_struct \*** *napi***, int (\****poll***) (struct napi\_struct \*, int), int** *weight***);**

## ARGUMENTS

*dev*

network device

*napi*

napi context

*poll*

polling function

*weight*

default weight

## DESCRIPTION

**netif\_napi\_add** must be used to initialize a napi context prior to calling \*any\* of the other napi related functions.

## COPYRIGHT
