get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 92176,
    "url": "http://patches.dpdk.org/api/patches/92176/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210426124250.42771-6-michaelba@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://patches.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": "<20210426124250.42771-6-michaelba@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210426124250.42771-6-michaelba@nvidia.com",
    "date": "2021-04-26T12:42:50",
    "name": "[5/5] net/mlx5: use aging by counter when counter is existed",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b628cf7c10d28364d89c607a16431c6223af7a2b",
    "submitter": {
        "id": 1949,
        "url": "http://patches.dpdk.org/api/people/1949/?format=api",
        "name": "Michael Baum",
        "email": "michaelba@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210426124250.42771-6-michaelba@nvidia.com/mbox/",
    "series": [
        {
            "id": 16674,
            "url": "http://patches.dpdk.org/api/series/16674/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16674",
            "date": "2021-04-26T12:42:45",
            "name": "net/mlx5: add indirect count action",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/16674/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/92176/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/92176/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 19648A0548;\n\tMon, 26 Apr 2021 14:43:45 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B0997411D7;\n\tMon, 26 Apr 2021 14:43:28 +0200 (CEST)",
            "from NAM10-BN7-obe.outbound.protection.outlook.com\n (mail-bn7nam10on2040.outbound.protection.outlook.com [40.107.92.40])\n by mails.dpdk.org (Postfix) with ESMTP id 8DF01411CA\n for <dev@dpdk.org>; Mon, 26 Apr 2021 14:43:26 +0200 (CEST)",
            "from DM5PR21CA0058.namprd21.prod.outlook.com (2603:10b6:3:129::20)\n by MWHPR12MB1887.namprd12.prod.outlook.com (2603:10b6:300:111::23) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Mon, 26 Apr\n 2021 12:43:24 +0000",
            "from DM6NAM11FT030.eop-nam11.prod.protection.outlook.com\n (2603:10b6:3:129:cafe::84) by DM5PR21CA0058.outlook.office365.com\n (2603:10b6:3:129::20) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.2 via Frontend\n Transport; Mon, 26 Apr 2021 12:43:24 +0000",
            "from mail.nvidia.com (216.228.112.34) by\n DM6NAM11FT030.mail.protection.outlook.com (10.13.172.146) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4065.21 via Frontend Transport; Mon, 26 Apr 2021 12:43:24 +0000",
            "from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 26 Apr\n 2021 12:43:23 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=NwWrHUo37lzB3b94+hfwp8AIRPtRIQkuvxrXyWmQ5f9o6x8gRsDjbw6cjyw2sv7z7LVjxtPBhHSz+JLyI9z0No2Tpb5EhnxhfkvpaR21eSPW0aB93RMrJ5B1DNFnGsJWxopRXx8c3drDRt/UMbP44EocKarIiqGVEShrNfY5hlxNlHnvKZCcwRXbCS8fgNxjs+Z0flxhV4nQSbkb/fhYMmxEesw5Hl39K8SQm7LxyekKRewhe2Fiy25nrEtynrU2JWSkCxmEhEJ3tW8WpWtBelFKEHafUgYvDcYosASxVUiml/KZ6sP9+bhTGM4m2KGjFyVHr5WrOIKXheZJlBgCSg==",
        "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-SenderADCheck;\n bh=Fcan9LQi1BQoTbq9ck1d+9F0QrvvHeX5caoMJqqSUjY=;\n b=c5g+Q24Qx5dQDil2F7ozSZvZxGx2Cu3EO/OSQ7Zj65XO0MkA/fgKBwnaLd4tvq+G7G++ed0M6RnPreQadV7YQM+xan5WlP+hGw3MlZ4AJMRZKD3ArbgQgrN4dDCv+3TX1Sfvmhz72gqY8cGnfbGvTJ0RGJnyauQwIXt/AGq4c95qx2lF+oqBXuvPz6h9tF0PmDfM9f0xei8BZFVLK6JUVF6PDgi0PAO9szNaxDX1Rt/4upugyJ02y8LCQJXbKszEw2LKFgpSni3KRsItH1MxvHb/DFOnSDyX1yENhcKwRPRqsMkhWhtlqpqhSRnLsEz5zEguatU5Fe8usBOBvCsb0A==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=Fcan9LQi1BQoTbq9ck1d+9F0QrvvHeX5caoMJqqSUjY=;\n b=DGs2byezews1E8CwezQ6cfFVMIU0e4x5X61QkdwJtqaR0Lsz/J44cP5TXnYvduwt0O1QKgGsKPG28f5lOhLonkHhYYqxp7WZz7QaBevhpQOsVCgVRy1a9Hi2Vr1TXzfu4zB8iZge2sywW9sfyFPo91h1P9AbFd+WvylH6FPHR53//Q5Ia7VGGuDkyE6MvsKKJz2taO63yWbUwmazNNLcXo+1EE539M3tRCXQ8l8VFQxYteKFf4bg/LM8adeQPSjjVWFWLxvod8aEn9FRvBHHO+oajRoDdXttVdi2hrQbNuvE6onfhesxZiwvT4TyIMkHVRw0WH6/GAiidSHSS0yrjg==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.112.34)\n smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed)\n header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.112.34 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.112.34; helo=mail.nvidia.com;",
        "From": "Michael Baum <michaelba@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Matan Azrad <matan@nvidia.com>, Raslan Darawsheh <rasland@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>",
        "Date": "Mon, 26 Apr 2021 15:42:50 +0300",
        "Message-ID": "<20210426124250.42771-6-michaelba@nvidia.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210426124250.42771-1-michaelba@nvidia.com>",
        "References": "<20210426124250.42771-1-michaelba@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[172.20.145.6]",
        "X-ClientProxiedBy": "HQMAIL107.nvidia.com (172.20.187.13) To\n HQMAIL107.nvidia.com (172.20.187.13)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "9f04f63d-9e3a-44cb-b3a0-08d908b0e1ff",
        "X-MS-TrafficTypeDiagnostic": "MWHPR12MB1887:",
        "X-Microsoft-Antispam-PRVS": "\n <MWHPR12MB188738A22C3F117940E0E989CC429@MWHPR12MB1887.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:5516;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n uDf6mcCyeJY0Q5w8ECpJ1PX7dxODKtyeIXPVK/vpGefnUtFiRASo3F9gc+YqRn0wDiP7TVmBenne+IjZfWQmDXBl2s38F/2BN21bvXwo7JTJGeylQB0t3zJTzD7fErU0dEfZ6r80CQcXVGpL1x9boKf5isd4LIiI2k/PAydufxUgVlATqMuhifTgY9dtb9ejHLmLf5cSSE865SPZx1C7Z2XRprr8ftMBM4WtRVhzGWxenqk+bNTsGb2Yz3HRaq8KXOkzK99IUtieHQEIh1/dbpIMaAylMDI5b1W/PYkH8T/cdHCnmaVpEuHRfjIrvGNLqNUynLuRK86Mjnj3GJnhi5f3vvHSDHAAApmloYWW1qnKtwDGMk1HV/LKLVnJaI/JXTusiABiCQF9sogcVxyjT4YRuhfrboKuA7LipOwDtIosIPOdJlrwgornvKGogmC5TeMltxr4Yj8GNjKFB1CCAJW/TzXpuK08GwQJUEGjcqQlmkj7Oxk+pE50a67C91mW89lAA8Em9EyP9SSBOzZGqRsQlse0dvOpAYsd6rGH6LXH89Uaeo+UX2PVOk4IvSxlzWOnHNbMjWW6Ic3acWnTRnK2WFxNh82lvYgxxmJOv9b5s1gFaaoyI9HJJuCKHriqeKazb+x+ZSUFgs3rpWhbAhhc/rbfJ/I79/2Lt9uk2VI=",
        "X-Forefront-Antispam-Report": "CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE;\n SFS:(4636009)(376002)(39860400002)(136003)(346002)(396003)(36840700001)(46966006)(316002)(8676002)(70586007)(36906005)(16526019)(5660300002)(54906003)(70206006)(186003)(1076003)(107886003)(4326008)(26005)(36756003)(2616005)(356005)(8936002)(36860700001)(7696005)(82310400003)(426003)(47076005)(83380400001)(2906002)(6916009)(6286002)(7636003)(82740400003)(336012)(478600001)(55016002)(86362001)(6666004);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "26 Apr 2021 12:43:24.7523 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 9f04f63d-9e3a-44cb-b3a0-08d908b0e1ff",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n DM6NAM11FT030.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MWHPR12MB1887",
        "Subject": "[dpdk-dev] [PATCH 5/5] net/mlx5: use aging by counter when counter\n is existed",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The driver support 2 mechanisms in order to support AGE action:\n1. Aging by counter - HW counter will be configured to the flow traffic,\nthe driver polls the counter values efficiently to detect flow timeout.\n2. Aging by ASO flow hit bit - HW ASO flow-hit bit is allocated for the\nflow, the driver polls the bit efficiently to detect flow timeout.\n\nASO bit is only single bit resource while counter is 16 bytes, hence, it\nis better to use ASO instead of counter for aging.\n\nWhen a non-shared COUNT action is also configured to the flow, the\ndriver can use the same counter also for AGE action and no need to\ncreate more ASO action for it.\n\nThe current code always uses ASO when it is supported in the device,\nchange it to reuse the non-shared counter if it exists in the flow.\n\nSigned-off-by: Michael Baum <michaelba@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/net/mlx5/mlx5_flow_dv.c | 149 +++++++++++++++++++++++++++-------------\n 1 file changed, 102 insertions(+), 47 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex 7174e9b..9cd1c45 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -7143,6 +7143,12 @@ struct mlx5_hlist_entry *\n \t\t\t\t\t\tRTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n \t\t\t\t\t\t\t\t\t   NULL,\n \t\t\t  \"Shared ASO age action is not supported for group 0\");\n+\t\t\tif (action_flags & MLX5_FLOW_ACTION_AGE)\n+\t\t\t\treturn rte_flow_error_set\n+\t\t\t\t\t\t  (error, EINVAL,\n+\t\t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t\t\t   NULL,\n+\t\t\t\t\t\t   \"duplicate age actions set\");\n \t\t\taction_flags |= MLX5_FLOW_ACTION_AGE;\n \t\t\t++actions_n;\n \t\t\tbreak;\n@@ -11163,6 +11169,47 @@ struct mlx5_cache_entry *\n }\n \n /**\n+ * Prepares DV flow counter with aging configuration.\n+ * Gets it by index when exists, creates a new one when doesn't.\n+ *\n+ * @param[in] dev\n+ *   Pointer to rte_eth_dev structure.\n+ * @param[in] dev_flow\n+ *   Pointer to the mlx5_flow.\n+ * @param[in, out] flow\n+ *   Pointer to the sub flow.\n+ * @param[in] count\n+ *   Pointer to the counter action configuration.\n+ * @param[in] age\n+ *   Pointer to the aging action configuration.\n+ * @param[out] error\n+ *   Pointer to the error structure.\n+ *\n+ * @return\n+ *   Pointer to the counter, NULL otherwise.\n+ */\n+static struct mlx5_flow_counter *\n+flow_dv_prepare_counter(struct rte_eth_dev *dev,\n+\t\t\tstruct mlx5_flow *dev_flow,\n+\t\t\tstruct rte_flow *flow,\n+\t\t\tconst struct rte_flow_action_count *count,\n+\t\t\tconst struct rte_flow_action_age *age,\n+\t\t\tstruct rte_flow_error *error)\n+{\n+\tif (!flow->counter) {\n+\t\tflow->counter = flow_dv_translate_create_counter(dev, dev_flow,\n+\t\t\t\t\t\t\t\t count, age);\n+\t\tif (!flow->counter) {\n+\t\t\trte_flow_error_set(error, rte_errno,\n+\t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ACTION, NULL,\n+\t\t\t\t\t   \"cannot create counter object.\");\n+\t\t\treturn NULL;\n+\t\t}\n+\t}\n+\treturn flow_dv_counter_get_by_idx(dev, flow->counter, NULL);\n+}\n+\n+/**\n  * Fill the flow with DV spec, lock free\n  * (mutex should be acquired by caller).\n  *\n@@ -11215,7 +11262,7 @@ struct mlx5_cache_entry *\n \t} mhdr_dummy;\n \tstruct mlx5_flow_dv_modify_hdr_resource *mhdr_res = &mhdr_dummy.res;\n \tconst struct rte_flow_action_count *count = NULL;\n-\tconst struct rte_flow_action_age *age = NULL;\n+\tconst struct rte_flow_action_age *non_shared_age = NULL;\n \tunion flow_dv_attr flow_attr = { .attr = 0 };\n \tuint32_t tag_be;\n \tunion mlx5_flow_tbl_key tbl_key;\n@@ -11230,6 +11277,7 @@ struct mlx5_cache_entry *\n \tconst struct rte_flow_action_sample *sample = NULL;\n \tstruct mlx5_flow_sub_actions_list *sample_act;\n \tuint32_t sample_act_pos = UINT32_MAX;\n+\tuint32_t age_act_pos = UINT32_MAX;\n \tuint32_t num_of_dest = 0;\n \tint tmp_actions_n = 0;\n \tuint32_t table;\n@@ -11452,7 +11500,12 @@ struct mlx5_cache_entry *\n \t\t\tage_act = flow_aso_age_get_by_idx(dev, flow->age);\n \t\t\t__atomic_fetch_add(&age_act->refcnt, 1,\n \t\t\t\t\t   __ATOMIC_RELAXED);\n-\t\t\tdev_flow->dv.actions[actions_n++] = age_act->dr_action;\n+\t\t\tage_act_pos = actions_n++;\n+\t\t\taction_flags |= MLX5_FLOW_ACTION_AGE;\n+\t\t\tbreak;\n+\t\tcase RTE_FLOW_ACTION_TYPE_AGE:\n+\t\t\tnon_shared_age = action->conf;\n+\t\t\tage_act_pos = actions_n++;\n \t\t\taction_flags |= MLX5_FLOW_ACTION_AGE;\n \t\t\tbreak;\n \t\tcase MLX5_RTE_FLOW_ACTION_TYPE_COUNT:\n@@ -11464,31 +11517,6 @@ struct mlx5_cache_entry *\n \t\t\t/* Save information first, will apply later. */\n \t\t\taction_flags |= MLX5_FLOW_ACTION_COUNT;\n \t\t\tbreak;\n-\t\tcase RTE_FLOW_ACTION_TYPE_AGE:\n-\t\t\tif (priv->sh->flow_hit_aso_en && attr->group) {\n-\t\t\t\t/*\n-\t\t\t\t * Create one shared age action, to be used\n-\t\t\t\t * by all sub-flows.\n-\t\t\t\t */\n-\t\t\t\tif (!flow->age) {\n-\t\t\t\t\tflow->age =\n-\t\t\t\t\t\tflow_dv_translate_create_aso_age\n-\t\t\t\t\t\t\t(dev, action->conf,\n-\t\t\t\t\t\t\t error);\n-\t\t\t\t\tif (!flow->age)\n-\t\t\t\t\t\treturn rte_flow_error_set\n-\t\t\t\t\t\t(error, rte_errno,\n-\t\t\t\t\t\t RTE_FLOW_ERROR_TYPE_ACTION,\n-\t\t\t\t\t\t NULL,\n-\t\t\t\t\t\t \"can't create ASO age action\");\n-\t\t\t\t}\n-\t\t\t\tdev_flow->dv.actions[actions_n++] =\n-\t\t\t\t\t  (flow_aso_age_get_by_idx\n-\t\t\t\t\t\t(dev, flow->age))->dr_action;\n-\t\t\t\taction_flags |= MLX5_FLOW_ACTION_AGE;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t\t/* Fall-through */\n \t\tcase RTE_FLOW_ACTION_TYPE_COUNT:\n \t\t\tif (!dev_conf->devx) {\n \t\t\t\treturn rte_flow_error_set\n@@ -11498,10 +11526,7 @@ struct mlx5_cache_entry *\n \t\t\t\t\t       \"count action not supported\");\n \t\t\t}\n \t\t\t/* Save information first, will apply later. */\n-\t\t\tif (actions->type == RTE_FLOW_ACTION_TYPE_COUNT)\n-\t\t\t\tcount = action->conf;\n-\t\t\telse\n-\t\t\t\tage = action->conf;\n+\t\t\tcount = action->conf;\n \t\t\taction_flags |= MLX5_FLOW_ACTION_COUNT;\n \t\t\tbreak;\n \t\tcase RTE_FLOW_ACTION_TYPE_OF_POP_VLAN:\n@@ -11801,27 +11826,57 @@ struct mlx5_cache_entry *\n \t\t\t\tdev_flow->dv.actions[modify_action_position] =\n \t\t\t\t\thandle->dvh.modify_hdr->action;\n \t\t\t}\n+\t\t\t/*\n+\t\t\t * Handle AGE and COUNT action by single HW counter\n+\t\t\t * when they are not shared.\n+\t\t\t */\n+\t\t\tif (action_flags & MLX5_FLOW_ACTION_AGE) {\n+\t\t\t\tif ((non_shared_age &&\n+\t\t\t\t     count && !count->shared) ||\n+\t\t\t\t    !(priv->sh->flow_hit_aso_en &&\n+\t\t\t\t      attr->group)) {\n+\t\t\t\t\t/* Creates age by counters. */\n+\t\t\t\t\tcnt_act = flow_dv_prepare_counter\n+\t\t\t\t\t\t\t\t(dev, dev_flow,\n+\t\t\t\t\t\t\t\t flow, count,\n+\t\t\t\t\t\t\t\t non_shared_age,\n+\t\t\t\t\t\t\t\t error);\n+\t\t\t\t\tif (!cnt_act)\n+\t\t\t\t\t\treturn -rte_errno;\n+\t\t\t\t\tdev_flow->dv.actions[age_act_pos] =\n+\t\t\t\t\t\t\t\tcnt_act->action;\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t\tif (!flow->age && non_shared_age) {\n+\t\t\t\t\tflow->age =\n+\t\t\t\t\t\tflow_dv_translate_create_aso_age\n+\t\t\t\t\t\t\t\t(dev,\n+\t\t\t\t\t\t\t\t non_shared_age,\n+\t\t\t\t\t\t\t\t error);\n+\t\t\t\t\tif (!flow->age)\n+\t\t\t\t\t\treturn rte_flow_error_set\n+\t\t\t\t\t\t    (error, rte_errno,\n+\t\t\t\t\t\t     RTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t\t\t     NULL,\n+\t\t\t\t\t\t     \"can't create ASO age action\");\n+\t\t\t\t}\n+\t\t\t\tage_act = flow_aso_age_get_by_idx(dev,\n+\t\t\t\t\t\t\t\t  flow->age);\n+\t\t\t\tdev_flow->dv.actions[age_act_pos] =\n+\t\t\t\t\t\t\t     age_act->dr_action;\n+\t\t\t}\n \t\t\tif (action_flags & MLX5_FLOW_ACTION_COUNT) {\n \t\t\t\t/*\n \t\t\t\t * Create one count action, to be used\n \t\t\t\t * by all sub-flows.\n \t\t\t\t */\n-\t\t\t\tif (!flow->counter) {\n-\t\t\t\t\tflow->counter =\n-\t\t\t\t\t\tflow_dv_translate_create_counter\n-\t\t\t\t\t\t\t(dev, dev_flow, count,\n-\t\t\t\t\t\t\t age);\n-\t\t\t\t\tif (!flow->counter)\n-\t\t\t\t\t\treturn rte_flow_error_set\n-\t\t\t\t\t\t(error, rte_errno,\n-\t\t\t\t\t\t RTE_FLOW_ERROR_TYPE_ACTION,\n-\t\t\t\t\t\t NULL, \"cannot create counter\"\n-\t\t\t\t\t\t \" object.\");\n-\t\t\t\t}\n-\t\t\t\tdev_flow->dv.actions[actions_n] =\n-\t\t\t\t\t  (flow_dv_counter_get_by_idx(dev,\n-\t\t\t\t\t  flow->counter, NULL))->action;\n-\t\t\t\tactions_n++;\n+\t\t\t\tcnt_act = flow_dv_prepare_counter(dev, dev_flow,\n+\t\t\t\t\t\t\t\t  flow, count,\n+\t\t\t\t\t\t\t\t  NULL, error);\n+\t\t\t\tif (!cnt_act)\n+\t\t\t\t\treturn -rte_errno;\n+\t\t\t\tdev_flow->dv.actions[actions_n++] =\n+\t\t\t\t\t\t\t\tcnt_act->action;\n \t\t\t}\n \t\tdefault:\n \t\t\tbreak;\n",
    "prefixes": [
        "5/5"
    ]
}