X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fevent%2Fsw%2Fsw_evdev.h;h=749870727b9abd7f6a618e1613345af3fc10b7dc;hb=009ac7157c940194b862be6e8a08acae37383090;hp=5796e3150aeb6006524f646b9652d79bcafabf3d;hpb=5566a3e35866ce9e5eacf886c27b460ebfcd6ee9;p=dpdk.git diff --git a/drivers/event/sw/sw_evdev.h b/drivers/event/sw/sw_evdev.h index 5796e3150a..749870727b 100644 --- a/drivers/event/sw/sw_evdev.h +++ b/drivers/event/sw/sw_evdev.h @@ -21,6 +21,10 @@ #define MAX_SW_PROD_Q_DEPTH 4096 #define SW_FRAGMENTS_MAX 16 +/* Should be power-of-two minus one, to leave room for the next pointer */ +#define SW_EVS_PER_Q_CHUNK 255 +#define SW_Q_CHUNK_SIZE ((SW_EVS_PER_Q_CHUNK + 1) * sizeof(struct rte_event)) + /* report dequeue burst sizes in buckets */ #define SW_DEQ_STAT_BUCKET_SHIFT 2 /* how many packets pulled from port by sched */ @@ -102,6 +106,14 @@ struct reorder_buffer_entry { struct rte_event fragments[SW_FRAGMENTS_MAX]; }; +struct sw_iq { + struct sw_queue_chunk *head; + struct sw_queue_chunk *tail; + uint16_t head_idx; + uint16_t tail_idx; + uint16_t count; +}; + struct sw_qid { /* set when the QID has been initialized */ uint8_t initialized; @@ -114,7 +126,7 @@ struct sw_qid { struct sw_point_stats stats; /* Internal priority rings for packets */ - struct iq_ring *iq[SW_IQS_MAX]; + struct sw_iq iq[SW_IQS_MAX]; uint32_t iq_pkt_mask; /* A mask to indicate packets in an IQ */ uint64_t iq_pkt_count[SW_IQS_MAX]; @@ -173,6 +185,7 @@ struct sw_port { uint16_t outstanding_releases __rte_cache_aligned; uint16_t inflight_max; /* app requested max inflights for this port */ uint16_t inflight_credits; /* num credits this port has right now */ + uint8_t implicit_release; /* release events before dequeueing */ uint16_t last_dequeue_burst_sz; /* how big the burst was */ uint64_t last_dequeue_ticks; /* used to track burst processing time */ @@ -225,6 +238,8 @@ struct sw_evdev { /* Internal queues - one per logical queue */ struct sw_qid qids[RTE_EVENT_MAX_QUEUES_PER_DEV] __rte_cache_aligned; + struct sw_queue_chunk *chunk_list_head; + struct sw_queue_chunk *chunks; /* Cache how many packets are in each cq */ uint16_t cq_ring_space[SW_PORTS_MAX] __rte_cache_aligned; @@ -291,5 +306,6 @@ int sw_xstats_reset(struct rte_eventdev *dev, const uint32_t ids[], uint32_t nb_ids); +int test_sw_eventdev(void); #endif /* _SW_EVDEV_H_ */