Documentation ¶
Overview ¶
Package xdp provides link layer endpoints backed by AF_XDP sockets.
Index ¶
Constants ¶
View Source
const MTU = 1500
MTU is sized to ensure packets fit inside a 2048 byte XDP frame.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // FD is used to read/write packets. FD int // ClosedFunc is a function to be called when an endpoint's peer (if // any) closes its end of the communication pipe. ClosedFunc func(tcpip.Error) // Address is the link address for this endpoint. Address tcpip.LinkAddress // SaveRestore if true, indicates that this NIC capability set should // include CapabilitySaveRestore SaveRestore bool // DisconnectOk if true, indicates that this NIC capability set should // include CapabilityDisconnectOk. DisconnectOk bool // TXChecksumOffload if true, indicates that this endpoints capability // set should include CapabilityTXChecksumOffload. TXChecksumOffload bool // RXChecksumOffload if true, indicates that this endpoints capability // set should include CapabilityRXChecksumOffload. RXChecksumOffload bool // InterfaceIndex is the interface index of the underlying device. InterfaceIndex int // Bind is true when we're responsible for binding the AF_XDP socket to // a device. When false, another process is expected to bind for us. Bind bool // GRO enables generic receive offload. GRO bool }
Options specify the details about the fd-based endpoint to be created.
Click to show internal directories.
Click to hide internal directories.