linux-next: build failure after merge of the rdma tree
Hi all,
After merging the rdma tree, today's linux-next build (x86_64 allmodconfig) failed like this:
ERROR: "mlx5_get_send_wqe" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined!
Caused by commit
34f4c9554d8b ("IB/mlx5: Use fragmented QP's buffer for in-kernel users")
mlx5_get_send_wqe() is still used in drivers/infiniband/hw/mlx5/cq.c and declared in drivers/infiniband/hw/mlx5/mlx5_ib.h ...
I have used the version of the rdma tree from next-20181203 for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 7 lines · Stephen Rothwell
Hi all,
After merging the rdma tree, today's linux-next build (
x86_64allmodconfig) failed like this:ERROR: "
mlx5_get_send_wqe" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined!
Quoted 8 lines
Caused by commit
34f4c9554d8b("IB/mlx5: Use fragmented QP's buffer for in-kernel users")
mlx5_get_send_wqe()is still used indrivers/infiniband/hw/mlx5/cq.cand declared indrivers/infiniband/hw/mlx5/mlx5_ib.h...I have used the version of the rdma tree from next-20181203 for today.
Huh. So apparently every compiler that tested this patch (0-day, mine, the submitters) optimized this call away because is_atomic_response() always returns 0: meaning mlx5_get_atomic_laddr is never callable and can be deleted entirely, including the call to mlx5_get_send_wqe.
Not sure what compiler setup will hit this, but it is clearly wrong code..
Guy/Leon, please send a fixup.. Maybe just delete all this handle_atomics stuff?
Thanks,
Jason
Quoted 22 lines · Jason Gunthorpe
Quoted 7 lines · Stephen Rothwell
Hi all,
After merging the rdma tree, today's linux-next build (
x86_64allmodconfig) failed like this:ERROR: "
mlx5_get_send_wqe" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined!Quoted 8 lines
Caused by commit
34f4c9554d8b("IB/mlx5: Use fragmented QP's buffer for in-kernel users")
mlx5_get_send_wqe()is still used indrivers/infiniband/hw/mlx5/cq.cand declared indrivers/infiniband/hw/mlx5/mlx5_ib.h...I have used the version of the rdma tree from next-20181203 for today.
Huh. So apparently every compiler that tested this patch (0-day, mine, the submitters) optimized this call away because
is_atomic_response()always returns 0: meaningmlx5_get_atomic_laddris never callable and can be deleted entirely, including the call tomlx5_get_send_wqe.
Quoted 5 lines
Not sure what compiler setup will hit this, but it is clearly wrong code..
Guy/Leon, please send a fixup.. Maybe just delete all this
handle_atomicsstuff?
I deleted it and will wait for the results of regression prior to send the patch.
Thanks
Quoted 3 lines
Thanks,
Jason
Quoted 8 lines
Huh. So apparently every compiler that tested this patch (0-day, mine, the submitters) optimized this call away because
is_atomic_response()always returns 0: meaningmlx5_get_atomic_laddris never callable and can be deleted entirely, including the call tomlx5_get_send_wqe.Not sure what compiler setup will hit this, but it is clearly wrong code..
Flag -o0 ?
Quoted 6 lines
Guy/Leon, please send a fixup.. Maybe just delete all this
handle_atomicsstuff?Thanks,
Jason
Hi Guy,
Quoted 11 lines · On Wed, 5 Dec 2018 12:25:57 +0000 "Guy Levi(SW)" <[email protected]> wrote:
Quoted 9 lines
Huh. So apparently every compiler that tested this patch (0-day, mine, the submitters) optimized this call away because
is_atomic_response()always returns 0: meaningmlx5_get_atomic_laddris never callable and can be deleted entirely, including the call tomlx5_get_send_wqe.Not sure what compiler setup will hit this, but it is clearly wrong code..
Flag -o0 ?
No, but the kbuild tree contains a change that allows turning off of gcc's autoinlining and the CONFIG option guarding that gets turned on for allmodconfig builds among others.
Masahiro, should CONFIG_NO_AUTO_INLINE maybe need to be off unless explicitly enabled (like CONFIG_DEBUG_INFO and others)?
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 23 lines · On Tue, 4 Dec 2018 09:42:59 +0000 Leon Romanovsky <[email protected]> wrote:
Quoted 21 lines · Jason Gunthorpe
Quoted 6 lines · Stephen Rothwell
After merging the rdma tree, today's linux-next build (
x86_64allmodconfig) failed like this:ERROR: "
mlx5_get_send_wqe" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined!Quoted 8 lines
Caused by commit
34f4c9554d8b("IB/mlx5: Use fragmented QP's buffer for in-kernel users")
mlx5_get_send_wqe()is still used indrivers/infiniband/hw/mlx5/cq.cand declared indrivers/infiniband/hw/mlx5/mlx5_ib.h...I have used the version of the rdma tree from next-20181203 for today.
Huh. So apparently every compiler that tested this patch (0-day, mine, the submitters) optimized this call away because
is_atomic_response()always returns 0: meaningmlx5_get_atomic_laddris never callable and can be deleted entirely, including the call tomlx5_get_send_wqe.
Quoted 7 lines
Quoted 5 lines
Not sure what compiler setup will hit this, but it is clearly wrong code..
Guy/Leon, please send a fixup.. Maybe just delete all this
handle_atomicsstuff?I deleted it and will wait for the results of regression prior to send the patch.
I am still getting this error.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 10 lines · Stephen Rothwell
Hi Guy,
Quoted 7 lines · On Wed, 5 Dec 2018 12:25:57 +0000 "Guy Levi(SW)" <[email protected]> wrote:
Quoted 7 lines
Huh. So apparently every compiler that tested this patch (0-day, mine, the submitters) optimized this call away because
is_atomic_response()always returns 0: meaningmlx5_get_atomic_laddris never callable and can be deleted entirely, including the call tomlx5_get_send_wqe.
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Not sure what compiler setup will hit this, but it is clearly wrong code..
Flag -o0 ?
No, but the kbuild tree contains a change that allows turning off of gcc's autoinlining and the CONFIG option guarding that gets turned on for allmodconfig builds among others.
Let me turn it off to pass allmodconfig build. it is a pure debug option.
Quoted 6 lines
Masahiro, should
CONFIG_NO_AUTO_INLINEmaybe need to be off unless explicitly enabled (likeCONFIG_DEBUG_INFOand others)?Signature · 2 lines
Cheers, Stephen Rothwell
Signature · 2 lines
Thanks, Changbin Du
Quoted 14 lines · Stephen Rothwell
Hi Guy,
Quoted 10 lines · On Wed, 5 Dec 2018 12:25:57 +0000 "Guy Levi(SW)" <[email protected]> wrote:
Quoted 9 lines
Huh. So apparently every compiler that tested this patch (0-day, mine, the submitters) optimized this call away because
is_atomic_response()always returns 0: meaningmlx5_get_atomic_laddris never callable and can be deleted entirely, including the call tomlx5_get_send_wqe.Not sure what compiler setup will hit this, but it is clearly wrong code..
Quoted 8 lines
Quoted 1 line
Flag -o0 ?
No, but the kbuild tree contains a change that allows turning off of gcc's autoinlining and the CONFIG option guarding that gets turned on for allmodconfig builds among others.
Masahiro, should
CONFIG_NO_AUTO_INLINEmaybe need to be off unless explicitly enabled (likeCONFIG_DEBUG_INFOand others)?
No.
If CONFIG_NO_AUTO_INLINE is turned off for compile-testing, people will not even notice a breakage,
then the code will get broken here and there.
You will not be able to enable it
when you really want to use it.
In this case, the reason is obvious.
If you expect the compiler to optimize the code out, you must use 'static inline' instead of 'static'.
static int is_atomic_response(struct mlx5_ib_qp *qp, uint16_t idx)
{
/* TBD: waiting decision
*/
return 0;
}Signature · 2 lines
Best Regards Masahiro Yamada