Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196013/?format=api
{ "id": 2196013, "url": "http://patchwork.ozlabs.org/api/patches/2196013/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20260212170538.415843-2-john.cabaj@canonical.com/", "project": { "id": 15, "url": "http://patchwork.ozlabs.org/api/projects/15/?format=api", "name": "Ubuntu Kernel", "link_name": "ubuntu-kernel", "list_id": "kernel-team.lists.ubuntu.com", "list_email": "kernel-team@lists.ubuntu.com", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260212170538.415843-2-john.cabaj@canonical.com>", "list_archive_url": null, "date": "2026-02-12T17:05:38", "name": "[SRU,Q:linux-azure,1/1] net: mana: Implement ndo_tx_timeout and serialize queue resets per port.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c49e9a0d93691b3b08faa34bf8345b5e2ec47e68", "submitter": { "id": 85032, "url": "http://patchwork.ozlabs.org/api/people/85032/?format=api", "name": "John Cabaj", "email": "john.cabaj@canonical.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20260212170538.415843-2-john.cabaj@canonical.com/mbox/", "series": [ { "id": 491998, "url": "http://patchwork.ozlabs.org/api/series/491998/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=491998", "date": "2026-02-12T17:05:37", "name": "net: mana: Implement ndo_tx_timeout and serialize queue resets per port", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491998/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196013/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196013/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<kernel-team-bounces@lists.ubuntu.com>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (4096-bit key;\n unprotected) header.d=canonical.com header.i=@canonical.com\n header.a=rsa-sha256 header.s=20251003 header.b=lM7aSg7c;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com\n (client-ip=185.125.189.65; helo=lists.ubuntu.com;\n envelope-from=kernel-team-bounces@lists.ubuntu.com;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fBhX56WqPz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 04:05:57 +1100 (AEDT)", "from localhost ([127.0.0.1] helo=lists.ubuntu.com)\n\tby lists.ubuntu.com with esmtp (Exim 4.86_2)\n\t(envelope-from <kernel-team-bounces@lists.ubuntu.com>)\n\tid 1vqa8P-0008Ux-64; Thu, 12 Feb 2026 17:05:45 +0000", "from smtp-relay-internal-1.internal ([10.131.114.114]\n helo=smtp-relay-internal-1.canonical.com)\n by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.86_2) (envelope-from <john.cabaj@canonical.com>)\n id 1vqa8O-0008Uj-86\n for kernel-team@lists.ubuntu.com; Thu, 12 Feb 2026 17:05:44 +0000", "from mail-vk1-f200.google.com (mail-vk1-f200.google.com\n [209.85.221.200])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 224093F46B\n for <kernel-team@lists.ubuntu.com>; Thu, 12 Feb 2026 17:05:44 +0000 (UTC)", "by mail-vk1-f200.google.com with SMTP id\n 71dfb90a1353d-5675cb317e3so89247e0c.0\n for <kernel-team@lists.ubuntu.com>; Thu, 12 Feb 2026 09:05:44 -0800 (PST)", "from smtp.gmail.com\n (h208-73-92-250.mdtnwi.broadband.dynamic.tds.net. [208.73.92.250])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8cb2b0e16dfsm389445185a.16.2026.02.12.09.05.41\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 12 Feb 2026 09:05:41 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com;\n s=20251003; t=1770915944;\n bh=gxy4ZWVVKEYIKsLZbgOKZpNXbsVfkHtLpyYlyAOu3vY=;\n h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n MIME-Version;\n b=lM7aSg7chytPIKGZ5wwyb331rnomC4/r61O2y9cVC/XcX3HVf17q1Yz4e6ShXa6ey\n foOyZWw6pKYz/3c/iDAk5T8v7DG5BAe+S9KmLRH3M10GRWcnkxXfcWvxRokCGZj1mB\n uxCqJ2L9Lipm3MkNJrafEkr6HubEuw2921PFukZbOdX6HLo4eyxHXgFFD5V9xkbxhc\n XjicRU9cwQAu36f/mbtZKExsTsbqbTbAG53oZcLklvkjqbLutVoyM1/Tlj4molTYBb\n 2qmMS5D0uqL6ccQe9wFgy4D+Z02toFRqcTrRm2CYUXubMdZNS8FNYslddgeRo4KQqh\n bzJU4YVkTCdBV8LbbO6J1j3zsxyUqCipwdmRoj+LWdyqXBM/bb+TO3X4MINZuo9jZ/\n o2Vg58CQDM+04B3rS6fX4Xe/ThWjCrq9Bw1gWlLyN3h451P7tr3BZ6HmD4LRHaGl8L\n M/V7kkjqnPlYTq2HyfzKhSHjnt2kZWml5pPwd2oGcraoTNSiJ9bn2Qvf4aAh5AX0pn\n 7KfMy+ssfWg3eg33/aMPY5+i1YnvSN8hmMy9edeGAPufWu2FgxJF0W12kr4gbHaaki\n N3233/rgGVJwNRq+3K4jY82VXQzpuK8CIlnmWTJezIXgbObMrfA14T8DIHtnbZHCJi\n 2lKUeUh2l1hTZ9IL+Y80ryvI=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770915943; x=1771520743;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=gxy4ZWVVKEYIKsLZbgOKZpNXbsVfkHtLpyYlyAOu3vY=;\n b=R9iXouZ8Sbe2As0KwJgsvMWFYMBo1e8FiBJLlu8xm2HAJTuFlWBEbDEuSjPHPUHJ/g\n QparBH5KW25d4BxulgW7RgprT+9FLDevTdksVjr8fKAniPhKCtjAyY8VLTG3xSb3yYeu\n D6WrhSWcUGM3UqEmkENfNDAhbepdNJfj8r0Lbc433TEb1ErRgSNgnodSbvhkZSMR/MBs\n SqQMCaOI+C9dp6TMRO5jikkeLOD3htjtY/7AyLhazISEs9p9PKL3KkyMT7CpdJWRPeou\n ea5k+7UK05PQn0cV3zF4NPlpQ+1hJonx+W4gusDrD3YrdnBMHzaDw7nmHA8Ugwb5HEny\n YfYA==", "X-Gm-Message-State": "AOJu0YwkeL4IVZaAWIzwQ8GwZ2tMPmIsqKXOW0BfMH7tYU80fdIpdpZ4\n vIIOQq4Fb+FOk8Wuhf5+Uwuwkx78Z46sT/uiICuAcVO5W7g9f7kcqf4HemPa/9UCMDOx0XCFdJ6\n 12+zY9R7vHCCco6Raal0TPIX60lCHmNqWRJ42eJsVawut7RqUyaD0iWzlbq26Lrg4uLcr+VwW/1\n 5szWhboVbz6+ESuw==", "X-Gm-Gg": "AZuq6aJkKRQftBTvw9g5yDinL82HLUwKPEzSj5tWlPiyb+J83Lu1ELKdOxZrz4pgba+\n CO0ulck3Japz3V9tav529GivU58A49RrdO5aeYIsAPXakzql9w5OiQz07ds/m+XCNqIYk68U1Dq\n nmqTW6YhaWcjlWnDJbdj6peZtnD/LIOckvsazrBtMMiI5592M1aq9jwg1kBODHzLX+dVo3o2AOW\n 1KUqk+tU5yK1cYh5ATUEoWwau3LADlCZUX1uvt/9n9U/Lix0+r+bC9W4nPJC1S7ixkahsocag3u\n J+VHcf3mX0pQHyBJlA1xrGLnzj61D+z9SNss+Hwk93/sHzWX0skfld9l8eHfmW+JX5G405cFube\n Pu2GSLfZDykWxz8wjo74t0H8RgpK9tIf7UGnq73rP6/aZXUlP6u3DRd/X6QkHc6Zpy6KFXaZPQx\n QTBfvFg6T0Tw==", "X-Received": [ "by 2002:a05:6102:508c:b0:5db:e909:aa0d with SMTP id\n ada2fe7eead31-5fdfbcec0b3mr1091929137.37.1770915943064;\n Thu, 12 Feb 2026 09:05:43 -0800 (PST)", "by 2002:a05:6102:508c:b0:5db:e909:aa0d with SMTP id\n ada2fe7eead31-5fdfbcec0b3mr1091897137.37.1770915942549;\n Thu, 12 Feb 2026 09:05:42 -0800 (PST)" ], "From": "John Cabaj <john.cabaj@canonical.com>", "To": "kernel-team@lists.ubuntu.com", "Subject": "[SRU][Q:linux-azure][PATCH 1/1] net: mana: Implement ndo_tx_timeout\n and serialize queue resets per port.", "Date": "Thu, 12 Feb 2026 11:05:38 -0600", "Message-ID": "<20260212170538.415843-2-john.cabaj@canonical.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260212170538.415843-1-john.cabaj@canonical.com>", "References": "<20260212170538.415843-1-john.cabaj@canonical.com>", "MIME-Version": "1.0", "X-BeenThere": "kernel-team@lists.ubuntu.com", "X-Mailman-Version": "2.1.20", "Precedence": "list", "List-Id": "Kernel team discussions <kernel-team.lists.ubuntu.com>", "List-Unsubscribe": "<https://lists.ubuntu.com/mailman/options/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe>", "List-Archive": "<https://lists.ubuntu.com/archives/kernel-team>", "List-Post": "<mailto:kernel-team@lists.ubuntu.com>", "List-Help": "<mailto:kernel-team-request@lists.ubuntu.com?subject=help>", "List-Subscribe": "<https://lists.ubuntu.com/mailman/listinfo/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "kernel-team-bounces@lists.ubuntu.com", "Sender": "\"kernel-team\" <kernel-team-bounces@lists.ubuntu.com>" }, "content": "From: Dipayaan Roy <dipayanroy@linux.microsoft.com>\n\nBugLink: https://bugs.launchpad.net/bugs/2141683\n\nImplement .ndo_tx_timeout for MANA so any stalled TX queue can be detected\nand a device-controlled port reset for all queues can be scheduled to a\nordered workqueue. The reset for all queues on stall detection is\nrecomended by hardware team.\n\nReviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>\nReviewed-by: Haiyang Zhang <haiyangz@microsoft.com>\nSigned-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>\nLink: https://patch.msgid.link/20260112130552.GA11785@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net\nSigned-off-by: Jakub Kicinski <kuba@kernel.org>\n(backported from commit 3b194343c25084a8d2fa0c0f2c9e80f3080fd732 linux-next)\n[john-cabaj: simple context changes]\nSigned-off-by: John Cabaj <john.cabaj@canonical.com>\n---\n drivers/net/ethernet/microsoft/mana/mana_en.c | 77 ++++++++++++++++++-\n include/net/mana/gdma.h | 7 +-\n include/net/mana/mana.h | 3 +\n 3 files changed, 85 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c\nindex 48665e8ac1df..69547d65386e 100644\n--- a/drivers/net/ethernet/microsoft/mana/mana_en.c\n+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c\n@@ -298,6 +298,39 @@ static int mana_get_gso_hs(struct sk_buff *skb)\n \treturn gso_hs;\n }\n \n+static void mana_per_port_queue_reset_work_handler(struct work_struct *work)\n+{\n+\tstruct mana_port_context *apc = container_of(work,\n+\t\t\t\t\t\t struct mana_port_context,\n+\t\t\t\t\t\t queue_reset_work);\n+\tstruct net_device *ndev = apc->ndev;\n+\tint err;\n+\n+\trtnl_lock();\n+\n+\t/* Pre-allocate buffers to prevent failure in mana_attach later */\n+\terr = mana_pre_alloc_rxbufs(apc, ndev->mtu, apc->num_queues);\n+\tif (err) {\n+\t\tnetdev_err(ndev, \"Insufficient memory for reset post tx stall detection\\n\");\n+\t\tgoto out;\n+\t}\n+\n+\terr = mana_detach(ndev, false);\n+\tif (err) {\n+\t\tnetdev_err(ndev, \"mana_detach failed: %d\\n\", err);\n+\t\tgoto dealloc_pre_rxbufs;\n+\t}\n+\n+\terr = mana_attach(ndev);\n+\tif (err)\n+\t\tnetdev_err(ndev, \"mana_attach failed: %d\\n\", err);\n+\n+dealloc_pre_rxbufs:\n+\tmana_pre_dealloc_rxbufs(apc);\n+out:\n+\trtnl_unlock();\n+}\n+\n netdev_tx_t mana_start_xmit(struct sk_buff *skb, struct net_device *ndev)\n {\n \tenum mana_tx_pkt_format pkt_fmt = MANA_SHORT_PKT_FMT;\n@@ -802,6 +835,23 @@ static int mana_change_mtu(struct net_device *ndev, int new_mtu)\n \treturn err;\n }\n \n+static void mana_tx_timeout(struct net_device *netdev, unsigned int txqueue)\n+{\n+\tstruct mana_port_context *apc = netdev_priv(netdev);\n+\tstruct mana_context *ac = apc->ac;\n+\tstruct gdma_context *gc = ac->gdma_dev->gdma_context;\n+\n+\t/* Already in service, hence tx queue reset is not required.*/\n+\tif (gc->in_service)\n+\t\treturn;\n+\n+\t/* Note: If there are pending queue reset work for this port(apc),\n+\t * subsequent request queued up from here are ignored. This is because\n+\t * we are using the same work instance per port(apc).\n+\t */\n+\tqueue_work(ac->per_port_queue_reset_wq, &apc->queue_reset_work);\n+}\n+\n static int mana_shaper_set(struct net_shaper_binding *binding,\n \t\t\t const struct net_shaper *shaper,\n \t\t\t struct netlink_ext_ack *extack)\n@@ -884,6 +934,7 @@ static const struct net_device_ops mana_devops = {\n \t.ndo_bpf\t\t= mana_bpf,\n \t.ndo_xdp_xmit\t\t= mana_xdp_xmit,\n \t.ndo_change_mtu\t\t= mana_change_mtu,\n+\t.ndo_tx_timeout\t\t= mana_tx_timeout,\n \t.net_shaper_ops = &mana_shaper_ops,\n };\n \n@@ -3254,6 +3305,8 @@ static int mana_probe_port(struct mana_context *ac, int port_idx,\n \tndev->min_mtu = ETH_MIN_MTU;\n \tndev->needed_headroom = MANA_HEADROOM;\n \tndev->dev_port = port_idx;\n+\t/* Recommended timeout based on HW FPGA re-config scenario. */\n+\tndev->watchdog_timeo = 15 * HZ;\n \tSET_NETDEV_DEV(ndev, gc->dev);\n \n \tnetif_set_tso_max_size(ndev, GSO_MAX_SIZE);\n@@ -3270,6 +3323,10 @@ static int mana_probe_port(struct mana_context *ac, int port_idx,\n \tif (err)\n \t\tgoto reset_apc;\n \n+\t/* Initialize the per port queue reset work.*/\n+\tINIT_WORK(&apc->queue_reset_work,\n+\t\t mana_per_port_queue_reset_work_handler);\n+\n \tnetdev_lockdep_set_classes(ndev);\n \n \tndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;\n@@ -3441,6 +3498,7 @@ int mana_probe(struct gdma_dev *gd, bool resuming)\n {\n \tstruct gdma_context *gc = gd->gdma_context;\n \tstruct mana_context *ac = gd->driver_data;\n+\tstruct mana_port_context *apc = NULL;\n \tstruct device *dev = gc->dev;\n \tu8 bm_hostmode = 0;\n \tu16 num_ports = 0;\n@@ -3498,6 +3556,14 @@ int mana_probe(struct gdma_dev *gd, bool resuming)\n \tif (ac->num_ports > MAX_PORTS_IN_MANA_DEV)\n \t\tac->num_ports = MAX_PORTS_IN_MANA_DEV;\n \n+\tac->per_port_queue_reset_wq =\n+\t\tcreate_singlethread_workqueue(\"mana_per_port_queue_reset_wq\");\n+\tif (!ac->per_port_queue_reset_wq) {\n+\t\tdev_err(dev, \"Failed to allocate per port queue reset workqueue\\n\");\n+\t\terr = -ENOMEM;\n+\t\tgoto out;\n+\t}\n+\n \tif (!resuming) {\n \t\tfor (i = 0; i < ac->num_ports; i++) {\n \t\t\terr = mana_probe_port(ac, i, &ac->ports[i]);\n@@ -3514,6 +3580,8 @@ int mana_probe(struct gdma_dev *gd, bool resuming)\n \t} else {\n \t\tfor (i = 0; i < ac->num_ports; i++) {\n \t\t\trtnl_lock();\n+\t\t\tapc = netdev_priv(ac->ports[i]);\n+\t\t\tenable_work(&apc->queue_reset_work);\n \t\t\terr = mana_attach(ac->ports[i]);\n \t\t\trtnl_unlock();\n \t\t\t/* we log the port for which the attach failed and stop\n@@ -3560,13 +3628,15 @@ void mana_remove(struct gdma_dev *gd, bool suspending)\n \n \tfor (i = 0; i < ac->num_ports; i++) {\n \t\tndev = ac->ports[i];\n-\t\tapc = netdev_priv(ndev);\n \t\tif (!ndev) {\n \t\t\tif (i == 0)\n \t\t\t\tdev_err(dev, \"No net device to remove\\n\");\n \t\t\tgoto out;\n \t\t}\n \n+\t\tapc = netdev_priv(ndev);\n+\t\tdisable_work_sync(&apc->queue_reset_work);\n+\n \t\t/* All cleanup actions should stay after rtnl_lock(), otherwise\n \t\t * other functions may access partially cleaned up data.\n \t\t */\n@@ -3593,6 +3663,11 @@ void mana_remove(struct gdma_dev *gd, bool suspending)\n \n \tmana_destroy_eq(ac);\n out:\n+\tif (ac->per_port_queue_reset_wq) {\n+\t\tdestroy_workqueue(ac->per_port_queue_reset_wq);\n+\t\tac->per_port_queue_reset_wq = NULL;\n+\t}\n+\n \tmana_gd_deregister_device(gd);\n \n \tif (suspending)\ndiff --git a/include/net/mana/gdma.h b/include/net/mana/gdma.h\nindex bf3b32540786..b61c5aae5ec7 100644\n--- a/include/net/mana/gdma.h\n+++ b/include/net/mana/gdma.h\n@@ -596,6 +596,10 @@ enum {\n \n /* Driver can self reset on FPGA Reconfig EQE notification */\n #define GDMA_DRV_CAP_FLAG_1_HANDLE_RECONFIG_EQE BIT(17)\n+\n+/* Driver detects stalled send queues and recovers them */\n+#define GDMA_DRV_CAP_FLAG_1_HANDLE_STALL_SQ_RECOVERY BIT(18)\n+\n #define GDMA_DRV_CAP_FLAG_1_HW_VPORT_LINK_AWARE BIT(6)\n \n /* Driver can handle hardware recovery events during probe */\n@@ -611,7 +615,8 @@ enum {\n \t GDMA_DRV_CAP_FLAG_1_SELF_RESET_ON_EQE | \\\n \t GDMA_DRV_CAP_FLAG_1_HANDLE_RECONFIG_EQE | \\\n \t GDMA_DRV_CAP_FLAG_1_HW_VPORT_LINK_AWARE | \\\n-\t GDMA_DRV_CAP_FLAG_1_PROBE_RECOVERY)\n+\t GDMA_DRV_CAP_FLAG_1_PROBE_RECOVERY | \\\n+\t GDMA_DRV_CAP_FLAG_1_HANDLE_STALL_SQ_RECOVERY)\n \n #define GDMA_DRV_CAP_FLAGS2 0\n \ndiff --git a/include/net/mana/mana.h b/include/net/mana/mana.h\nindex 8906901535f5..729dda01680c 100644\n--- a/include/net/mana/mana.h\n+++ b/include/net/mana/mana.h\n@@ -476,6 +476,8 @@ struct mana_context {\n \tstruct mana_eq *eqs;\n \tstruct dentry *mana_eqs_debugfs;\n \n+\tstruct workqueue_struct *per_port_queue_reset_wq;\n+\n \tstruct net_device *ports[MAX_PORTS_IN_MANA_DEV];\n \n \t/* Link state change work */\n@@ -486,6 +488,7 @@ struct mana_context {\n struct mana_port_context {\n \tstruct mana_context *ac;\n \tstruct net_device *ndev;\n+\tstruct work_struct queue_reset_work;\n \n \tu8 mac_addr[ETH_ALEN];\n \n", "prefixes": [ "SRU", "Q:linux-azure", "1/1" ] }