get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139974,
    "url": "http://patchwork.dpdk.org/api/patches/139974/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240507124305.2318-12-venkatkumar.ande@amd.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": "<20240507124305.2318-12-venkatkumar.ande@amd.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240507124305.2318-12-venkatkumar.ande@amd.com",
    "date": "2024-05-07T12:42:52",
    "name": "[v2,12/25] net/axgbe: delay AN timeout during KR training",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "e11868c41025acb5edf9ab37a3baab3b00ae4e8a",
    "submitter": {
        "id": 3256,
        "url": "http://patchwork.dpdk.org/api/people/3256/?format=api",
        "name": "Venkat Kumar Ande",
        "email": "venkatkumar.ande@amd.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240507124305.2318-12-venkatkumar.ande@amd.com/mbox/",
    "series": [
        {
            "id": 31890,
            "url": "http://patchwork.dpdk.org/api/series/31890/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31890",
            "date": "2024-05-07T12:42:41",
            "name": "[v2,01/25] net/axgbe: fix mdio access for non-zero ports and CL45 PHYs",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/31890/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/139974/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/139974/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 F17EE43FC9;\n\tTue,  7 May 2024 14:44:59 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0523B433D7;\n\tTue,  7 May 2024 14:44:10 +0200 (CEST)",
            "from NAM10-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam10on2045.outbound.protection.outlook.com [40.107.93.45])\n by mails.dpdk.org (Postfix) with ESMTP id B7EFF433C7;\n Tue,  7 May 2024 14:44:07 +0200 (CEST)",
            "from PH7PR03CA0005.namprd03.prod.outlook.com (2603:10b6:510:339::31)\n by PH8PR12MB7447.namprd12.prod.outlook.com (2603:10b6:510:215::7)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Tue, 7 May\n 2024 12:44:04 +0000",
            "from SN1PEPF00036F3F.namprd05.prod.outlook.com\n (2603:10b6:510:339:cafe::79) by PH7PR03CA0005.outlook.office365.com\n (2603:10b6:510:339::31) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.43 via Frontend\n Transport; Tue, 7 May 2024 12:44:04 +0000",
            "from SATLEXMB04.amd.com (165.204.84.17) by\n SN1PEPF00036F3F.mail.protection.outlook.com (10.167.248.23) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.20.7544.18 via Frontend Transport; Tue, 7 May 2024 12:44:03 +0000",
            "from cae-Lilac-RMB.amd.com (10.180.168.240) by SATLEXMB04.amd.com\n (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 7 May\n 2024 07:44:01 -0500"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=lVvEJgWq8R55p3UZJIa1LPcwTINSCRC2NNp6OSDRifqyQDskDSrfxrzkcgcUByZcV9mmtaSUIfatUWb6zJRNSSgRl3hmJMLpRcBZd/AEuu6YWYaaMyVwOAgNR4gFGIAB4w0e+JD1tIYvLltSBihdb7kG7N/jGLxA4okuy+gw+u/mmmEeINFVoj/FNmkPtb4SqdhTCNLzWN2QSlVDyDe5kLy/vhGlS9e1JOMimsEKBa7jwJ4u+KbNtAGJxVkyC2xIxtZ1J4fszjKU2qWO91TJegVMqF8kBGl7rN2eVQp7RzdHoUry5BdB/FUrbOM9XZGK16t7pPYcmfxRBp44/siQ5w==",
        "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=4C6WUrfnRtBasiF4Qk7C2+/3Uo3/RkGocpAsjy8ebiY=;\n b=kt5hTa4ZWUJb6CCC4af/dS4EYI7WxP/YG6/3fXy+93URwFMaeppPd7iuzOr50rMlIeivQ/7ruw2pGz/ZG4AuZgFvAkCfPuc9rM9tIx4Uky48zgPzyYyCWop79uwmpD0ggrkfdznEHX35V80tjR2Fj7+eIwPx1VeiYigF7jVRInK9lRON30kClJ0mA2UFrahjhEQp4xVAuQJy86CLY+QI8rxduzY3ebchKR2OnrSZx4Sb1HzUJwQkGGtSVRxq2N5B5PcxOUyu8yTGhNyn+z4c23SjVcCmUu+cWcAwphq3Te1c3RlMdz1fa+uO5VyokM7TBgd8x7jv/Smghx4vv5V2iQ==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass\n (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;\n dkim=none (message not signed); arc=none (0)",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=4C6WUrfnRtBasiF4Qk7C2+/3Uo3/RkGocpAsjy8ebiY=;\n b=ebD7J0uUZihp6iPd+WdCQ7xiuRVx+ZSk7jfKi0Bkc9FXeteFwPFlkrH+397nDueBp4hfI55nfuA/dyWX4+s7i2Nf02Pg6QKzoqRewLGVpsYE4uQcBCcM0s+4jrnQNOnJXAAWtKVzQ8bCXCmNqm5xVFAcwZKVozUd7OuxKupmE8s=",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 165.204.84.17)\n smtp.mailfrom=amd.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=amd.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of amd.com designates\n 165.204.84.17 as permitted sender) receiver=protection.outlook.com;\n client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C",
        "From": "Venkat Kumar Ande <venkatkumar.ande@amd.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<Selwin.Sebastian@amd.com>, Venkat Kumar Ande <venkatkumar.ande@amd.com>,\n <stable@dpdk.org>",
        "Subject": "[PATCH v2 12/25] net/axgbe: delay AN timeout during KR training",
        "Date": "Tue, 7 May 2024 18:12:52 +0530",
        "Message-ID": "<20240507124305.2318-12-venkatkumar.ande@amd.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240507124305.2318-1-venkatkumar.ande@amd.com>",
        "References": "<20240412125013.10498-1-VenkatKumar.Ande@amd.com>\n <20240507124305.2318-1-venkatkumar.ande@amd.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.180.168.240]",
        "X-ClientProxiedBy": "SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com\n (10.181.40.145)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "SN1PEPF00036F3F:EE_|PH8PR12MB7447:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "7552371d-dfbe-44ff-2a29-08dc6e936091",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;\n ARA:13230031|82310400017|36860700004|1800799015|376005;",
        "X-Microsoft-Antispam-Message-Info": "\n wGWtdVADVJwiAn3/6ItF0OiC9ud0N7Maat0fVCqXemyQeWkQu7y4SChih9IJy3TEVI5M2RH54C3h627G3mA9wq+Zs+XhPosVY+VocEK2FuznwI0xY5IIVlenM9CrCUg4Of6KFGkgKUFMUaQ/IhQruGahvA7h6FFr7RcHY/92yt2eZ+Ic6PRyCMisyjN+aU5nSchONTnn353ZADtKk3v3dvwZWaY9t6wvxZYB65RnTR5D7qC0jc7smqctmRkOMrPlqb+3GLV4TY03raVJC2jlZTFav4GPXS19MuYdzlSAMNz0yC6r4QOdTq0+IPpcuJ8ZoqZWE2m8ys9REfenj/JsbkVo3hGJxcOn9WsXNqrdhvkaVHyoFdxNWWoeayLBA7G3uOJFoEMT61zvfTVoszUYdtQMrDE1MUw6LM10yLu68toxAnxgnU3kKdnZ3NhT0DWvLTSVHlab3n6UNqd4OYqScy9vizDKmD7fPQTLWg9bC9xKpg1Z8Mgg99r7N17yu1CLRboAEYjB/LVNmt6gSLHqu2rqlrcogoJEVkHJE+jeiQBpgsoyZ4u5aDruBAnr2hWuXuTUvM/othpOU5gulatoKrTK5/3925nZQhebjJLGEdedB/zddcA/ymXW4o3IOwz5gTqrVRclUtNnTtQ4SOJKmtDcCs1w0hWP9toI2jxbiXqffEk7lVLRhINgwBrzn8hE5VnZCbSgA9VG4lKa1wxmEghqdgYJYqdqUklXCbfvl7u2ljRg6lrnM/KheFCXKSi2o2IF1NSakescieOALyOX4xeOSI0gcbY4Th+/X9x3bDf89oW/xQDK6AXwzzIDmyL3PRhW4NaqAipAJ3Kgdl1YwoHKtYkjlpgsHqylsqAvciTWofshiKDueuvYoyg1bES5U3qnLJ0sUC7tvzejyUITbuLaxQa6KiWzSMdoshvHxRPWSyip8vRNXzECAb+4yegdm29VZ/iAut0UvPlEzG/LLZytmcNxF4HufHD+4TNBZOLrMnmRTDPCWuwUnkDQHK99U0VL8vFyC9elIn9bnAiBIBZ6nbNNxjJgkrOHK7/Bmfmf5XonqhqhsbN9RI3BOyfjiwSHYQ690Ecz7i2P67cZPn5o2b4vlyWFwM8IHRXPnW0jJCuCSxDDT54FxZRzH5Ni/lXZx5YUOrymC6im1/OLUJbmS8zLqTTQIOFFcwI8MCpOEmrbaWTEodzNkcEK9FPVsDWWsdmXGp3+aEIlZAK2OnFBPZUZ3MPMPQCYCdCpf61Q4sBgeun1dj4HMRzEeKh+irWt+tALzoIARcHwuWZg+RvdFy84Sg5E7OBoqo8X2hPr5Ej/GF8WTn852RTYx/c/g8qiKWuP0hh0Rc4bcVox1V/iXaDaZ2D4b1SMcv/ptvOZO+FMWC5uR+FnUIWpMKju",
        "X-Forefront-Antispam-Report": "CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE;\n SFS:(13230031)(82310400017)(36860700004)(1800799015)(376005); DIR:OUT;\n SFP:1101;",
        "X-OriginatorOrg": "amd.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "07 May 2024 12:44:03.8516 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 7552371d-dfbe-44ff-2a29-08dc6e936091",
        "X-MS-Exchange-CrossTenant-Id": "3dd8961f-e488-4e60-8e11-a82d994e183d",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17];\n Helo=[SATLEXMB04.amd.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n SN1PEPF00036F3F.namprd05.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH8PR12MB7447",
        "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": "AN restart triggered during KR training not only aborts the KR training\nprocess but also move the HW to unstable state. Driver has to wait up to\n500ms or until the KR training is completed before restarting AN cycle.\n\nWithout the fix the user will face KR training failure issues.\n\nFixes: a5c7273771e8 (\"net/axgbe: add phy programming APIs\")\nCc: stable@dpdk.org\n\nSigned-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>\n---\n drivers/net/axgbe/axgbe_ethdev.h |  2 ++\n drivers/net/axgbe/axgbe_mdio.c   | 25 +++++++++++++++++++++++++\n 2 files changed, 27 insertions(+)",
    "diff": "diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h\nindex f122dfd516..d1fac667c2 100644\n--- a/drivers/net/axgbe/axgbe_ethdev.h\n+++ b/drivers/net/axgbe/axgbe_ethdev.h\n@@ -111,6 +111,7 @@\n /* Auto-negotiation */\n #define AXGBE_AN_MS_TIMEOUT\t\t500\n #define AXGBE_LINK_TIMEOUT\t\t5\n+#define AXGBE_KR_TRAINING_WAIT_ITER\t50\n \n #define AXGBE_SGMII_AN_LINK_STATUS\tBIT(1)\n #define AXGBE_SGMII_AN_LINK_SPEED\t(BIT(2) | BIT(3))\n@@ -661,6 +662,7 @@ struct axgbe_port {\n \tunsigned int parallel_detect;\n \tunsigned int fec_ability;\n \tunsigned long an_start;\n+\tunsigned long kr_start_time;\n \tenum axgbe_an_mode an_mode;\n \n \t/* I2C support */\ndiff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c\nindex b03bc471cb..e1a737cf62 100644\n--- a/drivers/net/axgbe/axgbe_mdio.c\n+++ b/drivers/net/axgbe/axgbe_mdio.c\n@@ -357,6 +357,7 @@ static enum axgbe_an axgbe_an73_tx_training(struct axgbe_port *pdata,\n \treg |= AXGBE_KR_TRAINING_ENABLE;\n \treg |= AXGBE_KR_TRAINING_START;\n \tXMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);\n+\tpdata->kr_start_time = rte_get_timer_cycles();\n \n \tPMD_DRV_LOG(DEBUG, \"KR training initiated\\n\");\n \tif (pdata->phy_if.phy_impl.kr_training_post)\n@@ -487,6 +488,7 @@ static enum axgbe_an axgbe_an73_incompat_link(struct axgbe_port *pdata)\n \n \taxgbe_an_disable(pdata);\n \taxgbe_switch_mode(pdata);\n+\tpdata->an_result = AXGBE_AN_READY;\n \taxgbe_an_restart(pdata);\n \n \treturn AXGBE_AN_INCOMPAT_LINK;\n@@ -967,11 +969,34 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)\n {\n \tunsigned long link_timeout;\n \tunsigned long ticks;\n+\tunsigned long kr_time;\n+\tint wait;\n \n \tlink_timeout = pdata->link_check + (AXGBE_LINK_TIMEOUT *\n \t\t\t\t\t    2 *  rte_get_timer_hz());\n \tticks = rte_get_timer_cycles();\n \tif (time_after(ticks, link_timeout)) {\n+\t\tif ((axgbe_cur_mode(pdata) == AXGBE_MODE_KR) &&\n+\t\t    pdata->phy.autoneg == AUTONEG_ENABLE) {\n+\t\t\t/* AN restart should not happen while KR training is in progress.\n+\t\t\t * The while loop ensures no AN restart during KR training,\n+\t\t\t * waits up to 500ms and AN restart is triggered only if KR\n+\t\t\t * training is failed.\n+\t\t\t */\n+\t\t\twait = AXGBE_KR_TRAINING_WAIT_ITER;\n+\t\t\twhile (wait--) {\n+\t\t\t\tkr_time = pdata->kr_start_time +\n+\t\t\t\t\t  msecs_to_timer_cycles(AXGBE_AN_MS_TIMEOUT);\n+\t\t\t\tticks = rte_get_timer_cycles();\n+\t\t\t\tif (time_after(ticks, kr_time))\n+\t\t\t\t\tbreak;\n+\t\t\t\t/* AN restart is not required, if AN result is COMPLETE */\n+\t\t\t\tif (pdata->an_result == AXGBE_AN_COMPLETE)\n+\t\t\t\t\treturn;\n+\t\t\t\trte_delay_us(10500);\n+\t\t\t}\n+\t\t}\n+\n \t\tPMD_DRV_LOG(NOTICE, \"AN link timeout\\n\");\n \t\taxgbe_phy_config_aneg(pdata);\n \t}\n",
    "prefixes": [
        "v2",
        "12/25"
    ]
}