diff options
author | Leon Romanovsky <leon@kernel.org> | 2017-02-08 10:04:09 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-08 12:28:49 -0500 |
commit | 646ebd4166ca00bdf682a36bd2e1c9a74d848ac6 (patch) | |
tree | 77ef532d2a930d80da6f5803c9604816cd8792b5 | |
parent | 647bf3d8a8e5777319da92af672289b2a6c4dc66 (diff) |
RDMA: Don't reference kernel private header from UAPI header
Remove references to private kernel header and defines from exported
ib_user_verb.h file.
The code snippet below is used to reproduce the issue:
#include <stdio.h>
#include <rdma/ib_user_verb.h>
int main(void)
{
printf("IB_USER_VERBS_ABI_VERSION = %d\n", IB_USER_VERBS_ABI_VERSION);
return 0;
}
It fails during compilation phase with an error:
➜ /tmp gcc main.c
main.c:2:31: fatal error: rdma/ib_user_verb.h: No such file or directory
#include <rdma/ib_user_verb.h>
^
compilation terminated.
Fixes: 189aba99e700 ("IB/uverbs: Extend modify_qp and support packet pacing")
CC: Bodong Wang <bodong@mellanox.com>
CC: Matan Barak <matanb@mellanox.com>
CC: Christoph Hellwig <hch@infradead.org>
Tested-by: Slava Shwartsman <slavash@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | include/uapi/rdma/ib_user_verbs.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index dfdfe4e92d31..f4f87cff6dc6 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h | |||
@@ -37,7 +37,6 @@ | |||
37 | #define IB_USER_VERBS_H | 37 | #define IB_USER_VERBS_H |
38 | 38 | ||
39 | #include <linux/types.h> | 39 | #include <linux/types.h> |
40 | #include <rdma/ib_verbs.h> | ||
41 | 40 | ||
42 | /* | 41 | /* |
43 | * Increment this value if any changes that break userspace ABI | 42 | * Increment this value if any changes that break userspace ABI |
@@ -548,11 +547,17 @@ enum { | |||
548 | }; | 547 | }; |
549 | 548 | ||
550 | enum { | 549 | enum { |
551 | IB_USER_LEGACY_LAST_QP_ATTR_MASK = IB_QP_DEST_QPN | 550 | /* |
551 | * This value is equal to IB_QP_DEST_QPN. | ||
552 | */ | ||
553 | IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20, | ||
552 | }; | 554 | }; |
553 | 555 | ||
554 | enum { | 556 | enum { |
555 | IB_USER_LAST_QP_ATTR_MASK = IB_QP_RATE_LIMIT | 557 | /* |
558 | * This value is equal to IB_QP_RATE_LIMIT. | ||
559 | */ | ||
560 | IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25, | ||
556 | }; | 561 | }; |
557 | 562 | ||
558 | struct ib_uverbs_ex_create_qp { | 563 | struct ib_uverbs_ex_create_qp { |