* Re: [infiniband:for-next 41/47] drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3: warning: case value '7' not in enumerated type 'enum qp_transition'
[not found] ` <53882b5a.UAE9BgmHCPuDMdrw%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2014-05-30 22:43 ` Roland Dreier
[not found] ` <CAL1RGDXoVByoFadRiH7iRxWj9AdShEJtvpoj_5uNhkudGrwJPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Roland Dreier @ 2014-05-30 22:43 UTC (permalink / raw)
To: kbuild test robot
Cc: Jack Morgenstein, Or Gerlitz, kbuild-all-JC7UmRfGjtg,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Thu, May 29, 2014 at 11:55 PM, kbuild test robot
<fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git for-next
> head: 73b878af35148015273fb09b4a4af80c770ff763
> commit: 99ec41d0a48cb6d14af25765f9449762f9d101f6 [41/47] mlx4: Add infrastructure for selecting VFs to enable QP0 via MLX proxy QPs
> config: x86_64-rhel (attached as .config)
>
> All warnings:
>
> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'verify_qp_parameters':
>>> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3: warning: case value '7' not in enumerated type 'enum qp_transition' [-Wswitch]
> case MLX4_QP_ST_MLX:
> ^
>
> vim +2875 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
>
> 2859 num_gids = mlx4_get_slave_num_gids(dev, slave, port);
> 2860 else
> 2861 num_gids = 1;
> 2862 if (qp_ctx->pri_path.mgid_index >= num_gids)
> 2863 return -EINVAL;
> 2864 }
> 2865 if (optpar & MLX4_QP_OPTPAR_ALT_ADDR_PATH) {
> 2866 port = (qp_ctx->alt_path.sched_queue >> 6 & 1) + 1;
> 2867 if (dev->caps.port_mask[port] != MLX4_PORT_TYPE_IB)
> 2868 num_gids = mlx4_get_slave_num_gids(dev, slave, port);
> 2869 else
> 2870 num_gids = 1;
> 2871 if (qp_ctx->alt_path.mgid_index >= num_gids)
> 2872 return -EINVAL;
> 2873 }
> 2874 break;
>> 2875 case MLX4_QP_ST_MLX:
> 2876 qpn = vhcr->in_modifier & 0x7fffff;
> 2877 port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1;
> 2878 if (transition == QP_TRANS_INIT2RTR &&
> 2879 slave != mlx4_master_func_num(dev) &&
> 2880 mlx4_is_qp_reserved(dev, qpn) &&
> 2881 !mlx4_vf_smi_enabled(dev, slave, port)) {
> 2882 /* only enabled VFs may create MLX proxy QPs */
> 2883 mlx4_err(dev, "%s: unprivileged slave %d attempting to create an MLX proxy special QP on port %d\n",
Looks like this is actually a bug... assuming you guys agree the patch
is correct, I'll add the following:
commit 165cb465f73c (HEAD, mlx4)
Author: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Date: Fri May 30 15:38:58 2014
mlx4_core: Move handling of MLX4_QP_ST_MLX to proper switch statement
The handling of MLX4_QP_ST_MLX in verify_qp_parameters() was
accidentally put inside the inner switch statement (that handles which
transition of RC/UC/XRC QPs is happening). Fix this by moving the case
to the outer switch statement.
The compiler pointed this out with:
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In
function 'verify_qp_parameters':
>> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3:
warning: case value '7' not in enumerated type 'enum qp_transition'
[-Wswitch]
case MLX4_QP_ST_MLX:
Reported-by: kbuild test robot <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Fixes: 99ec41d0a48c ("mlx4: Add infrastructure for selecting VFs
to enable QP0 via MLX proxy QPs")
Signed-off-by: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index ad98162a8d79..10db83ee0e58 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -2872,25 +2872,25 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
return -EINVAL;
}
break;
- case MLX4_QP_ST_MLX:
- qpn = vhcr->in_modifier & 0x7fffff;
- port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1;
- if (transition == QP_TRANS_INIT2RTR &&
- slave != mlx4_master_func_num(dev) &&
- mlx4_is_qp_reserved(dev, qpn) &&
- !mlx4_vf_smi_enabled(dev, slave, port)) {
- /* only enabled VFs may create MLX proxy QPs */
- mlx4_err(dev, "%s: unprivileged slave
%d attempting to create an MLX proxy special QP on port %d\n",
- __func__, slave, port);
- return -EPERM;
- }
- break;
-
default:
break;
}
+ break;
+ case MLX4_QP_ST_MLX:
+ qpn = vhcr->in_modifier & 0x7fffff;
+ port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1;
+ if (transition == QP_TRANS_INIT2RTR &&
+ slave != mlx4_master_func_num(dev) &&
+ mlx4_is_qp_reserved(dev, qpn) &&
+ !mlx4_vf_smi_enabled(dev, slave, port)) {
+ /* only enabled VFs may create MLX proxy QPs */
+ mlx4_err(dev, "%s: unprivileged slave %d
attempting to create an MLX proxy special QP on port %d\n",
+ __func__, slave, port);
+ return -EPERM;
+ }
break;
+
default:
break;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [infiniband:for-next 41/47] drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3: warning: case value '7' not in enumerated type 'enum qp_transition'
[not found] ` <CAL1RGDXoVByoFadRiH7iRxWj9AdShEJtvpoj_5uNhkudGrwJPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-06-01 7:25 ` Jack Morgenstein
0 siblings, 0 replies; 2+ messages in thread
From: Jack Morgenstein @ 2014-06-01 7:25 UTC (permalink / raw)
To: Roland Dreier
Cc: kbuild test robot, Or Gerlitz, kbuild-all-JC7UmRfGjtg,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Fri, 30 May 2014 15:43:39 -0700
Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org> wrote:
> Looks like this is actually a bug... assuming you guys agree the patch
> is correct, I'll add the following:
>
> commit 165cb465f73c (HEAD, mlx4)
> Author: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
> Date: Fri May 30 15:38:58 2014
>
> mlx4_core: Move handling of MLX4_QP_ST_MLX to proper switch
> statement
>
> The handling of MLX4_QP_ST_MLX in verify_qp_parameters() was
> accidentally put inside the inner switch statement (that handles
> which transition of RC/UC/XRC QPs is happening). Fix this by moving
> the case to the outer switch statement.
>
> The compiler pointed this out with:
>
> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In
> function 'verify_qp_parameters':
> >> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3:
> warning: case value '7' not in enumerated type 'enum qp_transition'
> [-Wswitch]
> case MLX4_QP_ST_MLX:
>
> Reported-by: kbuild test robot <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Fixes: 99ec41d0a48c ("mlx4: Add infrastructure for selecting VFs
> to enable QP0 via MLX proxy QPs")
> Signed-off-by: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Acked-by: Jack Morgenstein <jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
----
Thanks, Roland! your fix is exactly right!
-Jack
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-01 7:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <53882b5a.UAE9BgmHCPuDMdrw%fengguang.wu@intel.com>
[not found] ` <53882b5a.UAE9BgmHCPuDMdrw%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-05-30 22:43 ` [infiniband:for-next 41/47] drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3: warning: case value '7' not in enumerated type 'enum qp_transition' Roland Dreier
[not found] ` <CAL1RGDXoVByoFadRiH7iRxWj9AdShEJtvpoj_5uNhkudGrwJPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-01 7:25 ` Jack Morgenstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox