From patchwork Mon Jul 13 13:15:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 235391 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2833665ilg; Mon, 13 Jul 2020 06:19:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJUx1LTZ31seNiDWyTpwu15M2OIl+yBu1/icIRcNueUCQo489nCoLcUMqDg9W15gb7UbR9 X-Received: by 2002:a1c:8117:: with SMTP id c23mr17955165wmd.157.1594646369721; Mon, 13 Jul 2020 06:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594646369; cv=none; d=google.com; s=arc-20160816; b=ZRTc2t/W76noOBWimcK/5cjXzj1rLUI56g/iJa/uhqgz6m81LPryPDNDFBVMFmDGkc yfX0KJ+zoVU+drgKHJmpX5GteGKBzbGiHquU+d4QJiH2WhtHEo5QiNoPV2eNaiUs8NSd gMLkTiuHN6/5gHIOsi/EBAwktZAaMw8vKWM22X/SOB5AvAP6P5KOi731VtmlD0ffzm55 gmk8/a+NL6coZgfT1enEN7AurR+kPFA/T9W/ar5PWOzlePmjU61AHre8KcVTEKVpxNGl w7/kSMqsXSb5wb5uhS9Rg4SBhtWzJszau0aMfpAYaMhbYmeswmKCE+Kp9v87/SwASqL8 W/xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=WvVNU2CTOhkXqekrkTYrXzNvsUT5tepuOvaaDd5nbOg=; b=jgTj7lX6JXkIj4/XdbHX9FRv2zP6CM9CbYjtKSKIkwFLHTYBSGQxg6dyqnhyfA8BIA 14VKIEgD5fzFwro83ipVHGgzUou4N9nG1jUIAAIoB6hElw9xr0pzp63Mxd6825DzbTNA bPkpj9lGPmTrWJKebysrK3fAmIQ9V6CusXRAfuey9Tg7ar/3OT9aIdTX238Bl76O6ty6 j5Zv4XiOU+NxD0QBh+FcLeMhHgdR1jIySadjzZL+HuOlwggiQVZayxsHf0wJGXallSuZ fLwx6DkVmL1Z5ujDKYJ9xbq3tNLfwbxsnSt1qGQNBOYSEHCVz2l4rf9PJ2kEpqbF+Qw2 Fw3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id 131si13309188wmb.36.2020.07.13.06.19.29; Mon, 13 Jul 2020 06:19:29 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 840FB1D658; Mon, 13 Jul 2020 15:19:28 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 1ED2A1D657 for ; Mon, 13 Jul 2020 15:19:28 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id EC4F12000AB; Mon, 13 Jul 2020 15:19:27 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D9E1520006A; Mon, 13 Jul 2020 15:19:25 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C9368402AA; Mon, 13 Jul 2020 21:19:22 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: maryam.tahhan@intel.com, reshma.pattan@intel.com, Hemant Agrawal Date: Mon, 13 Jul 2020 18:45:00 +0530 Message-Id: <20200713131501.17422-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200711095343.10523-1-hemant.agrawal@nxp.com> References: <20200711095343.10523-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 1/2] app/proc-info: enhance mempool to print ops name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Enhance the mempool details to also print the ops index and name Signed-off-by: Hemant Agrawal --- These patches are built over Stephen's series: https://patches.dpdk.org/cover/69876/ But they can be applied independently as well. app/proc-info/main.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1 diff --git a/app/proc-info/main.c b/app/proc-info/main.c index e0b61b366..a5d16765b 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1276,7 +1276,10 @@ show_mempool(char *name) if (name != NULL) { struct rte_mempool *ptr = rte_mempool_lookup(name); if (ptr != NULL) { + struct rte_mempool_ops *ops; + flags = ptr->flags; + ops = rte_mempool_get_ops(ptr->ops_index); printf(" - Name: %s on socket %d\n" " - flags:\n" "\t -- No spread (%c)\n" @@ -1306,6 +1309,8 @@ show_mempool(char *name) printf(" - Count: avail (%u), in use (%u)\n", rte_mempool_avail_count(ptr), rte_mempool_in_use_count(ptr)); + printf(" - ops_index %d ops_name %s\n", + ptr->ops_index, ops ? ops->name : "NA"); return; } From patchwork Mon Jul 13 13:15:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 235392 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2833765ilg; Mon, 13 Jul 2020 06:19:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOKcuFuKpGVZJ46TBgT5BKfdOEI/BhgzACQwOcstlMxZOhubRP7BJpuADNBQHbYiEln3uM X-Received: by 2002:adf:dd4a:: with SMTP id u10mr78608799wrm.169.1594646375927; Mon, 13 Jul 2020 06:19:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594646375; cv=none; d=google.com; s=arc-20160816; b=eo99EWUAQArmCWounG77cXd2aD3ISeXbLJ6c0tQUkiF7O5k6m9ee5dpB2FobdaCXbG Cf1iVkgRkmc49v337Rmcvrx4ItWSeFd1LKVbmjxZG2CqD1hmozveDaVoDfpi17+C1Tfq jINQupBBXXSwwaM4xdH9AqKf6g0gO4VCHvPwXJeSw+i/vrieZAkZoWwfFvHBD9tWoY8E 2zpOSmScrXaztgkBbXU4GgLYJusUdd64RJvivX0XoaDeHNzYcK/+GCrqXKSgCTkwfPCc PMGJ0XrIudcjW/MHZbqLXRGS5jOvXQugoqVLIqiPS9GFUE/R1vCRLWS/ObXg6nOhDvB9 hEZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=nF668WFMcDMk05iO4FIlFHws4sHBYqrH2cG8QWgLqPI=; b=LBQl31LJ/UOmMdR99VKBab5pFNAUbaUIX/68w6Z0rQ9xJlYzP8IsEvZ4qiE91ZbfSf gi7lPc3ozXib7Uw/cUHWei2l+B0f7ne3F8ueLU7bmJBMTHlh3WB7HMK7Mda27IxSuVVz HiTJRnCGBTGE0CVNB5lZw+M5X4C1TRocHpcmjAVqqm4rRFfKr3b+MgutuBprgfux5yyf 0/HddV4t/nZ/03JyavwwbiKsT33iMoaPrF6UTzxKVGl6XCJqePoRO+d3hV3+s+f8/bqN F788k9Vq/WqBk2iVip4CpFp0iPjtCLhhyO/sKKgtrUKA56371/ny+3UU413oQ2X12xxq aY6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id g3si12196553wmk.162.2020.07.13.06.19.35; Mon, 13 Jul 2020 06:19:35 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 07A931D66C; Mon, 13 Jul 2020 15:19:31 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id DDB341D66A for ; Mon, 13 Jul 2020 15:19:28 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AA37020006A; Mon, 13 Jul 2020 15:19:28 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9765C2000A0; Mon, 13 Jul 2020 15:19:26 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8D8E7402C8; Mon, 13 Jul 2020 21:19:23 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: maryam.tahhan@intel.com, reshma.pattan@intel.com, Hemant Agrawal Date: Mon, 13 Jul 2020 18:45:01 +0530 Message-Id: <20200713131501.17422-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200713131501.17422-1-hemant.agrawal@nxp.com> References: <20200711095343.10523-1-hemant.agrawal@nxp.com> <20200713131501.17422-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 2/2] app/proc-info: add crypto security context info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds the crypto based security context info. Also improve the flag printing to SECURITY OFFLOAD from INLINE. Signed-off-by: Hemant Agrawal --- app/proc-info/main.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/app/proc-info/main.c b/app/proc-info/main.c index a5d16765b..34acea12a 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1169,7 +1169,7 @@ display_crypto_feature_info(uint64_t x) printf("\t\t + AESNI: CPU (%c), HW (%c)\n", (x & RTE_CRYPTODEV_FF_CPU_AESNI) ? 'y' : 'n', (x & RTE_CRYPTODEV_FF_HW_ACCELERATED) ? 'y' : 'n'); - printf("\t\t + INLINE (%c)\n", + printf("\t\t + SECURITY OFFLOAD (%c)\n", (x & RTE_CRYPTODEV_FF_SECURITY) ? 'y' : 'n'); printf("\t\t + ARM: NEON (%c), CE (%c)\n", (x & RTE_CRYPTODEV_FF_CPU_NEON) ? 'y' : 'n', @@ -1226,6 +1226,26 @@ show_crypto(void) stats.dequeued_count, stats.dequeue_err_count); } +#ifdef RTE_LIBRTE_SECURITY + void *p_ctx = rte_eth_dev_get_sec_ctx(i); + printf("\t -- security context - %p\n", p_ctx); + + if (p_ctx) { + printf("\t -- size %u\n", + rte_security_session_get_size(p_ctx)); + const struct rte_security_capability *s_cap = + rte_security_capabilities_get(p_ctx); + if (s_cap) { + printf("\t -- action (0x%x), protocol (0x%x)," + " offload flags (0x%x)\n", + s_cap->action, + s_cap->protocol, + s_cap->ol_flags); + printf("\t -- capabilities - oper type %x\n", + s_cap->crypto_capabilities->op); + } + } +#endif } }