get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 104656,
    "url": "http://patchwork.dpdk.org/api/patches/104656/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20211124093556.3358394-3-dkozlyuk@nvidia.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": "<20211124093556.3358394-3-dkozlyuk@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211124093556.3358394-3-dkozlyuk@nvidia.com",
    "date": "2021-11-24T09:35:53",
    "name": "[2/2] net/mlx5: fix RxQ reference counting for indirect RSS",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2e58f1d61b7abc6d38f2970ad2632ef48363802a",
    "submitter": {
        "id": 2248,
        "url": "http://patchwork.dpdk.org/api/people/2248/?format=api",
        "name": "Dmitry Kozlyuk",
        "email": "dkozlyuk@nvidia.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20211124093556.3358394-3-dkozlyuk@nvidia.com/mbox/",
    "series": [
        {
            "id": 20738,
            "url": "http://patchwork.dpdk.org/api/series/20738/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=20738",
            "date": "2021-11-24T09:35:52",
            "name": "[1/2] net/mlx5: fix indirect RSS creation when port is stopped",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/20738/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/104656/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/104656/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 9A42DA0C52;\n\tWed, 24 Nov 2021 10:36:36 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6B8394115E;\n\tWed, 24 Nov 2021 10:36:23 +0100 (CET)",
            "from NAM10-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam10on2080.outbound.protection.outlook.com [40.107.93.80])\n by mails.dpdk.org (Postfix) with ESMTP id 10F0C41143\n for <dev@dpdk.org>; Wed, 24 Nov 2021 10:36:20 +0100 (CET)",
            "from DM6PR03CA0057.namprd03.prod.outlook.com (2603:10b6:5:100::34)\n by MWHPR12MB1423.namprd12.prod.outlook.com (2603:10b6:300:14::21) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22; Wed, 24 Nov\n 2021 09:36:17 +0000",
            "from DM6NAM11FT026.eop-nam11.prod.protection.outlook.com\n (2603:10b6:5:100:cafe::a6) by DM6PR03CA0057.outlook.office365.com\n (2603:10b6:5:100::34) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.21 via Frontend\n Transport; Wed, 24 Nov 2021 09:36:17 +0000",
            "from mail.nvidia.com (216.228.112.34) by\n DM6NAM11FT026.mail.protection.outlook.com (10.13.172.161) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4713.20 via Frontend Transport; Wed, 24 Nov 2021 09:36:16 +0000",
            "from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 24 Nov\n 2021 09:36:13 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=JxZMbpOCxAYCNqHEgag8wfkayupaxIwSNpY1mBRIs9Y0WOezYERMKB8sTP6KEKV1Lkjt08wE0mkgyqSWdglg3T+uUIymQ78QQdYBsgbgoosBtTI/zhUilBg8X5iw/YwlgzERGFoO+E1c7RUHYnMX6T6ji/Q70T/ddq3qOEU+AdIF8ez7ji0sfWhIfku5P9Vvxna6aR6mT3j7zV7THX2zgb8KpT1bTR3Q+Ukr/ixATCZRFMmrnMRUjyT4qg6lb79Ofd49Yt2WM7uqaczCAD2U5EOP3Zqz6MS24Lvoi1XK4ocU1vL2T6Ci9l2++gMEw7PTYluoWIq6r0skX58XDJrIfg==",
        "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=CTczPIoVs4abf3QLjpIRuTKmOCtz3QQD5CTYIZDk6+s=;\n b=Nk7TTaoSqsxiBtAzsRTJJQ8SAix/PD0gJMTeaa4O9O+/szs1iA0OPJdQ1VVbZhNFQJMD/30boKjsNOuqhHcZ8XUf5a3u2gxUkjL0uPJJAz//guNjDFj3/1y2+fbx2xXl1sJ0LyY9NJ1bafLrJ6KiNtS4GeBGySvFTiy3k0hoVq1LoEydxdrX74VunG81n0xPQWyCAEYxs8w3VnvHZPMTOGwlM80xNXxzW1f2H5pOdDHSO/ePpZqr0NHUizz7ICdZvQaAP3ipMfs8zEN4lmkYZ4JKaQEq66fFyNdMj5p3VSl8fFg56ebjSc7+xWBRW743TtIheGGrvrH9U3lQsPZa3g==",
        "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=quarantine sp=quarantine pct=100) action=none\n header.from=nvidia.com; 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=CTczPIoVs4abf3QLjpIRuTKmOCtz3QQD5CTYIZDk6+s=;\n b=CwQ+Y/bdI5+NOp4/H+vsJCJYjZAvhEqLo49ozZyaCHWZKnxlrHRSRcdY7cwbyCJshZg4qfdyA977MZrlwpOzs1V2/s4lIOuBJmrdxUC1VDC2LFjMwnZV7yYfkkDmA1nzQ9NzHJnJ2GcJY1V8kAN4+eFVRmLVXBVxUh/Nj6lx7IUlhRly2+P7jhv3Mi2ks5PXMPDk7rwlyIDY52rmB9uwdG5MVsKNDIYIF+rcglN6XST1OgydFWubqr8TzihhPPCgiq0MhpWVBCuu8aFDRoLYVjg5570Zl0MUvkYHtqWT5rI1xuQNRdDv+hc3MjjN7bW4qi1M1fNZ0l7k6OWGbEjONQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.112.34)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;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": "Dmitry Kozlyuk <dkozlyuk@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Raslan Darawsheh <rasland@nvidia.com>, Matan Azrad <matan@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>",
        "Subject": "[PATCH 2/2] net/mlx5: fix RxQ reference counting for indirect RSS",
        "Date": "Wed, 24 Nov 2021 11:35:53 +0200",
        "Message-ID": "<20211124093556.3358394-3-dkozlyuk@nvidia.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20211124093556.3358394-1-dkozlyuk@nvidia.com>",
        "References": "<20211123223159.3324247-1-dkozlyuk@nvidia.com>\n <20211124093556.3358394-1-dkozlyuk@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[172.20.187.5]",
        "X-ClientProxiedBy": "HQMAIL105.nvidia.com (172.20.187.12) To\n HQMAIL107.nvidia.com (172.20.187.13)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "37bd8218-67ac-48de-75a7-08d9af2ddd36",
        "X-MS-TrafficTypeDiagnostic": "MWHPR12MB1423:",
        "X-Microsoft-Antispam-PRVS": "\n <MWHPR12MB142310C7C1DEA2C9493C421CB9619@MWHPR12MB1423.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:2089;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n /NNq9pml0ElbhM16xd8KZGmhlUW9w7tFj8DxQMWk1DWClKoUkOVptvkRzcXIUcYnli0sxXjM+3DiM3DBxpBybManFU8gwiTDDcTPKMAtsWIMhmhvgm+4PZcOHOgB4JFhUZSaIAxgLJx5k9zhfo14vY/cvl2lAXgiBflEf5yDNyZ9bNCbVg2D624JBtcWS6GW2NSsfcTlFGhxm+FruvZqS79DKG9I413dm7cq8wFiYiILKI5rx6g0Df60qGM8E4oFUJg3j45BLc8pIJrtrTqerVXiBqZl4o5KvqsxWkbmciImLfzWvpYa3n4I1GDtvN4wlHKmBmfcVi5qfE+DqehT/6zulUhbQPHiqAqolniKTDknpg+nIhP8NMQ9Hk9R7ZoNtOLf4b5URXPpCukW5m5q//yroLqbeNsug7If3TUA+VMt0zpys5BDomy/C1oV6dUcvpIj9oHAnYH19wgzbnElzYqiE8pj1fKoQOHsxZhBH6Oi+tzh5TAD3nniFFhMKkMLFADoSMHSzC2vInaNuY89c3uf7bU+0HeqT/ltChfFVTCapxf0agbMrdxGTwdSbONNhl1ENZKDtCaMzh+0vG3a7Zpkyb9GFxDXfzA35oa3RU8Z5/KdGEwK9jkwDwHe2tM8ntzv7umDFKvxEO6WfGMHVn0ZzkAxcus4tEcYNXsDdxefIygf4ycpI4XKqpmYXoBPMJHkUMcKLRXygUXJPUt7iQ==",
        "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)(46966006)(36840700001)(107886003)(356005)(7636003)(70206006)(2906002)(16526019)(6286002)(70586007)(83380400001)(6916009)(8936002)(4326008)(36860700001)(2616005)(508600001)(336012)(186003)(8676002)(47076005)(36756003)(86362001)(7696005)(426003)(26005)(54906003)(5660300002)(55016003)(82310400004)(316002)(6666004)(1076003);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "24 Nov 2021 09:36:16.8079 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 37bd8218-67ac-48de-75a7-08d9af2ddd36",
        "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 DM6NAM11FT026.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MWHPR12MB1423",
        "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": "mlx5_ind_table_obj_modify() was not changing the reference counters\nof neither the new set of RxQs, nor the old set of RxQs.\nOn the other hand, creation of the RSS incremented the RxQ refcnt.\nIf an RxQ was present in both the initial and the modified set,\nits reference counter was incremented one extra time\ncompared to the queues that were only present in the new set.\nThis prevented releasing said RxQ resources on port stop:\n\n    flow indirect_action 0 create action_id 1 \\\n        action rss queues 0 1 end / end\n    flow indirect_action 0 update 1 \\\n        action rss queues 2 3 end / end\n    quit\n    ...\n    mlx5_net: mlx5.c:1622: mlx5_dev_close():\n        port 0 some Rx queue objects still remain\n    mlx5_net: mlx5.c:1626: mlx5_dev_close():\n        port 0 some Rx queues still remain\n\nIncrement reference counters for the new set of RxQs\nand decrement them for the old set of RxQs.\nOnly do this when the port is started when the port is started.\nRemove explicit referencing of RxQ from mlx5_ind_table_obj_attach()\nbecause it reuses mlx5_ind_table_obj_modify() code doing this.\n\nFixes: ec4e11d41d12 (\"net/mlx5: preserve indirect actions on restart\")\n\nSigned-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>\n---\n drivers/net/mlx5/mlx5_rxq.c | 34 +++++++++++++++++++---------------\n 1 file changed, 19 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c\nindex 8f9a94572f..46d6536be5 100644\n--- a/drivers/net/mlx5/mlx5_rxq.c\n+++ b/drivers/net/mlx5/mlx5_rxq.c\n@@ -2392,7 +2392,8 @@ mlx5_ind_table_obj_modify(struct rte_eth_dev *dev,\n \t\t\t  bool standalone)\n {\n \tstruct mlx5_priv *priv = dev->data->dev_private;\n-\tunsigned int i;\n+\tbool dev_started = priv->dev_data->dev_started;\n+\tunsigned int i, j;\n \tint ret = 0, err;\n \tconst unsigned int n = rte_is_power_of_2(queues_n) ?\n \t\t\t       log2above(queues_n) :\n@@ -2402,22 +2403,30 @@ mlx5_ind_table_obj_modify(struct rte_eth_dev *dev,\n \tRTE_SET_USED(standalone);\n \tif (mlx5_ind_table_obj_check_standalone(dev, ind_tbl) < 0)\n \t\treturn -rte_errno;\n-\tfor (i = 0; i != queues_n; ++i) {\n-\t\tif (!mlx5_rxq_get(dev, queues[i])) {\n-\t\t\tret = -rte_errno;\n-\t\t\tgoto error;\n+\tif (dev_started)\n+\t\tfor (i = 0; i != queues_n; ++i) {\n+\t\t\tif (!mlx5_rxq_ref(dev, queues[i])) {\n+\t\t\t\tret = -rte_errno;\n+\t\t\t\tgoto error;\n+\t\t\t}\n \t\t}\n-\t}\n \tMLX5_ASSERT(priv->obj_ops.ind_table_modify);\n \tret = priv->obj_ops.ind_table_modify(dev, n, queues, queues_n, ind_tbl);\n \tif (ret)\n \t\tgoto error;\n+\tif (dev_started)\n+\t\tfor (i = 0; i < ind_tbl->queues_n; i++)\n+\t\t\tclaim_nonzero(mlx5_rxq_deref(dev, ind_tbl->queues[i]));\n \tind_tbl->queues_n = queues_n;\n \tind_tbl->queues = queues;\n \treturn 0;\n error:\n-\terr = rte_errno;\n-\trte_errno = err;\n+\tif (dev_started) {\n+\t\terr = rte_errno;\n+\t\tfor (j = 0; j < i; j++)\n+\t\t\tmlx5_rxq_deref(dev, queues[j]);\n+\t\trte_errno = err;\n+\t}\n \tDRV_LOG(DEBUG, \"Port %u cannot setup indirection table.\",\n \t\tdev->data->port_id);\n \treturn ret;\n@@ -2438,19 +2447,14 @@ int\n mlx5_ind_table_obj_attach(struct rte_eth_dev *dev,\n \t\t\t  struct mlx5_ind_table_obj *ind_tbl)\n {\n-\tunsigned int i;\n \tint ret;\n \n \tret = mlx5_ind_table_obj_modify(dev, ind_tbl, ind_tbl->queues,\n \t\t\t\t\tind_tbl->queues_n, true);\n-\tif (ret != 0) {\n+\tif (ret != 0)\n \t\tDRV_LOG(ERR, \"Port %u could not modify indirect table obj %p\",\n \t\t\tdev->data->port_id, (void *)ind_tbl);\n-\t\treturn ret;\n-\t}\n-\tfor (i = 0; i < ind_tbl->queues_n; i++)\n-\t\tmlx5_rxq_ref(dev, ind_tbl->queues[i]);\n-\treturn 0;\n+\treturn ret;\n }\n \n /**\n",
    "prefixes": [
        "2/2"
    ]
}