/** Input Queue statistics. Each input queue has four stats fields. */ struct oct_iq_stats {
u64 instr_posted; /**< Instructions posted to this queue. */
u64 instr_processed; /**< Instructions processed in this queue. */
u64 instr_dropped; /**< Instructions that could not be processed */
u64 bytes_sent; /**< Bytes sent through this queue. */
u64 sgentry_sent;/**< Gather entries sent through this queue. */
u64 tx_done;/**< Num of packets sent to network. */
u64 tx_iq_busy;/**< Numof times this iq was found to be full. */
u64 tx_dropped;/**< Numof pkts dropped dueto xmitpath errors. */
u64 tx_tot_bytes;/**< Total count of bytes sento to network. */
u64 tx_gso; /* count of tso */
u64 tx_vxlan; /* tunnel */
u64 tx_dmamap_fail; /* Number of times dma mapping failed */
u64 tx_restart; /* Number of times this queue restarted */
};
/** A spinlock to protect access to the input ring. */
spinlock_t lock;
/** A spinlock to protect while posting on the ring. */
spinlock_t post_lock;
/** This flag indicates if the queue can be used for soft commands. *Ifthisflagisset,post_lockmustbeacquiredbeforeposting *acommandtothequeue. *Ifthisflagisclear,post_lockisinvalidforthequeue. *Allcontrolcommands(softcommands)willgothroughonlyQueue0 *(controlanddataqueue).Soonlyqueue-0needspost_lock, *otherqueuesareonlydataqueuesanddoesnotneedpost_lock
*/ bool allow_soft_cmds;
u32 pkt_in_done;
u32 pkts_processed;
/** A spinlock to protect access to the input ring.*/
spinlock_t iq_flush_running_lock;
/** Flag that indicates if the queue uses 64 byte commands. */
u32 iqcmd_64B:1;
/** Queue info. */ union oct_txpciq txpciq;
u32 rsvd:17;
/* Controls whether extra flushing of IQ is done on Tx */
u32 do_auto_flush:1;
u32 status:8;
/** Maximum no. of instructions in this queue. */
u32 max_count;
/** Index in input ring where the driver should write the next packet */
u32 host_write_index;
/** Index in input ring where Octeon is expected to read the next *packet.
*/
u32 octeon_read_index;
/** This index aids in finding the window in the queue where Octeon *hasreadthecommands.
*/
u32 flush_index;
/** This field keeps track of the instructions pending in this queue. */
atomic_t instr_pending;
u32 reset_instr_cnt;
/** Pointer to the Virtual Base addr of the input ring. */
u8 *base_addr;
struct octeon_request_list *request_list;
/** Octeon doorbell register for the ring. */ void __iomem *doorbell_reg;
/** Octeon instruction count register for this ring. */ void __iomem *inst_cnt_reg;
/** Number of instructions pending to be posted to Octeon. */
u32 fill_cnt;
/** The max. number of instructions that can be held pending by the *driver.
*/
u32 fill_threshold;
/** The last time that the doorbell was rung. */
u64 last_db_time;
/** The doorbell timeout. If the doorbell was not rung for this time and *fill_cntisnon-zero,ringthedoorbellagain.
*/
u32 db_timeout;
/** Statistics for this input queue. */ struct oct_iq_stats stats;
/** DMA mapped base address of the input descriptor ring. */
dma_addr_t base_addr_dma;
/** Application context */ void *app_ctx;
/* network stack queue index */ int q_index;
/*os ifidx associated with this queue */ int ifidx;
};
/*---------------------- INSTRUCTION FORMAT ----------------------------*/
/** 32-byte instruction format. *Formatofinstructionfora32-bytemodeinputqueue.
*/ struct octeon_instr_32B { /** Pointer where the input data is available. */
u64 dptr;
/** Instruction Header. */
u64 ih;
/** Pointer where the response for a RAW mode packet will be written *byOcteon.
*/
u64 rptr;
/** Input Request Header. Additional info about the input. */
u64 irh;
/** 64-byte instruction format. *Formatofinstructionfora64-bytemodeinputqueue.
*/ struct octeon_instr2_64B { /** Pointer where the input data is available. */
u64 dptr;
/** Instruction Header. */
u64 ih2;
/** Input Request Header. */
u64 irh;
/** opcode/subcode specific parameters */
u64 ossp[2];
/** Return Data Parameters */
u64 rdp;
/** Pointer where the response for a RAW mode packet will be written *byOcteon.
*/
u64 rptr;
u64 reserved;
};
struct octeon_instr3_64B { /** Pointer where the input data is available. */
u64 dptr;
/** Instruction Header. */
u64 ih3;
/** Instruction Header. */
u64 pki_ih3;
/** Input Request Header. */
u64 irh;
/** opcode/subcode specific parameters */
u64 ossp[2];
/** Return Data Parameters */
u64 rdp;
/** Pointer where the response for a RAW mode packet will be written *byOcteon.
*/
u64 rptr;
};
union octeon_instr_64B { struct octeon_instr2_64B cmd2; struct octeon_instr3_64B cmd3;
};
/** Context buffer info */ void *ctxptr;
u32 ctxsize;
/** Time out and callback */
size_t expiry_time;
u32 iq_no; void (*callback)(struct octeon_device *, u32, void *); void *callback_arg;
int caller_is_done;
u32 sc_status; struct completion complete;
};
/* max timeout (in milli sec) for soft request */ #define LIO_SC_MAX_TMO_MS 60000
/** Maximum number of buffers to allocate into soft command buffer pool
*/ #define MAX_SOFT_COMMAND_BUFFERS 256
/** Head of a soft command buffer pool.
*/ struct octeon_sc_buffer_pool { /** List structure to add delete pending entries to */ struct list_head head;
/** A lock for this response list */
spinlock_t lock;
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.