net/af_packet: prefer snprintf against strncpy
[dpdk.git] / drivers / crypto / scheduler / scheduler_pmd_private.h
index 2f4feea..421dae3 100644 (file)
@@ -84,15 +84,18 @@ struct scheduler_ctx {
 
        uint8_t reordering_enabled;
 
-       struct rte_cryptodev_qp_conf qp_conf;
-
        char name[RTE_CRYPTODEV_SCHEDULER_NAME_MAX_LEN];
        char description[RTE_CRYPTODEV_SCHEDULER_DESC_MAX_LEN];
+
+       char *init_slave_names[RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES];
+       int nb_init_slaves;
 } __rte_cache_aligned;
 
 struct scheduler_qp_ctx {
        void *private_qp_ctx;
 
+       uint32_t max_nb_objs;
+
        struct rte_ring *order_ring;
        uint32_t seqn;
 } __rte_cache_aligned;
@@ -129,7 +132,7 @@ scheduler_order_drain(struct rte_ring *order_ring,
        struct rte_crypto_op *op;
        uint32_t nb_objs = rte_ring_count(order_ring);
        uint32_t nb_ops_to_deq = 0;
-       int status = -1;
+       uint32_t nb_ops_deqd = 0;
 
        if (nb_objs > nb_ops)
                nb_objs = nb_ops;
@@ -142,10 +145,10 @@ scheduler_order_drain(struct rte_ring *order_ring,
        }
 
        if (nb_ops_to_deq)
-               status = rte_ring_sc_dequeue_bulk(order_ring, (void **)ops,
-                               nb_ops_to_deq, NULL);
+               nb_ops_deqd = rte_ring_sc_dequeue_bulk(order_ring,
+                               (void **)ops, nb_ops_to_deq, NULL);
 
-       return (status == 0) ? nb_ops_to_deq : 0;
+       return nb_ops_deqd;
 }
 /** device specific operations function pointer structure */
 extern struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops;