patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v1] net/iavf: fix RSS queue region size exceeds
@ 2020-11-11  6:42 Ting Xu
  2020-11-11  8:48 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Ting Xu @ 2020-11-11  6:42 UTC (permalink / raw)
  To: dev; +Cc: qi.z.zhang, beilei.xing, jingjing.wu, stable

When a rule is set to do RSS to redirect flows to a group of queues, the
queue region size should not be larger than the max RSS queue region
supported by HW. This patch added the step to check the queue region
size, and report failure if the size does not meet the requirement.

Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues")
Cc: stable@dpdk.org

Signed-off-by: Ting Xu <ting.xu@intel.com>
---
 drivers/net/iavf/iavf_fdir.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index f584e5624c..d683a468c1 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -256,6 +256,7 @@ iavf_fdir_parse_action_qregion(struct iavf_adapter *ad,
 			const struct rte_flow_action *act,
 			struct virtchnl_filter_action *filter_action)
 {
+	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
 	const struct rte_flow_action_rss *rss = act->conf;
 	uint32_t i;
 
@@ -300,6 +301,13 @@ iavf_fdir_parse_action_qregion(struct iavf_adapter *ad,
 		return -rte_errno;
 	}
 
+	if (rss->queue_num > vf->max_rss_qregion) {
+		rte_flow_error_set(error, EINVAL,
+				RTE_FLOW_ERROR_TYPE_ACTION, act,
+				"The region size cannot be large than the supported max RSS queue region");
+		return -rte_errno;
+	}
+
 	filter_action->act_conf.queue.index = rss->queue[0];
 	filter_action->act_conf.queue.region = rte_fls_u32(rss->queue_num) - 1;
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH v1] net/iavf: fix RSS queue region size exceeds
  2020-11-11  6:42 [dpdk-stable] [PATCH v1] net/iavf: fix RSS queue region size exceeds Ting Xu
@ 2020-11-11  8:48 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2020-11-11  8:48 UTC (permalink / raw)
  To: Xu, Ting, dev; +Cc: Xing, Beilei, Wu, Jingjing, stable



> -----Original Message-----
> From: Xu, Ting <ting.xu@intel.com>
> Sent: Wednesday, November 11, 2020 2:43 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> Wu, Jingjing <jingjing.wu@intel.com>; stable@dpdk.org
> Subject: [PATCH v1] net/iavf: fix RSS queue region size exceeds
> 
> When a rule is set to do RSS to redirect flows to a group of queues, the queue
> region size should not be larger than the max RSS queue region supported by
> HW. This patch added the step to check the queue region size, and report
> failure if the size does not meet the requirement.
> 
> Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ting Xu <ting.xu@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-11  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11  6:42 [dpdk-stable] [PATCH v1] net/iavf: fix RSS queue region size exceeds Ting Xu
2020-11-11  8:48 ` Zhang, Qi Z

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).