Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/8505/?format=api
https://patches.dpdk.org/api/patches/8505/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446308653-2378-3-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": "<1446308653-2378-3-git-send-email-jingjing.wu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1446308653-2378-3-git-send-email-jingjing.wu@intel.com", "date": "2015-10-31T16:24:12", "name": "[dpdk-dev,v3,2/3] i40e: extend flow diretcor to support filtering in VFs", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "aa7a34a8db826313e106d21bcceb0dcc2b93ebb1", "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/1446308653-2378-3-git-send-email-jingjing.wu@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/8505/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/8505/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 C0F725A95;\n\tSat, 31 Oct 2015 17:24:39 +0100 (CET)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 6E145374D\n\tfor <dev@dpdk.org>; Sat, 31 Oct 2015 17:24:38 +0100 (CET)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga102.fm.intel.com with ESMTP; 31 Oct 2015 09:24:24 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 31 Oct 2015 09:24:24 -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 t9VGOMq8022099;\n\tSun, 1 Nov 2015 00:24:22 +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 t9VGOJbE002426; Sun, 1 Nov 2015 00:24:21 +0800", "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9VGOJd6002422; \n\tSun, 1 Nov 2015 00:24:19 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.20,224,1444719600\"; d=\"scan'208\";a=\"823870867\"", "From": "Jingjing Wu <jingjing.wu@intel.com>", "To": "dev@dpdk.org", "Date": "Sun, 1 Nov 2015 00:24:12 +0800", "Message-Id": "<1446308653-2378-3-git-send-email-jingjing.wu@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1446308653-2378-1-git-send-email-jingjing.wu@intel.com>", "References": "<1446021688-17544-1-git-send-email-jingjing.wu@intel.com>\n\t<1446308653-2378-1-git-send-email-jingjing.wu@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 2/3] i40e: extend flow diretcor to support\n\tfiltering in VFs", "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": "This patch extends flow director to filtering in VFs.\nIt also corrects to disable interrupt on queues when stop device.\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n doc/guides/rel_notes/release_2_2.rst | 2 ++\n drivers/net/i40e/i40e_ethdev.c | 4 ++--\n drivers/net/i40e/i40e_fdir.c | 15 ++++++++++++---\n 3 files changed, 16 insertions(+), 5 deletions(-)", "diff": "diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst\nindex 8ca3872..908be5c 100644\n--- a/doc/guides/rel_notes/release_2_2.rst\n+++ b/doc/guides/rel_notes/release_2_2.rst\n@@ -22,6 +22,8 @@ New Features\n \n * **Added i40e flow control support.**\n \n+* **Added i40e flow director support in VF.**\n+\n * **Added fm10k TSO support for both PF and VF.**\n \n * **New NIC Boulder Rapid support.**\ndiff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 016838a..b69c689 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -1095,8 +1095,8 @@ i40e_dev_stop(struct rte_eth_dev *dev)\n \t}\n \n \tif (pf->fdir.fdir_vsi) {\n-\t\ti40e_vsi_queues_bind_intr(pf->fdir.fdir_vsi);\n-\t\ti40e_vsi_enable_queues_intr(pf->fdir.fdir_vsi);\n+\t\ti40e_vsi_queues_unbind_intr(pf->fdir.fdir_vsi);\n+\t\ti40e_vsi_disable_queues_intr(pf->fdir.fdir_vsi);\n \t}\n \t/* Clear all queues and release memory */\n \ti40e_dev_clear_queues(dev);\ndiff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c\nindex c9ce98f..73a69c9 100644\n--- a/drivers/net/i40e/i40e_fdir.c\n+++ b/drivers/net/i40e/i40e_fdir.c\n@@ -1022,6 +1022,11 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,\n \t\tPMD_DRV_LOG(ERR, \"Invalid queue ID\");\n \t\treturn -EINVAL;\n \t}\n+\tif (filter->input.flow_ext.is_vf &&\n+\t\tfilter->input.flow_ext.dst_id >= pf->vf_num) {\n+\t\tPMD_DRV_LOG(ERR, \"Invalid VF ID\");\n+\t\treturn -EINVAL;\n+\t}\n \n \tmemset(pkt, 0, I40E_FDIR_PKT_LEN);\n \n@@ -1061,7 +1066,7 @@ i40e_fdir_filter_programming(struct i40e_pf *pf,\n \tvolatile struct i40e_tx_desc *txdp;\n \tvolatile struct i40e_filter_program_desc *fdirdp;\n \tuint32_t td_cmd;\n-\tuint16_t i;\n+\tuint16_t vsi_id, i;\n \tuint8_t dest;\n \n \tPMD_DRV_LOG(INFO, \"filling filter programming descriptor.\");\n@@ -1083,9 +1088,13 @@ i40e_fdir_filter_programming(struct i40e_pf *pf,\n \t\t\t\t\t I40E_TXD_FLTR_QW0_PCTYPE_SHIFT) &\n \t\t\t\t\t I40E_TXD_FLTR_QW0_PCTYPE_MASK);\n \n-\t/* Use LAN VSI Id by default */\n+\tif (filter->input.flow_ext.is_vf)\n+\t\tvsi_id = pf->vfs[filter->input.flow_ext.dst_id].vsi->vsi_id;\n+\telse\n+\t\t/* Use LAN VSI Id by default */\n+\t\tvsi_id = pf->main_vsi->vsi_id;\n \tfdirdp->qindex_flex_ptype_vsi |=\n-\t\trte_cpu_to_le_32((pf->main_vsi->vsi_id <<\n+\t\trte_cpu_to_le_32((vsi_id <<\n \t\t\t\t I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT) &\n \t\t\t\t I40E_TXD_FLTR_QW0_DEST_VSI_MASK);\n \n", "prefixes": [ "dpdk-dev", "v3", "2/3" ] }{ "id": 8505, "url": "