* [dpdk-dev] [PATCH] net/ice: add error cases with a wrong package
@ 2019-11-07 7:34 Simei Su
2019-11-07 10:27 ` Zhang, Qi Z
2019-11-08 6:44 ` Ye Xiaolong
0 siblings, 2 replies; 3+ messages in thread
From: Simei Su @ 2019-11-07 7:34 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, qiming.yang; +Cc: dev, simei.su
If the switch/fdir/hash module can't resolve a correct parser,
it should return error.
Fixes: 47d460d63233 ("net/ice: rework switch filter")
Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Signed-off-by: Simei Su <simei.su@intel.com>
---
drivers/net/ice/ice_fdir_filter.c | 4 +++-
drivers/net/ice/ice_hash.c | 2 ++
drivers/net/ice/ice_switch_filter.c | 4 +++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index fbbc41f..baaa7fa 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -863,8 +863,10 @@
if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
parser = &ice_fdir_parser_comms;
- else
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
parser = &ice_fdir_parser_os;
+ else
+ return -EINVAL;
return ice_register_parser(parser, ad);
}
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 3381b45..8dc3146 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -242,6 +242,8 @@ struct ice_hash_match_type ice_hash_type_list[] = {
parser = &ice_hash_parser_os;
else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
parser = &ice_hash_parser_comms;
+ else
+ return -EINVAL;
return ice_register_parser(parser, ad);
}
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 4be87c2..2406102 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1122,8 +1122,10 @@ struct sw_meta {
if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
dist_parser = &ice_switch_dist_parser_comms;
- else
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
dist_parser = &ice_switch_dist_parser_os;
+ else
+ return -EINVAL;
if (ad->devargs.pipe_mode_support)
ret = ice_register_parser(perm_parser, ad);
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ice: add error cases with a wrong package
2019-11-07 7:34 [dpdk-dev] [PATCH] net/ice: add error cases with a wrong package Simei Su
@ 2019-11-07 10:27 ` Zhang, Qi Z
2019-11-08 6:44 ` Ye Xiaolong
1 sibling, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2019-11-07 10:27 UTC (permalink / raw)
To: Su, Simei, Ye, Xiaolong, Yang, Qiming; +Cc: dev
> -----Original Message-----
> From: Su, Simei <simei.su@intel.com>
> Sent: Thursday, November 7, 2019 3:35 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>;
> Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Su, Simei <simei.su@intel.com>
> Subject: [PATCH] net/ice: add error cases with a wrong package
>
> If the switch/fdir/hash module can't resolve a correct parser, it should return
> error.
>
> Fixes: 47d460d63233 ("net/ice: rework switch filter")
> Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
> Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
>
> Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ice: add error cases with a wrong package
2019-11-07 7:34 [dpdk-dev] [PATCH] net/ice: add error cases with a wrong package Simei Su
2019-11-07 10:27 ` Zhang, Qi Z
@ 2019-11-08 6:44 ` Ye Xiaolong
1 sibling, 0 replies; 3+ messages in thread
From: Ye Xiaolong @ 2019-11-08 6:44 UTC (permalink / raw)
To: Simei Su; +Cc: qi.z.zhang, qiming.yang, dev
On 11/07, Simei Su wrote:
>If the switch/fdir/hash module can't resolve a correct parser,
>it should return error.
>
>Fixes: 47d460d63233 ("net/ice: rework switch filter")
>Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
>Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
>
>Signed-off-by: Simei Su <simei.su@intel.com>
>---
> drivers/net/ice/ice_fdir_filter.c | 4 +++-
> drivers/net/ice/ice_hash.c | 2 ++
> drivers/net/ice/ice_switch_filter.c | 4 +++-
> 3 files changed, 8 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
>index fbbc41f..baaa7fa 100644
>--- a/drivers/net/ice/ice_fdir_filter.c
>+++ b/drivers/net/ice/ice_fdir_filter.c
>@@ -863,8 +863,10 @@
>
> if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
> parser = &ice_fdir_parser_comms;
>- else
>+ else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
> parser = &ice_fdir_parser_os;
>+ else
>+ return -EINVAL;
>
> return ice_register_parser(parser, ad);
> }
>diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
>index 3381b45..8dc3146 100644
>--- a/drivers/net/ice/ice_hash.c
>+++ b/drivers/net/ice/ice_hash.c
>@@ -242,6 +242,8 @@ struct ice_hash_match_type ice_hash_type_list[] = {
> parser = &ice_hash_parser_os;
> else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
> parser = &ice_hash_parser_comms;
>+ else
>+ return -EINVAL;
>
> return ice_register_parser(parser, ad);
> }
>diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
>index 4be87c2..2406102 100644
>--- a/drivers/net/ice/ice_switch_filter.c
>+++ b/drivers/net/ice/ice_switch_filter.c
>@@ -1122,8 +1122,10 @@ struct sw_meta {
>
> if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
> dist_parser = &ice_switch_dist_parser_comms;
>- else
>+ else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
> dist_parser = &ice_switch_dist_parser_os;
>+ else
>+ return -EINVAL;
>
> if (ad->devargs.pipe_mode_support)
> ret = ice_register_parser(perm_parser, ad);
>--
>1.8.3.1
>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Applied to dpdk-next-net-intel. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-08 6:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07 7:34 [dpdk-dev] [PATCH] net/ice: add error cases with a wrong package Simei Su
2019-11-07 10:27 ` Zhang, Qi Z
2019-11-08 6:44 ` Ye Xiaolong
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).