d226c2348aef061b0e0e7163564111335aff694c
[dpdk.git] / drivers / crypto / aesni_gcm / aesni_gcm_pmd.c
1 /*-
2  *   BSD LICENSE
3  *
4  *   Copyright(c) 2016-2017 Intel Corporation. All rights reserved.
5  *
6  *   Redistribution and use in source and binary forms, with or without
7  *   modification, are permitted provided that the following conditions
8  *   are met:
9  *
10  *     * Redistributions of source code must retain the above copyright
11  *       notice, this list of conditions and the following disclaimer.
12  *     * Redistributions in binary form must reproduce the above copyright
13  *       notice, this list of conditions and the following disclaimer in
14  *       the documentation and/or other materials provided with the
15  *       distribution.
16  *     * Neither the name of Intel Corporation nor the names of its
17  *       contributors may be used to endorse or promote products derived
18  *       from this software without specific prior written permission.
19  *
20  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32
33 #include <rte_common.h>
34 #include <rte_config.h>
35 #include <rte_hexdump.h>
36 #include <rte_cryptodev.h>
37 #include <rte_cryptodev_pmd.h>
38 #include <rte_cryptodev_vdev.h>
39 #include <rte_vdev.h>
40 #include <rte_malloc.h>
41 #include <rte_cpuflags.h>
42 #include <rte_byteorder.h>
43
44 #include "aesni_gcm_pmd_private.h"
45
46 static uint8_t cryptodev_driver_id;
47
48 /** Parse crypto xform chain and set private session parameters */
49 int
50 aesni_gcm_set_session_parameters(const struct aesni_gcm_ops *gcm_ops,
51                 struct aesni_gcm_session *sess,
52                 const struct rte_crypto_sym_xform *xform)
53 {
54         const struct rte_crypto_sym_xform *auth_xform;
55         const struct rte_crypto_sym_xform *aead_xform;
56         uint16_t digest_length;
57         uint8_t key_length;
58         uint8_t *key;
59
60         /* AES-GMAC */
61         if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
62                 auth_xform = xform;
63                 if (auth_xform->auth.algo != RTE_CRYPTO_AUTH_AES_GMAC) {
64                         GCM_LOG_ERR("Only AES GMAC is supported as an "
65                                         "authentication only algorithm");
66                         return -EINVAL;
67                 }
68                 /* Set IV parameters */
69                 sess->iv.offset = auth_xform->auth.iv.offset;
70                 sess->iv.length = auth_xform->auth.iv.length;
71
72                 /* Select Crypto operation */
73                 if (auth_xform->auth.op == RTE_CRYPTO_AUTH_OP_GENERATE)
74                         sess->op = AESNI_GMAC_OP_GENERATE;
75                 else
76                         sess->op = AESNI_GMAC_OP_VERIFY;
77
78                 key_length = auth_xform->auth.key.length;
79                 key = auth_xform->auth.key.data;
80                 digest_length = auth_xform->auth.digest_length;
81
82         /* AES-GCM */
83         } else if (xform->type == RTE_CRYPTO_SYM_XFORM_AEAD) {
84                 aead_xform = xform;
85
86                 if (aead_xform->aead.algo != RTE_CRYPTO_AEAD_AES_GCM) {
87                         GCM_LOG_ERR("The only combined operation "
88                                                 "supported is AES GCM");
89                         return -EINVAL;
90                 }
91
92                 /* Set IV parameters */
93                 sess->iv.offset = aead_xform->aead.iv.offset;
94                 sess->iv.length = aead_xform->aead.iv.length;
95
96                 /* Select Crypto operation */
97                 if (aead_xform->aead.op == RTE_CRYPTO_AEAD_OP_ENCRYPT)
98                         sess->op = AESNI_GCM_OP_AUTHENTICATED_ENCRYPTION;
99                 else
100                         sess->op = AESNI_GCM_OP_AUTHENTICATED_DECRYPTION;
101
102                 key_length = aead_xform->aead.key.length;
103                 key = aead_xform->aead.key.data;
104
105                 sess->aad_length = aead_xform->aead.add_auth_data_length;
106                 digest_length = aead_xform->aead.digest_length;
107         } else {
108                 GCM_LOG_ERR("Wrong xform type, has to be AEAD or authentication");
109                 return -EINVAL;
110         }
111
112
113         /* IV check */
114         if (sess->iv.length != 16 && sess->iv.length != 12 &&
115                         sess->iv.length != 0) {
116                 GCM_LOG_ERR("Wrong IV length");
117                 return -EINVAL;
118         }
119
120         /* Check key length and calculate GCM pre-compute. */
121         switch (key_length) {
122         case 16:
123                 sess->key = AESNI_GCM_KEY_128;
124                 break;
125         case 24:
126                 sess->key = AESNI_GCM_KEY_192;
127                 break;
128         case 32:
129                 sess->key = AESNI_GCM_KEY_256;
130                 break;
131         default:
132                 GCM_LOG_ERR("Unsupported key length");
133                 return -EINVAL;
134         }
135
136         gcm_ops[sess->key].precomp(key, &sess->gdata_key);
137
138         /* Digest check */
139         if (digest_length != 16 &&
140                         digest_length != 12 &&
141                         digest_length != 8) {
142                 GCM_LOG_ERR("digest");
143                 return -EINVAL;
144         }
145         sess->digest_length = digest_length;
146
147         return 0;
148 }
149
150 /** Get gcm session */
151 static struct aesni_gcm_session *
152 aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
153 {
154         struct aesni_gcm_session *sess = NULL;
155         struct rte_crypto_sym_op *sym_op = op->sym;
156
157         if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
158                 sess = (struct aesni_gcm_session *)sym_op->session->_private;
159         } else  {
160                 void *_sess;
161
162                 if (rte_mempool_get(qp->sess_mp, &_sess))
163                         return sess;
164
165                 sess = (struct aesni_gcm_session *)
166                         ((struct rte_cryptodev_sym_session *)_sess)->_private;
167
168                 if (unlikely(aesni_gcm_set_session_parameters(qp->ops, sess,
169                                 sym_op->xform) != 0)) {
170                         rte_mempool_put(qp->sess_mp, _sess);
171                         sess = NULL;
172                 }
173         }
174         return sess;
175 }
176
177 /**
178  * Process a crypto operation, calling
179  * the GCM API from the multi buffer library.
180  *
181  * @param       qp              queue pair
182  * @param       op              symmetric crypto operation
183  * @param       session         GCM session
184  *
185  * @return
186  *
187  */
188 static int
189 process_gcm_crypto_op(struct aesni_gcm_qp *qp, struct rte_crypto_op *op,
190                 struct aesni_gcm_session *session)
191 {
192         uint8_t *src, *dst;
193         uint8_t *iv_ptr;
194         struct rte_crypto_sym_op *sym_op = op->sym;
195         struct rte_mbuf *m_src = sym_op->m_src;
196         uint32_t offset, data_offset, data_length;
197         uint32_t part_len, total_len, data_len;
198
199         if (session->op == AESNI_GCM_OP_AUTHENTICATED_ENCRYPTION ||
200                         session->op == AESNI_GCM_OP_AUTHENTICATED_DECRYPTION) {
201                 offset = sym_op->aead.data.offset;
202                 data_offset = offset;
203                 data_length = sym_op->aead.data.length;
204         } else {
205                 offset = sym_op->auth.data.offset;
206                 data_offset = offset;
207                 data_length = sym_op->auth.data.length;
208         }
209
210         RTE_ASSERT(m_src != NULL);
211
212         while (offset >= m_src->data_len) {
213                 offset -= m_src->data_len;
214                 m_src = m_src->next;
215
216                 RTE_ASSERT(m_src != NULL);
217         }
218
219         data_len = m_src->data_len - offset;
220         part_len = (data_len < data_length) ? data_len :
221                         data_length;
222
223         /* Destination buffer is required when segmented source buffer */
224         RTE_ASSERT((part_len == data_length) ||
225                         ((part_len != data_length) &&
226                                         (sym_op->m_dst != NULL)));
227         /* Segmented destination buffer is not supported */
228         RTE_ASSERT((sym_op->m_dst == NULL) ||
229                         ((sym_op->m_dst != NULL) &&
230                                         rte_pktmbuf_is_contiguous(sym_op->m_dst)));
231
232
233         dst = sym_op->m_dst ?
234                         rte_pktmbuf_mtod_offset(sym_op->m_dst, uint8_t *,
235                                         data_offset) :
236                         rte_pktmbuf_mtod_offset(sym_op->m_src, uint8_t *,
237                                         data_offset);
238
239         src = rte_pktmbuf_mtod_offset(m_src, uint8_t *, offset);
240
241         iv_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
242                                 session->iv.offset);
243         /*
244          * GCM working in 12B IV mode => 16B pre-counter block we need
245          * to set BE LSB to 1, driver expects that 16B is allocated
246          */
247         if (session->iv.length == 12) {
248                 uint32_t *iv_padd = (uint32_t *)&(iv_ptr[12]);
249                 *iv_padd = rte_bswap32(1);
250         }
251
252         if (session->op == AESNI_GCM_OP_AUTHENTICATED_ENCRYPTION) {
253
254                 qp->ops[session->key].init(&session->gdata_key,
255                                 &qp->gdata_ctx,
256                                 iv_ptr,
257                                 sym_op->aead.aad.data,
258                                 (uint64_t)session->aad_length);
259
260                 qp->ops[session->key].update_enc(&session->gdata_key,
261                                 &qp->gdata_ctx, dst, src,
262                                 (uint64_t)part_len);
263                 total_len = data_length - part_len;
264
265                 while (total_len) {
266                         dst += part_len;
267                         m_src = m_src->next;
268
269                         RTE_ASSERT(m_src != NULL);
270
271                         src = rte_pktmbuf_mtod(m_src, uint8_t *);
272                         part_len = (m_src->data_len < total_len) ?
273                                         m_src->data_len : total_len;
274
275                         qp->ops[session->key].update_enc(&session->gdata_key,
276                                         &qp->gdata_ctx, dst, src,
277                                         (uint64_t)part_len);
278                         total_len -= part_len;
279                 }
280
281                 qp->ops[session->key].finalize(&session->gdata_key,
282                                 &qp->gdata_ctx,
283                                 sym_op->aead.digest.data,
284                                 (uint64_t)session->digest_length);
285         } else if (session->op == AESNI_GCM_OP_AUTHENTICATED_DECRYPTION) {
286                 uint8_t *auth_tag = (uint8_t *)rte_pktmbuf_append(sym_op->m_dst ?
287                                 sym_op->m_dst : sym_op->m_src,
288                                 session->digest_length);
289
290                 if (!auth_tag) {
291                         GCM_LOG_ERR("auth_tag");
292                         return -1;
293                 }
294
295                 qp->ops[session->key].init(&session->gdata_key,
296                                 &qp->gdata_ctx,
297                                 iv_ptr,
298                                 sym_op->aead.aad.data,
299                                 (uint64_t)session->aad_length);
300
301                 qp->ops[session->key].update_dec(&session->gdata_key,
302                                 &qp->gdata_ctx, dst, src,
303                                 (uint64_t)part_len);
304                 total_len = data_length - part_len;
305
306                 while (total_len) {
307                         dst += part_len;
308                         m_src = m_src->next;
309
310                         RTE_ASSERT(m_src != NULL);
311
312                         src = rte_pktmbuf_mtod(m_src, uint8_t *);
313                         part_len = (m_src->data_len < total_len) ?
314                                         m_src->data_len : total_len;
315
316                         qp->ops[session->key].update_dec(&session->gdata_key,
317                                         &qp->gdata_ctx,
318                                         dst, src,
319                                         (uint64_t)part_len);
320                         total_len -= part_len;
321                 }
322
323                 qp->ops[session->key].finalize(&session->gdata_key,
324                                 &qp->gdata_ctx,
325                                 auth_tag,
326                                 (uint64_t)session->digest_length);
327         } else if (session->op == AESNI_GMAC_OP_GENERATE) {
328                 qp->ops[session->key].init(&session->gdata_key,
329                                 &qp->gdata_ctx,
330                                 iv_ptr,
331                                 src,
332                                 (uint64_t)data_length);
333                 qp->ops[session->key].finalize(&session->gdata_key,
334                                 &qp->gdata_ctx,
335                                 sym_op->auth.digest.data,
336                                 (uint64_t)session->digest_length);
337         } else { /* AESNI_GMAC_OP_VERIFY */
338                 uint8_t *auth_tag = (uint8_t *)rte_pktmbuf_append(sym_op->m_dst ?
339                                 sym_op->m_dst : sym_op->m_src,
340                                 session->digest_length);
341
342                 if (!auth_tag) {
343                         GCM_LOG_ERR("auth_tag");
344                         return -1;
345                 }
346
347                 qp->ops[session->key].init(&session->gdata_key,
348                                 &qp->gdata_ctx,
349                                 iv_ptr,
350                                 src,
351                                 (uint64_t)data_length);
352
353                 qp->ops[session->key].finalize(&session->gdata_key,
354                                 &qp->gdata_ctx,
355                                 auth_tag,
356                                 (uint64_t)session->digest_length);
357         }
358
359         return 0;
360 }
361
362 /**
363  * Process a completed job and return rte_mbuf which job processed
364  *
365  * @param job   JOB_AES_HMAC job to process
366  *
367  * @return
368  * - Returns processed mbuf which is trimmed of output digest used in
369  * verification of supplied digest in the case of a HASH_CIPHER operation
370  * - Returns NULL on invalid job
371  */
372 static void
373 post_process_gcm_crypto_op(struct rte_crypto_op *op)
374 {
375         struct rte_mbuf *m = op->sym->m_dst ? op->sym->m_dst : op->sym->m_src;
376
377         struct aesni_gcm_session *session =
378                 (struct aesni_gcm_session *)op->sym->session->_private;
379
380         op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
381
382         /* Verify digest if required */
383         if (session->op == AESNI_GCM_OP_AUTHENTICATED_DECRYPTION ||
384                         session->op == AESNI_GMAC_OP_VERIFY) {
385                 uint8_t *digest;
386
387                 uint8_t *tag = rte_pktmbuf_mtod_offset(m, uint8_t *,
388                                 m->data_len - session->digest_length);
389
390                 if (session->op == AESNI_GMAC_OP_VERIFY)
391                         digest = op->sym->auth.digest.data;
392                 else
393                         digest = op->sym->aead.digest.data;
394
395 #ifdef RTE_LIBRTE_PMD_AESNI_GCM_DEBUG
396                 rte_hexdump(stdout, "auth tag (orig):",
397                                 digest, session->digest_length);
398                 rte_hexdump(stdout, "auth tag (calc):",
399                                 tag, session->digest_length);
400 #endif
401
402                 if (memcmp(tag, digest, session->digest_length) != 0)
403                         op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
404
405                 /* trim area used for digest from mbuf */
406                 rte_pktmbuf_trim(m, session->digest_length);
407         }
408 }
409
410 /**
411  * Process a completed GCM request
412  *
413  * @param qp            Queue Pair to process
414  * @param job           JOB_AES_HMAC job
415  *
416  * @return
417  * - Number of processed jobs
418  */
419 static void
420 handle_completed_gcm_crypto_op(struct aesni_gcm_qp *qp,
421                 struct rte_crypto_op *op)
422 {
423         post_process_gcm_crypto_op(op);
424
425         /* Free session if a session-less crypto op */
426         if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
427                 rte_mempool_put(qp->sess_mp, op->sym->session);
428                 op->sym->session = NULL;
429         }
430 }
431
432 static uint16_t
433 aesni_gcm_pmd_dequeue_burst(void *queue_pair,
434                 struct rte_crypto_op **ops, uint16_t nb_ops)
435 {
436         struct aesni_gcm_session *sess;
437         struct aesni_gcm_qp *qp = queue_pair;
438
439         int retval = 0;
440         unsigned int i, nb_dequeued;
441
442         nb_dequeued = rte_ring_dequeue_burst(qp->processed_pkts,
443                         (void **)ops, nb_ops, NULL);
444
445         for (i = 0; i < nb_dequeued; i++) {
446
447                 sess = aesni_gcm_get_session(qp, ops[i]);
448                 if (unlikely(sess == NULL)) {
449                         ops[i]->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
450                         qp->qp_stats.dequeue_err_count++;
451                         break;
452                 }
453
454                 retval = process_gcm_crypto_op(qp, ops[i], sess);
455                 if (retval < 0) {
456                         ops[i]->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
457                         qp->qp_stats.dequeue_err_count++;
458                         break;
459                 }
460
461                 handle_completed_gcm_crypto_op(qp, ops[i]);
462         }
463
464         qp->qp_stats.dequeued_count += i;
465
466         return i;
467 }
468
469 static uint16_t
470 aesni_gcm_pmd_enqueue_burst(void *queue_pair,
471                 struct rte_crypto_op **ops, uint16_t nb_ops)
472 {
473         struct aesni_gcm_qp *qp = queue_pair;
474
475         unsigned int nb_enqueued;
476
477         nb_enqueued = rte_ring_enqueue_burst(qp->processed_pkts,
478                         (void **)ops, nb_ops, NULL);
479         qp->qp_stats.enqueued_count += nb_enqueued;
480
481         return nb_enqueued;
482 }
483
484 static int aesni_gcm_remove(struct rte_vdev_device *vdev);
485
486 static int
487 aesni_gcm_create(const char *name,
488                 struct rte_vdev_device *vdev,
489                 struct rte_crypto_vdev_init_params *init_params)
490 {
491         struct rte_cryptodev *dev;
492         struct aesni_gcm_private *internals;
493         enum aesni_gcm_vector_mode vector_mode;
494
495         if (init_params->name[0] == '\0')
496                 snprintf(init_params->name, sizeof(init_params->name),
497                                 "%s", name);
498
499         /* Check CPU for support for AES instruction set */
500         if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_AES)) {
501                 GCM_LOG_ERR("AES instructions not supported by CPU");
502                 return -EFAULT;
503         }
504
505         /* Check CPU for supported vector instruction set */
506         if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2))
507                 vector_mode = RTE_AESNI_GCM_AVX2;
508         else if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX))
509                 vector_mode = RTE_AESNI_GCM_AVX;
510         else
511                 vector_mode = RTE_AESNI_GCM_SSE;
512
513         dev = rte_cryptodev_vdev_pmd_init(init_params->name,
514                         sizeof(struct aesni_gcm_private), init_params->socket_id,
515                         vdev);
516         if (dev == NULL) {
517                 GCM_LOG_ERR("failed to create cryptodev vdev");
518                 goto init_error;
519         }
520
521         dev->driver_id = cryptodev_driver_id;
522         dev->dev_ops = rte_aesni_gcm_pmd_ops;
523
524         /* register rx/tx burst functions for data path */
525         dev->dequeue_burst = aesni_gcm_pmd_dequeue_burst;
526         dev->enqueue_burst = aesni_gcm_pmd_enqueue_burst;
527
528         dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
529                         RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
530                         RTE_CRYPTODEV_FF_CPU_AESNI |
531                         RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
532
533         switch (vector_mode) {
534         case RTE_AESNI_GCM_SSE:
535                 dev->feature_flags |= RTE_CRYPTODEV_FF_CPU_SSE;
536                 break;
537         case RTE_AESNI_GCM_AVX:
538                 dev->feature_flags |= RTE_CRYPTODEV_FF_CPU_AVX;
539                 break;
540         case RTE_AESNI_GCM_AVX2:
541                 dev->feature_flags |= RTE_CRYPTODEV_FF_CPU_AVX2;
542                 break;
543         default:
544                 break;
545         }
546
547         internals = dev->data->dev_private;
548
549         internals->vector_mode = vector_mode;
550
551         internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
552         internals->max_nb_sessions = init_params->max_nb_sessions;
553
554         return 0;
555
556 init_error:
557         GCM_LOG_ERR("driver %s: create failed", init_params->name);
558
559         aesni_gcm_remove(vdev);
560         return -EFAULT;
561 }
562
563 static int
564 aesni_gcm_probe(struct rte_vdev_device *vdev)
565 {
566         struct rte_crypto_vdev_init_params init_params = {
567                 RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
568                 RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
569                 rte_socket_id(),
570                 {0}
571         };
572         const char *name;
573         const char *input_args;
574
575         name = rte_vdev_device_name(vdev);
576         if (name == NULL)
577                 return -EINVAL;
578         input_args = rte_vdev_device_args(vdev);
579         rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
580
581         RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
582                         init_params.socket_id);
583         if (init_params.name[0] != '\0')
584                 RTE_LOG(INFO, PMD, "  User defined name = %s\n",
585                         init_params.name);
586         RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
587                         init_params.max_nb_queue_pairs);
588         RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
589                         init_params.max_nb_sessions);
590
591         return aesni_gcm_create(name, vdev, &init_params);
592 }
593
594 static int
595 aesni_gcm_remove(struct rte_vdev_device *vdev)
596 {
597         const char *name;
598
599         name = rte_vdev_device_name(vdev);
600         if (name == NULL)
601                 return -EINVAL;
602
603         GCM_LOG_INFO("Closing AESNI crypto device %s on numa socket %u\n",
604                         name, rte_socket_id());
605
606         return 0;
607 }
608
609 static struct rte_vdev_driver aesni_gcm_pmd_drv = {
610         .probe = aesni_gcm_probe,
611         .remove = aesni_gcm_remove
612 };
613
614 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
615 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
616 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
617         "max_nb_queue_pairs=<int> "
618         "max_nb_sessions=<int> "
619         "socket_id=<int>");
620 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_pmd_drv, cryptodev_driver_id);