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
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.
10 Signed-off-by: Eli Cohen <eli@mellanox.co.il>
12 drivers/infiniband/core/uverbs_cmd.c | 1 +
13 include/rdma/ib_verbs.h | 5 +++++
14 2 files changed, 6 insertions(+), 0 deletions(-)
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,
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;
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 {
36 +enum qp_create_flags {
37 + QP_CREATE_LSO = 1 << 0,
40 struct ib_qp_init_attr {
41 void (*event_handler)(struct ib_event *, void *);
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;