Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/139221/?format=api
http://patches.dpdk.org/api/patches/139221/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240411061740.16495-1-hepeng.0320@bytedance.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": "<20240411061740.16495-1-hepeng.0320@bytedance.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240411061740.16495-1-hepeng.0320@bytedance.com", "date": "2024-04-11T06:17:40", "name": "mlx5: fix race at mlx5_dev_close", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ae51bb16f1e3095e68b5eea60633845363730e33", "submitter": { "id": 3312, "url": "http://patches.dpdk.org/api/people/3312/?format=api", "name": "hepeng", "email": "hepeng.0320@bytedance.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/20240411061740.16495-1-hepeng.0320@bytedance.com/mbox/", "series": [ { "id": 31717, "url": "http://patches.dpdk.org/api/series/31717/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31717", "date": "2024-04-11T06:17:40", "name": "mlx5: fix race at mlx5_dev_close", "version": 1, "mbox": "http://patches.dpdk.org/series/31717/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/139221/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/139221/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 E7B9543E3E;\n\tThu, 11 Apr 2024 08:18:00 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AE3AB402A7;\n\tThu, 11 Apr 2024 08:18:00 +0200 (CEST)", "from mail-pg1-f170.google.com (mail-pg1-f170.google.com\n [209.85.215.170])\n by mails.dpdk.org (Postfix) with ESMTP id 5BCEF40262\n for <dev@dpdk.org>; Thu, 11 Apr 2024 08:17:59 +0200 (CEST)", "by mail-pg1-f170.google.com with SMTP id\n 41be03b00d2f7-5ce2aada130so5253931a12.1\n for <dev@dpdk.org>; Wed, 10 Apr 2024 23:17:59 -0700 (PDT)", "from localhost.localdomain ([61.213.176.12])\n by smtp.gmail.com with ESMTPSA id\n m17-20020a170902db1100b001ddb4df7f70sm520060plx.304.2024.04.10.23.17.56\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 10 Apr 2024 23:17:57 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=bytedance.com; s=google; t=1712816278; x=1713421078; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=SAgaMYeKIIcJfc8LZ0/tnOURMbNe/+QXgY193kfrEcs=;\n b=GB/ceAzqm8gfmXlKbZG+GEI7odI2wJaFxpAUDeJBvYDXOiQfp9KkNp33zFqIJan+v6\n haY4NP6DeeR4/jAlYJJWev2Li2QTLZ2K/NTlf+Kd1/TuAtg5yPtetxq8KXId6+8rGZgn\n P/GnNjHqngowNUwVB5QWiTUo90hgE1dmLGmjm9OmDg5bPskcOmIxpaT5UYSmPIkSO17A\n CmC7mZEuC3FdV5GVlUtCDHwi84ojwaijnFIW1S3ZcNJ7akd8GjYIc5eaMxLZ00lQCWaG\n FhC0ILLJYHx/pHuMhYJlYsxterm7oj/ePp8i89UBEOqNONdEM/vXpPXJJ1qqExRFs2Ic\n LfPg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1712816278; x=1713421078;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=SAgaMYeKIIcJfc8LZ0/tnOURMbNe/+QXgY193kfrEcs=;\n b=UOPoA3M1d8P6iXbivMswoppKi2hktYuRlGoN+mUTwa5wr32d6e4gs57luf1/QzlL4W\n Mxkhx2qBKyO4rO4CpauptxxiCrefrfMTUdGatkkGdDKMidWVFDZn/INTeVS8dDQiKXVW\n u4fGKy7Ca3J/9hQ9kWevXsWOFuMjWr0ImShs7O9pRKEl2K7aloy+n4UqRopH6087s6EO\n 9VgCLEFtEe7yzpnKyRhjlAEDbf5/1laAp+X+glcJcrQPClmXbadX7Aj5nLJgUgExsvfP\n 7v5IkaH7PdYwmfLkVPxh17b81M73+DdHFSiOlx+pvX4UQ4boHJ8/bpe7s1kWxk4o2Jv4\n mP0Q==", "X-Gm-Message-State": "AOJu0Yy0iVKWEbil+tyWjEVT0uTHWJlV8pLL/kQjxy7bmog65UTobOUP\n JgdMa6LCg3wzua3VE0QXA4xozn5ieTDT1rpCt2N8XQJcdB6vgQ4K3RRilxyjo6TMSLZ3k3FQ4d0\n qDf8=", "X-Google-Smtp-Source": "\n AGHT+IFhSYk6M/AMzclqLxHoi1XQkifooYplVpLGhr1ziZrY5R+M3sJReSOP64oSfL3UWhKFMRImyw==", "X-Received": "by 2002:a05:6a21:7885:b0:1a7:73ed:7f8d with SMTP id\n bf5-20020a056a21788500b001a773ed7f8dmr5243619pzc.38.1712816278021;\n Wed, 10 Apr 2024 23:17:58 -0700 (PDT)", "From": "hepeng <hepeng.0320@bytedance.com>", "To": "dev@dpdk.org", "Cc": "\"hepeng.0320\" <hepeng.0320@bytedance.com>", "Subject": "[PATCH] mlx5: fix race at mlx5_dev_close", "Date": "Thu, 11 Apr 2024 14:17:40 +0800", "Message-Id": "<20240411061740.16495-1-hepeng.0320@bytedance.com>", "X-Mailer": "git-send-email 2.39.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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: \"hepeng.0320\" <hepeng.0320@bytedance.com>\n\nmlx5_dev_close currently will set priv->sh->port[priv->dev_port -\n1].nl_ih_port_id to RTE_MAX_ETHPORTS to avoid mlx5_dev_interrupt_nl_cb\nto use the port's dev_private, because later the rte_eth_dev_close\nwill free the dev_private and set the pointer to NULL.\n\nHowever, since mlx5_dev_interrupt_nl_cb is running in another thread,\nI think the race still exists. So perhaps an easy fix is to wait for\n1ms to avoid this race.\n\nSigned-off-by: hepeng.0320 <hepeng.0320@bytedance.com>\n---\n drivers/net/mlx5/mlx5.c | 4 ++++\n 1 file changed, 4 insertions(+)", "diff": "diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex d1a6382..283162f 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -2457,6 +2457,10 @@ mlx5_dev_close(struct rte_eth_dev *dev)\n \t * mlx5_os_mac_addr_flush() uses ibdev_path for retrieving\n \t * ifindex if Netlink fails.\n \t */\n+\n+\t/* Avoid race condition if mlx5_dev_interrupt_nl_cb is running. */\n+\trte_delay_us_sleep(1000);\n+\n \tmlx5_free_shared_dev_ctx(priv->sh);\n \tif (priv->domain_id != RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID) {\n \t\tunsigned int c = 0;\n", "prefixes": [] }{ "id": 139221, "url": "