IFIQ_INPUT(9) | Kernel Developer's Manual | IFIQ_INPUT(9)

# NAME

`ifiq_input`, `ifiq_enqueue` — network interface input queue (ifiqueue) API

# SYNOPSIS

`#include <net/if_var.h>`

int
`ifiq_input`(struct ifiqueue *ifiq, struct mbuf_list *ml);

void
`ifiq_enqueue`(struct ifiqueue *ifiq, struct mbuf *m);

# DESCRIPTION

The network interface input queue (ifiqueue) API provides functions for network drivers to queue received packets for processing by the network stack.

`ifiq_input`(struct ifiqueue *ifq, struct mbuf_list *ml)
  Enqueue the list of mbufs in ml on the ifiq interface input queue and notify the network stack to process them. If the queue rejects the packets, they will be freed and counted as drops.
`ifiq_enqueue`(struct ifiqueue *ifq, struct mbuf *m)
  Enqueue the mbuf m on the ifiq interface input queue and notify the network stack to process it.

# CONTEXT

`ifiq_input`() and `ifiq_enqueue`() can be called during autoconf, from process context, or from interrupt context.

# RETURN VALUES

`ifiq_input`() returns a non-zero value if mbufs are queued too rapidly for the stack to process. If possible, the caller should attempt to reduce the number of mbufs being generated in the future. For example, if mbufs are being received from hardware managed with the interface RX ring API, if_rxr_livelocked(9) can be called to indicate to the hardware that backpressure is required.

# SEE ALSO

if_rxr_livelocked(9)

March 31, 2022 | Debian