crypto/mvsam: support HMAC SHA224
[dpdk.git] / drivers / crypto / mvsam / rte_mrvl_pmd_ops.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Marvell International Ltd.
3  * Copyright(c) 2017 Semihalf.
4  * All rights reserved.
5  */
6
7 #include <string.h>
8
9 #include <rte_common.h>
10 #include <rte_malloc.h>
11 #include <rte_cryptodev_pmd.h>
12
13 #include "rte_mrvl_pmd_private.h"
14
15 /**
16  * Capabilities list to be used in reporting to DPDK.
17  */
18 static const struct rte_cryptodev_capabilities
19         mrvl_crypto_pmd_capabilities[] = {
20         {       /* MD5 HMAC */
21                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
22                 {.sym = {
23                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
24                         {.auth = {
25                                 .algo = RTE_CRYPTO_AUTH_MD5_HMAC,
26                                 .block_size = 64,
27                                 .key_size = {
28                                         .min = 1,
29                                         .max = 64,
30                                         .increment = 1
31                                 },
32                                 .digest_size = {
33                                         .min = 12,
34                                         .max = 16,
35                                         .increment = 4
36                                 },
37                         }, }
38                 }, }
39         },
40         {       /* MD5 */
41                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
42                         {.sym = {
43                                 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
44                                 {.auth = {
45                                         .algo = RTE_CRYPTO_AUTH_MD5,
46                                         .block_size = 64,
47                                         .key_size = {
48                                                 .min = 0,
49                                                 .max = 0,
50                                                 .increment = 0
51                                         },
52                                         .digest_size = {
53                                                 .min = 12,
54                                                 .max = 16,
55                                                 .increment = 4
56                                         },
57                                 }, }
58                         }, }
59         },
60         {       /* SHA1 HMAC */
61                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
62                         {.sym = {
63                                 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
64                                 {.auth = {
65                                         .algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
66                                         .block_size = 64,
67                                         .key_size = {
68                                                 .min = 1,
69                                                 .max = 64,
70                                                 .increment = 1
71                                         },
72                                         .digest_size = {
73                                                 .min = 12,
74                                                 .max = 20,
75                                                 .increment = 4
76                                         },
77                                 }, }
78                         }, }
79         },
80         {       /* SHA1 */
81                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
82                 {.sym = {
83                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
84                         {.auth = {
85                                 .algo = RTE_CRYPTO_AUTH_SHA1,
86                                 .block_size = 64,
87                                 .key_size = {
88                                         .min = 0,
89                                         .max = 0,
90                                         .increment = 0
91                                 },
92                                 .digest_size = {
93                                         .min = 12,
94                                         .max = 20,
95                                         .increment = 4
96                                 },
97                         }, }
98                 }, }
99         },
100         {
101                 /* SHA224 HMAC */
102                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
103                 {.sym = {
104                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
105                         {.auth = {
106                                 .algo = RTE_CRYPTO_AUTH_SHA224_HMAC,
107                                 .block_size = 64,
108                                 .key_size = {
109                                         .min = 1,
110                                         .max = 64,
111                                         .increment = 1
112                                 },
113                                 .digest_size = {
114                                         .min = 28,
115                                         .max = 28,
116                                         .increment = 0
117                                 },
118                         }, }
119                 }, }
120         },
121         {       /* SHA224 */
122                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
123                 {.sym = {
124                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
125                         {.auth = {
126                                 .algo = RTE_CRYPTO_AUTH_SHA224,
127                                 .block_size = 64,
128                                 .key_size = {
129                                         .min = 0,
130                                         .max = 0,
131                                         .increment = 0
132                                 },
133                                 .digest_size = {
134                                         .min = 12,
135                                         .max = 28,
136                                         .increment = 4
137                                 },
138                         }, }
139                 }, }
140         },
141         {       /* SHA256 HMAC */
142                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
143                         {.sym = {
144                                 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
145                                 {.auth = {
146                                         .algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
147                                         .block_size = 64,
148                                         .key_size = {
149                                                 .min = 1,
150                                                 .max = 64,
151                                                 .increment = 1
152                                         },
153                                         .digest_size = {
154                                                 .min = 12,
155                                                 .max = 32,
156                                                 .increment = 4
157                                         },
158                                 }, }
159                         }, }
160         },
161         {       /* SHA256 */
162                         .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
163                         {.sym = {
164                                 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
165                                 {.auth = {
166                                         .algo = RTE_CRYPTO_AUTH_SHA256,
167                                         .block_size = 64,
168                                         .key_size = {
169                                                 .min = 0,
170                                                 .max = 0,
171                                                 .increment = 0
172                                         },
173                                         .digest_size = {
174                                                 .min = 12,
175                                                 .max = 32,
176                                                 .increment = 4
177                                         },
178                                 }, }
179                         }, }
180                 },
181         {       /* SHA384 HMAC */
182                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
183                 {.sym = {
184                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
185                         {.auth = {
186                                 .algo = RTE_CRYPTO_AUTH_SHA384_HMAC,
187                                 .block_size = 128,
188                                 .key_size = {
189                                         .min = 1,
190                                         .max = 128,
191                                         .increment = 1
192                                 },
193                                 .digest_size = {
194                                         .min = 12,
195                                         .max = 48,
196                                         .increment = 4
197                                 },
198                         }, }
199                 }, }
200         },
201         {       /* SHA384 */
202                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
203                 {.sym = {
204                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
205                         {.auth = {
206                                 .algo = RTE_CRYPTO_AUTH_SHA384,
207                                 .block_size = 128,
208                                 .key_size = {
209                                         .min = 0,
210                                         .max = 0,
211                                         .increment = 0
212                                 },
213                                 .digest_size = {
214                                         .min = 12,
215                                         .max = 48,
216                                         .increment = 4
217                                 },
218                         }, }
219                 }, }
220         },
221         {       /* SHA512 HMAC */
222                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
223                 {.sym = {
224                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
225                         {.auth = {
226                                 .algo = RTE_CRYPTO_AUTH_SHA512_HMAC,
227                                 .block_size = 128,
228                                 .key_size = {
229                                         .min = 1,
230                                         .max = 128,
231                                         .increment = 1
232                                 },
233                                 .digest_size = {
234                                         .min = 12,
235                                         .max = 48,
236                                         .increment = 4
237                                 },
238                         }, }
239                 }, }
240         },
241         {       /* SHA512  */
242                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
243                 {.sym = {
244                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
245                         {.auth = {
246                                 .algo = RTE_CRYPTO_AUTH_SHA512,
247                                 .block_size = 128,
248                                 .key_size = {
249                                         .min = 0,
250                                         .max = 0,
251                                         .increment = 0
252                                 },
253                                 .digest_size = {
254                                         .min = 12,
255                                         .max = 48,
256                                         .increment = 0
257                                 },
258                         }, }
259                 }, }
260         },
261         {       /* AES CBC */
262                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
263                         {.sym = {
264                                 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
265                                 {.cipher = {
266                                         .algo = RTE_CRYPTO_CIPHER_AES_CBC,
267                                         .block_size = 16,
268                                         .key_size = {
269                                                 .min = 16,
270                                                 .max = 32,
271                                                 .increment = 8
272                                         },
273                                         .iv_size = {
274                                                 .min = 16,
275                                                 .max = 16,
276                                                 .increment = 0
277                                         }
278                                 }, }
279                         }, }
280         },
281         {       /* AES CTR */
282                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
283                 {.sym = {
284                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
285                         {.cipher = {
286                                 .algo = RTE_CRYPTO_CIPHER_AES_CTR,
287                                 .block_size = 16,
288                                 .key_size = {
289                                         .min = 16,
290                                         .max = 32,
291                                         .increment = 8
292                                 },
293                                 .iv_size = {
294                                         .min = 16,
295                                         .max = 16,
296                                         .increment = 0
297                                 }
298                         }, }
299                 }, }
300         },
301         {       /* AES GCM */
302                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
303                 {.sym = {
304                         .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,
305                         {.aead = {
306                                 .algo = RTE_CRYPTO_AEAD_AES_GCM,
307                                 .block_size = 16,
308                                 .key_size = {
309                                         .min = 16,
310                                         .max = 32,
311                                         .increment = 8
312                                 },
313                                 .digest_size = {
314                                         .min = 16,
315                                         .max = 16,
316                                         .increment = 0
317                                 },
318                                 .aad_size = {
319                                         .min = 8,
320                                         .max = 12,
321                                         .increment = 4
322                                 },
323                                 .iv_size = {
324                                         .min = 12,
325                                         .max = 16,
326                                         .increment = 4
327                                 }
328                         }, }
329                 }, }
330         },
331         {       /* AES GMAC (AUTH) */
332                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
333                 {.sym = {
334                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
335                         {.auth = {
336                                 .algo = RTE_CRYPTO_AUTH_AES_GMAC,
337                                 .block_size = 16,
338                                 .key_size = {
339                                         .min = 16,
340                                         .max = 32,
341                                         .increment = 8
342                                 },
343                                 .digest_size = {
344                                         .min = 16,
345                                         .max = 16,
346                                         .increment = 0
347                                 },
348                                 .iv_size = {
349                                         .min = 8,
350                                         .max = 65532,
351                                         .increment = 4
352                                 }
353                         }, }
354                 }, }
355         },
356         {       /* 3DES CBC */
357                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
358                 {.sym = {
359                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
360                         {.cipher = {
361                                 .algo = RTE_CRYPTO_CIPHER_3DES_CBC,
362                                 .block_size = 8,
363                                 .key_size = {
364                                         .min = 24,
365                                         .max = 24,
366                                         .increment = 0
367                                 },
368                                 .iv_size = {
369                                         .min = 8,
370                                         .max = 8,
371                                         .increment = 0
372                                 }
373                         }, }
374                 }, }
375         },
376         {       /* 3DES CTR */
377                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
378                 {.sym = {
379                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
380                         {.cipher = {
381                                 .algo = RTE_CRYPTO_CIPHER_3DES_CTR,
382                                 .block_size = 8,
383                                 .key_size = {
384                                         .min = 24,
385                                         .max = 24,
386                                         .increment = 0
387                                 },
388                                 .iv_size = {
389                                         .min = 8,
390                                         .max = 8,
391                                         .increment = 0
392                                 }
393                         }, }
394                 }, }
395         },
396
397         RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
398 };
399
400
401 /**
402  * Configure device (PMD ops callback).
403  *
404  * @param dev Pointer to the device structure.
405  * @param config Pointer to configuration structure.
406  * @returns 0. Always.
407  */
408 static int
409 mrvl_crypto_pmd_config(__rte_unused struct rte_cryptodev *dev,
410                 __rte_unused struct rte_cryptodev_config *config)
411 {
412         return 0;
413 }
414
415 /**
416  * Start device (PMD ops callback).
417  *
418  * @param dev Pointer to the device structure.
419  * @returns 0. Always.
420  */
421 static int
422 mrvl_crypto_pmd_start(__rte_unused struct rte_cryptodev *dev)
423 {
424         return 0;
425 }
426
427 /**
428  * Stop device (PMD ops callback).
429  *
430  * @param dev Pointer to the device structure.
431  * @returns 0. Always.
432  */
433 static void
434 mrvl_crypto_pmd_stop(__rte_unused struct rte_cryptodev *dev)
435 {
436 }
437
438 /**
439  * Get device statistics (PMD ops callback).
440  *
441  * @param dev Pointer to the device structure.
442  * @param stats Pointer to statistics structure [out].
443  */
444 static void
445 mrvl_crypto_pmd_stats_get(struct rte_cryptodev *dev,
446                 struct rte_cryptodev_stats *stats)
447 {
448         int qp_id;
449
450         for (qp_id = 0; qp_id < dev->data->nb_queue_pairs; qp_id++) {
451                 struct mrvl_crypto_qp *qp = dev->data->queue_pairs[qp_id];
452
453                 stats->enqueued_count += qp->stats.enqueued_count;
454                 stats->dequeued_count += qp->stats.dequeued_count;
455
456                 stats->enqueue_err_count += qp->stats.enqueue_err_count;
457                 stats->dequeue_err_count += qp->stats.dequeue_err_count;
458         }
459 }
460
461 /**
462  * Reset device statistics (PMD ops callback).
463  *
464  * @param dev Pointer to the device structure.
465  */
466 static void
467 mrvl_crypto_pmd_stats_reset(struct rte_cryptodev *dev)
468 {
469         int qp_id;
470
471         for (qp_id = 0; qp_id < dev->data->nb_queue_pairs; qp_id++) {
472                 struct mrvl_crypto_qp *qp = dev->data->queue_pairs[qp_id];
473
474                 memset(&qp->stats, 0, sizeof(qp->stats));
475         }
476 }
477
478 /**
479  * Get device info (PMD ops callback).
480  *
481  * @param dev Pointer to the device structure.
482  * @param dev_info Pointer to the device info structure [out].
483  */
484 static void
485 mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
486                 struct rte_cryptodev_info *dev_info)
487 {
488         struct mrvl_crypto_private *internals = dev->data->dev_private;
489
490         if (dev_info != NULL) {
491                 dev_info->driver_id = dev->driver_id;
492                 dev_info->feature_flags = dev->feature_flags;
493                 dev_info->capabilities = mrvl_crypto_pmd_capabilities;
494                 dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
495                 dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
496         }
497 }
498
499 /**
500  * Release queue pair (PMD ops callback).
501  *
502  * @param dev Pointer to the device structure.
503  * @param qp_id ID of Queue Pair to release.
504  * @returns 0. Always.
505  */
506 static int
507 mrvl_crypto_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
508 {
509         struct mrvl_crypto_qp *qp =
510                         (struct mrvl_crypto_qp *)dev->data->queue_pairs[qp_id];
511
512         if (dev->data->queue_pairs[qp_id] != NULL) {
513                 sam_cio_flush(qp->cio);
514                 sam_cio_deinit(qp->cio);
515                 rte_free(dev->data->queue_pairs[qp_id]);
516                 dev->data->queue_pairs[qp_id] = NULL;
517         }
518
519         return 0;
520 }
521
522 /**
523  * Close device (PMD ops callback).
524  *
525  * @param dev Pointer to the device structure.
526  * @returns 0. Always.
527  */
528 static int
529 mrvl_crypto_pmd_close(struct rte_cryptodev *dev)
530 {
531         int qp_id;
532
533         for (qp_id = 0; qp_id < dev->data->nb_queue_pairs; qp_id++)
534                 mrvl_crypto_pmd_qp_release(dev, qp_id);
535
536         return 0;
537 }
538
539 /**
540  * Setup a queue pair (PMD ops callback).
541  *
542  * @param dev Pointer to the device structure.
543  * @param qp_id ID of the Queue Pair.
544  * @param qp_conf Queue pair configuration (nb of descriptors).
545  * @param socket_id NUMA socket to allocate memory on.
546  * @returns 0 upon success, negative value otherwise.
547  */
548 static int
549 mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
550                 const struct rte_cryptodev_qp_conf *qp_conf,
551                 int socket_id, struct rte_mempool *session_pool)
552 {
553         struct mrvl_crypto_qp *qp = NULL;
554         char match[RTE_CRYPTODEV_NAME_MAX_LEN];
555         unsigned int n;
556
557         /* Allocate the queue pair data structure. */
558         qp = rte_zmalloc_socket("MRVL Crypto PMD Queue Pair", sizeof(*qp),
559                                         RTE_CACHE_LINE_SIZE, socket_id);
560         if (qp == NULL)
561                 return -ENOMEM;
562
563         /* Free old qp prior setup if needed. */
564         if (dev->data->queue_pairs[qp_id] != NULL)
565                 mrvl_crypto_pmd_qp_release(dev, qp_id);
566
567         do { /* Error handling block */
568
569                 /*
570                  * This extra check is necessary due to a bug in
571                  * crypto library.
572                  */
573                 int num = sam_get_num_inst();
574                 if (num == 0) {
575                         MRVL_CRYPTO_LOG_ERR("No crypto engines detected.\n");
576                         return -1;
577                 }
578
579                 /*
580                  * In case two crypto engines are enabled qps will
581                  * be evenly spread among them. Even and odd qps will
582                  * be handled by cio-0 and cio-1 respectively. qp-cio mapping
583                  * will look as follows:
584                  *
585                  * qp:      0        1        2        3
586                  * cio-x:y: cio-0:0, cio-1:0, cio-0:1, cio-1:1
587                  *
588                  * qp:      4        5        6        7
589                  * cio-x:y: cio-0:2, cio-1:2, cio-0:3, cio-1:3
590                  *
591                  * In case just one engine is enabled mapping will look as
592                  * follows:
593                  * qp:      0        1        2        3
594                  * cio-x:y: cio-0:0, cio-0:1, cio-0:2, cio-0:3
595                  */
596                 n = snprintf(match, sizeof(match), "cio-%u:%u",
597                                 qp_id % num, qp_id / num);
598
599                 if (n >= sizeof(match))
600                         break;
601
602                 qp->cio_params.match = match;
603                 qp->cio_params.size = qp_conf->nb_descriptors;
604
605                 if (sam_cio_init(&qp->cio_params, &qp->cio) < 0)
606                         break;
607
608                 qp->sess_mp = session_pool;
609
610                 memset(&qp->stats, 0, sizeof(qp->stats));
611                 dev->data->queue_pairs[qp_id] = qp;
612                 return 0;
613         } while (0);
614
615         rte_free(qp);
616         return -1;
617 }
618
619 /** Return the number of allocated queue pairs (PMD ops callback).
620  *
621  * @param dev Pointer to the device structure.
622  * @returns Number of allocated queue pairs.
623  */
624 static uint32_t
625 mrvl_crypto_pmd_qp_count(struct rte_cryptodev *dev)
626 {
627         return dev->data->nb_queue_pairs;
628 }
629
630 /** Returns the size of the session structure (PMD ops callback).
631  *
632  * @param dev Pointer to the device structure [Unused].
633  * @returns Size of Marvell crypto session.
634  */
635 static unsigned
636 mrvl_crypto_pmd_sym_session_get_size(__rte_unused struct rte_cryptodev *dev)
637 {
638         return sizeof(struct mrvl_crypto_session);
639 }
640
641 /** Configure the session from a crypto xform chain (PMD ops callback).
642  *
643  * @param dev Pointer to the device structure.
644  * @param xform Pointer to the crytpo configuration structure.
645  * @param sess Pointer to the empty session structure.
646  * @returns 0 upon success, negative value otherwise.
647  */
648 static int
649 mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
650                 struct rte_crypto_sym_xform *xform,
651                 struct rte_cryptodev_sym_session *sess,
652                 struct rte_mempool *mp)
653 {
654         struct mrvl_crypto_session *mrvl_sess;
655         void *sess_private_data;
656         int ret;
657
658         if (sess == NULL) {
659                 MRVL_CRYPTO_LOG_ERR("Invalid session struct.");
660                 return -EINVAL;
661         }
662
663         if (rte_mempool_get(mp, &sess_private_data)) {
664                 CDEV_LOG_ERR("Couldn't get object from session mempool.");
665                 return -ENOMEM;
666         }
667
668         ret = mrvl_crypto_set_session_parameters(sess_private_data, xform);
669         if (ret != 0) {
670                 MRVL_CRYPTO_LOG_ERR("Failed to configure session parameters.");
671
672                 /* Return session to mempool */
673                 rte_mempool_put(mp, sess_private_data);
674                 return ret;
675         }
676
677         set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
678
679         mrvl_sess = (struct mrvl_crypto_session *)sess_private_data;
680         if (sam_session_create(&mrvl_sess->sam_sess_params,
681                                 &mrvl_sess->sam_sess) < 0) {
682                 MRVL_CRYPTO_LOG_DBG("Failed to create session!");
683                 return -EIO;
684         }
685
686         return 0;
687 }
688
689 /**
690  * Clear the memory of session so it doesn't leave key material behind.
691  *
692  * @param dev Pointer to the device structure.
693  * @returns 0. Always.
694  */
695 static void
696 mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
697                 struct rte_cryptodev_sym_session *sess)
698 {
699
700         uint8_t index = dev->driver_id;
701         void *sess_priv = get_sym_session_private_data(sess, index);
702
703         /* Zero out the whole structure */
704         if (sess_priv) {
705                 struct mrvl_crypto_session *mrvl_sess =
706                         (struct mrvl_crypto_session *)sess_priv;
707
708                 if (mrvl_sess->sam_sess &&
709                     sam_session_destroy(mrvl_sess->sam_sess) < 0) {
710                         MRVL_CRYPTO_LOG_INFO("Error while destroying session!");
711                 }
712
713                 memset(sess, 0, sizeof(struct mrvl_crypto_session));
714                 struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
715                 set_sym_session_private_data(sess, index, NULL);
716                 rte_mempool_put(sess_mp, sess_priv);
717         }
718 }
719
720 /**
721  * PMD handlers for crypto ops.
722  */
723 static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
724                 .dev_configure          = mrvl_crypto_pmd_config,
725                 .dev_start              = mrvl_crypto_pmd_start,
726                 .dev_stop               = mrvl_crypto_pmd_stop,
727                 .dev_close              = mrvl_crypto_pmd_close,
728
729                 .dev_infos_get          = mrvl_crypto_pmd_info_get,
730
731                 .stats_get              = mrvl_crypto_pmd_stats_get,
732                 .stats_reset            = mrvl_crypto_pmd_stats_reset,
733
734                 .queue_pair_setup       = mrvl_crypto_pmd_qp_setup,
735                 .queue_pair_release     = mrvl_crypto_pmd_qp_release,
736                 .queue_pair_count       = mrvl_crypto_pmd_qp_count,
737
738                 .sym_session_get_size   = mrvl_crypto_pmd_sym_session_get_size,
739                 .sym_session_configure  = mrvl_crypto_pmd_sym_session_configure,
740                 .sym_session_clear      = mrvl_crypto_pmd_sym_session_clear
741 };
742
743 struct rte_cryptodev_ops *rte_mrvl_crypto_pmd_ops = &mrvl_crypto_pmd_ops;