From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1AF15A00C4; Fri, 30 Sep 2022 09:35:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F115C40E5A; Fri, 30 Sep 2022 09:35:01 +0200 (CEST) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by mails.dpdk.org (Postfix) with ESMTP id CC2F240684 for ; Fri, 30 Sep 2022 09:34:59 +0200 (CEST) Received: by mail-qv1-f50.google.com with SMTP id l14so2337944qvq.8 for ; Fri, 30 Sep 2022 00:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=iOyUzE6+upCDHZ+NmtAmjYJrUZKqyBZzOFDTjf9D2XU=; b=EWzI7Ij9JFHrHF4ywG2bPOhMZDZ6Hs5zZQ1KXGxYg9unsbuNM3WjjaYX/KfzCA/1CN tTqgx1CuIEyU9Ki8Ze93wZys19AJZw+26PXXN8z5E2r8ynbChlXThV7ugrW3fLUIq11R UseIdboPJBiMRSggAG0isH5Ftq2qMBvUI/V+St9ZUE8s30x/+4iwGHtmCcmVoP+QZZ00 Q4o8F8xxOuarp9ituHacakm/gNto2vBNvbzYYG+Oy+qE+9IVJ2T49BTAMT/1A5mR1FYn vuFhRLFeUcSOuCKBpkQJeXtzTBcvsIAWvXNUzPD98s0COaKt7qJwRMBv8CXpV/4i95lQ tWMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=iOyUzE6+upCDHZ+NmtAmjYJrUZKqyBZzOFDTjf9D2XU=; b=c+7Xh+zleMIB0Vwca54XweW+UUZVTwLhOG9eBDSqY6c/8+rB8J2Dl+UbwaJ1Km9DFB DKwi+le7C1K8RiK6OAcz4J1lg1c5x11SFLy+QWXkAybn1wn6KyNAu1vqQ9b9iSa0ELiB JojnKspglEo0F/wNm9Iw1UwvtHkMW2UucdbL+jHedipbd1Y6VDR2CFk9SfFpmb5Oo3Up 6mOJEnaF6rlTqx2JR2iQte0RGuJB3V+HjzTEN+MRYIaLDM1EA6z6vGFvoGO0EBu93MXF KV2OZM35PMcAeRfk3keI8joRqAS9GbzIxIJ2Pg7Pit3WMJwhYYA/ySVVcyfTgxO9UaO3 PBKA== X-Gm-Message-State: ACrzQf2LRuSHhCb2SA1IiQrppmzEfngPDnEZk3LqsXFQCuP1218Kaf7R NbtSQJHpwn92EGid5ApUwBezhclEznK8dTFfd2s= X-Google-Smtp-Source: AMsMyM5KrCoLuHkO4fsKI4jNypo3qtPTdhwnLu5tzeSOM8xdsdjYZDfsf+2NVmmGsvschFKQx4VXe1ZxrIfQogchQ0E= X-Received: by 2002:ad4:5cc1:0:b0:4a7:dbb4:1118 with SMTP id iu1-20020ad45cc1000000b004a7dbb41118mr5674437qvb.84.1664523298972; Fri, 30 Sep 2022 00:34:58 -0700 (PDT) MIME-Version: 1.0 References: <20220916173227.27758-1-amitprakashs@marvell.com> <20220929123518.1444633-1-amitprakashs@marvell.com> In-Reply-To: <20220929123518.1444633-1-amitprakashs@marvell.com> From: Jerin Jacob Date: Fri, 30 Sep 2022 13:04:32 +0530 Message-ID: Subject: Re: [PATCH v2] cryptodev: add trace points To: Amit Prakash Shukla Cc: Akhil Goyal , Fan Zhang , Ray Kinsella , dev@dpdk.org, jerinj@marvell.com, roy.fan.zhang@intel.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Sep 29, 2022 at 6:08 PM Amit Prakash Shukla wrote: > > Add trace points for cryptodev functions. > > Signed-off-by: Amit Prakash Shukla Looks good from tracing PoV. Reviewed-by: Jerin Jacob > --- > v2: > - Removed trace changes for non-public API > - Code changes to include API result in trace > > lib/cryptodev/cryptodev_trace_points.c | 138 +++++++++ > lib/cryptodev/rte_cryptodev.c | 319 +++++++++++++++----- > lib/cryptodev/rte_cryptodev_trace.h | 384 +++++++++++++++++++++++++ > lib/cryptodev/version.map | 48 ++++ > 4 files changed, 818 insertions(+), 71 deletions(-) > > diff --git a/lib/cryptodev/cryptodev_trace_points.c b/lib/cryptodev/cryptodev_trace_points.c > index c5bfe08b79..9f0ed904ea 100644 > --- a/lib/cryptodev/cryptodev_trace_points.c > +++ b/lib/cryptodev/cryptodev_trace_points.c > @@ -50,3 +50,141 @@ RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_enqueue_burst, > > RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_dequeue_burst, > lib.cryptodev.deq.burst) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_callback_register, > + lib.cryptodev.callback.register) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_callback_unregister, > + lib.cryptodev.callback.unregister) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_device_count_by_driver, > + lib.cryptodev.device.count.by.driver) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_devices_get, > + lib.cryptodev.devices.get) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_driver_id_get, > + lib.cryptodev.driver.id.get) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_driver_name_get, > + lib.cryptodev.driver.name.get) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_aead_algo_enum, > + lib.cryptodev.get.aead.algo.enum) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_auth_algo_enum, > + lib.cryptodev.get.auth.algo.enum) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_cipher_algo_enum, > + lib.cryptodev.get.cipher.algo.enum) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_dev_id, > + lib.cryptodev.get.dev.id) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_feature_name, > + lib.cryptodev.get.feature.name) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_sec_ctx, > + lib.cryptodev.get.sec.ctx) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_info_get, > + lib.cryptodev.info.get) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_is_valid_dev, > + lib.cryptodev.is.valid.dev) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_name_get, > + lib.cryptodev.name.get) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_queue_pair_count, > + lib.cryptodev.queue.pair.count) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_socket_id, > + lib.cryptodev.socket.id) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_stats_get, > + lib.cryptodev.stats.get) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_stats_reset, > + lib.cryptodev.stats.reset) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_capability_check_aead, > + lib.cryptodev.sym.capability.check.aead) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_capability_check_auth, > + lib.cryptodev.sym.capability.check.auth) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_capability_check_cipher, > + lib.cryptodev.sym.capability.check.cipher) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_capability_get, > + lib.cryptodev.sym.capability.get) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_get_private_session_size, > + lib.cryptodev.sym.get.private.session.size) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_capability_get, > + lib.cryptodev.asym.capability.get) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_get_private_session_size, > + lib.cryptodev.asym.get.private.session.size) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_get_xform_enum, > + lib.cryptodev.asym.get.xform.enum) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_xform_capability_check_modlen, > + lib.cryptodev.asym.xform.capability.check.modlen) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_xform_capability_check_optype, > + lib.cryptodev.asym.xform.capability.check.optype) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_cpu_crypto_process, > + lib.cryptodev.sym.cpu.crypto.process) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_get_existing_header_session_size, > + lib.cryptodev.sym.get.existing.header.session.size) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_get_user_data, > + lib.cryptodev.sym.session.get.user.data) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_set_user_data, > + lib.cryptodev.sym.session.set.user.data) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_qp_status, > + lib.cryptodev.get.qp.status) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_configure_raw_dp_ctx, > + lib.cryptodev.configure.raw.dp.ctx) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_raw_dp_ctx_size, > + lib.cryptodev.get.raw.dp.ctx.size) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_add_deq_callback, > + lib.cryptodev.add.deq.callback) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_add_enq_callback, > + lib.cryptodev.add.enq.callback) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_remove_deq_callback, > + lib.cryptodev.remove.deq.callback) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_remove_enq_callback, > + lib.cryptodev.remove.enq.callback) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_get_user_data, > + lib.cryptodev.asym.session.get.user.data) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_set_user_data, > + lib.cryptodev.asym.session.set.user.data) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_session_event_mdata_set, > + lib.cryptodev.session.event.mdata.set) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_allocate_driver, > + lib.cryptodev.allocate.driver) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_op_pool_create, > + lib.cryptodev.op.pool.create) > + > +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_count, > + lib.cryptodev.count) > diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c > index 5e25e607fa..7c0fb59e29 100644 > --- a/lib/cryptodev/rte_cryptodev.c > +++ b/lib/cryptodev/rte_cryptodev.c > @@ -224,16 +224,19 @@ rte_cryptodev_get_cipher_algo_enum(enum rte_crypto_cipher_algorithm *algo_enum, > const char *algo_string) > { > unsigned int i; > + int ret = -1; /* Invalid string */ > > for (i = 1; i < RTE_DIM(rte_crypto_cipher_algorithm_strings); i++) { > if (strcmp(algo_string, rte_crypto_cipher_algorithm_strings[i]) == 0) { > *algo_enum = (enum rte_crypto_cipher_algorithm) i; > - return 0; > + ret = 0; > + break; > } > } > > - /* Invalid string */ > - return -1; > + rte_cryptodev_trace_get_cipher_algo_enum(algo_string, *algo_enum, ret); > + > + return ret; > } > > int > @@ -241,16 +244,19 @@ rte_cryptodev_get_auth_algo_enum(enum rte_crypto_auth_algorithm *algo_enum, > const char *algo_string) > { > unsigned int i; > + int ret = -1; /* Invalid string */ > > for (i = 1; i < RTE_DIM(rte_crypto_auth_algorithm_strings); i++) { > if (strcmp(algo_string, rte_crypto_auth_algorithm_strings[i]) == 0) { > *algo_enum = (enum rte_crypto_auth_algorithm) i; > - return 0; > + ret = 0; > + break; > } > } > > - /* Invalid string */ > - return -1; > + rte_cryptodev_trace_get_auth_algo_enum(algo_string, *algo_enum, ret); > + > + return ret; > } > > int > @@ -258,16 +264,19 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum, > const char *algo_string) > { > unsigned int i; > + int ret = -1; /* Invalid string */ > > for (i = 1; i < RTE_DIM(rte_crypto_aead_algorithm_strings); i++) { > if (strcmp(algo_string, rte_crypto_aead_algorithm_strings[i]) == 0) { > *algo_enum = (enum rte_crypto_aead_algorithm) i; > - return 0; > + ret = 0; > + break; > } > } > > - /* Invalid string */ > - return -1; > + rte_cryptodev_trace_get_aead_algo_enum(algo_string, *algo_enum, ret); > + > + return ret; > } > > int > @@ -275,17 +284,20 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum, > const char *xform_string) > { > unsigned int i; > + int ret = -1; /* Invalid string */ > > for (i = 1; i < RTE_DIM(rte_crypto_asym_xform_strings); i++) { > if (strcmp(xform_string, > rte_crypto_asym_xform_strings[i]) == 0) { > *xform_enum = (enum rte_crypto_asym_xform_type) i; > - return 0; > + ret = 0; > + break; > } > } > > - /* Invalid string */ > - return -1; > + rte_cryptodev_trace_asym_get_xform_enum(xform_string, *xform_enum, ret); > + > + return ret; > } > > /** > @@ -303,6 +315,7 @@ rte_cryptodev_sym_capability_get(uint8_t dev_id, > const struct rte_cryptodev_sym_capability_idx *idx) > { > const struct rte_cryptodev_capabilities *capability; > + const struct rte_cryptodev_symmetric_capability *sym_capability = NULL; > struct rte_cryptodev_info dev_info; > int i = 0; > > @@ -317,19 +330,28 @@ rte_cryptodev_sym_capability_get(uint8_t dev_id, > continue; > > if (idx->type == RTE_CRYPTO_SYM_XFORM_AUTH && > - capability->sym.auth.algo == idx->algo.auth) > - return &capability->sym; > + capability->sym.auth.algo == idx->algo.auth) { > + sym_capability = &capability->sym; > + break; > + } > > if (idx->type == RTE_CRYPTO_SYM_XFORM_CIPHER && > - capability->sym.cipher.algo == idx->algo.cipher) > - return &capability->sym; > + capability->sym.cipher.algo == idx->algo.cipher) { > + sym_capability = &capability->sym; > + break; > + } > > if (idx->type == RTE_CRYPTO_SYM_XFORM_AEAD && > - capability->sym.aead.algo == idx->algo.aead) > - return &capability->sym; > + capability->sym.aead.algo == idx->algo.aead) { > + sym_capability = &capability->sym; > + break; > + } > } > > - return NULL; > + rte_cryptodev_trace_sym_capability_get(dev_id, dev_info.driver_name, > + dev_info.driver_id, idx->type, sym_capability); > + > + return sym_capability; > } > > static int > @@ -362,6 +384,7 @@ rte_cryptodev_asym_capability_get(uint8_t dev_id, > const struct rte_cryptodev_asym_capability_idx *idx) > { > const struct rte_cryptodev_capabilities *capability; > + const struct rte_cryptodev_asymmetric_xform_capability *asym_cap = NULL; > struct rte_cryptodev_info dev_info; > unsigned int i = 0; > > @@ -373,10 +396,16 @@ rte_cryptodev_asym_capability_get(uint8_t dev_id, > if (capability->op != RTE_CRYPTO_OP_TYPE_ASYMMETRIC) > continue; > > - if (capability->asym.xform_capa.xform_type == idx->type) > - return &capability->asym.xform_capa; > + if (capability->asym.xform_capa.xform_type == idx->type) { > + asym_cap = &capability->asym.xform_capa; > + break; > + } > } > - return NULL; > + > + rte_cryptodev_trace_asym_capability_get(dev_info.driver_name, > + dev_info.driver_id, idx->type, asym_cap); > + > + return asym_cap; > }; > > int > @@ -384,13 +413,21 @@ rte_cryptodev_sym_capability_check_cipher( > const struct rte_cryptodev_symmetric_capability *capability, > uint16_t key_size, uint16_t iv_size) > { > - if (param_range_check(key_size, &capability->cipher.key_size) != 0) > - return -1; > + int ret = 0; /* success */ > + > + if (param_range_check(key_size, &capability->cipher.key_size) != 0) { > + ret = -1; > + goto done; > + } > > if (param_range_check(iv_size, &capability->cipher.iv_size) != 0) > - return -1; > + ret = -1; > > - return 0; > +done: > + rte_cryptodev_trace_sym_capability_check_cipher(capability, key_size, > + iv_size, ret); > + > + return ret; > } > > int > @@ -398,16 +435,27 @@ rte_cryptodev_sym_capability_check_auth( > const struct rte_cryptodev_symmetric_capability *capability, > uint16_t key_size, uint16_t digest_size, uint16_t iv_size) > { > - if (param_range_check(key_size, &capability->auth.key_size) != 0) > - return -1; > + int ret = 0; /* success */ > > - if (param_range_check(digest_size, &capability->auth.digest_size) != 0) > - return -1; > + if (param_range_check(key_size, &capability->auth.key_size) != 0) { > + ret = -1; > + goto done; > + } > + > + if (param_range_check(digest_size, > + &capability->auth.digest_size) != 0) { > + ret = -1; > + goto done; > + } > > if (param_range_check(iv_size, &capability->auth.iv_size) != 0) > - return -1; > + ret = -1; > > - return 0; > +done: > + rte_cryptodev_trace_sym_capability_check_auth(capability, key_size, > + digest_size, iv_size, ret); > + > + return ret; > } > > int > @@ -416,29 +464,48 @@ rte_cryptodev_sym_capability_check_aead( > uint16_t key_size, uint16_t digest_size, uint16_t aad_size, > uint16_t iv_size) > { > - if (param_range_check(key_size, &capability->aead.key_size) != 0) > - return -1; > + int ret = 0; /* success */ > > - if (param_range_check(digest_size, &capability->aead.digest_size) != 0) > - return -1; > + if (param_range_check(key_size, &capability->aead.key_size) != 0) { > + ret = -1; > + goto done; > + } > > - if (param_range_check(aad_size, &capability->aead.aad_size) != 0) > - return -1; > + if (param_range_check(digest_size, > + &capability->aead.digest_size) != 0) { > + ret = -1; > + goto done; > + } > + > + if (param_range_check(aad_size, &capability->aead.aad_size) != 0) { > + ret = -1; > + goto done; > + } > > if (param_range_check(iv_size, &capability->aead.iv_size) != 0) > - return -1; > + ret = -1; > > - return 0; > +done: > + rte_cryptodev_trace_sym_capability_check_aead(capability, key_size, > + digest_size, aad_size, iv_size, ret); > + > + return ret; > } > + > int > rte_cryptodev_asym_xform_capability_check_optype( > const struct rte_cryptodev_asymmetric_xform_capability *capability, > enum rte_crypto_asym_op_type op_type) > { > + int ret = 0; > + > if (capability->op_types & (1 << op_type)) > - return 1; > + ret = 1; > > - return 0; > + rte_cryptodev_trace_asym_xform_capability_check_optype( > + capability->op_types, op_type, ret); > + > + return ret; > } > > int > @@ -446,24 +513,34 @@ rte_cryptodev_asym_xform_capability_check_modlen( > const struct rte_cryptodev_asymmetric_xform_capability *capability, > uint16_t modlen) > { > + int ret = 0; /* success */ > + > /* no need to check for limits, if min or max = 0 */ > if (capability->modlen.min != 0) { > - if (modlen < capability->modlen.min) > - return -1; > + if (modlen < capability->modlen.min) { > + ret = -1; > + goto done; > + } > } > > if (capability->modlen.max != 0) { > - if (modlen > capability->modlen.max) > - return -1; > + if (modlen > capability->modlen.max) { > + ret = -1; > + goto done; > + } > } > > /* in any case, check if given modlen is module increment */ > if (capability->modlen.increment != 0) { > if (modlen % (capability->modlen.increment)) > - return -1; > + ret = -1; > } > > - return 0; > +done: > + rte_cryptodev_trace_asym_xform_capability_check_modlen(capability, > + modlen, ret); > + > + return ret; > } > > /* spinlock for crypto device enq callbacks */ > @@ -586,6 +663,8 @@ cryptodev_cb_init(struct rte_cryptodev *dev) > const char * > rte_cryptodev_get_feature_name(uint64_t flag) > { > + rte_cryptodev_trace_get_feature_name(flag); > + > switch (flag) { > case RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO: > return "SYMMETRIC_CRYPTO"; > @@ -684,22 +763,28 @@ unsigned int > rte_cryptodev_is_valid_dev(uint8_t dev_id) > { > struct rte_cryptodev *dev = NULL; > + unsigned int ret = 1; > > - if (!rte_cryptodev_is_valid_device_data(dev_id)) > - return 0; > + if (!rte_cryptodev_is_valid_device_data(dev_id)) { > + ret = 0; > + goto done; > + } > > dev = rte_cryptodev_pmd_get_dev(dev_id); > if (dev->attached != RTE_CRYPTODEV_ATTACHED) > - return 0; > - else > - return 1; > -} > + ret = 0; > > +done: > + rte_cryptodev_trace_is_valid_dev(dev_id, ret); > + > + return ret; > +} > > int > rte_cryptodev_get_dev_id(const char *name) > { > unsigned i; > + int ret = -1; > > if (name == NULL) > return -1; > @@ -710,16 +795,22 @@ rte_cryptodev_get_dev_id(const char *name) > if ((strcmp(cryptodev_globals.devs[i].data->name, name) > == 0) && > (cryptodev_globals.devs[i].attached == > - RTE_CRYPTODEV_ATTACHED)) > - return i; > + RTE_CRYPTODEV_ATTACHED)) { > + ret = (int)i; > + break; > + } > } > > - return -1; > + rte_cryptodev_trace_get_dev_id(name, ret); > + > + return ret; > } > > uint8_t > rte_cryptodev_count(void) > { > + rte_cryptodev_trace_count(cryptodev_globals.nb_devs); > + > return cryptodev_globals.nb_devs; > } > > @@ -734,6 +825,8 @@ rte_cryptodev_device_count_by_driver(uint8_t driver_id) > RTE_CRYPTODEV_ATTACHED) > dev_count++; > > + rte_cryptodev_trace_device_count_by_driver(driver_id, dev_count); > + > return dev_count; > } > > @@ -760,18 +853,24 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices, > } > } > > + rte_cryptodev_trace_devices_get(driver_name, count); > + > return count; > } > > void * > rte_cryptodev_get_sec_ctx(uint8_t dev_id) > { > + void *sec_ctx = NULL; > + > if (dev_id < RTE_CRYPTO_MAX_DEVS && > (rte_crypto_devices[dev_id].feature_flags & > RTE_CRYPTODEV_FF_SECURITY)) > - return rte_crypto_devices[dev_id].security_ctx; > + sec_ctx = rte_crypto_devices[dev_id].security_ctx; > > - return NULL; > + rte_cryptodev_trace_get_sec_ctx(dev_id, sec_ctx); > + > + return sec_ctx; > } > > int > @@ -784,6 +883,8 @@ rte_cryptodev_socket_id(uint8_t dev_id) > > dev = rte_cryptodev_pmd_get_dev(dev_id); > > + rte_cryptodev_trace_socket_id(dev_id, dev->data->name, > + dev->data->socket_id); > return dev->data->socket_id; > } > > @@ -965,6 +1066,10 @@ rte_cryptodev_queue_pair_count(uint8_t dev_id) > } > > dev = &rte_crypto_devices[dev_id]; > + rte_cryptodev_trace_queue_pair_count(dev, dev->data->name, > + dev->data->socket_id, dev->data->dev_id, > + dev->data->nb_queue_pairs); > + > return dev->data->nb_queue_pairs; > } > > @@ -1191,29 +1296,36 @@ int > rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id) > { > struct rte_cryptodev *dev; > + int ret = 0; > > if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); > - return -EINVAL; > + ret = -EINVAL; > + goto done; > } > > dev = &rte_crypto_devices[dev_id]; > if (queue_pair_id >= dev->data->nb_queue_pairs) { > CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id); > - return -EINVAL; > + ret = -EINVAL; > + goto done; > } > void **qps = dev->data->queue_pairs; > > if (qps[queue_pair_id]) { > CDEV_LOG_DEBUG("qp %d on dev %d is initialised", > queue_pair_id, dev_id); > - return 1; > + ret = 1; > + goto done; > } > > CDEV_LOG_DEBUG("qp %d on dev %d is not initialised", > queue_pair_id, dev_id); > > - return 0; > +done: > + rte_cryptodev_trace_get_qp_status(dev_id, queue_pair_id, ret); > + > + return ret; > } > > int > @@ -1346,6 +1458,7 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id, > > rte_spinlock_unlock(&rte_cryptodev_callback_lock); > > + rte_cryptodev_trace_add_enq_callback(dev_id, qp_id, cb_fn); > return cb; > } > > @@ -1371,6 +1484,8 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id, > return -ENODEV; > } > > + rte_cryptodev_trace_remove_enq_callback(dev_id, qp_id, cb->fn); > + > dev = &rte_crypto_devices[dev_id]; > if (qp_id >= dev->data->nb_queue_pairs) { > CDEV_LOG_ERR("Invalid queue_pair_id=%d", qp_id); > @@ -1481,6 +1596,8 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id, > > rte_spinlock_unlock(&rte_cryptodev_callback_lock); > > + rte_cryptodev_trace_add_deq_callback(dev_id, qp_id, cb_fn); > + > return cb; > } > > @@ -1506,6 +1623,8 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id, > return -ENODEV; > } > > + rte_cryptodev_trace_remove_deq_callback(dev_id, qp_id, cb->fn); > + > dev = &rte_crypto_devices[dev_id]; > if (qp_id >= dev->data->nb_queue_pairs) { > CDEV_LOG_ERR("Invalid queue_pair_id=%d", qp_id); > @@ -1575,6 +1694,8 @@ rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats) > if (*dev->dev_ops->stats_get == NULL) > return -ENOTSUP; > (*dev->dev_ops->stats_get)(dev, stats); > + > + rte_cryptodev_trace_stats_get(dev_id, stats); > return 0; > } > > @@ -1583,6 +1704,8 @@ rte_cryptodev_stats_reset(uint8_t dev_id) > { > struct rte_cryptodev *dev; > > + rte_cryptodev_trace_stats_reset(dev_id); > + > if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); > return; > @@ -1615,6 +1738,9 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info) > > dev_info->driver_name = dev->device->driver->name; > dev_info->device = dev->device; > + > + rte_cryptodev_trace_info_get(dev_id, dev_info->driver_name); > + > } > > int > @@ -1657,6 +1783,8 @@ rte_cryptodev_callback_register(uint8_t dev_id, > } > > rte_spinlock_unlock(&rte_cryptodev_cb_lock); > + > + rte_cryptodev_trace_callback_register(dev_id, event, cb_fn); > return (user_cb == NULL) ? -ENOMEM : 0; > } > > @@ -1703,6 +1831,8 @@ rte_cryptodev_callback_unregister(uint8_t dev_id, > } > > rte_spinlock_unlock(&rte_cryptodev_cb_lock); > + > + rte_cryptodev_trace_callback_unregister(dev_id, event, cb_fn); > return ret; > } > > @@ -2139,6 +2269,9 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id) > > priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev); > > + rte_cryptodev_trace_sym_get_private_session_size(dev_id, > + priv_sess_size); > + > return priv_sess_size; > } > > @@ -2158,6 +2291,9 @@ rte_cryptodev_asym_get_private_session_size(uint8_t dev_id) > > priv_sess_size = (*dev->dev_ops->asym_session_get_size)(dev); > > + rte_cryptodev_trace_asym_get_private_session_size(dev_id, > + priv_sess_size); > + > return priv_sess_size; > } > > @@ -2174,6 +2310,9 @@ rte_cryptodev_sym_session_set_user_data( > return -ENOMEM; > > rte_memcpy(sess->sess_data + sess->nb_drivers, data, size); > + > + rte_cryptodev_trace_sym_session_set_user_data(sess, data, size); > + > return 0; > } > > @@ -2181,10 +2320,16 @@ void * > rte_cryptodev_sym_session_get_user_data( > struct rte_cryptodev_sym_session *sess) > { > + void *data = NULL; > + > if (sess == NULL || sess->user_data_sz == 0) > return NULL; > > - return (void *)(sess->sess_data + sess->nb_drivers); > + data = (void *)(sess->sess_data + sess->nb_drivers); > + > + rte_cryptodev_trace_sym_session_get_user_data(sess, data); > + > + return data; > } > > int > @@ -2200,6 +2345,9 @@ rte_cryptodev_asym_session_set_user_data(void *session, void *data, uint16_t siz > rte_memcpy(sess->sess_private_data + > sess->max_priv_data_sz, > data, size); > + > + rte_cryptodev_trace_asym_session_set_user_data(sess, data, size); > + > return 0; > } > > @@ -2207,11 +2355,16 @@ void * > rte_cryptodev_asym_session_get_user_data(void *session) > { > struct rte_cryptodev_asym_session *sess = session; > + void *data = NULL; > + > if (sess == NULL || sess->user_data_sz == 0) > return NULL; > > - return (void *)(sess->sess_private_data + > - sess->max_priv_data_sz); > + data = (void *)(sess->sess_private_data + sess->max_priv_data_sz); > + > + rte_cryptodev_trace_asym_session_get_user_data(sess, data); > + > + return data; > } > > static inline void > @@ -2242,6 +2395,8 @@ rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id, > return 0; > } > > + rte_cryptodev_trace_sym_cpu_crypto_process(dev_id, sess); > + > return dev->dev_ops->sym_cpu_process(dev, sess, ofs, vec); > } > > @@ -2266,6 +2421,8 @@ rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id) > if (priv_size < 0) > return -ENOTSUP; > > + rte_cryptodev_trace_get_raw_dp_ctx_size(dev_id); > + > return RTE_ALIGN_CEIL((size + priv_size), 8); > } > > @@ -2286,6 +2443,8 @@ rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id, > || dev->dev_ops->sym_configure_raw_dp_ctx == NULL) > return -ENOTSUP; > > + rte_cryptodev_trace_configure_raw_dp_ctx(dev_id, qp_id, sess_type); > + > return (*dev->dev_ops->sym_configure_raw_dp_ctx)(dev, qp_id, ctx, > sess_type, session_ctx, is_update); > } > @@ -2309,6 +2468,9 @@ rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess, > if (dev->dev_ops->session_ev_mdata_set == NULL) > goto skip_pmd_op; > > + rte_cryptodev_trace_session_event_mdata_set(dev_id, sess, op_type, > + sess_type, ev_mdata, size); > + > return (*dev->dev_ops->session_ev_mdata_set)(dev, sess, op_type, > sess_type, ev_mdata); > > @@ -2451,6 +2613,7 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type, > priv->priv_size = priv_size; > priv->type = type; > > + rte_cryptodev_trace_op_pool_create(name, socket_id, type, nb_elts, mp); > return mp; > } > > @@ -2488,6 +2651,7 @@ rte_cryptodev_driver_id_get(const char *name) > { > struct cryptodev_driver *driver; > const char *driver_name; > + int driver_id = -1; > > if (name == NULL) { > RTE_LOG(DEBUG, CRYPTODEV, "name pointer NULL"); > @@ -2496,10 +2660,15 @@ rte_cryptodev_driver_id_get(const char *name) > > TAILQ_FOREACH(driver, &cryptodev_driver_list, next) { > driver_name = driver->driver->name; > - if (strncmp(driver_name, name, strlen(driver_name) + 1) == 0) > - return driver->id; > + if (strncmp(driver_name, name, strlen(driver_name) + 1) == 0) { > + driver_id = driver->id; > + break; > + } > } > - return -1; > + > + rte_cryptodev_trace_driver_id_get(name, driver_id); > + > + return driver_id; > } > > const char * > @@ -2516,6 +2685,8 @@ rte_cryptodev_name_get(uint8_t dev_id) > if (dev == NULL) > return NULL; > > + rte_cryptodev_trace_name_get(dev_id, dev->data->name); > + > return dev->data->name; > } > > @@ -2524,9 +2695,13 @@ rte_cryptodev_driver_name_get(uint8_t driver_id) > { > struct cryptodev_driver *driver; > > - TAILQ_FOREACH(driver, &cryptodev_driver_list, next) > - if (driver->id == driver_id) > + TAILQ_FOREACH(driver, &cryptodev_driver_list, next) { > + if (driver->id == driver_id) { > + rte_cryptodev_trace_driver_name_get(driver_id, > + driver->driver->name); > return driver->driver->name; > + } > + } > return NULL; > } > > @@ -2539,6 +2714,8 @@ rte_cryptodev_allocate_driver(struct cryptodev_driver *crypto_drv, > > TAILQ_INSERT_TAIL(&cryptodev_driver_list, crypto_drv, next); > > + rte_cryptodev_trace_allocate_driver(drv->name); > + > return nb_drivers++; > } > > diff --git a/lib/cryptodev/rte_cryptodev_trace.h b/lib/cryptodev/rte_cryptodev_trace.h > index a3f6048e7d..3d9b00145e 100644 > --- a/lib/cryptodev/rte_cryptodev_trace.h > +++ b/lib/cryptodev/rte_cryptodev_trace.h > @@ -138,6 +138,390 @@ RTE_TRACE_POINT( > rte_trace_point_emit_ptr(sess); > ) > > +RTE_TRACE_POINT( > + rte_cryptodev_trace_callback_register, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, > + enum rte_cryptodev_event_type event, const void *cb_fn), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_int(event); > + rte_trace_point_emit_ptr(cb_fn); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_callback_unregister, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, > + enum rte_cryptodev_event_type event, const void *cb_fn), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_int(event); > + rte_trace_point_emit_ptr(cb_fn); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_device_count_by_driver, > + RTE_TRACE_POINT_ARGS(uint8_t driver_id, uint8_t dev_count), > + rte_trace_point_emit_u8(driver_id); > + rte_trace_point_emit_u8(dev_count); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_devices_get, > + RTE_TRACE_POINT_ARGS(const char *driver_name, uint8_t count), > + rte_trace_point_emit_string(driver_name); > + rte_trace_point_emit_u8(count); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_driver_id_get, > + RTE_TRACE_POINT_ARGS(const char *name, int driver_id), > + rte_trace_point_emit_string(name); > + rte_trace_point_emit_int(driver_id); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_driver_name_get, > + RTE_TRACE_POINT_ARGS(uint8_t driver_id, const char *name), > + rte_trace_point_emit_u8(driver_id); > + rte_trace_point_emit_string(name); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_get_aead_algo_enum, > + RTE_TRACE_POINT_ARGS(const char *algo_string, > + enum rte_crypto_aead_algorithm algo_enum, int ret), > + rte_trace_point_emit_string(algo_string); > + rte_trace_point_emit_int(algo_enum); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_get_auth_algo_enum, > + RTE_TRACE_POINT_ARGS(const char *algo_string, > + enum rte_crypto_auth_algorithm algo_enum, int ret), > + rte_trace_point_emit_string(algo_string); > + rte_trace_point_emit_int(algo_enum); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_get_cipher_algo_enum, > + RTE_TRACE_POINT_ARGS(const char *algo_string, > + enum rte_crypto_cipher_algorithm algo_enum, int ret), > + rte_trace_point_emit_string(algo_string); > + rte_trace_point_emit_int(algo_enum); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_get_dev_id, > + RTE_TRACE_POINT_ARGS(const char *name, int ret), > + rte_trace_point_emit_string(name); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_get_feature_name, > + RTE_TRACE_POINT_ARGS(uint64_t flag), > + rte_trace_point_emit_u64(flag); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_get_sec_ctx, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, const void *sec_ctx), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_ptr(sec_ctx); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_info_get, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, const char *driver_name), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_string(driver_name); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_is_valid_dev, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, unsigned int ret), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u32(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_name_get, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, const char *name), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_string(name); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_queue_pair_count, > + RTE_TRACE_POINT_ARGS(const void *dev, const char *name, > + uint8_t socket_id, uint8_t dev_id, uint16_t nb_queue_pairs), > + rte_trace_point_emit_ptr(dev); > + rte_trace_point_emit_string(name); > + rte_trace_point_emit_u8(socket_id); > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u16(nb_queue_pairs); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_socket_id, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, const char *name, int socket_id), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_string(name); > + rte_trace_point_emit_int(socket_id); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_stats_get, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, > + const struct rte_cryptodev_stats *stats), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u64(stats->enqueued_count); > + rte_trace_point_emit_u64(stats->dequeued_count); > + rte_trace_point_emit_u64(stats->enqueue_err_count); > + rte_trace_point_emit_u64(stats->dequeue_err_count); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_stats_reset, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id), > + rte_trace_point_emit_u8(dev_id); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_sym_capability_check_aead, > + RTE_TRACE_POINT_ARGS( > + const struct rte_cryptodev_symmetric_capability *capability, > + uint16_t key_size, uint16_t digest_size, uint16_t aad_size, > + uint16_t iv_size, int ret), > + rte_trace_point_emit_ptr(capability); > + rte_trace_point_emit_int(capability->xform_type); > + rte_trace_point_emit_u16(key_size); > + rte_trace_point_emit_u16(digest_size); > + rte_trace_point_emit_u16(aad_size); > + rte_trace_point_emit_u16(iv_size); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_sym_capability_check_auth, > + RTE_TRACE_POINT_ARGS( > + const struct rte_cryptodev_symmetric_capability *capability, > + uint16_t key_size, uint16_t digest_size, uint16_t iv_size, > + int ret), > + rte_trace_point_emit_ptr(capability); > + rte_trace_point_emit_int(capability->xform_type); > + rte_trace_point_emit_u16(key_size); > + rte_trace_point_emit_u16(digest_size); > + rte_trace_point_emit_u16(iv_size); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_sym_capability_check_cipher, > + RTE_TRACE_POINT_ARGS( > + const struct rte_cryptodev_symmetric_capability *capability, > + uint16_t key_size, uint16_t iv_size, int ret), > + rte_trace_point_emit_ptr(capability); > + rte_trace_point_emit_int(capability->xform_type); > + rte_trace_point_emit_u16(key_size); > + rte_trace_point_emit_u16(iv_size); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_sym_capability_get, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, const char *driver_name, > + uint8_t driver_id, int idx_type, const void *sym_capability), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_string(driver_name); > + rte_trace_point_emit_u8(driver_id); > + rte_trace_point_emit_int(idx_type); > + rte_trace_point_emit_ptr(sym_capability); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_sym_get_private_session_size, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint32_t priv_sess_size), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u32(priv_sess_size); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_asym_capability_get, > + RTE_TRACE_POINT_ARGS(const char *driver_name, uint8_t driver_id, > + int idx_type, const void *asym_cap), > + rte_trace_point_emit_string(driver_name); > + rte_trace_point_emit_u8(driver_id); > + rte_trace_point_emit_int(idx_type); > + rte_trace_point_emit_ptr(asym_cap); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_asym_get_private_session_size, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint32_t priv_sess_size), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u32(priv_sess_size); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_asym_get_xform_enum, > + RTE_TRACE_POINT_ARGS(const char *xform_string, > + enum rte_crypto_asym_xform_type xform_enum, int ret), > + rte_trace_point_emit_string(xform_string); > + rte_trace_point_emit_int(xform_enum); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_asym_xform_capability_check_modlen, > + RTE_TRACE_POINT_ARGS(const void *capability, uint16_t modlen, int ret), > + rte_trace_point_emit_ptr(capability); > + rte_trace_point_emit_u16(modlen); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_sym_cpu_crypto_process, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, const void *sess), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_ptr(sess); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_sym_get_existing_header_session_size, > + RTE_TRACE_POINT_ARGS(struct rte_cryptodev_sym_session *sess), > + rte_trace_point_emit_ptr(sess); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_sym_session_get_user_data, > + RTE_TRACE_POINT_ARGS(const void *sess, const void *data), > + rte_trace_point_emit_ptr(sess); > + rte_trace_point_emit_ptr(data); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_sym_session_set_user_data, > + RTE_TRACE_POINT_ARGS(const void *sess, const void *data, uint16_t size), > + rte_trace_point_emit_ptr(sess); > + rte_trace_point_emit_ptr(data); > + rte_trace_point_emit_u16(size); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_get_qp_status, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint16_t queue_pair_id, int ret), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u16(queue_pair_id); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_configure_raw_dp_ctx, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint16_t qp_id, int sess_type), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u16(qp_id); > + rte_trace_point_emit_int(sess_type); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_get_raw_dp_ctx_size, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id), > + rte_trace_point_emit_u8(dev_id); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_add_deq_callback, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint16_t qp_id, const void *cb_fn), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u16(qp_id); > + rte_trace_point_emit_ptr(cb_fn); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_add_enq_callback, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint16_t qp_id, const void *cb_fn), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u16(qp_id); > + rte_trace_point_emit_ptr(cb_fn); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_remove_deq_callback, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint16_t qp_id, const void *fn), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u16(qp_id); > + rte_trace_point_emit_ptr(fn); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_remove_enq_callback, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint16_t qp_id, const void *fn), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_u16(qp_id); > + rte_trace_point_emit_ptr(fn); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_asym_session_get_user_data, > + RTE_TRACE_POINT_ARGS(const void *sess, const void *data), > + rte_trace_point_emit_ptr(sess); > + rte_trace_point_emit_ptr(data); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_asym_session_set_user_data, > + RTE_TRACE_POINT_ARGS(const void *sess, const void *data, uint16_t size), > + rte_trace_point_emit_ptr(sess); > + rte_trace_point_emit_ptr(data); > + rte_trace_point_emit_u16(size); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_session_event_mdata_set, > + RTE_TRACE_POINT_ARGS(uint8_t dev_id, const void *sess, int op_type, > + int sess_type, const void *ev_mdata, uint16_t size), > + rte_trace_point_emit_u8(dev_id); > + rte_trace_point_emit_ptr(sess); > + rte_trace_point_emit_int(op_type); > + rte_trace_point_emit_int(sess_type); > + rte_trace_point_emit_ptr(ev_mdata); > + rte_trace_point_emit_u16(size); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_allocate_driver, > + RTE_TRACE_POINT_ARGS(const char *name), > + rte_trace_point_emit_string(name); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_op_pool_create, > + RTE_TRACE_POINT_ARGS(const char *name, int socket_id, int type, > + uint32_t nb_elts, const void *mp), > + rte_trace_point_emit_string(name); > + rte_trace_point_emit_int(socket_id); > + rte_trace_point_emit_int(type); > + rte_trace_point_emit_u32(nb_elts); > + rte_trace_point_emit_ptr(mp); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_asym_xform_capability_check_optype, > + RTE_TRACE_POINT_ARGS(uint32_t op_types, > + enum rte_crypto_asym_op_type op_type, int ret), > + rte_trace_point_emit_u32(op_types); > + rte_trace_point_emit_int(op_type); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_cryptodev_trace_count, > + RTE_TRACE_POINT_ARGS(uint8_t nb_devs), > + rte_trace_point_emit_u8(nb_devs); > +) > + > #ifdef __cplusplus > } > #endif > diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map > index 5aee87c6f7..6d9b3e01a6 100644 > --- a/lib/cryptodev/version.map > +++ b/lib/cryptodev/version.map > @@ -109,6 +109,54 @@ EXPERIMENTAL { > #added in 22.07 > rte_cryptodev_session_event_mdata_set; > rte_crypto_asym_ke_strings; > + > + #added in 22.11 > + __rte_cryptodev_trace_add_deq_callback; > + __rte_cryptodev_trace_add_enq_callback; > + __rte_cryptodev_trace_allocate_driver; > + __rte_cryptodev_trace_asym_capability_get; > + __rte_cryptodev_trace_asym_get_private_session_size; > + __rte_cryptodev_trace_asym_get_xform_enum; > + __rte_cryptodev_trace_asym_session_get_user_data; > + __rte_cryptodev_trace_asym_session_set_user_data; > + __rte_cryptodev_trace_asym_xform_capability_check_modlen; > + __rte_cryptodev_trace_asym_xform_capability_check_optype; > + __rte_cryptodev_trace_callback_register; > + __rte_cryptodev_trace_callback_unregister; > + __rte_cryptodev_trace_configure_raw_dp_ctx; > + __rte_cryptodev_trace_device_count_by_driver; > + __rte_cryptodev_trace_devices_get; > + __rte_cryptodev_trace_driver_id_get; > + __rte_cryptodev_trace_driver_name_get; > + __rte_cryptodev_trace_get_aead_algo_enum; > + __rte_cryptodev_trace_get_auth_algo_enum; > + __rte_cryptodev_trace_get_cipher_algo_enum; > + __rte_cryptodev_trace_get_dev_id; > + __rte_cryptodev_trace_get_feature_name; > + __rte_cryptodev_trace_get_qp_status; > + __rte_cryptodev_trace_get_raw_dp_ctx_size; > + __rte_cryptodev_trace_get_sec_ctx; > + __rte_cryptodev_trace_info_get; > + __rte_cryptodev_trace_is_valid_dev; > + __rte_cryptodev_trace_name_get; > + __rte_cryptodev_trace_op_pool_create; > + __rte_cryptodev_trace_queue_pair_count; > + __rte_cryptodev_trace_remove_deq_callback; > + __rte_cryptodev_trace_remove_enq_callback; > + __rte_cryptodev_trace_session_event_mdata_set; > + __rte_cryptodev_trace_socket_id; > + __rte_cryptodev_trace_stats_get; > + __rte_cryptodev_trace_stats_reset; > + __rte_cryptodev_trace_sym_capability_check_aead; > + __rte_cryptodev_trace_sym_capability_check_auth; > + __rte_cryptodev_trace_sym_capability_check_cipher; > + __rte_cryptodev_trace_sym_capability_get; > + __rte_cryptodev_trace_sym_cpu_crypto_process; > + __rte_cryptodev_trace_sym_get_existing_header_session_size; > + __rte_cryptodev_trace_sym_get_private_session_size; > + __rte_cryptodev_trace_sym_session_get_user_data; > + __rte_cryptodev_trace_sym_session_set_user_data; > + __rte_cryptodev_trace_count; > }; > > INTERNAL { > -- > 2.25.1 >