get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/131905/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 131905,
    "url": "http://patchwork.dpdk.org/api/patches/131905/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230926024959.207098-7-chaoyong.he@corigine.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230926024959.207098-7-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230926024959.207098-7-chaoyong.he@corigine.com",
    "date": "2023-09-26T02:49:55",
    "name": "[v2,06/10] net/nfp: get IPsec Rx/Tx packet statistics",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "31a924eec77c68078b03243c136b9cae0a8277f9",
    "submitter": {
        "id": 2554,
        "url": "http://patchwork.dpdk.org/api/people/2554/?format=api",
        "name": "Chaoyong He",
        "email": "chaoyong.he@corigine.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230926024959.207098-7-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 29622,
            "url": "http://patchwork.dpdk.org/api/series/29622/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29622",
            "date": "2023-09-26T02:49:49",
            "name": "add the support of ipsec offload",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/29622/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/131905/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/131905/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9010A4263C;\n\tTue, 26 Sep 2023 04:51:21 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 51B6D402E6;\n\tTue, 26 Sep 2023 04:50:44 +0200 (CEST)",
            "from NAM10-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam10on2101.outbound.protection.outlook.com [40.107.93.101])\n by mails.dpdk.org (Postfix) with ESMTP id 605BF4064A\n for <dev@dpdk.org>; Tue, 26 Sep 2023 04:50:42 +0200 (CEST)",
            "from PH0PR13MB5568.namprd13.prod.outlook.com (2603:10b6:510:12b::16)\n by SA3PR13MB6516.namprd13.prod.outlook.com (2603:10b6:806:39c::8)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Tue, 26 Sep\n 2023 02:50:40 +0000",
            "from PH0PR13MB5568.namprd13.prod.outlook.com\n ([fe80::b070:92e1:931e:fee7]) by PH0PR13MB5568.namprd13.prod.outlook.com\n ([fe80::b070:92e1:931e:fee7%4]) with mapi id 15.20.6792.026; Tue, 26 Sep 2023\n 02:50:40 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=ACHOMrcsVpQsZrR43ykX1PjKENNKAd724PBDekCvdXLZmR+uyYeazMpyJvhQ/urUql/S7Fib++5ebwUNN+Tk3kpG9Ps0cBOKAyCOoOjveqZQpHnNd/OYClk5EYvHlL90jSivZrlSwSLDs08Vu7rgnwwr7uu1qOvHdboF95kxif8j02jNeXLwUmzBUzxMwd/6MXAlxHkh19Uu84RODh/XQI+/su8zwFeRBwMjy0bscYwHCDn/eQZQZJ9ZvURxS1bLx0Go+MFz8IqijIQvd5+8mHC+V5vGOW+DMynKuZiLm4gjE+v9J8oiaq44BgPLxIqoRw7Y4+XES1Ki5gNxg9olIg==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=vGu7lKbyde53E87VaYe0KZy+PPxSlCmpb0x2wpL9FrU=;\n b=KkZK5XBXNFNi+XnoaiMlTwG9f1QFNpTIYvEs4KTyHpJVWQeshZoG2P3ho2IGNyfASGrX4xdaYmh5vSPQyMnpCa2RVGtpjpXI/a6mC3grsj1PXmd0SWdkNWR70T29jWiL7WnHvotdvgGeICFjETkf3hfbscNH1vP/B7tSy8kLK/fVQUeOsy1KbXgWfRoe4MUtpyrIeEd0rvfJeW6KtUHZ/8AUwvJXvytSkl+LWaUWQkVDRNPngPxRy4uyHrmpeMGvofI9C0PZWF4QvZneS0bU24Upaq578Oa1DMARrrLB0e2mfEWYDOsP9nvPvHaMOvfAgzQ9Bb/eRr56tJJleBB/mA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com;\n dkim=pass header.d=corigine.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=vGu7lKbyde53E87VaYe0KZy+PPxSlCmpb0x2wpL9FrU=;\n b=oivkJND/zhVP5ttLOAqGH8tPL+QbMb2sx1N5dSjciSMbbHCYUWvCz4JGfYt4cmqE8IFvnCukMfpFkvagi7AN6L3jNw4x0QUJ0a0UpIa4zWJihwszUs0lEP95z63X28jteKv3nJDB64UPWyD/FLk61G2k7W+9SG4StL2uM9eLA+o=",
        "Authentication-Results": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=corigine.com;",
        "From": "Chaoyong He <chaoyong.he@corigine.com>",
        "To": "dev@dpdk.org",
        "Cc": "oss-drivers@corigine.com, Shihong Wang <shihong.wang@corigine.com>,\n Chaoyong He <chaoyong.he@corigine.com>",
        "Subject": "[PATCH v2 06/10] net/nfp: get IPsec Rx/Tx packet statistics",
        "Date": "Tue, 26 Sep 2023 10:49:55 +0800",
        "Message-Id": "<20230926024959.207098-7-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20230926024959.207098-1-chaoyong.he@corigine.com>",
        "References": "<20230925060644.1458598-1-chaoyong.he@corigine.com>\n <20230926024959.207098-1-chaoyong.he@corigine.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "BYAPR05CA0020.namprd05.prod.outlook.com\n (2603:10b6:a03:c0::33) To PH0PR13MB5568.namprd13.prod.outlook.com\n (2603:10b6:510:12b::16)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "PH0PR13MB5568:EE_|SA3PR13MB6516:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "81b8a8d8-f8ee-4ef5-d215-08dbbe3b5ec0",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n nlS6z4Ur4yJISAC2XfQWoA6qKkvgBG9FafYqiDxx+9DRDr2cS5weXWwKwPfBQ+3gW50Q1kEyDFAA9x1TkYThfRxAPT9/izJZnr9dYSOQAG2q4jlJkAi4jdre+yTCxuffY4VF9sxl4bpKJYpOKcEmQiKkx7adzKJTIDzZd1GpOAmJN2DykHRkaI+F0IIaqK6oV9gG1v4xuZWnP6nnI+364MqEhA83T68LB7dTats6xIZ84gRkBcRvwfKkLcEo6LymyMEv9LqiL6/6eYA9Zl+Vf9F1I4K3121rUntq4Mcssl+CnJ0NVE2sX4PBvqSdPAg985UzkPTDz6wrevfVlvU1qpvRvEo7VB4ZJo5xQzrQD2z8v7rolxZWg93Rzt3psM85lkzPtnkyh1Gkk/qAbiXlkt0OiyXUlNGcv0g6y+WAKtMFvSud+RnHVli3r7Dk+A5/B86ECTCYff21l6yHq9CaXMaULlbvvkOSsArAmYH7lN4U8e6b7X3dHZ/lkGB5SNGx5mJB515PdcDxx+RmDtkCtdIdaLmnE4CEFV//YQAhT7cBjKu+cDoUhB1G7GCZPXMgtTuyAs1cJCVD/V2Wg7gLNvhTkpGewYov6UDFQUEZDZGYvluVVlO9tQTRxQP37IHnDsJQPJ6XInMqgVpzY0pEhfuIZ2vytmenqhOAEs6Csm4=",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:PH0PR13MB5568.namprd13.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230031)(39830400003)(136003)(366004)(346002)(396003)(376002)(230922051799003)(1800799009)(451199024)(186009)(4326008)(83380400001)(2616005)(6486002)(6506007)(52116002)(478600001)(6666004)(86362001)(36756003)(38100700002)(1076003)(26005)(66476007)(8936002)(66556008)(6916009)(6512007)(2906002)(38350700002)(66946007)(41300700001)(107886003)(316002)(44832011)(8676002)(5660300002)(54906003);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n kRygr4fHFGJ9gKE8NGnyPrbhVO9fQ52gycIkjip9WSVBHqbQLbzNkzXcynDMqM1yqNgj5dNQuMeP9s+BybBVkTr7e2SJWhEboAMLa8/7esGfGrZZj8LcU5LWxsxoOcVGOXA8Ltn9K+XEqHACnIesLFmMuEzZNRbokeJtMSZoLZw84hrzv+md+JHDh5NjG9E2jltHzMHlPgffoUMfQK/DIogLpmXyeBC8BPc1jLkbB8b/G4THJH6V7ZlGrH1XN6IS3N6m8xOs12/FznU0uLGN83s8JvdA3R6prLME8SWCc3e3VQr0H9SBJjSKnAndsvaazPw8QQfIK+USlsraogdmymbIX6lyY6bC8rFM1cO+hcj/qO7wj4lfRtMfoao65mBqHkoOtdoDxTvpNknsuH/VMRzp0NGAnz2lbiioMXZQQzUZrlEm5t6xb9KqN/gJPrlYD62ScEfYuM8u977E5vG+7/UVUpgMCq6XlHnqPmIBwItMKDR9dXKPzHxbDHXbZTBW3MtwaOb+J0ArJGfdu/cnSvNou0UlOah6ZwtmsDlgPhr718SY2ZFTUuxM/2fmYbEk0YvCS/e03a52kJfpzed2vFGq9tt1R4XlYYYxbFiplj4+MSuIZeDllH1HbeB+8JKBP/YkH26GhWlGRrWqllUHA46GmdGBFT6feonR5BXe7XJSXp//RJKgJFShMyeLJ2zRr0hYgMqadSoAwncadK+yivjCU+nsYbtdL9BZ3Fq1WFE4wlch4nJ5krhgiROBnt0G9Cooi2kMW2qE7rJlJGuutnrsoaan2EWiBqpcNNeA8vc9g8LWH/srI+B7q6gpyNOAw1oTbcz8u+ADJgj/vSGxBlgQVOz96eePg9eCKwZKFdwxC1s8mwrtbvKP/S2ptrmnA7ncg0olUXxgwGVO/S05xRLdC3iLCs0NRwpM61PkjHgNOtrDdfkK8Jv7UBFd/+Y1MBuie3E9drmBj393XwJeZB2AJwtOG7UYB2EehrzSgU0DPjwHqbDtkYoQvdRX9Pdbj9D6SwhBsznffePOAFqhorE8pOhzkSfeS0XGSGoPjYRfAUdgMrJu+79HP80woKoJKvA8thkIOcLWSz1OxTwYgMry9mkwM6GCy+ZjPuqGTCCONYgICeqFUr6KuQyU2rsw3MjAQnURXTtLCCwRKUvZY4HDKMqMuD988+gX1KEA/fjzpR07cRcRnfqIOaDYbFH8hGzTszFWuScFC8Fwze+/PtCXfyslcNtbSku5JkZOBYSNk3z9PWhlqPfma86fR/ErutuHwjGB2Olravb6kuIurvt/Q3LDfm7JiQSDtBLcAF57lsKGmUfZDAOby8cR39G9Ou0hX3D3S5FFuljqGbUksnOYi9V0on7SssEFOp4htPxuqnYjpIDH4IjK4Fyy3DXCx1zjmeFRQp8bfByPoTlSPHOC4My2IoS5uRp1IimwOt7tqVEn27Y+TrU9goHWkogEzyoGpU3kgv7yjYQY9XnvgLc6mtbItWJKtFRQepp+jUAB8iYyILs7mqv3wVZadctdxXhowh8xkeEjbm22P6AFrsofb6GwQ8kNlmzXUN58iS6E6X/i9avJhJzZjZw0BuIR/uekFzqMkf9URdxsAUs+oA==",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 81b8a8d8-f8ee-4ef5-d215-08dbbe3b5ec0",
        "X-MS-Exchange-CrossTenant-AuthSource": "PH0PR13MB5568.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "26 Sep 2023 02:50:40.8064 (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "fe128f2c-073b-4c20-818e-7246a585940c",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n Xtd0+15fYE+e74Xq071qgM0G0AI3BYTIfto6Zm0lzXCfMp2iWVrcMbEgpNrgg/ium/AdDXOdgjAYA05xEgdffIG9IZyTUfgq2pJI42+Za+g=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SA3PR13MB6516",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "From: Shihong Wang <shihong.wang@corigine.com>\n\nIPsec packet processing is mostly carried out in hardware.\nThe hardware statistics on successful packets and discarded\npackets. The driver can obtain these statistics by Mailbox.\n\nSigned-off-by: Shihong Wang <shihong.wang@corigine.com>\nReviewed-by: Chaoyong He <chaoyong.he@corigine.com>\n---\n drivers/net/nfp/nfp_ipsec.c | 149 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 149 insertions(+)",
    "diff": "diff --git a/drivers/net/nfp/nfp_ipsec.c b/drivers/net/nfp/nfp_ipsec.c\nindex 51770def9d..d4292c3b90 100644\n--- a/drivers/net/nfp/nfp_ipsec.c\n+++ b/drivers/net/nfp/nfp_ipsec.c\n@@ -356,6 +356,154 @@ static const struct rte_security_capability nfp_security_caps[] = {\n \t}\n };\n \n+/* IPsec config message cmd codes */\n+enum nfp_ipsec_cfg_msg_cmd_codes {\n+\tNFP_IPSEC_CFG_MSG_ADD_SA,       /**< Add a new SA */\n+\tNFP_IPSEC_CFG_MSG_INV_SA,       /**< Invalidate an existing SA */\n+\tNFP_IPSEC_CFG_MSG_MODIFY_SA,    /**< Modify an existing SA */\n+\tNFP_IPSEC_CFG_MSG_GET_SA_STATS, /**< Report SA counters, flags, etc. */\n+\tNFP_IPSEC_CFG_MSG_GET_SEQ_NUMS, /**< Allocate sequence numbers */\n+\tNFP_IPSEC_CFG_MSG_LAST\n+};\n+\n+enum nfp_ipsec_cfg_msg_rsp_codes {\n+\tNFP_IPSEC_CFG_MSG_OK,\n+\tNFP_IPSEC_CFG_MSG_FAILED,\n+\tNFP_IPSEC_CFG_MSG_SA_VALID,\n+\tNFP_IPSEC_CFG_MSG_SA_HASH_ADD_FAILED,\n+\tNFP_IPSEC_CFG_MSG_SA_HASH_DEL_FAILED,\n+\tNFP_IPSEC_CFG_MSG_SA_INVALID_CMD\n+};\n+\n+static int\n+nfp_ipsec_cfg_cmd_issue(struct nfp_net_hw *hw,\n+\t\tstruct nfp_ipsec_msg *msg)\n+{\n+\tint ret;\n+\tuint32_t i;\n+\tuint32_t msg_size;\n+\n+\tmsg_size = RTE_DIM(msg->raw);\n+\tmsg->rsp = NFP_IPSEC_CFG_MSG_OK;\n+\n+\tfor (i = 0; i < msg_size; i++)\n+\t\tnn_cfg_writel(hw, NFP_NET_CFG_MBOX_VAL + 4 * i, msg->raw[i]);\n+\n+\tret = nfp_net_mbox_reconfig(hw, NFP_NET_CFG_MBOX_CMD_IPSEC);\n+\tif (ret < 0) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to IPsec reconfig mbox\");\n+\t\treturn ret;\n+\t}\n+\n+\t/*\n+\t * Not all commands and callers make use of response message data. But\n+\t * leave this up to the caller and always read and store the full\n+\t * response. One example where the data is needed is for statistics.\n+\t */\n+\tfor (i = 0; i < msg_size; i++)\n+\t\tmsg->raw[i] = nn_cfg_readl(hw, NFP_NET_CFG_MBOX_VAL + 4 * i);\n+\n+\tswitch (msg->rsp) {\n+\tcase NFP_IPSEC_CFG_MSG_OK:\n+\t\tret = 0;\n+\t\tbreak;\n+\tcase NFP_IPSEC_CFG_MSG_SA_INVALID_CMD:\n+\t\tret = -EINVAL;\n+\t\tbreak;\n+\tcase NFP_IPSEC_CFG_MSG_SA_VALID:\n+\t\tret = -EEXIST;\n+\t\tbreak;\n+\tcase NFP_IPSEC_CFG_MSG_FAILED:\n+\t\t/* FALLTHROUGH */\n+\tcase NFP_IPSEC_CFG_MSG_SA_HASH_ADD_FAILED:\n+\t\t/* FALLTHROUGH */\n+\tcase NFP_IPSEC_CFG_MSG_SA_HASH_DEL_FAILED:\n+\t\tret = -EIO;\n+\t\tbreak;\n+\tdefault:\n+\t\tret = -EDOM;\n+\t}\n+\n+\treturn ret;\n+}\n+\n+/**\n+ * Get discards packet statistics for each SA\n+ *\n+ * The sa_discard_stats contains the statistics of discards packets\n+ * of an SA. This function calculates the sum total of discarded packets.\n+ *\n+ * @param errors\n+ *   The value is SA discards packet sum total\n+ * @param sa_discard_stats\n+ *   The struct is SA discards packet Statistics\n+ */\n+static void\n+nfp_get_errorstats(uint64_t *errors,\n+\t\tstruct ipsec_discard_stats *sa_discard_stats)\n+{\n+\tuint32_t i;\n+\tuint32_t len;\n+\tuint32_t *perror;\n+\n+\tperror = &sa_discard_stats->discards_auth;\n+\tlen = sizeof(struct ipsec_discard_stats) / sizeof(uint32_t);\n+\n+\tfor (i = 0; i < len; i++)\n+\t\t*errors += *perror++;\n+\n+\t*errors -= sa_discard_stats->ipv4_id_counter;\n+}\n+\n+static int\n+nfp_security_session_get_stats(void *device,\n+\t\tstruct rte_security_session *session,\n+\t\tstruct rte_security_stats *stats)\n+{\n+\tint ret;\n+\tstruct nfp_net_hw *hw;\n+\tstruct nfp_ipsec_msg msg;\n+\tstruct rte_eth_dev *eth_dev;\n+\tstruct ipsec_get_sa_stats *cfg_s;\n+\tstruct rte_security_ipsec_stats *ips_s;\n+\tstruct nfp_ipsec_session *priv_session;\n+\tenum rte_security_ipsec_sa_direction direction;\n+\n+\teth_dev = device;\n+\tpriv_session = SECURITY_GET_SESS_PRIV(session);\n+\tmemset(&msg, 0, sizeof(msg));\n+\tmsg.cmd = NFP_IPSEC_CFG_MSG_GET_SA_STATS;\n+\tmsg.sa_idx = priv_session->sa_index;\n+\thw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);\n+\n+\tret = nfp_ipsec_cfg_cmd_issue(hw, &msg);\n+\tif (ret < 0) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to get SA stats\");\n+\t\treturn ret;\n+\t}\n+\n+\tcfg_s = &msg.cfg_get_stats;\n+\tdirection = priv_session->ipsec.direction;\n+\tmemset(stats, 0, sizeof(struct rte_security_stats)); /* Start with zeros */\n+\tstats->protocol = RTE_SECURITY_PROTOCOL_IPSEC;\n+\tips_s = &stats->ipsec;\n+\n+\t/* Only display SA if any counters are non-zero */\n+\tif (cfg_s->lifetime_byte_count != 0 || cfg_s->pkt_count != 0) {\n+\t\tif (direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS) {\n+\t\t\tips_s->ipackets = cfg_s->pkt_count;\n+\t\t\tips_s->ibytes = cfg_s->lifetime_byte_count;\n+\t\t\tnfp_get_errorstats(&ips_s->ierrors, &cfg_s->sa_discard_stats);\n+\t\t} else {\n+\t\t\tips_s->opackets = cfg_s->pkt_count;\n+\t\t\tips_s->obytes = cfg_s->lifetime_byte_count;\n+\t\t\tnfp_get_errorstats(&ips_s->oerrors, &cfg_s->sa_discard_stats);\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n static const struct rte_security_capability *\n nfp_crypto_capabilities_get(void *device __rte_unused)\n {\n@@ -370,6 +518,7 @@ nfp_security_session_get_size(void *device __rte_unused)\n \n static const struct rte_security_ops nfp_security_ops = {\n \t.session_get_size = nfp_security_session_get_size,\n+\t.session_stats_get = nfp_security_session_get_stats,\n \t.capabilities_get = nfp_crypto_capabilities_get,\n };\n \n",
    "prefixes": [
        "v2",
        "06/10"
    ]
}