[dpdk-dev] net/sfc: fix type of opaque pointer in perf profile handler

Message ID 1521873743-9393-1-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Andrew Rybchenko March 24, 2018, 6:42 a.m. UTC
  From: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>

The 'opaque' pointer in handler function is the last argument
of sfc_kvargs_process() function and it is pointer to the adapter
'evq_flags' that has a uint32_t type. So 'value' must be pointer
to uint32_t.

Fixes: c22d3c508e0c ("net/sfc: support parameter to choose performance profile")
Cc: stable@dpdk.org

Signed-off-by: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit March 27, 2018, 7:12 p.m. UTC | #1
On 3/24/2018 6:42 AM, Andrew Rybchenko wrote:
> From: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>
> 
> The 'opaque' pointer in handler function is the last argument
> of sfc_kvargs_process() function and it is pointer to the adapter
> 'evq_flags' that has a uint32_t type. So 'value' must be pointer
> to uint32_t.
> 
> Fixes: c22d3c508e0c ("net/sfc: support parameter to choose performance profile")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index 273a92c..8a5030b 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -821,7 +821,7 @@  static int
 sfc_kvarg_perf_profile_handler(__rte_unused const char *key,
 			       const char *value_str, void *opaque)
 {
-	uint64_t *value = opaque;
+	uint32_t *value = opaque;
 
 	if (strcasecmp(value_str, SFC_KVARG_PERF_PROFILE_THROUGHPUT) == 0)
 		*value = EFX_EVQ_FLAGS_TYPE_THROUGHPUT;