[ofa-general] [PATCH 2/10] IB/core: Add creation flags to QPs

Eli Cohen eli at dev.mellanox.co.il
Mon Mar 17 08:23:47 PDT 2008


>From 6de5c54194ff2f36b4f7e34bdf118f52f6a57239 Mon Sep 17 00:00:00 2001
From: Eli Cohen <eli at mellanox.co.il>
Date: Wed, 27 Feb 2008 18:02:13 +0200
Subject: [PATCH] IB/core: Add creation flags to QPs

This will allow a kernel verbs consumer to create a QP
and pass special flags to the hw layer. This patch also
defines one such flag for LSO support.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
 drivers/infiniband/core/uverbs_cmd.c |    1 +
 include/rdma/ib_verbs.h              |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 495c803..9e98cec 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -1065,6 +1065,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file,
 	attr.srq           = srq;
 	attr.sq_sig_type   = cmd.sq_sig_all ? IB_SIGNAL_ALL_WR : IB_SIGNAL_REQ_WR;
 	attr.qp_type       = cmd.qp_type;
+	attr.create_flags  = 0;
 
 	attr.cap.max_send_wr     = cmd.max_send_wr;
 	attr.cap.max_recv_wr     = cmd.max_recv_wr;
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 40ff512..7ee0077 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -495,6 +495,10 @@ enum ib_qp_type {
 	IB_QPT_RAW_ETY
 };
 
+enum qp_create_flags {
+	QP_CREATE_LSO = 1 << 0,
+};
+
 struct ib_qp_init_attr {
 	void                  (*event_handler)(struct ib_event *, void *);
 	void		       *qp_context;
@@ -505,6 +509,7 @@ struct ib_qp_init_attr {
 	enum ib_sig_type	sq_sig_type;
 	enum ib_qp_type		qp_type;
 	u8			port_num; /* special QP types only */
+	enum qp_create_flags    create_flags;
 };
 
 enum ib_rnr_timeout {
-- 
1.5.4.4






More information about the general mailing list