Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/549/?format=api
https://patches.dpdk.org/api/patches/549/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1411711418-12881-12-git-send-email-jingjing.wu@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": "<1411711418-12881-12-git-send-email-jingjing.wu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1411711418-12881-12-git-send-email-jingjing.wu@intel.com", "date": "2014-09-26T06:03:29", "name": "[dpdk-dev,v3,11/20] i40e: implement operations to get fdir info", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1608a3ddde40a3d90386ea8732003efe0dd451c7", "submitter": { "id": 47, "url": "https://patches.dpdk.org/api/people/47/?format=api", "name": "Jingjing Wu", "email": "jingjing.wu@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1411711418-12881-12-git-send-email-jingjing.wu@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/549/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/549/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 5E77C7DFF;\n\tFri, 26 Sep 2014 07:57:56 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 2AF577E1C\n\tfor <dev@dpdk.org>; Fri, 26 Sep 2014 07:57:48 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP; 25 Sep 2014 23:04:09 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 25 Sep 2014 22:58:06 -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 s8Q646sA029240;\n\tFri, 26 Sep 2014 14:04:06 +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 s8Q644R5012993; Fri, 26 Sep 2014 14:04:06 +0800", "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8Q644L5012989; \n\tFri, 26 Sep 2014 14:04:04 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"4.97,862,1389772800\"; d=\"scan'208\";a=\"391863690\"", "From": "Jingjing Wu <jingjing.wu@intel.com>", "To": "dev@dpdk.org", "Date": "Fri, 26 Sep 2014 14:03:29 +0800", "Message-Id": "<1411711418-12881-12-git-send-email-jingjing.wu@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1411711418-12881-1-git-send-email-jingjing.wu@intel.com>", "References": "<1411711418-12881-1-git-send-email-jingjing.wu@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 11/20] i40e: implement operations to get fdir\n\tinfo", "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 get flow director information in i40e pmd driver\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\nAcked-by: Chen Jing D(Mark) <jing.d.chen@intel.com>\nAcked-by: Helin Zhang <helin.zhang@intel.com>\n---\n lib/librte_pmd_i40e/i40e_fdir.c | 34 ++++++++++++++++++++++++++++++++++\n 1 file changed, 34 insertions(+)", "diff": "diff --git a/lib/librte_pmd_i40e/i40e_fdir.c b/lib/librte_pmd_i40e/i40e_fdir.c\nindex 82645df..d6c1793 100644\n--- a/lib/librte_pmd_i40e/i40e_fdir.c\n+++ b/lib/librte_pmd_i40e/i40e_fdir.c\n@@ -92,6 +92,8 @@ 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 void i40e_fdir_info_get(struct i40e_pf *pf,\n+\t\t\t struct rte_eth_fdir_info *fdir);\n \n static int\n i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq)\n@@ -865,6 +867,35 @@ i40e_fdir_filter_programming(struct i40e_pf *pf,\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+ * the flow director information.\n+ */\n+static void\n+i40e_fdir_info_get(struct i40e_pf *pf, struct rte_eth_fdir_info *fdir)\n+{\n+\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n+\tuint32_t pfqf_ctl;\n+\n+\tpfqf_ctl = I40E_READ_REG(hw, I40E_PFQF_CTL_0);\n+\tfdir->mode = pfqf_ctl & I40E_PFQF_CTL_0_FD_ENA_MASK ? 1 : 0;\n+\tfdir->info_ext.guarant_spc =\n+\t\t(uint16_t)hw->func_caps.fd_filters_guaranteed;\n+\tfdir->info_ext.guarant_cnt =\n+\t\t(uint16_t)((I40E_READ_REG(hw, I40E_PFQF_FDSTAT) &\n+\t\t\t I40E_PFQF_FDSTAT_GUARANT_CNT_MASK) >>\n+\t\t\t I40E_PFQF_FDSTAT_GUARANT_CNT_SHIFT);\n+\tfdir->info_ext.best_spc =\n+\t\t(uint16_t)hw->func_caps.fd_filters_best_effort;\n+\tfdir->info_ext.best_cnt =\n+\t\t(uint16_t)((I40E_READ_REG(hw, I40E_PFQF_FDSTAT) &\n+\t\t\t I40E_PFQF_FDSTAT_BEST_CNT_MASK) >>\n+\t\t\t I40E_PFQF_FDSTAT_BEST_CNT_SHIFT);\n+\treturn;\n+}\n+\n+/*\n * i40e_fdir_ctrl_func - deal with all operations on flow director.\n * @pf: board private structure\n * @filter_op:operation will be taken.\n@@ -894,6 +925,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_OP_GET_INFO:\n+\t\ti40e_fdir_info_get(pf, (struct rte_eth_fdir_info *)arg);\n+\t\tbreak;\n \tdefault:\n \t\tPMD_DRV_LOG(ERR, \"unknown operation %u.\", filter_op);\n \t\tret = -EINVAL;\n", "prefixes": [ "dpdk-dev", "v3", "11/20" ] }{ "id": 549, "url": "