net/iavf: enable IRQ mapping configuration for large VF
[dpdk.git] / drivers / crypto / bcmfs / bcmfs_qp.h
index 52c4879..57fe0a9 100644 (file)
@@ -24,6 +24,13 @@ enum bcmfs_queue_type {
        BCMFS_RM_CPLQ
 };
 
+#define BCMFS_QP_IOBASE_XLATE(base, idx)       \
+               ((base) + ((idx) * BCMFS_HW_QUEUE_IO_ADDR_LEN))
+
+/* Max pkts for preprocessing before submitting to h/w qp */
+#define BCMFS_MAX_REQS_BUFF    64
+
+/* qp stats */
 struct bcmfs_qp_stats {
        /* Count of all operations enqueued */
        uint64_t enqueued_count;
@@ -44,6 +51,8 @@ struct bcmfs_qp_config {
        uint16_t nb_descriptors;
        /* Maximum number of h/w descriptors needed by a request */
        uint16_t max_descs_req;
+       /* h/w ops associated with qp */
+       struct bcmfs_hw_queue_pair_ops *ops;
 };
 
 struct bcmfs_queue {
@@ -61,6 +70,8 @@ struct bcmfs_queue {
                /* s/w pointer for completion h/w queue*/
                uint32_t cmpl_read_ptr;
        };
+       /* number of inflight descriptor accumulated  before next db ring */
+       uint16_t descs_inflight;
        /* Memzone name */
        char memz_name[RTE_MEMZONE_NAMESIZE];
 };
@@ -88,6 +99,10 @@ struct bcmfs_qp {
        struct bcmfs_qp_stats stats;
        /* h/w ops associated with qp */
        struct bcmfs_hw_queue_pair_ops *ops;
+       /* bcmfs requests pool*/
+       struct rte_mempool *sr_mp;
+       /* a temporary buffer to keep message pointers */
+       struct bcmfs_qp_message *infl_msgs[BCMFS_MAX_REQS_BUFF];
 
 } __rte_cache_aligned;
 
@@ -119,4 +134,9 @@ bcmfs_qp_setup(struct bcmfs_qp **qp_addr,
               uint16_t queue_pair_id,
               struct bcmfs_qp_config *bcmfs_conf);
 
+/* stats functions*/
+void bcmfs_qp_stats_get(struct bcmfs_qp **qp, int num_qp,
+                       struct bcmfs_qp_stats *stats);
+void bcmfs_qp_stats_reset(struct bcmfs_qp **qp, int num_qp);
+
 #endif /* _BCMFS_QP_H_ */