New upstream version 18.02
[deb_dpdk.git] / drivers / crypto / kasumi / rte_kasumi_pmd.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2016-2017 Intel Corporation
3  */
4
5 #include <rte_common.h>
6 #include <rte_hexdump.h>
7 #include <rte_cryptodev.h>
8 #include <rte_cryptodev_pmd.h>
9 #include <rte_bus_vdev.h>
10 #include <rte_malloc.h>
11 #include <rte_cpuflags.h>
12
13 #include "rte_kasumi_pmd_private.h"
14
15 #define KASUMI_KEY_LENGTH 16
16 #define KASUMI_IV_LENGTH 8
17 #define KASUMI_MAX_BURST 4
18 #define BYTE_LEN 8
19
20 static uint8_t cryptodev_driver_id;
21
22 /** Get xform chain order. */
23 static enum kasumi_operation
24 kasumi_get_mode(const struct rte_crypto_sym_xform *xform)
25 {
26         if (xform == NULL)
27                 return KASUMI_OP_NOT_SUPPORTED;
28
29         if (xform->next)
30                 if (xform->next->next != NULL)
31                         return KASUMI_OP_NOT_SUPPORTED;
32
33         if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
34                 if (xform->next == NULL)
35                         return KASUMI_OP_ONLY_AUTH;
36                 else if (xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER)
37                         return KASUMI_OP_AUTH_CIPHER;
38                 else
39                         return KASUMI_OP_NOT_SUPPORTED;
40         }
41
42         if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
43                 if (xform->next == NULL)
44                         return KASUMI_OP_ONLY_CIPHER;
45                 else if (xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH)
46                         return KASUMI_OP_CIPHER_AUTH;
47                 else
48                         return KASUMI_OP_NOT_SUPPORTED;
49         }
50
51         return KASUMI_OP_NOT_SUPPORTED;
52 }
53
54
55 /** Parse crypto xform chain and set private session parameters. */
56 int
57 kasumi_set_session_parameters(struct kasumi_session *sess,
58                 const struct rte_crypto_sym_xform *xform)
59 {
60         const struct rte_crypto_sym_xform *auth_xform = NULL;
61         const struct rte_crypto_sym_xform *cipher_xform = NULL;
62         enum kasumi_operation mode;
63
64         /* Select Crypto operation - hash then cipher / cipher then hash */
65         mode = kasumi_get_mode(xform);
66
67         switch (mode) {
68         case KASUMI_OP_CIPHER_AUTH:
69                 auth_xform = xform->next;
70                 /* Fall-through */
71         case KASUMI_OP_ONLY_CIPHER:
72                 cipher_xform = xform;
73                 break;
74         case KASUMI_OP_AUTH_CIPHER:
75                 cipher_xform = xform->next;
76                 /* Fall-through */
77         case KASUMI_OP_ONLY_AUTH:
78                 auth_xform = xform;
79                 break;
80         case KASUMI_OP_NOT_SUPPORTED:
81         default:
82                 KASUMI_LOG_ERR("Unsupported operation chain order parameter");
83                 return -ENOTSUP;
84         }
85
86         if (cipher_xform) {
87                 /* Only KASUMI F8 supported */
88                 if (cipher_xform->cipher.algo != RTE_CRYPTO_CIPHER_KASUMI_F8)
89                         return -ENOTSUP;
90
91                 sess->cipher_iv_offset = cipher_xform->cipher.iv.offset;
92                 if (cipher_xform->cipher.iv.length != KASUMI_IV_LENGTH) {
93                         KASUMI_LOG_ERR("Wrong IV length");
94                         return -EINVAL;
95                 }
96
97                 /* Initialize key */
98                 sso_kasumi_init_f8_key_sched(cipher_xform->cipher.key.data,
99                                 &sess->pKeySched_cipher);
100         }
101
102         if (auth_xform) {
103                 /* Only KASUMI F9 supported */
104                 if (auth_xform->auth.algo != RTE_CRYPTO_AUTH_KASUMI_F9)
105                         return -ENOTSUP;
106
107                 if (auth_xform->auth.digest_length != KASUMI_DIGEST_LENGTH) {
108                         KASUMI_LOG_ERR("Wrong digest length");
109                         return -EINVAL;
110                 }
111
112                 sess->auth_op = auth_xform->auth.op;
113
114                 /* Initialize key */
115                 sso_kasumi_init_f9_key_sched(auth_xform->auth.key.data,
116                                 &sess->pKeySched_hash);
117         }
118
119
120         sess->op = mode;
121
122         return 0;
123 }
124
125 /** Get KASUMI session. */
126 static struct kasumi_session *
127 kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
128 {
129         struct kasumi_session *sess = NULL;
130
131         if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
132                 if (likely(op->sym->session != NULL))
133                         sess = (struct kasumi_session *)
134                                         get_session_private_data(
135                                         op->sym->session,
136                                         cryptodev_driver_id);
137         } else {
138                 void *_sess = NULL;
139                 void *_sess_private_data = NULL;
140
141                 if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
142                         return NULL;
143
144                 if (rte_mempool_get(qp->sess_mp, (void **)&_sess_private_data))
145                         return NULL;
146
147                 sess = (struct kasumi_session *)_sess_private_data;
148
149                 if (unlikely(kasumi_set_session_parameters(sess,
150                                 op->sym->xform) != 0)) {
151                         rte_mempool_put(qp->sess_mp, _sess);
152                         rte_mempool_put(qp->sess_mp, _sess_private_data);
153                         sess = NULL;
154                 }
155                 op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
156                 set_session_private_data(op->sym->session, cryptodev_driver_id,
157                         _sess_private_data);
158         }
159
160         if (unlikely(sess == NULL))
161                 op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
162
163         return sess;
164 }
165
166 /** Encrypt/decrypt mbufs with same cipher key. */
167 static uint8_t
168 process_kasumi_cipher_op(struct rte_crypto_op **ops,
169                 struct kasumi_session *session,
170                 uint8_t num_ops)
171 {
172         unsigned i;
173         uint8_t processed_ops = 0;
174         uint8_t *src[num_ops], *dst[num_ops];
175         uint8_t *iv_ptr;
176         uint64_t iv[num_ops];
177         uint32_t num_bytes[num_ops];
178
179         for (i = 0; i < num_ops; i++) {
180                 src[i] = rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *) +
181                                 (ops[i]->sym->cipher.data.offset >> 3);
182                 dst[i] = ops[i]->sym->m_dst ?
183                         rte_pktmbuf_mtod(ops[i]->sym->m_dst, uint8_t *) +
184                                 (ops[i]->sym->cipher.data.offset >> 3) :
185                         rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *) +
186                                 (ops[i]->sym->cipher.data.offset >> 3);
187                 iv_ptr = rte_crypto_op_ctod_offset(ops[i], uint8_t *,
188                                 session->cipher_iv_offset);
189                 iv[i] = *((uint64_t *)(iv_ptr));
190                 num_bytes[i] = ops[i]->sym->cipher.data.length >> 3;
191
192                 processed_ops++;
193         }
194
195         if (processed_ops != 0)
196                 sso_kasumi_f8_n_buffer(&session->pKeySched_cipher, iv,
197                         src, dst, num_bytes, processed_ops);
198
199         return processed_ops;
200 }
201
202 /** Encrypt/decrypt mbuf (bit level function). */
203 static uint8_t
204 process_kasumi_cipher_op_bit(struct rte_crypto_op *op,
205                 struct kasumi_session *session)
206 {
207         uint8_t *src, *dst;
208         uint8_t *iv_ptr;
209         uint64_t iv;
210         uint32_t length_in_bits, offset_in_bits;
211
212         offset_in_bits = op->sym->cipher.data.offset;
213         src = rte_pktmbuf_mtod(op->sym->m_src, uint8_t *);
214         if (op->sym->m_dst == NULL) {
215                 op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
216                 KASUMI_LOG_ERR("bit-level in-place not supported\n");
217                 return 0;
218         }
219         dst = rte_pktmbuf_mtod(op->sym->m_dst, uint8_t *);
220         iv_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
221                         session->cipher_iv_offset);
222         iv = *((uint64_t *)(iv_ptr));
223         length_in_bits = op->sym->cipher.data.length;
224
225         sso_kasumi_f8_1_buffer_bit(&session->pKeySched_cipher, iv,
226                         src, dst, length_in_bits, offset_in_bits);
227
228         return 1;
229 }
230
231 /** Generate/verify hash from mbufs with same hash key. */
232 static int
233 process_kasumi_hash_op(struct kasumi_qp *qp, struct rte_crypto_op **ops,
234                 struct kasumi_session *session,
235                 uint8_t num_ops)
236 {
237         unsigned i;
238         uint8_t processed_ops = 0;
239         uint8_t *src, *dst;
240         uint32_t length_in_bits;
241         uint32_t num_bytes;
242
243         for (i = 0; i < num_ops; i++) {
244                 /* Data must be byte aligned */
245                 if ((ops[i]->sym->auth.data.offset % BYTE_LEN) != 0) {
246                         ops[i]->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
247                         KASUMI_LOG_ERR("offset");
248                         break;
249                 }
250
251                 length_in_bits = ops[i]->sym->auth.data.length;
252
253                 src = rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *) +
254                                 (ops[i]->sym->auth.data.offset >> 3);
255                 /* Direction from next bit after end of message */
256                 num_bytes = length_in_bits >> 3;
257
258                 if (session->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY) {
259                         dst = qp->temp_digest;
260                         sso_kasumi_f9_1_buffer(&session->pKeySched_hash, src,
261                                         num_bytes, dst);
262
263                         /* Verify digest. */
264                         if (memcmp(dst, ops[i]->sym->auth.digest.data,
265                                         KASUMI_DIGEST_LENGTH) != 0)
266                                 ops[i]->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
267                 } else  {
268                         dst = ops[i]->sym->auth.digest.data;
269
270                         sso_kasumi_f9_1_buffer(&session->pKeySched_hash, src,
271                                         num_bytes, dst);
272                 }
273                 processed_ops++;
274         }
275
276         return processed_ops;
277 }
278
279 /** Process a batch of crypto ops which shares the same session. */
280 static int
281 process_ops(struct rte_crypto_op **ops, struct kasumi_session *session,
282                 struct kasumi_qp *qp, uint8_t num_ops,
283                 uint16_t *accumulated_enqueued_ops)
284 {
285         unsigned i;
286         unsigned enqueued_ops, processed_ops;
287
288         switch (session->op) {
289         case KASUMI_OP_ONLY_CIPHER:
290                 processed_ops = process_kasumi_cipher_op(ops,
291                                 session, num_ops);
292                 break;
293         case KASUMI_OP_ONLY_AUTH:
294                 processed_ops = process_kasumi_hash_op(qp, ops, session,
295                                 num_ops);
296                 break;
297         case KASUMI_OP_CIPHER_AUTH:
298                 processed_ops = process_kasumi_cipher_op(ops, session,
299                                 num_ops);
300                 process_kasumi_hash_op(qp, ops, session, processed_ops);
301                 break;
302         case KASUMI_OP_AUTH_CIPHER:
303                 processed_ops = process_kasumi_hash_op(qp, ops, session,
304                                 num_ops);
305                 process_kasumi_cipher_op(ops, session, processed_ops);
306                 break;
307         default:
308                 /* Operation not supported. */
309                 processed_ops = 0;
310         }
311
312         for (i = 0; i < num_ops; i++) {
313                 /*
314                  * If there was no error/authentication failure,
315                  * change status to successful.
316                  */
317                 if (ops[i]->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED)
318                         ops[i]->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
319                 /* Free session if a session-less crypto op. */
320                 if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
321                         memset(session, 0, sizeof(struct kasumi_session));
322                         memset(ops[i]->sym->session, 0,
323                                         rte_cryptodev_get_header_session_size());
324                         rte_mempool_put(qp->sess_mp, session);
325                         rte_mempool_put(qp->sess_mp, ops[i]->sym->session);
326                         ops[i]->sym->session = NULL;
327                 }
328         }
329
330         enqueued_ops = rte_ring_enqueue_burst(qp->processed_ops,
331                                 (void **)ops, processed_ops, NULL);
332         qp->qp_stats.enqueued_count += enqueued_ops;
333         *accumulated_enqueued_ops += enqueued_ops;
334
335         return enqueued_ops;
336 }
337
338 /** Process a crypto op with length/offset in bits. */
339 static int
340 process_op_bit(struct rte_crypto_op *op, struct kasumi_session *session,
341                 struct kasumi_qp *qp, uint16_t *accumulated_enqueued_ops)
342 {
343         unsigned enqueued_op, processed_op;
344
345         switch (session->op) {
346         case KASUMI_OP_ONLY_CIPHER:
347                 processed_op = process_kasumi_cipher_op_bit(op,
348                                 session);
349                 break;
350         case KASUMI_OP_ONLY_AUTH:
351                 processed_op = process_kasumi_hash_op(qp, &op, session, 1);
352                 break;
353         case KASUMI_OP_CIPHER_AUTH:
354                 processed_op = process_kasumi_cipher_op_bit(op, session);
355                 if (processed_op == 1)
356                         process_kasumi_hash_op(qp, &op, session, 1);
357                 break;
358         case KASUMI_OP_AUTH_CIPHER:
359                 processed_op = process_kasumi_hash_op(qp, &op, session, 1);
360                 if (processed_op == 1)
361                         process_kasumi_cipher_op_bit(op, session);
362                 break;
363         default:
364                 /* Operation not supported. */
365                 processed_op = 0;
366         }
367
368         /*
369          * If there was no error/authentication failure,
370          * change status to successful.
371          */
372         if (op->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED)
373                 op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
374
375         /* Free session if a session-less crypto op. */
376         if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
377                 memset(op->sym->session, 0, sizeof(struct kasumi_session));
378                 rte_cryptodev_sym_session_free(op->sym->session);
379                 op->sym->session = NULL;
380         }
381
382         enqueued_op = rte_ring_enqueue_burst(qp->processed_ops, (void **)&op,
383                                 processed_op, NULL);
384         qp->qp_stats.enqueued_count += enqueued_op;
385         *accumulated_enqueued_ops += enqueued_op;
386
387         return enqueued_op;
388 }
389
390 static uint16_t
391 kasumi_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
392                 uint16_t nb_ops)
393 {
394         struct rte_crypto_op *c_ops[nb_ops];
395         struct rte_crypto_op *curr_c_op;
396
397         struct kasumi_session *prev_sess = NULL, *curr_sess = NULL;
398         struct kasumi_qp *qp = queue_pair;
399         unsigned i;
400         uint8_t burst_size = 0;
401         uint16_t enqueued_ops = 0;
402         uint8_t processed_ops;
403
404         for (i = 0; i < nb_ops; i++) {
405                 curr_c_op = ops[i];
406
407 #ifdef RTE_LIBRTE_PMD_KASUMI_DEBUG
408                 if (!rte_pktmbuf_is_contiguous(curr_c_op->sym->m_src) ||
409                                 (curr_c_op->sym->m_dst != NULL &&
410                                 !rte_pktmbuf_is_contiguous(
411                                                 curr_c_op->sym->m_dst))) {
412                         KASUMI_LOG_ERR("PMD supports only contiguous mbufs, "
413                                 "op (%p) provides noncontiguous mbuf as "
414                                 "source/destination buffer.\n", curr_c_op);
415                         curr_c_op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
416                         break;
417                 }
418 #endif
419
420                 /* Set status as enqueued (not processed yet) by default. */
421                 curr_c_op->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
422
423                 curr_sess = kasumi_get_session(qp, curr_c_op);
424                 if (unlikely(curr_sess == NULL ||
425                                 curr_sess->op == KASUMI_OP_NOT_SUPPORTED)) {
426                         curr_c_op->status =
427                                         RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
428                         break;
429                 }
430
431                 /* If length/offset is at bit-level, process this buffer alone. */
432                 if (((curr_c_op->sym->cipher.data.length % BYTE_LEN) != 0)
433                                 || ((ops[i]->sym->cipher.data.offset
434                                         % BYTE_LEN) != 0)) {
435                         /* Process the ops of the previous session. */
436                         if (prev_sess != NULL) {
437                                 processed_ops = process_ops(c_ops, prev_sess,
438                                                 qp, burst_size, &enqueued_ops);
439                                 if (processed_ops < burst_size) {
440                                         burst_size = 0;
441                                         break;
442                                 }
443
444                                 burst_size = 0;
445                                 prev_sess = NULL;
446                         }
447
448                         processed_ops = process_op_bit(curr_c_op, curr_sess,
449                                                 qp, &enqueued_ops);
450                         if (processed_ops != 1)
451                                 break;
452
453                         continue;
454                 }
455
456                 /* Batch ops that share the same session. */
457                 if (prev_sess == NULL) {
458                         prev_sess = curr_sess;
459                         c_ops[burst_size++] = curr_c_op;
460                 } else if (curr_sess == prev_sess) {
461                         c_ops[burst_size++] = curr_c_op;
462                         /*
463                          * When there are enough ops to process in a batch,
464                          * process them, and start a new batch.
465                          */
466                         if (burst_size == KASUMI_MAX_BURST) {
467                                 processed_ops = process_ops(c_ops, prev_sess,
468                                                 qp, burst_size, &enqueued_ops);
469                                 if (processed_ops < burst_size) {
470                                         burst_size = 0;
471                                         break;
472                                 }
473
474                                 burst_size = 0;
475                                 prev_sess = NULL;
476                         }
477                 } else {
478                         /*
479                          * Different session, process the ops
480                          * of the previous session.
481                          */
482                         processed_ops = process_ops(c_ops, prev_sess,
483                                         qp, burst_size, &enqueued_ops);
484                         if (processed_ops < burst_size) {
485                                 burst_size = 0;
486                                 break;
487                         }
488
489                         burst_size = 0;
490                         prev_sess = curr_sess;
491
492                         c_ops[burst_size++] = curr_c_op;
493                 }
494         }
495
496         if (burst_size != 0) {
497                 /* Process the crypto ops of the last session. */
498                 processed_ops = process_ops(c_ops, prev_sess,
499                                 qp, burst_size, &enqueued_ops);
500         }
501
502         qp->qp_stats.enqueue_err_count += nb_ops - enqueued_ops;
503         return enqueued_ops;
504 }
505
506 static uint16_t
507 kasumi_pmd_dequeue_burst(void *queue_pair,
508                 struct rte_crypto_op **c_ops, uint16_t nb_ops)
509 {
510         struct kasumi_qp *qp = queue_pair;
511
512         unsigned nb_dequeued;
513
514         nb_dequeued = rte_ring_dequeue_burst(qp->processed_ops,
515                         (void **)c_ops, nb_ops, NULL);
516         qp->qp_stats.dequeued_count += nb_dequeued;
517
518         return nb_dequeued;
519 }
520
521 static int cryptodev_kasumi_remove(struct rte_vdev_device *vdev);
522
523 static int
524 cryptodev_kasumi_create(const char *name,
525                         struct rte_vdev_device *vdev,
526                         struct rte_cryptodev_pmd_init_params *init_params)
527 {
528         struct rte_cryptodev *dev;
529         struct kasumi_private *internals;
530         uint64_t cpu_flags = 0;
531
532         dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
533         if (dev == NULL) {
534                 KASUMI_LOG_ERR("failed to create cryptodev vdev");
535                 goto init_error;
536         }
537
538         /* Check CPU for supported vector instruction set */
539         if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX))
540                 cpu_flags |= RTE_CRYPTODEV_FF_CPU_AVX;
541         else
542                 cpu_flags |= RTE_CRYPTODEV_FF_CPU_SSE;
543
544         dev->driver_id = cryptodev_driver_id;
545         dev->dev_ops = rte_kasumi_pmd_ops;
546
547         /* Register RX/TX burst functions for data path. */
548         dev->dequeue_burst = kasumi_pmd_dequeue_burst;
549         dev->enqueue_burst = kasumi_pmd_enqueue_burst;
550
551         dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
552                         RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
553                         cpu_flags;
554
555         internals = dev->data->dev_private;
556
557         internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
558         internals->max_nb_sessions = init_params->max_nb_sessions;
559
560         return 0;
561 init_error:
562         KASUMI_LOG_ERR("driver %s: cryptodev_kasumi_create failed",
563                         init_params->name);
564
565         cryptodev_kasumi_remove(vdev);
566         return -EFAULT;
567 }
568
569 static int
570 cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
571 {
572         struct rte_cryptodev_pmd_init_params init_params = {
573                 "",
574                 sizeof(struct kasumi_private),
575                 rte_socket_id(),
576                 RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
577                 RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
578         };
579         const char *name;
580         const char *input_args;
581
582         name = rte_vdev_device_name(vdev);
583         if (name == NULL)
584                 return -EINVAL;
585         input_args = rte_vdev_device_args(vdev);
586
587         rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
588
589         return cryptodev_kasumi_create(name, vdev, &init_params);
590 }
591
592 static int
593 cryptodev_kasumi_remove(struct rte_vdev_device *vdev)
594 {
595         struct rte_cryptodev *cryptodev;
596         const char *name;
597
598         name = rte_vdev_device_name(vdev);
599         if (name == NULL)
600                 return -EINVAL;
601
602         cryptodev = rte_cryptodev_pmd_get_named_dev(name);
603         if (cryptodev == NULL)
604                 return -ENODEV;
605
606         return rte_cryptodev_pmd_destroy(cryptodev);
607 }
608
609 static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = {
610         .probe = cryptodev_kasumi_probe,
611         .remove = cryptodev_kasumi_remove
612 };
613
614 static struct cryptodev_driver kasumi_crypto_drv;
615
616 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
617 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
618 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
619         "max_nb_queue_pairs=<int> "
620         "max_nb_sessions=<int> "
621         "socket_id=<int>");
622 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv, cryptodev_kasumi_pmd_drv,
623                 cryptodev_driver_id);