examples/l3fwd: share queue size variables
[dpdk.git] / drivers / event / dlb2 / dlb2_priv.h
index b1225af..7837ae8 100644 (file)
@@ -24,7 +24,9 @@
 
 /* Default values for command line devargs */
 #define DLB2_POLL_INTERVAL_DEFAULT 1000
-#define DLB2_SW_CREDIT_QUANTA_DEFAULT 32
+#define DLB2_SW_CREDIT_QUANTA_DEFAULT 32 /* Default = Worker */
+#define DLB2_SW_CREDIT_P_QUANTA_DEFAULT 256 /* Producer */
+#define DLB2_SW_CREDIT_C_QUANTA_DEFAULT 256 /* Consumer */
 #define DLB2_DEPTH_THRESH_DEFAULT 256
 
 /*  command line arg strings */
@@ -36,8 +38,9 @@
 #define DLB2_COS_ARG "cos"
 #define DLB2_POLL_INTERVAL_ARG "poll_interval"
 #define DLB2_SW_CREDIT_QUANTA_ARG "sw_credit_quanta"
+#define DLB2_HW_CREDIT_QUANTA_ARG "hw_credit_quanta"
 #define DLB2_DEPTH_THRESH_ARG "default_depth_thresh"
-#define DLB2_VECTOR_OPTS_DISAB_ARG "vector_opts_disable"
+#define DLB2_VECTOR_OPTS_ENAB_ARG "vector_opts_enable"
 
 /* Begin HW related defines and structs */
 
@@ -72,7 +75,9 @@
 #define DLB2_MIN_DEQUEUE_TIMEOUT_NS 1
 /* Note: "- 1" here to support the timeout range check in eventdev_autotest */
 #define DLB2_MAX_DEQUEUE_TIMEOUT_NS (UINT32_MAX - 1)
-#define DLB2_SW_CREDIT_BATCH_SZ 32
+#define DLB2_SW_CREDIT_BATCH_SZ 32 /* Default - Worker */
+#define DLB2_SW_CREDIT_P_BATCH_SZ 256 /* Producer */
+#define DLB2_SW_CREDIT_C_BATCH_SZ 256 /* Consumer */
 #define DLB2_NUM_SN_GROUPS 2
 #define DLB2_MAX_LDB_SN_ALLOC 1024
 #define DLB2_MAX_QUEUE_DEPTH_THRESHOLD 8191
@@ -367,6 +372,7 @@ struct dlb2_port {
        struct dlb2_eventdev *dlb2; /* back ptr */
        struct dlb2_eventdev_port *ev_port; /* back ptr */
        bool use_scalar; /* force usage of scalar code */
+       uint16_t hw_credit_quanta;
 };
 
 /* Per-process per-port mmio and memory pointers */
@@ -513,7 +519,7 @@ struct dlb2_eventdev_port {
        bool setup_done;
        /* enq_configured is set when the qm port is created */
        bool enq_configured;
-       uint8_t implicit_release; /* release events before dequeueing */
+       uint8_t implicit_release; /* release events before dequeuing */
 }  __rte_cache_aligned;
 
 struct dlb2_queue {
@@ -565,7 +571,7 @@ struct dlb2_eventdev {
        uint32_t new_event_limit;
        int max_num_events_override;
        int num_dir_credits_override;
-       bool vector_opts_disabled;
+       bool vector_opts_enabled;
        volatile enum dlb2_run_state run_state;
        uint16_t num_dir_queues; /* total num of evdev dir queues requested */
        union {
@@ -587,6 +593,7 @@ struct dlb2_eventdev {
        enum dlb2_cq_poll_modes poll_mode;
        int poll_interval;
        int sw_credit_quanta;
+       int hw_credit_quanta;
        int default_depth_thresh;
        uint8_t revision;
        uint8_t version;
@@ -622,8 +629,9 @@ struct dlb2_devargs {
        enum dlb2_cos cos_id;
        int poll_interval;
        int sw_credit_quanta;
+       int hw_credit_quanta;
        int default_depth_thresh;
-       bool vector_opts_disabled;
+       bool vector_opts_enabled;
 };
 
 /* End Eventdev related defines and structs */