/* struct octep_oq_desc_hw - Octeon Hardware OQ descriptor format. * * The descriptor ring is made of descriptors which have 2 64-bit values: * * @buffer_ptr: DMA address of the skb->data * @info_ptr: DMA address of host memory, used to update pkt count by hw. * This is currently unused to save pci writes.
*/ struct octep_oq_desc_hw {
dma_addr_t buffer_ptr;
u64 info_ptr;
};
/* Extended Response Header in packet data received from Hardware. * Includes metadata like checksum status. * this is valid only if hardware/firmware published support for this. * This is at offset 0 of packet data (skb->data).
*/ struct octep_oq_resp_hw_ext { /* Reserved. */
u64 rsvd:48;
/* Length of Rx packet DMA'ed by Octeon to Host. * this is in bigendian; so need to be converted to cpu endian. * Octeon writes this at the beginning of Rx buffer (skb->data).
*/ struct octep_oq_resp_hw { /* The Length of the packet. */
__be64 length;
};
/* Pointer to data buffer. * Driver keeps a pointer to the data buffer that it made available to * the Octeon device. Since the descriptor ring keeps physical (bus) * addresses, this field is required for the driver to keep track of * the virtual address pointers. The fields are operated by * OS-dependent routines.
*/ struct octep_rx_buffer { struct page *page;
/* length from rx hardware descriptor after converting to cpu endian */
u64 len;
};
/* Output Queue statistics. Each output queue has four stats fields. */ struct octep_oq_stats { /* Number of packets received from the Device. */
u64 packets;
/* Number of bytes received from the Device. */
u64 bytes;
/* Number of times failed to allocate buffers. */
u64 alloc_failures;
};
/* The Descriptor Ring Output Queue structure. * This structure has all the information required to implement a * Octeon OQ.
*/ struct octep_oq {
u32 q_no;
/* The receive buffer list. This list has the virtual addresses * of the buffers.
*/ struct octep_rx_buffer *buff_info;
/* Pointer to the mapped packet credit register. * Host writes number of info/buffer ptrs available to this register
*/
u8 __iomem *pkts_credit_reg;
/* Pointer to the mapped packet sent register. * Octeon writes the number of packets DMA'ed to host memory * in this register.
*/
u8 __iomem *pkts_sent_reg;
/* Pointer to statistics for this OQ. */ struct octep_oq_stats *stats;
/* Packets pending to be processed */
u32 pkts_pending;
u32 last_pkt_count;
/* Index in the ring where the driver should read the next packet */
u32 host_read_idx;
/* Number of descriptors in this ring. */
u32 max_count;
u32 ring_size_mask;
/* The number of descriptors pending refill. */
u32 refill_count;
/* Index in the ring where the driver will refill the * descriptor's buffer
*/
u32 host_refill_idx;
u32 refill_threshold;
/* The size of each buffer pointed by the buffer pointer. */
u32 buffer_size;
u32 max_single_buffer_size;
/* The 8B aligned descriptor ring starts at this address. */ struct octep_oq_desc_hw *desc_ring;
/* DMA mapped address of the OQ descriptor ring. */
dma_addr_t desc_ring_dma;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.