[HW, TOOLS] fixed a bug, causing incorrect value of max_addr_handles in query_ca...
[mirror/winof/.git] / hw / mlx4 / kernel_patches / core_0025_qp_create_flags.patch
1 From a1d2b448a530a829c2ae3a896c0f2d3adc90a069 Mon Sep 17 00:00:00 2001
2 From: Eli Cohen <eli@mellanox.co.il>
3 Date: Tue, 15 Jan 2008 15:42:31 +0200
4 Subject: [PATCH] Add creation flags to QPs
5
6 This will allow a kernel verbs consumer to create a QP
7 and pass special flags to the hw layer. This patch also
8 defines one such flag for LSO support.
9
10 Signed-off-by: Eli Cohen <eli@mellanox.co.il>
11 ---
12  drivers/infiniband/core/uverbs_cmd.c |    1 +
13  include/rdma/ib_verbs.h              |    5 +++++
14  2 files changed, 6 insertions(+), 0 deletions(-)
15
16 diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
17 index 495c803..9e98cec 100644
18 --- a/drivers/infiniband/core/uverbs_cmd.c
19 +++ b/drivers/infiniband/core/uverbs_cmd.c
20 @@ -1065,6 +1065,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file,
21         attr.srq           = srq;
22         attr.sq_sig_type   = cmd.sq_sig_all ? IB_SIGNAL_ALL_WR : IB_SIGNAL_REQ_WR;
23         attr.qp_type       = cmd.qp_type;
24 +       attr.create_flags  = 0;
25  
26         attr.cap.max_send_wr     = cmd.max_send_wr;
27         attr.cap.max_recv_wr     = cmd.max_recv_wr;
28 diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
29 index e35cc29..a4f6184 100644
30 --- a/include/rdma/ib_verbs.h
31 +++ b/include/rdma/ib_verbs.h
32 @@ -494,6 +494,10 @@ enum ib_qp_type {
33         IB_QPT_RAW_ETY
34  };
35  
36 +enum qp_create_flags {
37 +       QP_CREATE_LSO = 1 << 0,
38 +};
39 +
40  struct ib_qp_init_attr {
41         void                  (*event_handler)(struct ib_event *, void *);
42         void                   *qp_context;
43 @@ -504,6 +508,7 @@ struct ib_qp_init_attr {
44         enum ib_sig_type        sq_sig_type;
45         enum ib_qp_type         qp_type;
46         u8                      port_num; /* special QP types only */
47 +       enum qp_create_flags    create_flags;
48  };
49  
50  enum ib_rnr_timeout {
51 -- 
52 1.5.3.8
53