get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1045,
    "url": "http://patches.dpdk.org/api/patches/1045/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1414654006-7472-15-git-send-email-jingjing.wu@intel.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": "<1414654006-7472-15-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1414654006-7472-15-git-send-email-jingjing.wu@intel.com",
    "date": "2014-10-30T07:26:39",
    "name": "[dpdk-dev,v5,14/21] i40e: implement operation to flush flow director table",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3b58a6366efa204eed754589a58dadf526806b87",
    "submitter": {
        "id": 47,
        "url": "http://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1414654006-7472-15-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/1045/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/1045/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 6C06D7F2D;\n\tThu, 30 Oct 2014 08:19:17 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 833177F34\n\tfor <dev@dpdk.org>; Thu, 30 Oct 2014 08:18:39 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga102.jf.intel.com with ESMTP; 30 Oct 2014 00:26:09 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 30 Oct 2014 00:27:32 -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 s9U7RU7k008089;\n\tThu, 30 Oct 2014 15:27:30 +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 s9U7RSwA007965; Thu, 30 Oct 2014 15:27:30 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s9U7RSkU007961; \n\tThu, 30 Oct 2014 15:27:28 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.07,284,1413270000\"; d=\"scan'208\";a=\"598845739\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 30 Oct 2014 15:26:39 +0800",
        "Message-Id": "<1414654006-7472-15-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1414654006-7472-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1413939687-11177-1-git-send-email-jingjing.wu@intel.com>\n\t<1414654006-7472-1-git-send-email-jingjing.wu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v5 14/21] i40e: implement operation to flush flow\n\tdirector table",
        "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": "Implement operation to flush flow director table\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n lib/librte_pmd_i40e/i40e_fdir.c | 47 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 47 insertions(+)",
    "diff": "diff --git a/lib/librte_pmd_i40e/i40e_fdir.c b/lib/librte_pmd_i40e/i40e_fdir.c\nindex 85df220..f59eb24 100644\n--- a/lib/librte_pmd_i40e/i40e_fdir.c\n+++ b/lib/librte_pmd_i40e/i40e_fdir.c\n@@ -73,6 +73,10 @@\n #define I40E_FDIR_WAIT_COUNT       10\n #define I40E_FDIR_WAIT_INTERVAL_US 1000\n \n+/* Wait count and interval for fdir filter flush */\n+#define I40E_FDIR_FLUSH_RETRY       50\n+#define I40E_FDIR_FLUSH_INTERVAL_MS 5\n+\n #define I40E_COUNTER_PF           2\n /* Statistic counter index for one pf */\n #define I40E_COUNTER_INDEX_FDIR(pf_id)   (0 + (pf_id) * I40E_COUNTER_PF)\n@@ -89,6 +93,7 @@ static int i40e_fdir_filter_programming(struct i40e_pf *pf,\n \t\t\tenum i40e_filter_pctype pctype,\n \t\t\tstruct rte_eth_fdir_filter *filter,\n \t\t\tbool add);\n+static int i40e_fdir_flush(struct i40e_pf *pf);\n static void i40e_fdir_info_get(struct i40e_pf *pf,\n \t\t\t   struct rte_eth_fdir_info *fdir);\n \n@@ -876,6 +881,45 @@ i40e_fdir_filter_programming(struct i40e_pf *pf,\n }\n \n /*\n+ * i40e_fdir_flush - clear all filters of Flow Director table\n+ * @pf: board private structure\n+ */\n+static int\n+i40e_fdir_flush(struct i40e_pf *pf)\n+{\n+\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n+\tuint32_t reg;\n+\tuint16_t guarant_cnt, best_cnt;\n+\tint i;\n+\n+\tI40E_WRITE_REG(hw, I40E_PFQF_CTL_1, I40E_PFQF_CTL_1_CLEARFDTABLE_MASK);\n+\tI40E_WRITE_FLUSH(hw);\n+\n+\tfor (i = 0; i < I40E_FDIR_FLUSH_RETRY; i++) {\n+\t\trte_delay_ms(I40E_FDIR_FLUSH_INTERVAL_MS);\n+\t\treg = I40E_READ_REG(hw, I40E_PFQF_CTL_1);\n+\t\tif (!(reg & I40E_PFQF_CTL_1_CLEARFDTABLE_MASK))\n+\t\t\tbreak;\n+\t}\n+\tif (i >= I40E_FDIR_FLUSH_RETRY) {\n+\t\tPMD_DRV_LOG(ERR, \"FD table did not flush, may need more time.\");\n+\t\treturn -ETIMEDOUT;\n+\t}\n+\tguarant_cnt = (uint16_t)((I40E_READ_REG(hw, I40E_PFQF_FDSTAT) &\n+\t\t\t\tI40E_PFQF_FDSTAT_GUARANT_CNT_MASK) >>\n+\t\t\t\tI40E_PFQF_FDSTAT_GUARANT_CNT_SHIFT);\n+\tbest_cnt = (uint16_t)((I40E_READ_REG(hw, I40E_PFQF_FDSTAT) &\n+\t\t\t\tI40E_PFQF_FDSTAT_BEST_CNT_MASK) >>\n+\t\t\t\tI40E_PFQF_FDSTAT_BEST_CNT_SHIFT);\n+\tif (guarant_cnt != 0 || best_cnt != 0) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to flush FD table.\");\n+\t\treturn -ENOSYS;\n+\t} else\n+\t\tPMD_DRV_LOG(INFO, \"FD table Flush success.\");\n+\treturn 0;\n+}\n+\n+/*\n  * i40e_fdir_info_get - get information of Flow Director\n  * @pf: ethernet device to get info from\n  * @fdir: a pointer to a structure of type *rte_eth_fdir_info* to be filled with\n@@ -934,6 +978,9 @@ i40e_fdir_ctrl_func(struct i40e_pf *pf, enum rte_filter_op filter_op, void *arg)\n \t\t\t(struct rte_eth_fdir_filter *)arg,\n \t\t\tFALSE);\n \t\tbreak;\n+\tcase RTE_ETH_FILTER_FLUSH:\n+\t\tret = i40e_fdir_flush(pf);\n+\t\tbreak;\n \tcase RTE_ETH_FILTER_INFO:\n \t\ti40e_fdir_info_get(pf, (struct rte_eth_fdir_info *)arg);\n \t\tbreak;\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "14/21"
    ]
}