get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139260,
    "url": "https://patches.dpdk.org/api/patches/139260/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240412125249.10625-11-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-11-VenkatKumar.Ande@amd.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240412125249.10625-11-VenkatKumar.Ande@amd.com",
    "date": "2024-04-12T12:52:36",
    "name": "[11/24] net/axgbe: use definitions for mailbox commands",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "70c1af9785e1823b006dfc3a81dcace31667203d",
    "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-11-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/139260/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/139260/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 5422843E52;\n\tFri, 12 Apr 2024 14:54:38 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DF33E427DB;\n\tFri, 12 Apr 2024 14:54:14 +0200 (CEST)",
            "from NAM04-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam04on2077.outbound.protection.outlook.com [40.107.102.77])\n by mails.dpdk.org (Postfix) with ESMTP id 9A9D9411F3\n for <dev@dpdk.org>; Fri, 12 Apr 2024 14:54:11 +0200 (CEST)",
            "from MN2PR22CA0009.namprd22.prod.outlook.com (2603:10b6:208:238::14)\n by PH7PR12MB6611.namprd12.prod.outlook.com (2603:10b6:510:211::11)\n with 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:08 +0000",
            "from BL6PEPF00020E5F.namprd04.prod.outlook.com\n (2603:10b6:208:238:cafe::a7) by MN2PR22CA0009.outlook.office365.com\n (2603:10b6:208:238::14) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend\n Transport; Fri, 12 Apr 2024 12:54:08 +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:08 +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:53:58 -0500"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=dvuOkwksuacCgQhWZCk5O4G9Aj7Ds/Es2+Amfefo8oxeNLnXGifr+2m6opaOIwzh0B9qVwmDbBzKWA9Ne85+eQn9UJsjfkn0Or+RJ4gUnPfpSLM+i2Lc3CoQr/Axs3ICJ3HDnmVoQgH8U8skIgZc79TLU/Lf6JOG7O9xwm5JPCEtY+RTULJCWFg/twjzcYrSsOvx/ROYLoEfr+NfAi2uHJvFQ9ISf7YEBNkkZIMPEHEjAbxIcTRtWRVlZ8eQYuNZApl67KMigRSxDFE6jvvv3SJEY1wBq0VqTGHUqX19ahOF6A1wHtoB70cDA3PwV3s3Hd9oxvp87N8UJuqJQhXUnQ==",
        "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=mC59Qb4C8QNStRJer317aj0aFnBK0gf91dxKzmfLrbY=;\n b=hK7+YWcJLJSH5pJzXHfAqoqaIf5m8I2sJck5DjKxUYbtHeAPeMsvX7VYW+a0cMaJoaBT6wdYPVgcY7i6VY2kY9+3BMbTXWYW9e0F5fl25KrQQOzKa1GZ1aWhk8+bQSJJFJwGi1vytiROt/3+f4C1LlNIGq70N/Z4oRM6/zMCwRcwRvY1W1gMXtUo/QnduaFR5lICSvcIeyPzf092M6R+mHG6j8DaiNwcQW1zn1Zk04UuXOr8aIZ7JNdeoAFwX+rwFPgW84MRCIdRkXthlz7N67S2aOe2JoSEDCEmc1fF9mw1LqfpWW97rs7inzADbPD1hcKV3wkP6JakwmiuJQlTTw==",
        "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=mC59Qb4C8QNStRJer317aj0aFnBK0gf91dxKzmfLrbY=;\n b=3ywGdQTIklmstt5ikCC2sVLhOkM+aZyGum/PUPLZPFYqaRCAZ++tPto0FHEx0ir4Op7e+C2NTy2FwDPncdfP41ktAfQv+VVgMeGjgel6GIqnG8pUqnFSMmVdVyhSyXNLz99CygP2uH244o4gIpZuyKs2C9XvImfRT3ZymuOMu90=",
        "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 11/24] net/axgbe: use definitions for mailbox commands",
        "Date": "Fri, 12 Apr 2024 08:52:36 -0400",
        "Message-ID": "<20240412125249.10625-11-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_|PH7PR12MB6611:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "c0cd6b44-df29-444e-de9e-08dc5aefa48a",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n aNIB74vGx55pDv3OsKGWeJjh5OdFcUzeU+bMF76TjPh3DhUxREUl9bW+zG3csm8a9CZcVodx1scatGcb69hybCWaejnSzRx6dv4w04VWTW5rTpLP0rwXpXGtcp+0o3vtJPtTLpMimNfHsbU6XB2PImOyQDY30C0TQGtOKYEQ4HuXAyOlfTUivpMFwAh0hn2mOoeUsuDypLLFYjmcSV0Q+fk9Rw5577qWmtv6GkS4Pnmyx3hSCsdZT760jOvDTpq4i/jawExeI9UAlSrIL5njx5I0+IgVS2lN09d8pZZmw29X1uU+w0yMdjwSXamA3bvda5W3x3gBFJHgHps8XY8ZoJSs+ufWWCXeud+6wSsqSuBSwDIf/DKZjVJxezrG88Gco9GPld+T479DcT2fhj5KWB9KO5dLSD0N4qr+vZN3aWbzpVCb4zS2JIONA8JhxTGrv76Hej8aIVOMFzLlc0i5ma/8GwC8spH5p8OiyIVlf/AirD26fom7pDpq61+XAtpSmRVFiVVLAL2UJfxlySN6thqZl+gKselHXkPaF77jctamfSmt1fM8QRrQCaPRyrETINnPIj5uj2GUHvVKzOu0L7QjhvfqhNRDyPYQN/eYHnMsVet8DccQGvmvbR59+DuOI9lceARRtUGSVyDj8zyqIzAXPOlpVoncNzWA12seX9XmARJxg7aP6vZjgktdllhTUqpWfZs2LjDJB/gvqeZH0fFvuTOwp6bp3QFQE9GrJETW9V3uiV30carfKhfgErAg",
        "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)(1800799015)(36860700004)(82310400014); DIR:OUT;\n SFP:1101;",
        "X-OriginatorOrg": "amd.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "12 Apr 2024 12:54:08.3703 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n c0cd6b44-df29-444e-de9e-08dc5aefa48a",
        "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": "PH7PR12MB6611",
        "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": "Instead of using hardcoded values, use enumerations for mailbox command\nand sub commands.\n\nSigned-off-by: Venkat Kumar Ande <VenkatKumar.Ande@amd.com>\n---\n drivers/net/axgbe/axgbe_ethdev.h   | 25 +++++++++++++++++++++++++\n drivers/net/axgbe/axgbe_phy_impl.c | 25 +++++++++++++++----------\n 2 files changed, 40 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h\nindex 469b3876c0..20b36ced55 100644\n--- a/drivers/net/axgbe/axgbe_ethdev.h\n+++ b/drivers/net/axgbe/axgbe_ethdev.h\n@@ -230,6 +230,31 @@ enum axgbe_mdio_mode {\n \tAXGBE_MDIO_MODE_CL45,\n };\n \n+enum axgbe_mb_cmd {\n+\tAXGBE_MB_CMD_POWER_OFF = 0,\n+\tAXGBE_MB_CMD_SET_1G,\n+\tAXGBE_MB_CMD_SET_2_5G,\n+\tAXGBE_MB_CMD_SET_10G_SFI,\n+\tAXGBE_MB_CMD_SET_10G_KR,\n+\tAXGBE_MB_CMD_RRC\n+};\n+\n+enum axgbe_mb_subcmd {\n+\tAXGBE_MB_SUBCMD_NONE = 0,\n+\n+\t/* 10GbE SFP subcommands */\n+\tAXGBE_MB_SUBCMD_ACTIVE = 0,\n+\tAXGBE_MB_SUBCMD_PASSIVE_1M,\n+\tAXGBE_MB_SUBCMD_PASSIVE_3M,\n+\tAXGBE_MB_SUBCMD_PASSIVE_OTHER,\n+\n+\t/* 1GbE Mode subcommands */\n+\tAXGBE_MB_SUBCMD_10MBITS = 0,\n+\tAXGBE_MB_SUBCMD_100MBITS,\n+\tAXGBE_MB_SUBCMD_1G_SGMII,\n+\tAXGBE_MB_SUBCMD_1G_KX\n+};\n+\n struct axgbe_phy {\n \tuint32_t supported;\n \tuint32_t advertising;\ndiff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c\nindex a58d51d606..8cc99d3a6b 100644\n--- a/drivers/net/axgbe/axgbe_phy_impl.c\n+++ b/drivers/net/axgbe/axgbe_phy_impl.c\n@@ -1217,7 +1217,7 @@ static void axgbe_phy_pll_ctrl(struct axgbe_port *pdata, bool enable)\n }\n \n static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata,\n-\t\t\t\t\tunsigned int cmd, unsigned int sub_cmd)\n+\t\tenum axgbe_mb_cmd cmd, enum axgbe_mb_subcmd sub_cmd)\n {\n \tunsigned int s0 = 0;\n \tunsigned int wait;\n@@ -1262,7 +1262,7 @@ static void axgbe_phy_rrc(struct axgbe_port *pdata)\n \n \n \t/* Receiver Reset Cycle */\n-\taxgbe_phy_perform_ratechange(pdata, 5, 0);\n+\taxgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_RRC, AXGBE_MB_SUBCMD_NONE);\n \n \tPMD_DRV_LOG(DEBUG, \"receiver reset complete\\n\");\n }\n@@ -1272,7 +1272,7 @@ static void axgbe_phy_power_off(struct axgbe_port *pdata)\n \tstruct axgbe_phy_data *phy_data = pdata->phy_data;\n \n \t/* Power off */\n-\taxgbe_phy_perform_ratechange(pdata, 0, 0);\n+\taxgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_POWER_OFF, AXGBE_MB_SUBCMD_NONE);\n \n \tphy_data->cur_mode = AXGBE_MODE_UNKNOWN;\n \n@@ -1287,14 +1287,18 @@ static void axgbe_phy_sfi_mode(struct axgbe_port *pdata)\n \n \t/* 10G/SFI */\n \tif (phy_data->sfp_cable != AXGBE_SFP_CABLE_PASSIVE) {\n-\t\taxgbe_phy_perform_ratechange(pdata, 3, 0);\n+\t\taxgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_SET_10G_SFI,\n+\t\t\t\t\t\t\tAXGBE_MB_SUBCMD_ACTIVE);\n \t} else {\n \t\tif (phy_data->sfp_cable_len <= 1)\n-\t\t\taxgbe_phy_perform_ratechange(pdata, 3, 1);\n+\t\t\taxgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_SET_10G_SFI,\n+\t\t\t\t\t\t\tAXGBE_MB_SUBCMD_PASSIVE_1M);\n \t\telse if (phy_data->sfp_cable_len <= 3)\n-\t\t\taxgbe_phy_perform_ratechange(pdata, 3, 2);\n+\t\t\taxgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_SET_10G_SFI,\n+\t\t\t\t\t\t\tAXGBE_MB_SUBCMD_PASSIVE_3M);\n \t\telse\n-\t\t\taxgbe_phy_perform_ratechange(pdata, 3, 3);\n+\t\t\taxgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_SET_10G_SFI,\n+\t\t\t\t\t\t\tAXGBE_MB_SUBCMD_PASSIVE_OTHER);\n \t}\n \n \tphy_data->cur_mode = AXGBE_MODE_SFI;\n@@ -1309,7 +1313,8 @@ static void axgbe_phy_kr_mode(struct axgbe_port *pdata)\n \taxgbe_phy_set_redrv_mode(pdata);\n \n \t/* 10G/KR */\n-\taxgbe_phy_perform_ratechange(pdata, 4, 0);\n+\t\taxgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_SET_10G_KR,\n+\t\t\t\t\t\tAXGBE_MB_SUBCMD_NONE);\n \tphy_data->cur_mode = AXGBE_MODE_KR;\n \n \tPMD_DRV_LOG(DEBUG, \"10GbE KR mode set\\n\");\n@@ -1322,7 +1327,7 @@ static void axgbe_phy_kx_2500_mode(struct axgbe_port *pdata)\n \taxgbe_phy_set_redrv_mode(pdata);\n \n \t/* 2.5G/KX */\n-\taxgbe_phy_perform_ratechange(pdata, 2, 0);\n+\taxgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_SET_2_5G, AXGBE_MB_SUBCMD_NONE);\n \tphy_data->cur_mode = AXGBE_MODE_KX_2500;\n }\n \n@@ -1333,7 +1338,7 @@ static void axgbe_phy_sgmii_1000_mode(struct axgbe_port *pdata)\n \taxgbe_phy_set_redrv_mode(pdata);\n \n \t/* 1G/SGMII */\n-\taxgbe_phy_perform_ratechange(pdata, 1, 2);\n+\taxgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_SET_1G, AXGBE_MB_SUBCMD_1G_SGMII);\n \n \tphy_data->cur_mode = AXGBE_MODE_SGMII_1000;\n }\n",
    "prefixes": [
        "11/24"
    ]
}