* [dpdk-dev] [PATCH] net/i40e: add invalid queue id checking for VF
@ 2017-07-14 6:41 Beilei Xing
2017-07-14 6:51 ` [dpdk-dev] [PATCH v2] net/i40e: add checking invalid VF queue id for FDIR Beilei Xing
0 siblings, 1 reply; 3+ messages in thread
From: Beilei Xing @ 2017-07-14 6:41 UTC (permalink / raw)
To: jingjing.wu; +Cc: dev
There's only invalid queue id checking for PF, this patch
adds invalid queue id checking for VF.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_flow.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 93ecee2..95af701 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2846,7 +2846,10 @@ i40e_flow_parse_fdir_action(struct rte_eth_dev *dev,
case RTE_FLOW_ACTION_TYPE_QUEUE:
act_q = (const struct rte_flow_action_queue *)act->conf;
filter->action.rx_queue = act_q->index;
- if (filter->action.rx_queue >= pf->dev_data->nb_rx_queues) {
+ if ((!filter->input.flow_ext.is_vf &&
+ filter->action.rx_queue >= pf->dev_data->nb_rx_queues) ||
+ (filter->input.flow_ext.is_vf &&
+ filter->action.rx_queue >= pf->vf_nb_qps)) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, act,
"Invalid queue ID for FDIR.");
--
2.5.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH v2] net/i40e: add checking invalid VF queue id for FDIR
2017-07-14 6:41 [dpdk-dev] [PATCH] net/i40e: add invalid queue id checking for VF Beilei Xing
@ 2017-07-14 6:51 ` Beilei Xing
2017-07-18 10:23 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Beilei Xing @ 2017-07-14 6:51 UTC (permalink / raw)
To: jingjing.wu; +Cc: dev
There's only invalid queue id checking for PF when creating FDIR
rules, this patch adds checking invalid queue id for VF.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
v2 changes:
- rework commit log.
drivers/net/i40e/i40e_flow.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 93ecee2..95af701 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2846,7 +2846,10 @@ i40e_flow_parse_fdir_action(struct rte_eth_dev *dev,
case RTE_FLOW_ACTION_TYPE_QUEUE:
act_q = (const struct rte_flow_action_queue *)act->conf;
filter->action.rx_queue = act_q->index;
- if (filter->action.rx_queue >= pf->dev_data->nb_rx_queues) {
+ if ((!filter->input.flow_ext.is_vf &&
+ filter->action.rx_queue >= pf->dev_data->nb_rx_queues) ||
+ (filter->input.flow_ext.is_vf &&
+ filter->action.rx_queue >= pf->vf_nb_qps)) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, act,
"Invalid queue ID for FDIR.");
--
2.5.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: add checking invalid VF queue id for FDIR
2017-07-14 6:51 ` [dpdk-dev] [PATCH v2] net/i40e: add checking invalid VF queue id for FDIR Beilei Xing
@ 2017-07-18 10:23 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-07-18 10:23 UTC (permalink / raw)
To: Beilei Xing, jingjing.wu; +Cc: dev
On 7/14/2017 7:51 AM, Beilei Xing wrote:
> There's only invalid queue id checking for PF when creating FDIR
> rules, this patch adds checking invalid queue id for VF.
>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-18 10:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-14 6:41 [dpdk-dev] [PATCH] net/i40e: add invalid queue id checking for VF Beilei Xing
2017-07-14 6:51 ` [dpdk-dev] [PATCH v2] net/i40e: add checking invalid VF queue id for FDIR Beilei Xing
2017-07-18 10:23 ` Ferruh Yigit
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).