List comments

GET /api/patches/74605/comments/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "id": 116498,
        "web_url": "https://patches.dpdk.org/comment/116498/",
        "msgid": "<AM0PR05MB6707B2B0382A66ACB4145293C2790@AM0PR05MB6707.eurprd05.prod.outlook.com>",
        "date": "2020-07-22T11:35:38",
        "subject": "Re: [dpdk-dev] [PATCH v2 1/3] net/mlx5: separate aging counter pool\n\trange",
        "submitter": {
            "id": 513,
            "url": "https://patches.dpdk.org/api/people/513/",
            "name": "Raslan Darawsheh",
            "email": "rasland@mellanox.com"
        },
        "content": "Hi,\n\n> -----Original Message-----\n> From: Suanming Mou <suanmingm@mellanox.com>\n> Sent: Wednesday, July 22, 2020 10:59 AM\n> To: Slava Ovsiienko <viacheslavo@mellanox.com>; Matan Azrad\n> <matan@mellanox.com>\n> Cc: Raslan Darawsheh <rasland@mellanox.com>; dev@dpdk.org\n> Subject: [PATCH v2 1/3] net/mlx5: separate aging counter pool range\n> \n> Currently, when allocate the counter or counter based age from group 0,\n> counter and age may share the same counter dcs ID range. Both age and\n> pure counter need to sync up with each other's container to check if\n> the ID range exists and update the min_dcs.\n> \n> It comes two disadvantages:\n> 1. If the ID range is shared, this counter range will be queried twice\n> both from age and pure counter container in 1s.\n> 2. The same range counter check between the two container makes the\n> counter allocate sync min_dcs time to time with extra min_dcs updating.\n> \n> This patch avoid the same ID range to be shared when allocate the new\n> pool. If the same ID range exists in other container, just add the\n> counter to the other container until get new range which saves the\n> min_dcs sync up time to time.\n> \n> Signed-off-by: Suanming Mou <suanmingm@mellanox.com>\n> Acked-by: Matan Azrad <matan@mellanox.com>\n> ---\n>  drivers/net/mlx5/mlx5_flow_dv.c | 69 +++++++++++++++++------------------\n> ------\n>  1 file changed, 28 insertions(+), 41 deletions(-)\n> \n> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c\n> b/drivers/net/mlx5/mlx5_flow_dv.c\n> index f0cc7ad..2fc4457 100644\n> --- a/drivers/net/mlx5/mlx5_flow_dv.c\n> +++ b/drivers/net/mlx5/mlx5_flow_dv.c\n> @@ -4408,39 +4408,6 @@ struct field_modify_info modify_tcp[] = {\n>  }\n> \n>  /**\n> - * Update the minimum dcs-id for aged or no-aged counter pool.\n> - *\n> - * @param[in] dev\n> - *   Pointer to the Ethernet device structure.\n> - * @param[in] pool\n> - *   Current counter pool.\n> - * @param[in] batch\n> - *   Whether the pool is for counter that was allocated by batch command.\n> - * @param[in] age\n> - *   Whether the counter is for aging.\n> - */\n> -static void\n> -flow_dv_counter_update_min_dcs(struct rte_eth_dev *dev,\n> -\t\t\tstruct mlx5_flow_counter_pool *pool,\n> -\t\t\tuint32_t batch, uint32_t age)\n> -{\n> -\tstruct mlx5_priv *priv = dev->data->dev_private;\n> -\tstruct mlx5_flow_counter_pool *other;\n> -\tstruct mlx5_pools_container *cont;\n> -\n> -\tcont = MLX5_CNT_CONTAINER(priv->sh, batch, (age ^ 0x1));\n> -\tother = flow_dv_find_pool_by_id(cont, pool->min_dcs->id);\n> -\tif (!other)\n> -\t\treturn;\n> -\tif (pool->min_dcs->id < other->min_dcs->id) {\n> -\t\trte_atomic64_set(&other->a64_dcs,\n> -\t\t\trte_atomic64_read(&pool->a64_dcs));\n> -\t} else {\n> -\t\trte_atomic64_set(&pool->a64_dcs,\n> -\t\t\trte_atomic64_read(&other->a64_dcs));\n> -\t}\n> -}\n> -/**\n>   * Prepare a new counter and/or a new counter pool.\n>   *\n>   * @param[in] dev\n> @@ -4467,31 +4434,50 @@ struct field_modify_info modify_tcp[] = {\n>  \tstruct mlx5_counters tmp_tq;\n>  \tstruct mlx5_devx_obj *dcs = NULL;\n>  \tstruct mlx5_flow_counter *cnt;\n> +\tuint32_t add2other;\n>  \tuint32_t i;\n> \n>  \tcont = MLX5_CNT_CONTAINER(priv->sh, batch, age);\n>  \tif (!batch) {\n> +retry:\n> +\t\tadd2other = 0;\n>  \t\t/* bulk_bitmap must be 0 for single counter allocation. */\n>  \t\tdcs = mlx5_devx_cmd_flow_counter_alloc(priv->sh->ctx, 0);\n>  \t\tif (!dcs)\n>  \t\t\treturn NULL;\n>  \t\tpool = flow_dv_find_pool_by_id(cont, dcs->id);\n> +\t\t/* Check if counter belongs to exist pool ID range. */\n>  \t\tif (!pool) {\n> -\t\t\tpool = flow_dv_pool_create(dev, dcs, batch, age);\n> -\t\t\tif (!pool) {\n> -\t\t\t\tmlx5_devx_cmd_destroy(dcs);\n> -\t\t\t\treturn NULL;\n> +\t\t\tpool = flow_dv_find_pool_by_id\n> +\t\t\t       (MLX5_CNT_CONTAINER\n> +\t\t\t       (priv->sh, batch, (age ^ 0x1)), dcs->id);\n> +\t\t\t/*\n> +\t\t\t * Pool eixsts, counter will be added to the other\n> +\t\t\t * container, need to reallocate it later.\n> +\t\t\t */\n> +\t\t\tif (pool) {\n> +\t\t\t\tadd2other = 1;\n> +\t\t\t} else {\n> +\t\t\t\tpool = flow_dv_pool_create(dev, dcs, batch,\n> +\t\t\t\t\t\t\t   age);\n> +\t\t\t\tif (!pool) {\n> +\t\t\t\t\tmlx5_devx_cmd_destroy(dcs);\n> +\t\t\t\t\treturn NULL;\n> +\t\t\t\t}\n>  \t\t\t}\n> -\t\t} else if (dcs->id < pool->min_dcs->id) {\n> +\t\t}\n> +\t\tif (dcs->id < pool->min_dcs->id)\n>  \t\t\trte_atomic64_set(&pool->a64_dcs,\n>  \t\t\t\t\t (int64_t)(uintptr_t)dcs);\n> -\t\t}\n> -\t\tflow_dv_counter_update_min_dcs(dev,\n> -\t\t\t\t\t\tpool, batch, age);\n>  \t\ti = dcs->id % MLX5_COUNTERS_PER_POOL;\n>  \t\tcnt = MLX5_POOL_GET_CNT(pool, i);\n>  \t\tcnt->pool = pool;\n>  \t\tMLX5_GET_POOL_CNT_EXT(pool, i)->dcs = dcs;\n> +\t\tif (add2other) {\n> +\t\t\tTAILQ_INSERT_TAIL(&pool->counters[pool-\n> >query_gen],\n> +\t\t\t\t\t  cnt, next);\n> +\t\t\tgoto retry;\n> +\t\t}\n>  \t\t*cnt_free = cnt;\n>  \t\treturn pool;\n>  \t}\n> @@ -9985,3 +9971,4 @@ struct field_modify_info modify_tcp[] = {\n>  };\n> \n>  #endif /* HAVE_IBV_FLOW_DV_SUPPORT */\n> +\n> --\n> 1.8.3.1\n\n\nSeries applied to next-net-mlx,\n\nKindest regards,\nRaslan Darawsheh",
        "headers": {
            "Accept-Language": "en-US",
            "X-Mailman-Version": "2.1.15",
            "x-ms-oob-tlc-oobclassifiers": "OLM:2582;",
            "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "AM0PR0502MB3924",
            "authentication-results": "mellanox.com; dkim=none (message not signed)\n header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com;",
            "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED",
            "Precedence": "list",
            "List-Post": "<mailto:dev@dpdk.org>",
            "x-ms-exchange-senderadcheck": "1",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "Subject": "Re: [dpdk-dev] [PATCH v2 1/3] net/mlx5: separate aging counter pool\n\trange",
            "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "Delivered-To": "patchwork@inbox.dpdk.org",
            "Received": [
                "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AD24FA0526;\n\tWed, 22 Jul 2020 13:35:40 +0200 (CEST)",
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 46C4C1C02C;\n\tWed, 22 Jul 2020 13:35:40 +0200 (CEST)",
                "from EUR05-VI1-obe.outbound.protection.outlook.com\n (mail-vi1eur05on2048.outbound.protection.outlook.com [40.107.21.48])\n by dpdk.org (Postfix) with ESMTP id 9420D1C012\n for <dev@dpdk.org>; Wed, 22 Jul 2020 13:35:39 +0200 (CEST)",
                "from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17)\n by AM0PR0502MB3924.eurprd05.prod.outlook.com (2603:10a6:208:20::30)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.22; Wed, 22 Jul\n 2020 11:35:38 +0000",
                "from AM0PR05MB6707.eurprd05.prod.outlook.com\n ([fe80::ecd3:6008:3784:4012]) by AM0PR05MB6707.eurprd05.prod.outlook.com\n ([fe80::ecd3:6008:3784:4012%5]) with mapi id 15.20.3195.028; Wed, 22 Jul 2020\n 11:35:38 +0000"
            ],
            "x-originating-ip": "[84.242.49.134]",
            "x-microsoft-antispam": "BCL:0;",
            "x-ms-exchange-transport-forked": "True",
            "X-MS-Exchange-CrossTenant-AuthSource": "AM0PR05MB6707.eurprd05.prod.outlook.com",
            "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=CZfVMHXa5c2peKyG+vLZlK7wwXhMuUO9HpKmGpnnyuI=;\n b=O0ANDUeTLIZoeFRH4Y1afjpeRuiwwuwpv+W1xeZOju0/fMK4OM2lQ+HT4i918jp0mx8yO7MRedg5q8QT5YG0i3MuD92nGN8CSO9Xpm9kjTdAbWAX41+alEC6aWIeQqY5nMcnu6sk1ZoCF8aqgy2SPceLB7sxLdjt4Rh+Cwge3VCRYgFm91brzIFASmX5ba4FbuWg6rx6eU2RwSruv0KPhoVmsGVJ6xUClJviqXGFKBvLYx60WN0wWm33ELYRi0IMA/EtB1i/Kk6IthPaZAjQstmOoadbxo9cGtR62EP+nycTfIh1WkRK3HwTKhLokKLZJ32rPuitNW0bSz/a0z+Lcg==",
            "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted",
            "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=CZfVMHXa5c2peKyG+vLZlK7wwXhMuUO9HpKmGpnnyuI=;\n b=oIaTc4aT3bqz/9Yy2nMGVe9/41rb5Y47rkirBVynmxtKCzS85IP2EvuN2IuVYeQOY1vjEBQUlIHQVU8Xx0ggArXlYBi5K27i8XBDgUc88arn5No9cduaJl8OasZBWQUOzjamdibKPYAXtk5F/FZd7iH1prpSwOYVVcnagL2vP2Q=",
            "Message-ID": "\n <AM0PR05MB6707B2B0382A66ACB4145293C2790@AM0PR05MB6707.eurprd05.prod.outlook.com>",
            "X-MS-Exchange-CrossTenant-userprincipalname": "\n 4NU865F0SPmGVI9L6SUMz+Wm0KjNI3U4QwxMiuvukqq5O5DLVPihJvoaMHiSxeq2v66xeHvzpAhu6Rkaum6Thw==",
            "To": "Suanming Mou <suanmingm@mellanox.com>, Slava Ovsiienko\n <viacheslavo@mellanox.com>, Matan Azrad <matan@mellanox.com>",
            "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
            "From": "Raslan Darawsheh <rasland@mellanox.com>",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "x-ms-publictraffictype": "Email",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com;\n dkim=pass header.d=mellanox.com; arc=none",
            "X-MS-TNEF-Correlator": "",
            "Thread-Index": "AQHWX/3y/RC/cZDw/kacfvJKqnlAYKkTd9fA",
            "CC": "\"dev@dpdk.org\" <dev@dpdk.org>",
            "X-OriginatorOrg": "Mellanox.com",
            "Thread-Topic": "[PATCH v2 1/3] net/mlx5: separate aging counter pool range",
            "X-Original-To": "patchwork@inbox.dpdk.org",
            "x-microsoft-antispam-message-info": "\n J6kpNVpCO3iKuXPZKDCVXRjIRGf7aFCHaMTaiW3q5EgdJWtt55gx/GyZSSbrfaejyM5E3G4dbI7Ztc0bm+vKtlR2rg+088AhmwsdqAmSefad+fgFO98DlXLUXWmzJzKqOZVW5hYNebA06yw1w5z+O3srsMHt4RKM95+TAVh/oG2Q6uqudiafzwvpQdk7LGoFeXx30lC8VCQYILdS87Zg0pw7gyS5TTczPhKoInKhgD+gO+HBcWS8bCLCv8vajqCEnaC9V0qpgNLdXj7wtXRPt6pdVpCjKHGDE8tm/6ILdGCzmMZhkTXcAZEJYjjnGXm0jeClyiQ9yXXZJVzfi6xbiw==",
            "x-ms-office365-filtering-ht": "Tenant",
            "MIME-Version": "1.0",
            "In-Reply-To": "<1595404727-164521-1-git-send-email-suanmingm@mellanox.com>",
            "X-BeenThere": "dev@dpdk.org",
            "References": "<1594903224-20442-1-git-send-email-suanmingm@mellanox.com>\n <1595404727-164521-1-git-send-email-suanmingm@mellanox.com>",
            "Content-Type": "text/plain; charset=\"us-ascii\"",
            "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
            "X-MS-Exchange-CrossTenant-id": "a652971c-7d2e-4d9b-a6a4-d149256f461b",
            "x-ms-office365-filtering-correlation-id": "3d6d2cee-5fef-4f95-41b6-08d82e335b4f",
            "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 3d6d2cee-5fef-4f95-41b6-08d82e335b4f",
            "Date": "Wed, 22 Jul 2020 11:35:38 +0000",
            "Content-Transfer-Encoding": "quoted-printable",
            "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(136003)(366004)(346002)(376002)(396003)(39860400002)(66476007)(66556008)(66946007)(66446008)(64756008)(8936002)(76116006)(7696005)(110136005)(2906002)(71200400001)(8676002)(186003)(86362001)(26005)(316002)(6506007)(53546011)(9686003)(478600001)(5660300002)(55016002)(6636002)(52536014)(4326008)(83380400001)(33656002);\n DIR:OUT; SFP:1101;",
            "X-MS-Has-Attach": "",
            "x-ms-traffictypediagnostic": "AM0PR0502MB3924:",
            "x-ms-exchange-antispam-messagedata": "\n wxKri4TkvuuE1T+YPDk0DjYQzo+vDxhlXr2xWcsAwywkXc6jV8LZvCjw4SRtnfIX8re18KokHCL6Wc/uei7p+bwzVfGlD0jI8vtI/XXpyRrnQ8CKPV7DogyAQZXQg+K4UBI2N3TaMha7N3kWBcJ0P/eIqIrjtcCr3lobdaRlBcvSIvg0gvva0BPqslEV1qdMdcRW/fFhb0/Gl4wuimYHBt+q1DTQkjo/4ZFzecvfCmwU0VgpL1Sn3O5DqrVbyH3nWJVjDRyYE5xSGOjbhbf25rCL5QjryFnhraWCvaXXwNQjZB93o5FJhMafcPYAMA+uLF5ilMw/W2BsYqwYJyeQqVCuUCZdojtCK26SALynIB6SRyuXgTeLuT8UgeT9shCOcmgaLuyTlMJ2SvJ7In+V1l27Z3p0fC6ba5kTeoWUA3HQ4Z3WPglruNlhopgfEYALUqXDJHOn6A12G6L+QbKDmBSqZIG84FoOmiQ/o76ixvE3ImcWXbcRnv9Ghif5OtDQ",
            "X-MS-Exchange-CrossTenant-originalarrivaltime": "22 Jul 2020 11:35:38.0447 (UTC)",
            "Content-Language": "en-US",
            "Errors-To": "dev-bounces@dpdk.org",
            "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=idn1WSt0HxeA9wdlsJhbNcNAzNqUfYZtjcYRpi6SXt9rLx4XxeEp7pNb01uthvw8f7Kgz2V3ChTG3O1sw+BVOXdSSmBnmy+Nqb+y5ejreznKe6t9/MVEAnsBGv3drn4e22q3pO8JPt+NmSzK3D0h2OBVwZK1MlCWRXR4fPiIzgRbulL06nPia8a15d3EfdI0hrrIZhIT73OD0TlA/I3qzhL1kBUmHkw0wSlKXQYorEpGYB6Y1As3n6NgQk0QAIwv4yd6UYhdyu+I4jme7riZukAzxvZ7TqnhjQym0JnPNx6o5tfeXI5Bh27f4ZYJ32bfZScBkEqoQ9wzKOdYioA0Xw==",
            "x-microsoft-antispam-prvs": "\n <AM0PR0502MB3924451B8FE2EF0741F03A92C2790@AM0PR0502MB3924.eurprd05.prod.outlook.com>"
        }
    }
]