From patchwork Tue Jul 21 18:22:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 246939 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3166208ilg; Tue, 21 Jul 2020 11:23:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyypPZyUQqYSTANDmMcympIUYNve/efNP+rDIhHu+Uci2ONgErRanLZYZ7wb14GYsWF9+eu X-Received: by 2002:a25:d952:: with SMTP id q79mr41390703ybg.369.1595355820712; Tue, 21 Jul 2020 11:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595355820; cv=none; d=google.com; s=arc-20160816; b=R/B3s8PFU+NgMSHBAloLr3kg5Yl3CJZJeD2TKkQzSq83Qiq/r2nFxU6TSplwV/b23g 9VqopSHD6L0KRjodOqCesa6aOkblUGE+bEpFno6kwM7Zmhz/zvADCBHALaAIFhINMMnZ 9Xi0OSXHKT5IMUH83rhk79607kKg4c21AFR3dOUcAHZCQdFc7/2IWDi6NNY0WZAVEq8f 0kmN/rH5HgpKBJIQvt3zMinRPK0t6+XVwDaP0hQ4ZhifAefNhEe+9nMO7/6TX9J04WJr DvUw7cvzaNNUYUm8ufy+kNq3MlbpZhM1vwfCAnG07F8osv5f01QIXVXHTeovxNcmO46f Owaw== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:cc:to:from:dkim-signature; bh=6DljVwQwZifQ8F3xEcClWR3a4alMcuL6XIRUFg6hoPs=; b=jZrw8Pjod/j6qJNRqwl6F2TeHOtFXp3bV7Pp5Ut6n/QZabRsokKiXDY8OgMrp5UB8B Za5ri5gHUXfX+Gaitiu/pPI5ay8SU0QA4sMcVtjSDU86F47xd5G+0ne6jkTjjRivsmVW 9s8+phDf2Zf8ove/2mdpR1ksbFWM1EjYXwT3VtLklKci907TqNhesp1kASsURXAI7fcR qUblTK/cVUwBcV8RIGbCAUTEzV+HU1biJX4eTtYfnhZgvxcpykfAmR0Vp/JS0OB2f1H9 sGwZqd2MOJsSY1jJGtVShOaG1dEN+6EhGtsS6viO6JaUDicoGQZKujMFUkHyPjvYSc8D 0raQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=jU5Gk+0n; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id r13si20229254ybs.137.2020.07.21.11.23.40; Tue, 21 Jul 2020 11:23:40 -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; dkim=fail header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=jU5Gk+0n; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDC541C0BC; Tue, 21 Jul 2020 20:23:04 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 82CE11C0AC for ; Tue, 21 Jul 2020 20:23:00 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id x8so10611598plm.10 for ; Tue, 21 Jul 2020 11:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6DljVwQwZifQ8F3xEcClWR3a4alMcuL6XIRUFg6hoPs=; b=jU5Gk+0n/W3QL1USq/T+3C5NIWZCfVnpzNxjI+2CYj9Zcw8zgJg5cTTDYrosPL4V3T YseDcZZSGU9hLdzpsdIqbw1aTsmtuILuJYJv4pf1QCTj27YzXILmG2WzM35jDBd1fT/y UQ35QUTrFPLu94PBp8WmpQHNWx0n6ABvntWkJQ7IIDbG7ZQasUt3K4RlptHUrsrb3w4f ujFvd2a0wJFI7JiaxF8c5h98i9Ie7/SdDRdF1eSqLo+8l3qmVdKAFr6JiKYxuDUcY5+v Duj9OHCYuLJcc3ZmLqxX9EoJTMQOTKzK7rOzz3nN4QW9bj19r8NdXUJFvmkbJsosVWUj E3hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6DljVwQwZifQ8F3xEcClWR3a4alMcuL6XIRUFg6hoPs=; b=Hof54o5/wHEz5fNd/Q//kWb1di8xpWX0m4ZHnGTQIcdDMHZS+SSdx3uLZIMkTlZMjK Dp7AU3gRXSBNUwzaSFmr4FtJ2dqFJE4yksNCGU7l6blfUx46ncrq8VyW0ZatWENIjGE2 VodDWdEhpuOQDabTniVXjoNXlECUz66itK3cqzTGNgLzRFFf8Jyimmmu0iryBA3kw5sD K+/qXRDQDjiRytLQeNVZMsA7P4bcdyvj/LE6TKDBoJqfLvFicmLytl9a9t2orn5xAbmG M1XHhFJGdvUeLi9gt4HOKZzzF1Kxzs9uk7wV5OSTE2I1mDBo9Aqk2ImAawAm2A93nSnx JclQ== X-Gm-Message-State: AOAM530C+s4xxJR40FLPYcSW1jKy6L4Y6FaMTXiDYtiIfYFgDv05dSSE tNTcTh/rlR63rdE5Q03iFUx5JJYp/hRNHA== X-Received: by 2002:a17:90a:32cb:: with SMTP id l69mr5462059pjb.205.1595355779305; Tue, 21 Jul 2020 11:22:59 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 76sm21434031pfu.139.2020.07.21.11.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 11:22:58 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Hemant Agrawal , Stephen Hemminger Date: Tue, 21 Jul 2020 11:22:39 -0700 Message-Id: <20200721182242.5366-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200721182242.5366-1-stephen@networkplumber.org> References: <20200506193741.24117-1-stephen@networkplumber.org> <20200721182242.5366-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 5/8] 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" From: Hemant Agrawal Enhance the mempool details to also print the ops index and name Signed-off-by: Hemant Agrawal Signed-off-by: Stephen Hemminger --- app/proc-info/main.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.27.0 diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 7c1276b7fbc1..f3f83c0cea37 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1219,7 +1219,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" @@ -1249,6 +1252,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 Wed Jul 15 21:22:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 235622 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp228363ilg; Wed, 15 Jul 2020 14:23:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfvy9Ojh8nhzmBAiQxUMY/sdJNML2GrppveMvhFP87gmMeKEkMfeJLFwfPukFRloZX5zmx X-Received: by 2002:a25:a308:: with SMTP id d8mr1609671ybi.60.1594848223679; Wed, 15 Jul 2020 14:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594848223; cv=none; d=google.com; s=arc-20160816; b=fmhVkMFj8LUwWqXvMBicZTT82BdfT7u9MhNRjQ/HMrG+uwbBftP/JuxnaN1G/0rlZO C9bt21aWx3uaeaI8r0bJ8kqBX3xCB1lAWQrndKOsx2qlk7dNekugbAWVL00wDHO523nv RP/XAKHuN9iWBn6FuZl9fqxe/WSDJO/mBDJXtFS7u1vhSEOTbQig3QPjga1NraXUn+aX kIg9ZWkyRy4+0vDsQH/FR9Yeevyvjk89qsO+zGxFhK9XJL7h3niQDAbhh6TGoA8D5iOn TDMxEccZyivYDqrJqhbT5dPz7pnhlRlnrjd+AzndwgbvUniNq6iyrx1P/lkleIIbiRwB rAZw== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:cc:to:from:dkim-signature; bh=7qMco6owzSRRppoegkjBk6gyJ3foTnwTLT70++HgyZ0=; b=vOyYx3tJsTY0pmkWPGONMD/zDN+sMaPdbfiW8eLvWLdcwh7r2HN/P2KC/fRGTz7rOO 2KEaSCJtX0mVnSyYsuZhBZvzKkIwsIaGH1sVI/gYmhTbl/mzMSEbETzbnxwHUZ3RCKiV G3B4PT7Zd8/x5D9wwK/GS6uQZpHLylzleNzBVYGB9sMxKGF6vPsmNQO1DNyIAziUTcbv K9MY0WOLZaM6xfcqC3VcumWlICE2bM3MGV2sPzlHXai9YGTdp9/ku34ObI8enM5mZZP2 pq3cHsI0tPfZq3Fj59183djAUca8JEp5gcOjX6UUDsEeV6xEmgiWKv6LG8C0a3kKTRoC zfpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=1pIqgUzU; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id e192si3688712ybf.257.2020.07.15.14.23.43; Wed, 15 Jul 2020 14:23:43 -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; dkim=fail header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=1pIqgUzU; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BD8831BEDC; Wed, 15 Jul 2020 23:22:51 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id B95B91BEB1 for ; Wed, 15 Jul 2020 23:22:47 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id k4so2910906pld.12 for ; Wed, 15 Jul 2020 14:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7qMco6owzSRRppoegkjBk6gyJ3foTnwTLT70++HgyZ0=; b=1pIqgUzU8w87HsWoGQ+Vp7AnFy/PQ9mxJubXqG3NcoibPqLOe5WEJe8cyJI/OJ/iye hO6N90XjyzOerjFLSyR9h816Mlw67m5/PFYAZntmS1vma6u+Q4cMSpJhEK47QpQXe6A9 bLfixftqMNKCvkeqaFteRWjRmCRrv+FsdF0m9eJ53VQ13I0mbhuOO9qIx0y9O/EwYUN4 jK0D6e3PEsOfVRl3adqDOs5tLSKDT+FR22TjeKJQ7UoTiF9zKsLbP3OZLGUk+e1Qi2B9 ZNuEuBVI7K6ewaE9QWqXBVWn08ov1ESCsEcgKzqaZzkhL+G0f+E0rmisZaNIevud0Qeo HoBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7qMco6owzSRRppoegkjBk6gyJ3foTnwTLT70++HgyZ0=; b=RetN67W1d6U0ksl1GiTqAwz+wVm1xSTl06jdtCsfN5R1bAZ9htDD4cEjPj7MDI/Lcu cjVgf7zRHPAR2yz3I7rtbhoe3zDQ5bWfPp4L70csWkOOHfx3hMydUaUlas3XGvitPro2 50Lp7Bet/aYqT2SkOLLz36ZHjT6USQNRL9vyyyevkC4z66LPgdbitDToFw9vp2zADaTr LntlTYe3qtwQxeGTiX8rhMy5ZlDIm99gE7fRMZPDishGyea/hA/ELcCwTfMRiLt4Qa8R 1okFoftRYi2Z5bgZ8Y0lsZasMoDWXzrXaLldCUP2ERvvElv/woDI5SWZV1gAxB9fx6Wo i+YQ== X-Gm-Message-State: AOAM531VREVIi1YNtbiJbNN2C+TgzXLGgatRFb+/yXWcypBaLJMU8OBh N4YjMfTnfCbyMcug8xocw/p7SQ== X-Received: by 2002:a17:90a:368c:: with SMTP id t12mr1654868pjb.90.1594848166984; Wed, 15 Jul 2020 14:22:46 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s89sm2932600pjj.28.2020.07.15.14.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 14:22:46 -0700 (PDT) From: Stephen Hemminger To: maryam.tahhan@intel.com, reshma.pattan@intel.com, hemant.agrawal@nxp.com Cc: dev@dpdk.org, Stephen Hemminger Date: Wed, 15 Jul 2020 14:22:28 -0700 Message-Id: <20200715212228.28010-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200715212228.28010-1-stephen@networkplumber.org> References: <20200506193741.24117-1-stephen@networkplumber.org> <20200715212228.28010-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 7/7] 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" From: Hemant Agrawal If crypto context is not present, no point in displaying it. This patch adds the crypto based security context info. Also improve the flag printing to SECURITY OFFLOAD from INLINE. Use common code for displaying crypto context information when doing show_ports and show_crypto. Signed-off-by: Hemant Agrawal Signed-off-by: Stephen Hemminger --- app/proc-info/main.c | 80 +++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 34 deletions(-) -- 2.27.0 diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 14c04f8367f1..91205a51ad6b 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -674,6 +674,32 @@ eth_tx_queue_available(uint16_t port_id, uint16_t queue_id, uint16_t n) return count; } +static void +show_security_context(uint16_t portid) +{ + void *p_ctx = rte_eth_dev_get_sec_ctx(portid); + const struct rte_security_capability *s_cap; + + if (p_ctx == NULL) + return; + + printf(" - crypto context\n"); + printf("\t -- security context - %p\n", p_ctx); + printf("\t -- size %u\n", + rte_security_session_get_size(p_ctx)); + + 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); + } +} + static void show_port(void) { @@ -853,26 +879,8 @@ show_port(void) } } - printf(" - cyrpto context\n"); #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); - } - } + show_security_context(i); #endif } } @@ -1178,7 +1186,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', @@ -1212,14 +1220,14 @@ show_crypto(void) printf(" - device (%u)\n", i); printf("\t -- name (%s)\n" - "\t -- driver (%s)\n" - "\t -- id (%u) on socket (%d)\n" - "\t -- queue pairs (%d)\n", - rte_cryptodev_name_get(i), - dev_info.driver_name, - dev_info.driver_id, - dev_info.device->numa_node, - rte_cryptodev_queue_pair_count(i)); + "\t -- driver (%s)\n" + "\t -- id (%u) on socket (%d)\n" + "\t -- queue pairs (%d)\n", + rte_cryptodev_name_get(i), + dev_info.driver_name, + dev_info.driver_id, + dev_info.device->numa_node, + rte_cryptodev_queue_pair_count(i)); display_crypto_feature_info(dev_info.feature_flags); @@ -1227,14 +1235,18 @@ show_crypto(void) if (rte_cryptodev_stats_get(i, &stats) == 0) { printf("\t -- stats\n"); printf("\t\t + enqueue count (%"PRIu64")" - " error (%"PRIu64")\n", - stats.enqueued_count, - stats.enqueue_err_count); + " error (%"PRIu64")\n", + stats.enqueued_count, + stats.enqueue_err_count); printf("\t\t + dequeue count (%"PRIu64")" - " error (%"PRIu64")\n", - stats.dequeued_count, - stats.dequeue_err_count); + " error (%"PRIu64")\n", + stats.dequeued_count, + stats.dequeue_err_count); } + +#ifdef RTE_LIBRTE_SECURITY + show_security_context(i); +#endif } }