Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 17.08
[deb_dpdk.git]
/
drivers
/
crypto
/
scheduler
/
scheduler_pmd_private.h
diff --git
a/drivers/crypto/scheduler/scheduler_pmd_private.h
b/drivers/crypto/scheduler/scheduler_pmd_private.h
index
421dae3
..
e606716
100644
(file)
--- a/
drivers/crypto/scheduler/scheduler_pmd_private.h
+++ b/
drivers/crypto/scheduler/scheduler_pmd_private.h
@@
-36,6
+36,9
@@
#include "rte_cryptodev_scheduler.h"
#include "rte_cryptodev_scheduler.h"
+#define CRYPTODEV_NAME_SCHEDULER_PMD crypto_scheduler
+/**< Scheduler Crypto PMD device name */
+
#define PER_SLAVE_BUFF_SIZE (256)
#define CS_LOG_ERR(fmt, args...) \
#define PER_SLAVE_BUFF_SIZE (256)
#define CS_LOG_ERR(fmt, args...) \
@@
-63,7
+66,7
@@
struct scheduler_slave {
uint16_t qp_id;
uint32_t nb_inflight_cops;
uint16_t qp_id;
uint32_t nb_inflight_cops;
-
enum rte_cryptodev_type dev_type
;
+
uint8_t driver_id
;
};
struct scheduler_ctx {
};
struct scheduler_ctx {
@@
-86,6
+89,8
@@
struct scheduler_ctx {
char name[RTE_CRYPTODEV_SCHEDULER_NAME_MAX_LEN];
char description[RTE_CRYPTODEV_SCHEDULER_DESC_MAX_LEN];
char name[RTE_CRYPTODEV_SCHEDULER_NAME_MAX_LEN];
char description[RTE_CRYPTODEV_SCHEDULER_DESC_MAX_LEN];
+ uint16_t wc_pool[RTE_CRYPTODEV_SCHEDULER_MAX_NB_WORKER_CORES];
+ uint16_t nb_wc;
char *init_slave_names[RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES];
int nb_init_slaves;
char *init_slave_names[RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES];
int nb_init_slaves;
@@
-100,12
+105,10
@@
struct scheduler_qp_ctx {
uint32_t seqn;
} __rte_cache_aligned;
uint32_t seqn;
} __rte_cache_aligned;
-struct scheduler_session {
- struct rte_cryptodev_sym_session *sessions[
- RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES];
-};
-static inline uint16_t __attribute__((always_inline))
+extern uint8_t cryptodev_driver_id;
+
+static __rte_always_inline uint16_t
get_max_enqueue_order_count(struct rte_ring *order_ring, uint16_t nb_ops)
{
uint32_t count = rte_ring_free_count(order_ring);
get_max_enqueue_order_count(struct rte_ring *order_ring, uint16_t nb_ops)
{
uint32_t count = rte_ring_free_count(order_ring);
@@
-113,7
+116,7
@@
get_max_enqueue_order_count(struct rte_ring *order_ring, uint16_t nb_ops)
return count > nb_ops ? nb_ops : count;
}
return count > nb_ops ? nb_ops : count;
}
-static
inline void __attribute__((always_inline))
+static
__rte_always_inline void
scheduler_order_insert(struct rte_ring *order_ring,
struct rte_crypto_op **ops, uint16_t nb_ops)
{
scheduler_order_insert(struct rte_ring *order_ring,
struct rte_crypto_op **ops, uint16_t nb_ops)
{
@@
-125,7
+128,7
@@
scheduler_order_insert(struct rte_ring *order_ring,
op = ring[(order_ring->cons.head + pos) & order_ring->mask]; \
} while (0)
op = ring[(order_ring->cons.head + pos) & order_ring->mask]; \
} while (0)
-static
inline uint16_t __attribute__((always_inline))
+static
__rte_always_inline uint16_t
scheduler_order_drain(struct rte_ring *order_ring,
struct rte_crypto_op **ops, uint16_t nb_ops)
{
scheduler_order_drain(struct rte_ring *order_ring,
struct rte_crypto_op **ops, uint16_t nb_ops)
{