Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/94307/?format=api
http://patches.dpdk.org/api/patches/94307/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210616175523.930678-3-lance.richardson@broadcom.com/", "project": { "id": 1, "url": "http://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": "<20210616175523.930678-3-lance.richardson@broadcom.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210616175523.930678-3-lance.richardson@broadcom.com", "date": "2021-06-16T17:55:21", "name": "[2/4] net/bnxt: fix tx desc status implementation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "29d3254952236478c7300c396f92438d56d88219", "submitter": { "id": 1323, "url": "http://patches.dpdk.org/api/people/1323/?format=api", "name": "Lance Richardson", "email": "lance.richardson@broadcom.com" }, "delegate": { "id": 1766, "url": "http://patches.dpdk.org/api/users/1766/?format=api", "username": "ajitkhaparde", "first_name": "Ajit", "last_name": "Khaparde", "email": "ajit.khaparde@broadcom.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210616175523.930678-3-lance.richardson@broadcom.com/mbox/", "series": [ { "id": 17364, "url": "http://patches.dpdk.org/api/series/17364/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=17364", "date": "2021-06-16T17:55:19", "name": "net/bnxt: various fixes", "version": 1, "mbox": "http://patches.dpdk.org/series/17364/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/94307/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/94307/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 4B6A7A0C43;\n\tWed, 16 Jun 2021 20:09:50 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 35B29410E6;\n\tWed, 16 Jun 2021 20:09:50 +0200 (CEST)", "from mail-pg1-f182.google.com (mail-pg1-f182.google.com\n [209.85.215.182])\n by mails.dpdk.org (Postfix) with ESMTP id B2AE24067A\n for <dev@dpdk.org>; Wed, 16 Jun 2021 20:09:48 +0200 (CEST)", "by mail-pg1-f182.google.com with SMTP id e22so2631286pgv.10\n for <dev@dpdk.org>; Wed, 16 Jun 2021 11:09:48 -0700 (PDT)", "from lrichardson-VirtualBox.dhcp.broadcom.net ([192.19.231.250])\n by smtp.gmail.com with ESMTPSA id q4sm2951401pfh.18.2021.06.16.11.09.40\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 16 Jun 2021 11:09:47 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version; bh=DJJmNkp01eybprGku2T+U6t6IIKzLJhdgJ2dAzOElaQ=;\n b=HjlXxxS1ArgWzuDmY8i7UWzBEljnxikqQKWtJlf6F70rm+KuI9fU1/f5UVvxSDQH3l\n zdyLmy/yKtThM1fL8bz5SySxiMQtFZakodWSiCptHVu0PhUOtnTqKv36hQnVEU3OpM3H\n QSu4gDvnYp0t6M35JqkcilFCNESiO1P6dKIsc=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version;\n bh=DJJmNkp01eybprGku2T+U6t6IIKzLJhdgJ2dAzOElaQ=;\n b=F4o22WRgdb18NDJcXdepsiD/dlwAUwXI3wABSoEBXF3htOAKwIhSRfxav1TrnQO1t4\n e06JhB1mhFnaq/7D1DK5pK4uenfOJQ8aPlvHf24xTyKeWtif5CqJrGamQdE8b8rOocI6\n yx+kE8PaVbI+hUKvNAOleCMu+OLYVPaDOXyFTn+6vNuqiwM81IjarV/3rgAXM6DUS3ro\n yLz0EABHZzy0X2i3W7LfQX5A7/lQoFZR+X/IDF1QEaAEnKJIccMBO8b8AMN0bq1ryr+r\n 4PZWU/q6hIXPhO6crAJtF7Scf4YNc/p5NslJrWSV4z4fyWWb8cS+cGS8x+L+WmNOYAW2\n HOkg==", "X-Gm-Message-State": "AOAM530m8Xk1fiZkwoxEoE4YYi6Cvho4i+VAGalFujO0HzspJ8bu0N3Y\n X9xD0zhqdCzUxKKw40xIg8nMNA==", "X-Google-Smtp-Source": "\n ABdhPJyihKnYrqL5uFY2H7IqYHumZ7/Ad73vEM3sWSS/kXMmpiXYMVS72D9G5PtJq/WrzVyWBIkcOw==", "X-Received": "by 2002:a65:6802:: with SMTP id l2mr891144pgt.132.1623866987897;\n Wed, 16 Jun 2021 11:09:47 -0700 (PDT)", "From": "Lance Richardson <lance.richardson@broadcom.com>", "To": "Ajit Khaparde <ajit.khaparde@broadcom.com>,\n Somnath Kotur <somnath.kotur@broadcom.com>", "Cc": "dev@dpdk.org,\n\tstable@dpdk.org", "Date": "Wed, 16 Jun 2021 13:55:21 -0400", "Message-Id": "<20210616175523.930678-3-lance.richardson@broadcom.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210616175523.930678-1-lance.richardson@broadcom.com>", "References": "<20210616175523.930678-1-lance.richardson@broadcom.com>", "MIME-Version": "1.0", "Content-Type": "multipart/signed; protocol=\"application/pkcs7-signature\";\n micalg=sha-256; boundary=\"000000000000fea3d005c4e5fe2a\"", "X-Content-Filtered-By": "Mailman/MimeDel 2.1.29", "Subject": "[dpdk-dev] [PATCH 2/4] net/bnxt: fix tx desc status implementation", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "With tx completion batching, a single transmit completion\ncan correspond to one or more transmit descriptors, adjust\nimplementation to account for this.\n\nRTE_ETH_TX_DESC_DONE should be returned for descriptors that\nare available for use instead of RTE_ETH_TX_DESC_UNAVAIL.\n\nFixes: 5735eb241947 (\"net/bnxt: support Tx batching\")\nFixes: 478ed3bb7b9d \"(net/bnxt: support Tx descriptor status\")\nCc: stable@dpdk.org\nSigned-off-by: Lance Richardson <lance.richardson@broadcom.com>\nReviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/bnxt_ethdev.c | 54 +++++++++++++++++++---------------\n 1 file changed, 31 insertions(+), 23 deletions(-)", "diff": "diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c\nindex d4b8762d5..a4a0142e8 100644\n--- a/drivers/net/bnxt/bnxt_ethdev.c\n+++ b/drivers/net/bnxt/bnxt_ethdev.c\n@@ -3296,41 +3296,49 @@ static int\n bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)\n {\n \tstruct bnxt_tx_queue *txq = (struct bnxt_tx_queue *)tx_queue;\n-\tstruct bnxt_tx_ring_info *txr;\n-\tstruct bnxt_cp_ring_info *cpr;\n-\tstruct rte_mbuf **tx_buf;\n-\tstruct tx_pkt_cmpl *txcmp;\n-\tuint32_t cons, cp_cons;\n+\tstruct bnxt_cp_ring_info *cpr = txq->cp_ring;\n+\tuint32_t ring_mask, raw_cons, nb_tx_pkts = 0;\n+\tstruct bnxt_ring *cp_ring_struct;\n+\tstruct cmpl_base *cp_desc_ring;\n \tint rc;\n \n-\tif (!txq)\n-\t\treturn -EINVAL;\n-\n \trc = is_bnxt_in_error(txq->bp);\n \tif (rc)\n \t\treturn rc;\n \n-\tcpr = txq->cp_ring;\n-\ttxr = txq->tx_ring;\n-\n \tif (offset >= txq->nb_tx_desc)\n \t\treturn -EINVAL;\n \n-\tcons = RING_CMP(cpr->cp_ring_struct, offset);\n-\ttxcmp = (struct tx_pkt_cmpl *)&cpr->cp_desc_ring[cons];\n-\tcp_cons = cpr->cp_raw_cons;\n+\t/* Return \"desc done\" if descriptor is available for use. */\n+\tif (bnxt_tx_bds_in_hw(txq) <= offset)\n+\t\treturn RTE_ETH_TX_DESC_DONE;\n \n-\tif (cons > cp_cons) {\n-\t\tif (CMPL_VALID(txcmp, cpr->valid))\n-\t\t\treturn RTE_ETH_TX_DESC_UNAVAIL;\n-\t} else {\n-\t\tif (CMPL_VALID(txcmp, !cpr->valid))\n-\t\t\treturn RTE_ETH_TX_DESC_UNAVAIL;\n+\traw_cons = cpr->cp_raw_cons;\n+\tcp_desc_ring = cpr->cp_desc_ring;\n+\tcp_ring_struct = cpr->cp_ring_struct;\n+\tring_mask = cpr->cp_ring_struct->ring_mask;\n+\n+\t/* Check to see if hw has posted a completion for the descriptor. */\n+\twhile (1) {\n+\t\tstruct tx_cmpl *txcmp;\n+\t\tuint32_t cons;\n+\n+\t\tcons = RING_CMPL(ring_mask, raw_cons);\n+\t\ttxcmp = (struct tx_cmpl *)&cp_desc_ring[cons];\n+\n+\t\tif (!CMP_VALID(txcmp, raw_cons, cp_ring_struct))\n+\t\t\tbreak;\n+\n+\t\tif (CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2)\n+\t\t\tnb_tx_pkts += rte_le_to_cpu_32(txcmp->opaque);\n+\n+\t\tif (nb_tx_pkts > offset)\n+\t\t\treturn RTE_ETH_TX_DESC_DONE;\n+\n+\t\traw_cons = NEXT_RAW_CMP(raw_cons);\n \t}\n-\ttx_buf = &txr->tx_buf_ring[cons];\n-\tif (*tx_buf == NULL)\n-\t\treturn RTE_ETH_TX_DESC_DONE;\n \n+\t/* Descriptor is pending transmit, not yet completed by hardware. */\n \treturn RTE_ETH_TX_DESC_FULL;\n }\n \n", "prefixes": [ "2/4" ] }{ "id": 94307, "url": "