From: Alvin Zhang <alvinx.zhang@intel.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, Alvin Zhang <alvinx.zhang@intel.com>, stable@dpdk.org
Subject: [PATCH] net/ice: fix pointer of the meta data
Date: Fri, 12 Nov 2021 13:25:39 +0800 [thread overview]
Message-ID: <20211112052539.21316-1-alvinx.zhang@intel.com> (raw)
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
next reply other threads:[~2021-11-12 5:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 5:25 Alvin Zhang [this message]
2021-11-12 5:34 ` [PATCH v2] " Alvin Zhang
2021-11-12 5:44 ` Zhang, Qi Z
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211112052539.21316-1-alvinx.zhang@intel.com \
--to=alvinx.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).