* * Dequeue a burst of processed crypto operations from a queue on the crypto * device. The dequeued operation are stored in *rte_crypto_op* structures * whose pointers are supplied in the *ops* array. * * The rte_cryptodev_dequeue_burst() function returns the number of ops * actually dequeued, which is the number of *rte_crypto_op* data structures * effectively supplied into the *ops* arra
| 1896 | * *ops* array. |
| 1897 | */ |
| 1898 | static inline uint16_t |
| 1899 | rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, |
| 1900 | struct rte_crypto_op **ops, uint16_t nb_ops) |
| 1901 | { |
| 1902 | const struct rte_crypto_fp_ops *fp_ops; |
| 1903 | void *qp; |
| 1904 | |
| 1905 | rte_cryptodev_trace_dequeue_burst(dev_id, qp_id, (void **)ops, nb_ops); |
| 1906 | |
| 1907 | fp_ops = &rte_crypto_fp_ops[dev_id]; |
| 1908 | qp = fp_ops->qp.data[qp_id]; |
| 1909 | |
| 1910 | nb_ops = fp_ops->dequeue_burst(qp, ops, nb_ops); |
| 1911 | |
| 1912 | #ifdef RTE_CRYPTO_CALLBACKS |
| 1913 | if (unlikely(fp_ops->qp.deq_cb[qp_id].next != NULL)) { |
| 1914 | struct rte_cryptodev_cb_rcu *list; |
| 1915 | struct rte_cryptodev_cb *cb; |
| 1916 | |
| 1917 | /* rte_memory_order_release memory order was used when the |
| 1918 | * call back was inserted into the list. |
| 1919 | * Since there is a clear dependency between loading |
| 1920 | * cb and cb->fn/cb->next, rte_memory_order_acquire memory order is |
| 1921 | * not required. |
| 1922 | */ |
| 1923 | list = &fp_ops->qp.deq_cb[qp_id]; |
| 1924 | rte_rcu_qsbr_thread_online(list->qsbr, 0); |
| 1925 | cb = rte_atomic_load_explicit(&list->next, rte_memory_order_relaxed); |
| 1926 | |
| 1927 | while (cb != NULL) { |
| 1928 | nb_ops = cb->fn(dev_id, qp_id, ops, nb_ops, |
| 1929 | cb->arg); |
| 1930 | cb = cb->next; |
| 1931 | }; |
| 1932 | |
| 1933 | rte_rcu_qsbr_thread_offline(list->qsbr, 0); |
| 1934 | } |
| 1935 | #endif |
| 1936 | return nb_ops; |
| 1937 | } |
| 1938 | |
| 1939 | /** |
| 1940 | * Enqueue a burst of operations for processing on a crypto device. |