get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 6204,
    "url": "https://patches.dpdk.org/api/patches/6204/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1436410688-663-1-git-send-email-zhe.tao@intel.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": "<1436410688-663-1-git-send-email-zhe.tao@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1436410688-663-1-git-send-email-zhe.tao@intel.com",
    "date": "2015-07-09T02:58:08",
    "name": "[dpdk-dev,v3] i40e:Fix the Descriptor Done check mechanism for i40e",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6e79685447a86cb0d6d99ef35edc24cc8e16203f",
    "submitter": {
        "id": 276,
        "url": "https://patches.dpdk.org/api/people/276/?format=api",
        "name": "Zhe Tao",
        "email": "zhe.tao@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1436410688-663-1-git-send-email-zhe.tao@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/6204/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/6204/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 7F08D5A68;\n\tThu,  9 Jul 2015 04:58:18 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 6761B9E7\n\tfor <dev@dpdk.org>; Thu,  9 Jul 2015 04:58:16 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga103.fm.intel.com with ESMTP; 08 Jul 2015 19:58:15 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 08 Jul 2015 19:58:15 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t692wD3h006770;\n\tThu, 9 Jul 2015 10:58:13 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t692wAPM000698; Thu, 9 Jul 2015 10:58:12 +0800",
            "(from zhetao@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t692wAIC000694; \n\tThu, 9 Jul 2015 10:58:10 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.15,436,1432623600\"; d=\"scan'208\";a=\"521149128\"",
        "From": "Zhe Tao <zhe.tao@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu,  9 Jul 2015 10:58:08 +0800",
        "Message-Id": "<1436410688-663-1-git-send-email-zhe.tao@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1436347759-31915-1-git-send-email-zhe.tao@intel.com>",
        "References": "<1436347759-31915-1-git-send-email-zhe.tao@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3] i40e:Fix the Descriptor Done check mechanism\n\tfor i40e",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "If a descriptor the device drive is handling is the context descriptor, its type value will be 0x1.\nWhen using the not operator ! to do the conditional check, if the expression value is zero, the device driver will consider the transaction for this descriptor has been completed,\neven its DD field is still 0x1 which means NIC has not finished the operation on this descriptor. \nUse the 0xF to check the DD status to avoid the above issue happens.\n\nSigned-off-by: Zhe Tao <zhe.tao@intel.com>\n---\n\nPatch v3 changes:\n-Fix typo for the patch\n\nPatch v2 changes:\n-Fix the DD check mechanism for other functions (besides the i40e_xmit_cleanup) which use the DD bits to do conditional check\n\nchanges:\n-Fix the DD check mechanism for i40e_xmit_cleanup\n\n drivers/net/i40e/i40e_fdir.c |  3 ++-\n drivers/net/i40e/i40e_rxtx.c | 10 ++++++----\n 2 files changed, 8 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c\nindex 4bf98d0..f3cb757 100644\n--- a/drivers/net/i40e/i40e_fdir.c\n+++ b/drivers/net/i40e/i40e_fdir.c\n@@ -1110,7 +1110,8 @@ i40e_fdir_filter_programming(struct i40e_pf *pf,\n \n \tfor (i = 0; i < I40E_FDIR_WAIT_COUNT; i++) {\n \t\trte_delay_us(I40E_FDIR_WAIT_INTERVAL_US);\n-\t\tif (txdp->cmd_type_offset_bsz &\n+\t\tif ((txdp->cmd_type_offset_bsz &\n+\t\t\t\trte_cpu_to_le_64(I40E_TXD_QW1_DTYPE_MASK)) ==\n \t\t\t\trte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE))\n \t\t\tbreak;\n \t}\ndiff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c\nindex 2de0ac4..7c0c684 100644\n--- a/drivers/net/i40e/i40e_rxtx.c\n+++ b/drivers/net/i40e/i40e_rxtx.c\n@@ -574,8 +574,9 @@ i40e_xmit_cleanup(struct i40e_tx_queue *txq)\n \t\tdesc_to_clean_to = (uint16_t)(desc_to_clean_to - nb_tx_desc);\n \n \tdesc_to_clean_to = sw_ring[desc_to_clean_to].last_id;\n-\tif (!(txd[desc_to_clean_to].cmd_type_offset_bsz &\n-\t\trte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE))) {\n+\tif ((txd[desc_to_clean_to].cmd_type_offset_bsz &\n+\t\t\trte_cpu_to_le_64(I40E_TXD_QW1_DTYPE_MASK)) !=\n+\t\t\trte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE)) {\n \t\tPMD_TX_FREE_LOG(DEBUG, \"TX descriptor %4u is not done \"\n \t\t\t\"(port=%d queue=%d)\", desc_to_clean_to,\n \t\t\t\ttxq->port_id, txq->queue_id);\n@@ -1431,8 +1432,9 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq)\n \tstruct i40e_tx_entry *txep;\n \tuint16_t i;\n \n-\tif (!(txq->tx_ring[txq->tx_next_dd].cmd_type_offset_bsz &\n-\t\t\trte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE)))\n+\tif ((txq->tx_ring[txq->tx_next_dd].cmd_type_offset_bsz &\n+\t\t\trte_cpu_to_le_64(I40E_TXD_QW1_DTYPE_MASK)) !=\n+\t\t\trte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE))\n \t\treturn 0;\n \n \ttxep = &(txq->sw_ring[txq->tx_next_dd - (txq->tx_rs_thresh - 1)]);\n",
    "prefixes": [
        "dpdk-dev",
        "v3"
    ]
}