get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139267,
    "url": "https://patches.dpdk.org/api/patches/139267/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240412125249.10625-18-VenkatKumar.Ande@amd.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20240412125249.10625-18-VenkatKumar.Ande@amd.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240412125249.10625-18-VenkatKumar.Ande@amd.com",
    "date": "2024-04-12T12:52:43",
    "name": "[18/24] 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": "https://patches.dpdk.org/api/people/3256/?format=api",
        "name": "Venkat Kumar Ande",
        "email": "venkatkumar.ande@amd.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240412125249.10625-18-VenkatKumar.Ande@amd.com/mbox/",
    "series": [
        {
            "id": 31734,
            "url": "https://patches.dpdk.org/api/series/31734/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31734",
            "date": "2024-04-12T12:52:26",
            "name": "[01/24] net/axgbe: remove use of comm_owned field",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/31734/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/139267/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/139267/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 059D943E52;\n\tFri, 12 Apr 2024 14:55:31 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 744B7427E5;\n\tFri, 12 Apr 2024 14:54:34 +0200 (CEST)",
            "from NAM11-BN8-obe.outbound.protection.outlook.com\n (mail-bn8nam11on2082.outbound.protection.outlook.com [40.107.236.82])\n by mails.dpdk.org (Postfix) with ESMTP id 45BA9427E9\n for <dev@dpdk.org>; Fri, 12 Apr 2024 14:54:29 +0200 (CEST)",
            "from BL0PR05CA0029.namprd05.prod.outlook.com (2603:10b6:208:91::39)\n by CYYPR12MB8703.namprd12.prod.outlook.com (2603:10b6:930:c4::9) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr\n 2024 12:54:26 +0000",
            "from BL6PEPF00020E5F.namprd04.prod.outlook.com\n (2603:10b6:208:91:cafe::b5) by BL0PR05CA0029.outlook.office365.com\n (2603:10b6:208:91::39) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.12 via Frontend\n Transport; Fri, 12 Apr 2024 12:54:26 +0000",
            "from SATLEXMB04.amd.com (165.204.84.17) by\n BL6PEPF00020E5F.mail.protection.outlook.com (10.167.249.20) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 12:54:26 +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; Fri, 12 Apr\n 2024 07:54:15 -0500"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=DxAEFazJE37hT04U6AruuD6JZxNXKGzNtXYFoRRq/jugxBXWcPbQlZhHT9JcG9rF5JCAC9phsqPFc7ArZE9T52c89L9kg8hjpez2OSC/AX4u0hdLoOIrM1THXDFg1AnkLnsvrqKwMLm/ZeIKdl9j91dq4dNBar8sCWA7pwGOP3NgDEMEWMXYsYkc6+PZQc0adCs/Df4SiNhcmMeoxAGBGAI4hv2xGf2mmChZwGscXxg9K5shXa8IENL/MrPjMzzj01sNeMBybtAPYngnWk+g/jQ26Q78+zM+wvcWPw9S20JaaRTCO8OTipxmS8bVpZSYX3cWMA0TOyH3KSYmiYrWzQ==",
        "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=LuVEF6kXdMf+WVrBmtxOexXN/dF9sBPZXmTCZQms9EY=;\n b=JyaF9/fPVUwp511Ze5ujSZzyAwudPiNODQWQ7lDROHf1p8Ycg/kbKRB0PTKqFiby1SV4Hky5YhEO0C1kmFcAXCrSHLUhVO3D0M3Bl52a+OEOCI4UWcQwEjFmjKYJuiC2k802qEJHSRogt+G/HHztJKP3v8/kn+jtTBjw5q0IpfXXieq3xQSDFrTKJjKSRVXprTBlBcPVJSdtTN6rCb5Hwp/+xFDbLnE2pNWR2Uw+B8qlkYC65fnbVYX6SiYeSicSdOsnaIWJPqxHCUCbHX2sJ+B0jszY/GoeJiV7qXQvYfQF+elUB6IZqca9/0oDS18EKy43u94HzZldLyxi8+d6KA==",
        "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=LuVEF6kXdMf+WVrBmtxOexXN/dF9sBPZXmTCZQms9EY=;\n b=bQnXYCTciwV4PBAUbAfcYYgeq6q66JSt5r3YsZCLkzWTI+4XdiIwc9nf5sC3zs2hJPoBaQaeu/i9jLU7xljeiTYso//ew2Q6fHMX3d4GxG8owBLjEsDVQZZwQbA1yzBVodFwOwdudPnAbeoZGcPEyA1ktwaVWkcF7SDE672fjgs=",
        "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>",
        "Subject": "[PATCH 18/24] net/axgbe: delay AN timeout during KR training",
        "Date": "Fri, 12 Apr 2024 08:52:43 -0400",
        "Message-ID": "<20240412125249.10625-18-VenkatKumar.Ande@amd.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240412125249.10625-1-VenkatKumar.Ande@amd.com>",
        "References": "<20240412125249.10625-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": "SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com\n (10.181.40.145)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "BL6PEPF00020E5F:EE_|CYYPR12MB8703:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "893ecbff-578c-406d-9561-08dc5aefaf2d",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n ByisdFapkK6sjgUzT3swhf/GAuKEbYyoY1NCDYfKkuuow601lJnx0uA479jsLFlnwxln0fH+EUT+gCajqSKAt0gSIM9pH04uqMzxs9WOJTY1UGzh/+lCLln2FL8sg1b8kIS0hlmFB0GnU13P0fMcvWiTlDKmWPgiacueXj7f5SAa4Ou/q1tr41teYu/G7Sj/6E2smVEDcjlfhuYKEUFzyH4XWeXaZwSLq4uYzAjxHpIORk9BGUqYJvAR1RqBzgaN8TkaC0w0FPyY7FMxvtMNrkULGuYMj63nc+yesoIEdhbUfCBv9rEI21f2pyGWbwpF0krBl8LddBLT5b1YMp8QmHy2A8n/8X8TWv7d0jlTYvvljzLE/d0I0eIlYhWh9JdvKdCEyhKm1METUk8Wp+99HpW8XS4+78rxGVbAso6GJ+DHZ1EKEfWVxN7n7eZjpIYlwWPE7E6frm+ZsTycjN8KdJm0l9KfKUUycY+1rwNtBSHm4c1G3k180YNKRN8VPfFF+q9Yhi3PCaVtohnFvQMeZao9rqGWGtnlHvPpifI0rU7IDLrEShLmm5KW4eeC2FO5PqjIFsSzzi2bgGU8+H9XQsgIq9focukSSWGqwm1AEGdkSjtReLjjrKN9Y8t9AZzVhdHSyQQe4RCid8KS/b/510481T59q3evf/4IE7jjXMlSdo9G4PXahq6X0rxlXK3gC3FY1dKUAyXUVXJTXhVy1GThTkTrLzib9LJ5SP1t1fm9QIoFO+LEncpt626V+Mgf",
        "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)(376005)(36860700004)(82310400014)(1800799015); DIR:OUT;\n SFP:1101;",
        "X-OriginatorOrg": "amd.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "12 Apr 2024 12:54:26.1982 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 893ecbff-578c-406d-9561-08dc5aefaf2d",
        "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 BL6PEPF00020E5F.namprd04.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CYYPR12MB8703",
        "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\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 127427c736..4dcbf6d9a2 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@@ -689,6 +690,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 4307a7560a..9fe30e83bc 100644\n--- a/drivers/net/axgbe/axgbe_mdio.c\n+++ b/drivers/net/axgbe/axgbe_mdio.c\n@@ -370,6 +370,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@@ -500,6 +501,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@@ -988,11 +990,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": [
        "18/24"
    ]
}