Show a patch.

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

{
    "id": 248,
    "url": "http://patches.dpdk.org/api/patches/248/",
    "web_url": "http://patches.dpdk.org/patch/248/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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": "<1409105634-29980-7-git-send-email-jingjing.wu@intel.com>",
    "date": "2014-08-27T02:13:53",
    "name": "[dpdk-dev,v2,6/7] 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": "http://patches.dpdk.org/api/people/47/",
        "name": "Wu, Jingjing",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/patch/248/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/248/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/248/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<wujingji@shecgisg004.sh.intel.com>",
        "References": "<1409105634-29980-1-git-send-email-jingjing.wu@intel.com>",
        "X-Mailman-Version": "2.1.15",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,408,1406617200\"; d=\"scan'208\";a=\"563918983\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "X-List-Received-Date": "Wed, 27 Aug 2014 02:10:53 -0000",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1409105634-29980-7-git-send-email-jingjing.wu@intel.com>",
        "Received": [
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 60713B37A\n\tfor <dev@dpdk.org>; Wed, 27 Aug 2014 04:10:52 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga102.jf.intel.com with ESMTP; 26 Aug 2014 19:08:55 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 26 Aug 2014 19:14:44 -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 s7R2EdM9006238;\n\tWed, 27 Aug 2014 10:14:39 +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 s7R2EawR030132; Wed, 27 Aug 2014 10:14:38 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s7R2Eawl030128; \n\tWed, 27 Aug 2014 10:14:36 +0800"
        ],
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "Precedence": "list",
        "Date": "Wed, 27 Aug 2014 10:13:53 +0800",
        "Subject": "[dpdk-dev] [PATCH v2 6/7] i40e: support FD ID report and match\n\tcounter for i40e flow director",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "X-ExtLoop1": "1",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "In-Reply-To": "<1409105634-29980-1-git-send-email-jingjing.wu@intel.com>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "To": "dev@dpdk.org"
    },
    "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>\nReviewed-by: Helin Zhang <helin.zhang@intel.com>\nReviewed-by: Jing Chen <jing.d.chen@intel.com>\nReviewed-by: Jijiang Liu <jijiang.liu@intel.com>\n \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 10797ba..89b7eb7 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -1273,6 +1273,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@@ -1286,6 +1289,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@@ -1351,6 +1355,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 8bfbc8c..954385a 100644\n--- a/lib/librte_pmd_i40e/i40e_rxtx.c\n+++ b/lib/librte_pmd_i40e/i40e_rxtx.c\n@@ -107,6 +107,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@@ -623,7 +627,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@@ -861,6 +880,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@@ -1014,6 +1047,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",
        "v2",
        "6/7"
    ]
}