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

ifiq_input, ifiq_enqueuenetwork interface input queue (ifiqueue) API

#include <net/if_var.h>

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

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

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

(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.
(struct ifiqueue *ifq, struct mbuf *m)
Enqueue the mbuf m on the ifiq interface input queue and notify the network stack to process it.

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

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.

if_rxr_livelocked(9)

March 31, 2022 OpenBSD 7.6