get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 117607,
    "url": "https://patches.dpdk.org/api/patches/117607/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20221007174336.54354-28-andrew.boyer@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": "<20221007174336.54354-28-andrew.boyer@amd.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221007174336.54354-28-andrew.boyer@amd.com",
    "date": "2022-10-07T17:43:28",
    "name": "[27/35] net/ionic: add Tx descriptor status function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e1caeb92ed36655d8aa5f54b63c857b73298a3eb",
    "submitter": {
        "id": 2861,
        "url": "https://patches.dpdk.org/api/people/2861/?format=api",
        "name": "Andrew Boyer",
        "email": "Andrew.Boyer@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/20221007174336.54354-28-andrew.boyer@amd.com/mbox/",
    "series": [
        {
            "id": 25037,
            "url": "https://patches.dpdk.org/api/series/25037/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=25037",
            "date": "2022-10-07T17:43:01",
            "name": "net/ionic: updates for 22.11 release",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/25037/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/117607/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/117607/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 8234FA04FD;\n\tFri,  7 Oct 2022 19:47:26 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C9E0C42BED;\n\tFri,  7 Oct 2022 19:45:05 +0200 (CEST)",
            "from NAM02-BN1-obe.outbound.protection.outlook.com\n (mail-bn1nam07on2042.outbound.protection.outlook.com [40.107.212.42])\n by mails.dpdk.org (Postfix) with ESMTP id BF74642BE8\n for <dev@dpdk.org>; Fri,  7 Oct 2022 19:45:03 +0200 (CEST)",
            "from MW4PR03CA0342.namprd03.prod.outlook.com (2603:10b6:303:dc::17)\n by CY8PR12MB7564.namprd12.prod.outlook.com (2603:10b6:930:97::8) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.26; Fri, 7 Oct\n 2022 17:45:01 +0000",
            "from CO1NAM11FT068.eop-nam11.prod.protection.outlook.com\n (2603:10b6:303:dc:cafe::4) by MW4PR03CA0342.outlook.office365.com\n (2603:10b6:303:dc::17) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24 via Frontend\n Transport; Fri, 7 Oct 2022 17:45:01 +0000",
            "from SATLEXMB04.amd.com (165.204.84.17) by\n CO1NAM11FT068.mail.protection.outlook.com (10.13.175.142) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.20.5709.10 via Frontend Transport; Fri, 7 Oct 2022 17:45:01 +0000",
            "from driver-dev1.pensando.io (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.2375.28; Fri, 7 Oct\n 2022 12:44:58 -0500"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=MDlae37PXFhf70VziHkgQIZRvtpUo1qR5NDw5teU69C6kq4VhVaQ1rtdqDSsU+quRTLYQROFDHH7YJlmim+h0LkKlu/5oI92uQLzj9nu/GHxFfhHiS2TYixBiXRmhUPoXvbpviV12HyIl5D+M+nftUROQQEbenfxMGDj9mVYpHXc2kL8DAS7wEPmukLM+INUKnTXX65K+M8CvydJR1qtNSy/edPYs9UPRKRBJHDvIYQl9L6wqmu2uNj5qxSAypOKwYDe4HUSetqYBhyAoF8GfYByHhBFHkG2cdfTP+bCUb/96xeXFmK9c8+oI/bMymv8wZ/Jd+XnufbfZkiOtYMMFw==",
        "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=oCZ7Asm9RQ8f2c4SY3RzcXiJ/Yv2z9cHTmx2X5dMTrY=;\n b=IwtxO/FNWI2DZINR7Cn6K7yHl5miIkbKYF9SH8EdEwsyKm2FWAhed9BgKEhYli4h4ZLCDEsrNpFDoneDefvfideuKIJaL3mfdf/3x5HYzesYQHr/Nls0uQOmqs9k/AC9yVT9nJ7MdxRo+1Vvhij7+dfWOE72noB9EJum46c9RTTgs+yAGUiChWPh3HjjviCpA86q+hz5KeQOeXrm6tOPHEW8LLJ666MF6oDOTuDkVRNB5+RZOreeQr0Og+IHv4G7j9L4JEJksDdis9d2/i4X+HNxPKoL6LBG+SpggsuztUjXpnB2cxXt2Wu7QxloTRtHD8Lehu+KpCsvLt/ogk4+PQ==",
        "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",
        "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=oCZ7Asm9RQ8f2c4SY3RzcXiJ/Yv2z9cHTmx2X5dMTrY=;\n b=yW8O2ZkhmaN8CVLVquoZONKVdh6XrPEDtb0D+ql5gquW9676l+PcvJSdV4oiFqCAmWvlelW2J8ibV627MgnF34W5pJPc+ELvLmX/X+dFLe4KdXaUGn2MMZS11gmNV4PGw1reYvDvmovel0qBgGUY4PHlqYoNNlCXj8354WyDRoM=",
        "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": "Andrew Boyer <andrew.boyer@amd.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Andrew Boyer <andrew.boyer@amd.com>, Allen Hubbe <allen.hubbe@amd.com>",
        "Subject": "[PATCH 27/35] net/ionic: add Tx descriptor status function",
        "Date": "Fri, 7 Oct 2022 10:43:28 -0700",
        "Message-ID": "<20221007174336.54354-28-andrew.boyer@amd.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20221007174336.54354-1-andrew.boyer@amd.com>",
        "References": "<20221007174336.54354-1-andrew.boyer@amd.com>",
        "MIME-Version": "1.0",
        "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": "CO1NAM11FT068:EE_|CY8PR12MB7564:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "58321e1d-62f5-46bc-c3a7-08daa88ba8d3",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n aLIG4Sljy46gVc1LtSTWwsOfMwNiJ29oEqwm92BOMphjUObMBbOB032bbTKU1/ZTQ7f8cq3uZ6U3ljdovWKtLpEsQhldQ4hlKNdo+WtShrYXSgEv+TxFq0tZLGTQQpcOc6u5eM1GEnEx8dBggiWqWJmiBbH8CNe8OsQwJBxQ7RS8l2B+2CQOngQrcwCW7mSaxlnIY+7Kp5hSqJ1EP3IBx1W7DjSEFr8FLCVdeh9VwzEyDQ3FTpTfZhQ+dZnBK85I+PgTiqmb2Q6oBv4dkIb1oINmG3xNkbTUwIh9COSAtfCg23Zn+76nwL4m3AT0z8henf9EbtCQ6CuLMBDmisT6jsh2dMcW8zHzfvaiG7AicvaRi1qEIwHaXemfktipwacfZuy64ntz7Mm2lHUo2JWz1AKJFVo2Q57Y7tubexw3t+W4F5cDJdW8YFz5o+aMBCNPmg6hO3CnZiFDPpVUp+W5In2Q8wjuOypYJUFEDiXE3Vd4E5t48A1S87pVsGHUe2Gk8YMSqlT0JnzEk+Mjc6Cve8oY2MvrZskwFxMHBbgSLDH9P+dk6m5piFHpsh37tf2QL9UEbbd6jZIYAYndKZn5Ff/8hol6mvbm+xg7VlzLs006ASLd/Vlu7ucDeERcYiG+OZV/aQiqdfr7/R9mCTN+b83pRg7Iq6ijxItVuY4qV4xVwmX4XKgTz+HWZBcQPMqW35PBDx9rEPVhgLcLgI9qnBQaFAhMWm+/lKHewEbgAq7ihPnuQAycroIcd+xyorsqHFqm1A3+cxHlrp1EfMYbUyEpL4dQyBByEBj7yqKWrN4=",
        "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:(13230022)(4636009)(376002)(396003)(39860400002)(346002)(136003)(451199015)(40470700004)(36840700001)(46966006)(8676002)(26005)(8936002)(478600001)(54906003)(6666004)(70586007)(2906002)(41300700001)(5660300002)(2616005)(4326008)(44832011)(16526019)(82310400005)(1076003)(82740400003)(47076005)(6916009)(36756003)(186003)(40460700003)(336012)(36860700001)(426003)(70206006)(81166007)(86362001)(316002)(356005)(40480700001)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "amd.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "07 Oct 2022 17:45:01.0998 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 58321e1d-62f5-46bc-c3a7-08daa88ba8d3",
        "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 CO1NAM11FT068.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CY8PR12MB7564",
        "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": "This may be useful for clients.\n\nSigned-off-by: Andrew Boyer <andrew.boyer@amd.com>\nSigned-off-by: Allen Hubbe <allen.hubbe@amd.com>\n---\n doc/guides/nics/features/ionic.ini |  1 +\n drivers/net/ionic/ionic_ethdev.c   |  1 +\n drivers/net/ionic/ionic_rxtx.c     | 51 ++++++++++++++++++++++++++++++\n drivers/net/ionic/ionic_rxtx.h     |  1 +\n 4 files changed, 54 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/features/ionic.ini b/doc/guides/nics/features/ionic.ini\nindex e01ba87135..af0fc5462a 100644\n--- a/doc/guides/nics/features/ionic.ini\n+++ b/doc/guides/nics/features/ionic.ini\n@@ -28,6 +28,7 @@ L3 checksum offload  = Y\n L4 checksum offload  = Y\n Packet type parsing  = Y\n Rx descriptor status = Y\n+Tx descriptor status = Y\n Basic stats          = Y\n Extended stats       = Y\n Stats per queue      = Y\ndiff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c\nindex 7ac7006d88..cf74600f22 100644\n--- a/drivers/net/ionic/ionic_ethdev.c\n+++ b/drivers/net/ionic/ionic_ethdev.c\n@@ -985,6 +985,7 @@ eth_ionic_dev_init(struct rte_eth_dev *eth_dev, void *init_params)\n \teth_dev->tx_pkt_prepare = &ionic_prep_pkts;\n \n \teth_dev->rx_descriptor_status = ionic_dev_rx_descriptor_status;\n+\teth_dev->tx_descriptor_status = ionic_dev_tx_descriptor_status;\n \n \t/* Multi-process not supported, primary does initialization anyway */\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\ndiff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c\nindex 64cbbd9815..4f84fa7df1 100644\n--- a/drivers/net/ionic/ionic_rxtx.c\n+++ b/drivers/net/ionic/ionic_rxtx.c\n@@ -1274,3 +1274,54 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)\n \n \treturn RTE_ETH_RX_DESC_AVAIL;\n }\n+\n+int\n+ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)\n+{\n+\tstruct ionic_tx_qcq *txq = tx_queue;\n+\tstruct ionic_qcq *qcq = &txq->qcq;\n+\tstruct ionic_txq_comp *cq_desc;\n+\tuint16_t mask, head, tail, pos, cq_pos;\n+\tbool done_color;\n+\n+\tmask = qcq->q.size_mask;\n+\n+\t/* offset must be within the size of the ring */\n+\tif (offset > mask)\n+\t\treturn -EINVAL;\n+\n+\thead = qcq->q.head_idx;\n+\ttail = qcq->q.tail_idx;\n+\n+\t/* offset is beyond what is posted */\n+\tif (offset >= ((head - tail) & mask))\n+\t\treturn RTE_ETH_TX_DESC_DONE;\n+\n+\t/* interested in this absolute position in the txq */\n+\tpos = (tail + offset) & mask;\n+\n+\t/* tx cq position != tx q position, need to walk cq */\n+\tcq_pos = qcq->cq.tail_idx;\n+\tcq_desc = qcq->cq.base;\n+\tcq_desc = &cq_desc[cq_pos];\n+\n+\t/* how far behind is pos from head? */\n+\toffset = (head - pos) & mask;\n+\n+\t/* walk cq descriptors that match the expected done color */\n+\tdone_color = qcq->cq.done_color;\n+\twhile (color_match(cq_desc->color, done_color)) {\n+\t\t/* is comp index no further behind than pos? */\n+\t\ttail = rte_cpu_to_le_16(cq_desc->comp_index);\n+\t\tif (((head - tail) & mask) <= offset)\n+\t\t\treturn RTE_ETH_TX_DESC_DONE;\n+\n+\t\tcq_pos = (cq_pos + 1) & mask;\n+\t\tcq_desc = qcq->cq.base;\n+\t\tcq_desc = &cq_desc[cq_pos];\n+\n+\t\tdone_color = done_color != (cq_pos == 0);\n+\t}\n+\n+\treturn RTE_ETH_TX_DESC_FULL;\n+}\ndiff --git a/drivers/net/ionic/ionic_rxtx.h b/drivers/net/ionic/ionic_rxtx.h\nindex 465001a063..f950d6472c 100644\n--- a/drivers/net/ionic/ionic_rxtx.h\n+++ b/drivers/net/ionic/ionic_rxtx.h\n@@ -41,6 +41,7 @@ void ionic_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,\n \tstruct rte_eth_txq_info *qinfo);\n \n int ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);\n+int ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset);\n \n const uint32_t *ionic_dev_supported_ptypes_get(struct rte_eth_dev *dev);\n \n",
    "prefixes": [
        "27/35"
    ]
}