pub struct TxQueue { /* private fields */ }
Expand description

The transmitting side of an AF_XDP Socket.

More details can be found in the docs.

Implementations

Let the kernel know that the frames described by descs are ready to be transmitted. Returns the number of frames submitted to the kernel.

Note that if the length of descs is greater than the number of available spaces on the underlying ring buffer then no frames at all will be submitted for transmission.

Once the frames have been submitted to this queue they should not be used again until consumed via the CompQueue.

Safety

This function is unsafe as it is possible to cause a data race if used improperly. For example, by simultaneously submitting the same frame to this TxQueue and the FillQueue.

Furthermore, the frames passed to this queue must belong to the same Umem that this TxQueue instance is tied to.

Same as produce but for a single frame descriptor.

Safety

See produce.

Same as produce but wake up the kernel to continue processing produced frames (if required).

For more details see the docs.

Safety

See produce.

Same as produce_and_wakeup but for a single frame descriptor.

Safety

See produce.

Wake up the kernel to continue processing produced frames.

See produce_and_wakeup for a link to docs with further explanation.

Check if the XDP_USE_NEED_WAKEUP flag is set on the tx ring. If so then this means a call to wakeup will be required to continue processing produced frames.

See produce_and_wakeup for link to docs with further explanation.

Polls the socket, returning true if it is ready to write.

A reference to the underlying Socket’s file descriptor.

A mutable reference to the underlying Socket’s file descriptor.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.