| 654 | } |
| 655 | |
| 656 | static void |
| 657 | dpaa_sec_dump(struct dpaa_sec_op_ctx *ctx, struct dpaa_sec_qp *qp) |
| 658 | { |
| 659 | struct dpaa_sec_job *job = &ctx->job; |
| 660 | struct rte_crypto_op *op = ctx->op; |
| 661 | dpaa_sec_session *sess = NULL; |
| 662 | struct sec_cdb c_cdb, *cdb; |
| 663 | uint8_t bufsize; |
| 664 | struct rte_crypto_sym_op *sym_op; |
| 665 | struct qm_sg_entry sg[2]; |
| 666 | |
| 667 | if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) |
| 668 | sess = CRYPTODEV_GET_SYM_SESS_PRIV(op->sym->session); |
| 669 | #ifdef RTE_LIB_SECURITY |
| 670 | else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) |
| 671 | sess = SECURITY_GET_SESS_PRIV(op->sym->session); |
| 672 | #endif |
| 673 | if (sess == NULL) { |
| 674 | printf("session is NULL\n"); |
| 675 | goto mbuf_dump; |
| 676 | } |
| 677 | |
| 678 | cdb = &sess->cdb; |
| 679 | rte_memcpy(&c_cdb, cdb, sizeof(struct sec_cdb)); |
| 680 | #ifdef RTE_LIB_SECURITY |
| 681 | printf("\nsession protocol type = %d\n", sess->proto_alg); |
| 682 | #endif |
| 683 | printf("\n****************************************\n" |
| 684 | "session params:\n\tContext type:\t%d\n\tDirection:\t%s\n" |
| 685 | "\tCipher alg:\t%d\n\tAuth alg:\t%d\n\tAead alg:\t%d\n" |
| 686 | "\tCipher key len:\t%"PRIu64"\n\tCipher alg:\t%d\n" |
| 687 | "\tCipher algmode:\t%d\n", sess->ctxt, |
| 688 | (sess->dir == DIR_ENC) ? "DIR_ENC" : "DIR_DEC", |
| 689 | sess->cipher_alg, sess->auth_alg, sess->aead_alg, |
| 690 | (uint64_t)sess->cipher_key.length, sess->cipher_key.alg, |
| 691 | sess->cipher_key.algmode); |
| 692 | rte_hexdump(stdout, "cipher key", sess->cipher_key.data, |
| 693 | sess->cipher_key.length); |
| 694 | rte_hexdump(stdout, "auth key", sess->auth_key.data, |
| 695 | sess->auth_key.length); |
| 696 | printf("\tAuth key len:\t%"PRIu64"\n\tAuth alg:\t%d\n" |
| 697 | "\tAuth algmode:\t%d\n\tIV len:\t\t%d\n\tIV offset:\t%d\n" |
| 698 | "\tdigest length:\t%d\n\tauth only len:\t\t%d\n" |
| 699 | "\taead cipher text:\t%d\n", |
| 700 | (uint64_t)sess->auth_key.length, sess->auth_key.alg, |
| 701 | sess->auth_key.algmode, |
| 702 | sess->iv.length, sess->iv.offset, |
| 703 | sess->digest_length, sess->auth_only_len, |
| 704 | sess->auth_cipher_text); |
| 705 | #ifdef RTE_LIB_SECURITY |
| 706 | printf("PDCP session params:\n" |
| 707 | "\tDomain:\t\t%d\n\tBearer:\t\t%d\n\tpkt_dir:\t%d\n\thfn_ovd:" |
| 708 | "\t%d\n\tsn_size:\t%d\n\tsdap_enabled:\t%d\n\thfn_ovd_offset:" |
| 709 | "\t%d\n\thfn:\t\t%d\n" |
| 710 | "\thfn_threshold:\t0x%x\n", sess->pdcp.domain, |
| 711 | sess->pdcp.bearer, sess->pdcp.pkt_dir, sess->pdcp.hfn_ovd, |
| 712 | sess->pdcp.sn_size, sess->pdcp.sdap_enabled, |
| 713 | sess->pdcp.hfn_ovd_offset, sess->pdcp.hfn, |
no test coverage detected