Show a patch.

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

{
    "id": 119,
    "url": "https://patches.dpdk.org/api/patches/119/?format=api",
    "web_url": "https://patches.dpdk.org/patch/119/",
    "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"
    },
    "msgid": "<1406876916-24869-7-git-send-email-jingjing.wu@intel.com>",
    "date": "2014-08-01T07:08:36",
    "name": "[dpdk-dev,6/6] i40e: support FD ID report and match counter for i40e flow director",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9a12e630c5ca2c4beec320cde6af66f143cb53c7",
    "submitter": {
        "id": 47,
        "url": "https://patches.dpdk.org/api/people/47/?format=api",
        "name": "Wu, Jingjing",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/119/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/119/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/119/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "X-ExtLoop1": "1",
        "Received": [
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 52A7EB381\n\tfor <dev@dpdk.org>; Fri,  1 Aug 2014 09:07:06 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga102.jf.intel.com with ESMTP; 01 Aug 2014 00:03:25 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 01 Aug 2014 00:09:08 -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 s717979r015039;\n\tFri, 1 Aug 2014 15:09:07 +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 s71793Uw025070; Fri, 1 Aug 2014 15:09:05 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s71793U3025066; \n\tFri, 1 Aug 2014 15:09:03 +0800"
        ],
        "References": "<1406876916-24869-1-git-send-email-jingjing.wu@intel.com>",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1406876916-24869-7-git-send-email-jingjing.wu@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.01,778,1400050800\"; d=\"scan'208\";a=\"552236362\"",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Precedence": "list",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "X-List-Received-Date": "Fri, 01 Aug 2014 07:07:07 -0000",
        "Return-Path": "<wujingji@shecgisg004.sh.intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "In-Reply-To": "<1406876916-24869-1-git-send-email-jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "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>",
        "Date": "Fri,  1 Aug 2014 15:08:36 +0800",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Subject": "[dpdk-dev] [PATCH 6/6] i40e: support FD ID report and match counter\n\tfor i40e flow director"
    },
    "content": "support to get the fdir_match counter\nsupport to set the FDIR flag and FD_ID reported in mbuf\n\nSigned-off-by: jingjing.wu <jingjing.wu@intel.com>\n---\n lib/librte_pmd_i40e/i40e_ethdev.c |  5 ++++\n lib/librte_pmd_i40e/i40e_rxtx.c   | 49 ++++++++++++++++++++++++++++++++++++++-\n 2 files changed, 53 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c\nindex c4637be..c518375 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -1112,6 +1112,9 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n \t\t\t    I40E_GLPRT_PTC9522L(hw->port),\n \t\t\t    pf->offset_loaded, &os->tx_size_big,\n \t\t\t    &ns->tx_size_big);\n+\ti40e_stat_update_32(hw, I40E_GLQF_PCNT(pf->fdir.match_counter_index),\n+\t\t\t   pf->offset_loaded,\n+\t\t\t   &os->fd_sb_match, &ns->fd_sb_match);\n \t/* GLPRT_MSPDC not supported */\n \t/* GLPRT_XEC not supported */\n \n@@ -1125,6 +1128,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n \tstats->obytes   = ns->eth.tx_bytes;\n \tstats->oerrors  = ns->eth.tx_errors;\n \tstats->imcasts  = ns->eth.rx_multicast;\n+\tstats->fdirmatch = ns->fd_sb_match;\n \n \tif (pf->main_vsi)\n \t\ti40e_update_vsi_stats(pf->main_vsi);\n@@ -1190,6 +1194,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n \tprintf(\"mac_short_packet_dropped: %lu\\n\",\n \t\t\tns->mac_short_packet_dropped);\n \tprintf(\"checksum_error:           %lu\\n\", ns->checksum_error);\n+\tprintf(\"fdir_match:               %lu\\n\", ns->fd_sb_match);\n \tprintf(\"***************** PF stats end ********************\\n\");\n #endif /* RTE_LIBRTE_I40E_DEBUG_DRIVER */\n }\ndiff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c\nindex ad60d20..759fd75 100644\n--- a/lib/librte_pmd_i40e/i40e_rxtx.c\n+++ b/lib/librte_pmd_i40e/i40e_rxtx.c\n@@ -110,6 +110,10 @@ i40e_rxd_status_to_pkt_flags(uint64_t qword)\n \t\t\t\t\tI40E_RX_DESC_FLTSTAT_RSS_HASH) ==\n \t\t\tI40E_RX_DESC_FLTSTAT_RSS_HASH) ? PKT_RX_RSS_HASH : 0);\n \n+\t/* Check if FDIR Match */\n+\tflags |= (uint16_t)(qword & (1 << I40E_RX_DESC_STATUS_FLM_SHIFT) ?\n+\t\t\t\t\t\t\tPKT_RX_FDIR : 0);\n+\n \treturn flags;\n }\n \n@@ -626,7 +630,22 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)\n \t\t\tmb->ol_flags = pkt_flags;\n \t\t\tif (pkt_flags & PKT_RX_RSS_HASH)\n \t\t\t\tmb->pkt.hash.rss = rte_le_to_cpu_32(\\\n-\t\t\t\t\trxdp->wb.qword0.hi_dword.rss);\n+\t\t\t\t\trxdp[j].wb.qword0.hi_dword.rss);\n+\t\t\tif (pkt_flags & PKT_RX_FDIR) {\n+#ifdef RTE_LIBRTE_I40E_16BYTE_RX_DESC\n+\t\t\t\tif (((qword1 >> I40E_RX_DESC_STATUS_FLTSTAT_SHIFT) &\n+\t\t\t\t\t\tI40E_RX_DESC_FLTSTAT_RSS_HASH) ==\n+\t\t\t\t\t\tI40E_RX_DESC_FLTSTAT_RSV_FD_ID)\n+\t\t\t\t\tmb->pkt.hash.fdir.id = (uint16_t)\n+\t\t\t\t\t\trte_le_to_cpu_32(rxdp[j].wb.qword0.hi_dword.fd);\n+#else\n+\t\t\t\tif (((rxdp[j].wb.qword2.ext_status >>\n+\t\t\t\t\tI40E_RX_DESC_EXT_STATUS_FLEXBH_SHIFT) &\n+\t\t\t\t\t0x03) == 0x01)\n+\t\t\t\t\tmb->pkt.hash.fdir.id = (uint16_t)\n+\t\t\t\t\t\trte_le_to_cpu_32(rxdp[j].wb.qword3.hi_dword.fd_id);\n+#endif\n+\t\t\t}\n \t\t}\n \n \t\tfor (j = 0; j < I40E_LOOK_AHEAD; j++)\n@@ -864,6 +883,20 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \t\tif (pkt_flags & PKT_RX_RSS_HASH)\n \t\t\trxm->pkt.hash.rss =\n \t\t\t\trte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss);\n+\t\tif (pkt_flags & PKT_RX_FDIR) {\n+#ifdef RTE_LIBRTE_I40E_16BYTE_RX_DESC\n+\t\t\tif (((qword1 >> I40E_RX_DESC_STATUS_FLTSTAT_SHIFT) &\n+\t\t\t\t\tI40E_RX_DESC_FLTSTAT_RSS_HASH) ==\n+\t\t\t\t\tI40E_RX_DESC_FLTSTAT_RSV_FD_ID)\n+\t\t\t\trxm->pkt.hash.fdir.id = (uint16_t)\n+\t\t\t\t\trte_le_to_cpu_32(rxd.wb.qword0.hi_dword.fd);\n+#else\n+\t\t\tif (((rxd.wb.qword2.ext_status >> I40E_RX_DESC_EXT_STATUS_FLEXBH_SHIFT) &\n+\t\t\t\t0x03) == 0x01)\n+\t\t\t\trxm->pkt.hash.fdir.id = (uint16_t)\n+\t\t\t\t\trte_le_to_cpu_32(rxd.wb.qword3.hi_dword.fd_id);\n+#endif\n+\t\t}\n \n \t\trx_pkts[nb_rx++] = rxm;\n \t}\n@@ -1017,6 +1050,20 @@ i40e_recv_scattered_pkts(void *rx_queue,\n \t\tif (pkt_flags & PKT_RX_RSS_HASH)\n \t\t\trxm->pkt.hash.rss =\n \t\t\t\trte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss);\n+\t\tif (pkt_flags & PKT_RX_FDIR) {\n+#ifdef RTE_LIBRTE_I40E_16BYTE_RX_DESC\n+\t\t\tif (((qword1 >> I40E_RX_DESC_STATUS_FLTSTAT_SHIFT) &\n+\t\t\t\t\tI40E_RX_DESC_FLTSTAT_RSS_HASH) ==\n+\t\t\t\t\tI40E_RX_DESC_FLTSTAT_RSV_FD_ID)\n+\t\t\t\trxm->pkt.hash.fdir.id = (uint16_t)\n+\t\t\t\t\trte_le_to_cpu_32(rxd.wb.qword0.hi_dword.fd);\n+#else\n+\t\t\tif (((rxd.wb.qword2.ext_status >> I40E_RX_DESC_EXT_STATUS_FLEXBH_SHIFT) &\n+\t\t\t\t0x03) == 0x01)\n+\t\t\t\trxm->pkt.hash.fdir.id = (uint16_t)\n+\t\t\t\t\trte_le_to_cpu_32(rxd.wb.qword3.hi_dword.fd_id);\n+#endif\n+\t\t}\n \n \t\t/* Prefetch data of first segment, if configured to do so. */\n \t\trte_prefetch0(first_seg->pkt.data);\n",
    "prefixes": [
        "dpdk-dev",
        "6/6"
    ]
}