DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: ignore error when remove RSS rule
@ 2019-11-12 14:28 Qi Zhang
  2019-11-14  3:31 ` Ye Xiaolong
  0 siblings, 1 reply; 3+ messages in thread
From: Qi Zhang @ 2019-11-12 14:28 UTC (permalink / raw)
  To: qiming.yang; +Cc: simei.su, dev, xiaolong.ye, Qi Zhang

Currently, multiple rte_flow RSS rules may mapping to the same
hardware rule if a later rule is just for inputset change or symm
turn on/off. so after one of the rules be destroyed, we will
get error ICE_ERR_DOES_NOT_EXIST when destroying any other rules.
The patch simply fix this by ignore this error. A more sophistic
fix that remember the sequence and replay properly will be provided
in future.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_hash.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index d88434305..2e9c1bc67 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -536,7 +536,12 @@ ice_hash_destroy(struct ice_adapter *ad,
 		ret = ice_rem_rss_cfg(hw, vsi->idx,
 				filter_ptr->rss_cfg.hashed_flds,
 				filter_ptr->rss_cfg.packet_hdr);
-		if (ret) {
+		/* Fixme: Ignore the error if a rule does not exist.
+		 * Currently a rule for inputset change or symm turn on/off
+		 * will overwrite an exist rule, while application still
+		 * have 2 rte_flow handles.
+		 **/
+		if (ret && ret != ICE_ERR_DOES_NOT_EXIST) {
 			rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 					"rss flow destroy fail");
-- 
2.13.6


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

* Re: [dpdk-dev] [PATCH] net/ice: ignore error when remove RSS rule
  2019-11-12 14:28 [dpdk-dev] [PATCH] net/ice: ignore error when remove RSS rule Qi Zhang
@ 2019-11-14  3:31 ` Ye Xiaolong
  2019-11-14  4:29   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Ye Xiaolong @ 2019-11-14  3:31 UTC (permalink / raw)
  To: Qi Zhang; +Cc: qiming.yang, simei.su, dev

On 11/12, Qi Zhang wrote:
>Currently, multiple rte_flow RSS rules may mapping to the same

s/mapping/map

>hardware rule if a later rule is just for inputset change or symm
>turn on/off. so after one of the rules be destroyed, we will
>get error ICE_ERR_DOES_NOT_EXIST when destroying any other rules.

In this case, the hardware rule has been destroyed by the first rte_flow RSS
rule removal, right? Do we need a counter or similar to record how
may rte_flow RSS rules are linked to the hardware rule?

>The patch simply fix this by ignore this error. A more sophistic

s/fix/fixes

And I think you mean "sophisticated"?

>fix that remember the sequence and replay properly will be provided
>in future.
>
>Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
> drivers/net/ice/ice_hash.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
>index d88434305..2e9c1bc67 100644
>--- a/drivers/net/ice/ice_hash.c
>+++ b/drivers/net/ice/ice_hash.c
>@@ -536,7 +536,12 @@ ice_hash_destroy(struct ice_adapter *ad,
> 		ret = ice_rem_rss_cfg(hw, vsi->idx,
> 				filter_ptr->rss_cfg.hashed_flds,
> 				filter_ptr->rss_cfg.packet_hdr);
>-		if (ret) {
>+		/* Fixme: Ignore the error if a rule does not exist.
>+		 * Currently a rule for inputset change or symm turn on/off
>+		 * will overwrite an exist rule, while application still
>+		 * have 2 rte_flow handles.
>+		 **/
>+		if (ret && ret != ICE_ERR_DOES_NOT_EXIST) {

This patch can't be applied cleanly on top of latest dpdk-next-net-intel, please
help do a rebase.

Thanks,
Xiaolong

> 			rte_flow_error_set(error, EINVAL,
> 					RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
> 					"rss flow destroy fail");
>-- 
>2.13.6
>

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

* Re: [dpdk-dev] [PATCH] net/ice: ignore error when remove RSS rule
  2019-11-14  3:31 ` Ye Xiaolong
@ 2019-11-14  4:29   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2019-11-14  4:29 UTC (permalink / raw)
  To: Ye, Xiaolong; +Cc: Yang, Qiming, Su, Simei, dev



> -----Original Message-----
> From: Ye, Xiaolong <xiaolong.ye@intel.com>
> Sent: Thursday, November 14, 2019 11:31 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Yang, Qiming <qiming.yang@intel.com>; Su, Simei <simei.su@intel.com>;
> dev@dpdk.org
> Subject: Re: [PATCH] net/ice: ignore error when remove RSS rule
> 
> On 11/12, Qi Zhang wrote:
> >Currently, multiple rte_flow RSS rules may mapping to the same
> 
> s/mapping/map
> 
> >hardware rule if a later rule is just for inputset change or symm turn
> >on/off. so after one of the rules be destroyed, we will get error
> >ICE_ERR_DOES_NOT_EXIST when destroying any other rules.
> 
> In this case, the hardware rule has been destroyed by the first rte_flow RSS
> rule removal, right? Do we need a counter or similar to record how may
> rte_flow RSS rules are linked to the hardware rule?

Count does not make it better, since different delete sequence still goes to the same result which is not expected.
If B overwrite A, when B is deleted, we should rollback to A, but not just count--.since user expect B should not work at the moment,
Yes, current solution still has problem since if A is deleted first, B also does not work which is not expected.
Maybe simply prevent overwrite is a better way, since what we need is a API like a rte_flow_update, without it user need to destroy first then create.

> 
> >The patch simply fix this by ignore this error. A more sophistic
> 
> s/fix/fixes
> 
> And I think you mean "sophisticated"?
> 
> >fix that remember the sequence and replay properly will be provided in
> >future.
> >
> >Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
> >
> >Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> >---
> > drivers/net/ice/ice_hash.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
> >index d88434305..2e9c1bc67 100644
> >--- a/drivers/net/ice/ice_hash.c
> >+++ b/drivers/net/ice/ice_hash.c
> >@@ -536,7 +536,12 @@ ice_hash_destroy(struct ice_adapter *ad,
> > 		ret = ice_rem_rss_cfg(hw, vsi->idx,
> > 				filter_ptr->rss_cfg.hashed_flds,
> > 				filter_ptr->rss_cfg.packet_hdr);
> >-		if (ret) {
> >+		/* Fixme: Ignore the error if a rule does not exist.
> >+		 * Currently a rule for inputset change or symm turn on/off
> >+		 * will overwrite an exist rule, while application still
> >+		 * have 2 rte_flow handles.
> >+		 **/
> >+		if (ret && ret != ICE_ERR_DOES_NOT_EXIST) {
> 
> This patch can't be applied cleanly on top of latest dpdk-next-net-intel, please
> help do a rebase.

OK I will rebase and fix those typo.

Thanks
Qi
> 
> Thanks,
> Xiaolong
> 
> > 			rte_flow_error_set(error, EINVAL,
> > 					RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
> > 					"rss flow destroy fail");
> >--
> >2.13.6
> >

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

end of thread, other threads:[~2019-11-14  4:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 14:28 [dpdk-dev] [PATCH] net/ice: ignore error when remove RSS rule Qi Zhang
2019-11-14  3:31 ` Ye Xiaolong
2019-11-14  4:29   ` 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).