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 7566AA052A for ; Tue, 26 Jan 2021 14:06:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 526FE1414B7; Tue, 26 Jan 2021 14:06:27 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 0959F1414A6; Tue, 26 Jan 2021 14:06:23 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 5B6165C00BE; Tue, 26 Jan 2021 08:06:21 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 26 Jan 2021 08:06:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=ya0Yit6Mg1+t9 5FMQ7lEg/7BqT8le0T09jO6e/O5LlE=; b=Cq2Am+2XOaTo+WM+0q8uMf/cWC/xI /Iya0PAZkIZvZH8Q7akj+cZxU5VqDADHz0UgP/x/JTgw5dEm/S+UphhRZlpPeYb3 QJjcy3bXrw1w7V4Up4iTkO8s44b7EuRVPwSO3HH6XLASFDDGKK4ien5YscommlWn v9PSV42jGAmazSaLFHLpfclaZW0Y8ZArPs3rmdTkghdg1hzFdb6N05c0cynCl9bq urKuXCaLA/usuxX6VvbLD97wLUMFt9fvEhqnrMYJcvwtQS3vk1s15xs36dfwLC6i /gFoiyOV7c1xG4m/eRN3QQ5Ox0/oxuuaV56Lu/UrXsC9+2l5P7smBikXw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=ya0Yit6Mg1+t95FMQ7lEg/7BqT8le0T09jO6e/O5LlE=; b=FaWLCOSg iWQPNsx+RxQZcBGvfB/AZ9pI0gX7z3AW3Ord+5S+/rjyNP4UjUTXBIPkTtOdraMl z2Dx+zbVT25Ea9oLWT4K5kg+1hDIFgP5m3Lk0yT+cQtC4S8gR39PZJDP7/pRFYAK EpNF/0iRsysSbu5ECY6xAVABYoTmUy1IsGYQwNWvU9t8/zIv53CunmBuxc3V9E0v uFKrfzdtWj6pBf4cA2+afmf8plF24FCmo1EHu4PIHXQuic66s0oDVtfNLqAz3Tk7 u+rNJMQIpEJR+AXxsD1asNglS1DCqKTijhemYUgZNkUABiEZMUSkN49vIiTL/Sat 9ZWxfaZhxgSUDQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdehgdegkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedtgfeu tdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 94EBB240064; Tue, 26 Jan 2021 08:06:19 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Hemant Agrawal , stable@dpdk.org, Maryam Tahhan , Reshma Pattan , Stephen Hemminger Date: Tue, 26 Jan 2021 14:06:16 +0100 Message-Id: <20210126130616.3840205-1-thomas@monjalon.net> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210120051711.19876-1-hemant.agrawal@nxp.com> References: <20210120051711.19876-1-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v3 1/1] app/procinfo: fix security context info X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Hemant Agrawal We need to differentiate between crypto and ethernet security context as they belong to different devices. Fixes: d82d6ac64338 ("app/procinfo: add crypto security context info") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal Signed-off-by: Thomas Monjalon --- v3: include stdbool.h and use true/false instead of 1/0 --- app/proc-info/main.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 44249dd2cb..b9587f7ded 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -645,11 +646,16 @@ metrics_display(int port_id) } static void -show_security_context(uint16_t portid) +show_security_context(uint16_t portid, bool inline_offload) { - void *p_ctx = rte_eth_dev_get_sec_ctx(portid); + void *p_ctx; const struct rte_security_capability *s_cap; + if (inline_offload) + p_ctx = rte_eth_dev_get_sec_ctx(portid); + else + p_ctx = rte_cryptodev_get_sec_ctx(portid); + if (p_ctx == NULL) return; @@ -856,7 +862,7 @@ show_port(void) } #ifdef RTE_LIB_SECURITY - show_security_context(i); + show_security_context(i, true); #endif } } @@ -1220,7 +1226,7 @@ show_crypto(void) } #ifdef RTE_LIB_SECURITY - show_security_context(i); + show_security_context(i, false); #endif } } -- 2.30.0