* [PATCH] net/ice: fix pointer of the meta data
@ 2021-11-12 5:25 Alvin Zhang
2021-11-12 5:34 ` [PATCH v2] " Alvin Zhang
0 siblings, 1 reply; 3+ messages in thread
From: Alvin Zhang @ 2021-11-12 5:25 UTC (permalink / raw)
To: qi.z.zhang; +Cc: dev, Alvin Zhang, stable
This patch fixes coverity issue by directly passing the address
of the meter data to lower function.
Coverity issue: 373867
Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
drivers/net/ice/ice_hash.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 4b682a4..afbb357 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -1055,10 +1055,9 @@ struct rss_attr_type {
static int
ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item,
const struct rte_flow_action actions[],
- uint64_t pattern_hint, void **meta,
+ uint64_t pattern_hint, struct ice_rss_meta *rss_meta,
struct rte_flow_error *error)
{
- struct ice_rss_meta *rss_meta = (struct ice_rss_meta *)*meta;
struct ice_rss_hash_cfg *cfg = pattern_match_item->meta;
enum rte_flow_action_type action_type;
const struct rte_flow_action_rss *rss;
@@ -1196,7 +1195,7 @@ struct rss_attr_type {
/* Check rss action. */
ret = ice_hash_parse_action(pattern_match_item, actions, phint,
- (void **)&rss_meta_ptr, error);
+ rss_meta_ptr, error);
error:
if (!ret && meta)
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] net/ice: fix pointer of the meta data
2021-11-12 5:25 [PATCH] net/ice: fix pointer of the meta data Alvin Zhang
@ 2021-11-12 5:34 ` Alvin Zhang
2021-11-12 5:44 ` Zhang, Qi Z
0 siblings, 1 reply; 3+ messages in thread
From: Alvin Zhang @ 2021-11-12 5:34 UTC (permalink / raw)
To: qi.z.zhang; +Cc: dev, Alvin Zhang, stable
This patch fixes coverity issue by directly passing the address
of the meta data to subfunction.
Coverity issue: 373867
Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
drivers/net/ice/ice_hash.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 4b682a4..afbb357 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -1055,10 +1055,9 @@ struct rss_attr_type {
static int
ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item,
const struct rte_flow_action actions[],
- uint64_t pattern_hint, void **meta,
+ uint64_t pattern_hint, struct ice_rss_meta *rss_meta,
struct rte_flow_error *error)
{
- struct ice_rss_meta *rss_meta = (struct ice_rss_meta *)*meta;
struct ice_rss_hash_cfg *cfg = pattern_match_item->meta;
enum rte_flow_action_type action_type;
const struct rte_flow_action_rss *rss;
@@ -1196,7 +1195,7 @@ struct rss_attr_type {
/* Check rss action. */
ret = ice_hash_parse_action(pattern_match_item, actions, phint,
- (void **)&rss_meta_ptr, error);
+ rss_meta_ptr, error);
error:
if (!ret && meta)
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v2] net/ice: fix pointer of the meta data
2021-11-12 5:34 ` [PATCH v2] " Alvin Zhang
@ 2021-11-12 5:44 ` Zhang, Qi Z
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2021-11-12 5:44 UTC (permalink / raw)
To: Zhang, AlvinX; +Cc: dev, stable
> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang@intel.com>
> Sent: Friday, November 12, 2021 1:34 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/ice: fix pointer of the meta data
>
> This patch fixes coverity issue by directly passing the address of the meta data
> to subfunction.
>
> Coverity issue: 373867
>
> Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
> Cc: stable@dpdk.org
>
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-12 5:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 5:25 [PATCH] net/ice: fix pointer of the meta data Alvin Zhang
2021-11-12 5:34 ` [PATCH v2] " Alvin Zhang
2021-11-12 5:44 ` 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).