diff options
Diffstat (limited to 'drivers/infiniband/core/uverbs_main.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 75ad86c4abf8..2df31f68ea09 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -115,8 +115,10 @@ static ssize_t (*uverbs_cmd_table[])(struct ib_uverbs_file *file, | |||
115 | [IB_USER_VERBS_CMD_CLOSE_XRCD] = ib_uverbs_close_xrcd, | 115 | [IB_USER_VERBS_CMD_CLOSE_XRCD] = ib_uverbs_close_xrcd, |
116 | [IB_USER_VERBS_CMD_CREATE_XSRQ] = ib_uverbs_create_xsrq, | 116 | [IB_USER_VERBS_CMD_CREATE_XSRQ] = ib_uverbs_create_xsrq, |
117 | [IB_USER_VERBS_CMD_OPEN_QP] = ib_uverbs_open_qp, | 117 | [IB_USER_VERBS_CMD_OPEN_QP] = ib_uverbs_open_qp, |
118 | #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING | ||
118 | [IB_USER_VERBS_CMD_CREATE_FLOW] = ib_uverbs_create_flow, | 119 | [IB_USER_VERBS_CMD_CREATE_FLOW] = ib_uverbs_create_flow, |
119 | [IB_USER_VERBS_CMD_DESTROY_FLOW] = ib_uverbs_destroy_flow | 120 | [IB_USER_VERBS_CMD_DESTROY_FLOW] = ib_uverbs_destroy_flow |
121 | #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ | ||
120 | }; | 122 | }; |
121 | 123 | ||
122 | static void ib_uverbs_add_one(struct ib_device *device); | 124 | static void ib_uverbs_add_one(struct ib_device *device); |
@@ -605,6 +607,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, | |||
605 | if (!(file->device->ib_dev->uverbs_cmd_mask & (1ull << hdr.command))) | 607 | if (!(file->device->ib_dev->uverbs_cmd_mask & (1ull << hdr.command))) |
606 | return -ENOSYS; | 608 | return -ENOSYS; |
607 | 609 | ||
610 | #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING | ||
608 | if (hdr.command >= IB_USER_VERBS_CMD_THRESHOLD) { | 611 | if (hdr.command >= IB_USER_VERBS_CMD_THRESHOLD) { |
609 | struct ib_uverbs_cmd_hdr_ex hdr_ex; | 612 | struct ib_uverbs_cmd_hdr_ex hdr_ex; |
610 | 613 | ||
@@ -621,6 +624,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, | |||
621 | (hdr_ex.out_words + | 624 | (hdr_ex.out_words + |
622 | hdr_ex.provider_out_words) * 4); | 625 | hdr_ex.provider_out_words) * 4); |
623 | } else { | 626 | } else { |
627 | #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ | ||
624 | if (hdr.in_words * 4 != count) | 628 | if (hdr.in_words * 4 != count) |
625 | return -EINVAL; | 629 | return -EINVAL; |
626 | 630 | ||
@@ -628,7 +632,9 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, | |||
628 | buf + sizeof(hdr), | 632 | buf + sizeof(hdr), |
629 | hdr.in_words * 4, | 633 | hdr.in_words * 4, |
630 | hdr.out_words * 4); | 634 | hdr.out_words * 4); |
635 | #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING | ||
631 | } | 636 | } |
637 | #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ | ||
632 | } | 638 | } |
633 | 639 | ||
634 | static int ib_uverbs_mmap(struct file *filp, struct vm_area_struct *vma) | 640 | static int ib_uverbs_mmap(struct file *filp, struct vm_area_struct *vma) |