From: Jingjing Wu <jingjing.wu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/4] i40e: extend flow diretcor to support filtering in VFs
Date: Tue, 22 Sep 2015 11:45:31 +0800 [thread overview]
Message-ID: <1442893533-32546-3-git-send-email-jingjing.wu@intel.com> (raw)
In-Reply-To: <1442893533-32546-1-git-send-email-jingjing.wu@intel.com>
This patch extends flow director to filtering in VFs.
It also corrects to disable interrupt on queues when stop device.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 4 ++--
drivers/net/i40e/i40e_fdir.c | 15 ++++++++++++---
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2dd9fdc..b3207e3 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1031,8 +1031,8 @@ i40e_dev_stop(struct rte_eth_dev *dev)
}
if (pf->fdir.fdir_vsi) {
- i40e_vsi_queues_bind_intr(pf->fdir.fdir_vsi);
- i40e_vsi_enable_queues_intr(pf->fdir.fdir_vsi);
+ i40e_vsi_queues_unbind_intr(pf->fdir.fdir_vsi);
+ i40e_vsi_disable_queues_intr(pf->fdir.fdir_vsi);
}
/* Clear all queues and release memory */
i40e_dev_clear_queues(dev);
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index c9ce98f..73a69c9 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1022,6 +1022,11 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR, "Invalid queue ID");
return -EINVAL;
}
+ if (filter->input.flow_ext.is_vf &&
+ filter->input.flow_ext.dst_id >= pf->vf_num) {
+ PMD_DRV_LOG(ERR, "Invalid VF ID");
+ return -EINVAL;
+ }
memset(pkt, 0, I40E_FDIR_PKT_LEN);
@@ -1061,7 +1066,7 @@ i40e_fdir_filter_programming(struct i40e_pf *pf,
volatile struct i40e_tx_desc *txdp;
volatile struct i40e_filter_program_desc *fdirdp;
uint32_t td_cmd;
- uint16_t i;
+ uint16_t vsi_id, i;
uint8_t dest;
PMD_DRV_LOG(INFO, "filling filter programming descriptor.");
@@ -1083,9 +1088,13 @@ i40e_fdir_filter_programming(struct i40e_pf *pf,
I40E_TXD_FLTR_QW0_PCTYPE_SHIFT) &
I40E_TXD_FLTR_QW0_PCTYPE_MASK);
- /* Use LAN VSI Id by default */
+ if (filter->input.flow_ext.is_vf)
+ vsi_id = pf->vfs[filter->input.flow_ext.dst_id].vsi->vsi_id;
+ else
+ /* Use LAN VSI Id by default */
+ vsi_id = pf->main_vsi->vsi_id;
fdirdp->qindex_flex_ptype_vsi |=
- rte_cpu_to_le_32((pf->main_vsi->vsi_id <<
+ rte_cpu_to_le_32((vsi_id <<
I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT) &
I40E_TXD_FLTR_QW0_DEST_VSI_MASK);
--
2.4.0
next prev parent reply other threads:[~2015-09-22 3:45 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 3:45 [dpdk-dev] [PATCH 0/4] extend flow director to support VF filtering in i40e driver Jingjing Wu
2015-09-22 3:45 ` [dpdk-dev] [PATCH 1/4] ethdev: extend struct to support flow director in VFs Jingjing Wu
2015-10-27 7:52 ` Zhang, Helin
2015-09-22 3:45 ` Jingjing Wu [this message]
2015-10-27 7:52 ` [dpdk-dev] [PATCH 2/4] i40e: extend flow diretcor to support filtering " Zhang, Helin
2015-09-22 3:45 ` [dpdk-dev] [PATCH 3/4] testpmd: extend commands Jingjing Wu
2015-10-27 7:53 ` Zhang, Helin
2015-09-22 3:45 ` [dpdk-dev] [PATCH 4/4] doc: extend commands in testpmd and remove related ABI deprecation Jingjing Wu
2015-10-27 7:54 ` Zhang, Helin
2015-10-27 9:35 ` Thomas Monjalon
2015-10-28 2:06 ` Wu, Jingjing
2015-10-28 8:41 ` [dpdk-dev] [PATCH v2 0/4] extend flow director to support VF filtering in i40e driver Jingjing Wu
2015-10-28 8:41 ` [dpdk-dev] [PATCH v2 1/4] ethdev: extend struct to support flow director in VFs Jingjing Wu
2015-10-28 8:41 ` [dpdk-dev] [PATCH v2 2/4] i40e: extend flow diretcor to support filtering " Jingjing Wu
2015-10-28 8:41 ` [dpdk-dev] [PATCH v2 3/4] testpmd: extend commands Jingjing Wu
2015-10-28 8:41 ` [dpdk-dev] [PATCH v2 4/4] doc: extend commands in testpmd and update release note Jingjing Wu
2015-10-30 7:42 ` [dpdk-dev] [PATCH v2 0/4] extend flow director to support VF filtering in i40e driver Zhang, Helin
2015-10-31 16:24 ` [dpdk-dev] [PATCH v3 0/3] " Jingjing Wu
2015-10-31 16:24 ` [dpdk-dev] [PATCH v3 1/3] ethdev: extend struct to support flow director in VFs Jingjing Wu
2015-11-01 14:27 ` Thomas Monjalon
2015-11-01 14:33 ` Wu, Jingjing
2015-11-01 14:55 ` Thomas Monjalon
2015-11-02 5:24 ` Wu, Jingjing
2015-10-31 16:24 ` [dpdk-dev] [PATCH v3 2/3] i40e: extend flow diretcor to support filtering " Jingjing Wu
2015-11-01 14:28 ` Thomas Monjalon
2015-10-31 16:24 ` [dpdk-dev] [PATCH v3 3/3] testpmd: extend commands Jingjing Wu
2015-11-01 14:45 ` Thomas Monjalon
2015-11-01 14:22 ` [dpdk-dev] [PATCH v3 0/3] extend flow director to support VF filtering in i40e driver Thomas Monjalon
2015-11-04 3:29 ` [dpdk-dev] [PATCH v4 0/3] extend flow drector " Jingjing Wu
2015-11-04 3:29 ` [dpdk-dev] [PATCH v4 1/3] ethdev: extend struct to support flow director in VFs Jingjing Wu
2015-11-04 3:29 ` [dpdk-dev] [PATCH v4 2/3] i40e: extend flow diretcor to support filtering " Jingjing Wu
2015-11-04 3:29 ` [dpdk-dev] [PATCH v4 3/3] testpmd: extend commands Jingjing Wu
2015-11-04 12:41 ` [dpdk-dev] [PATCH v4 0/3] extend flow drector to support VF filtering in i40e driver Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442893533-32546-3-git-send-email-jingjing.wu@intel.com \
--to=jingjing.wu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).