* [PATCH libibverbs v3 0/3] SIF related libibverbs patches
@ 2016-09-20 6:22 Knut Omang
[not found] ` <cover.b0b7418bec346c028215053b3e58e097aa822563.1474352400.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: Knut Omang @ 2016-09-20 6:22 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker, Knut Omang
This is the initial patch series for the work of upstreaming the driver and
user level library for SIF, the new Oracle HCA.
These patches are needed to support SIF - Oracle's new Infiniband HCA stack
from user mode. A corresponding patch set for the kernel is needed.
Patch 1 introduces a new ibv_cmd_create_ah_ex under a new .so file version
IBVERBS_1.3 in order to preserve backward binary compatibility with older
provider builds.
We need patch 2 because we need a provider specific extension to the ibv_reg_mr response,
which breaks if alignment criterias are violated.
Patch 3 is similar to patch 2 except that no provider libs uses this code path
(kernel supported XRC send) until now, so no extra backward compatibility measures
are needed.
Changes since v2:
- Rebase to latest libibverbs (3b39733)
- Use IBVERBS_1.4 instead of 1.3 in map file
Changes since v1:
- Introduce the new ibv_cmd_create_ah_ex as a new version IBVERBS_1.3 in the
map file.
Knut Omang (3):
Add new call ibv_cmd_create_ah_ex which supports extra parameters
Add padding to get proper end alignment of ibv_reg_mr_resp
Provide remote XRC SRQ number in kernel post_send.
include/infiniband/driver.h | 4 +++-
include/infiniband/kern-abi.h | 2 +-
src/cmd.c | 55 +++++++++++++++++++++---------------
src/libibverbs.map | 6 +++-
4 files changed, 44 insertions(+), 23 deletions(-)
base-commit: 3b3973377f0dbccb11323b86e267308052cc4458
--
git-series 0.8.10
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
[not found] ` <cover.b0b7418bec346c028215053b3e58e097aa822563.1474352400.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2016-09-20 6:22 ` Knut Omang
[not found] ` <d551c3792e884443903c67212f505082cd53b135.1474352400.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-20 6:22 ` [PATCH libibverbs v3 2/3] Add padding to get proper end alignment of ibv_reg_mr_resp Knut Omang
2016-09-20 6:22 ` [PATCH libibverbs v3 3/3] Provide remote XRC SRQ number in kernel post_send Knut Omang
2 siblings, 1 reply; 12+ messages in thread
From: Knut Omang @ 2016-09-20 6:22 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker, Knut Omang
The original call ibv_cmd_create_ah does not allow vendor specific request or
response parameters to be defined and passed through to kernel space.
To keep backward compatibility, introduce a new extended call which accepts
cmd and resp parameters similar to other parts of the API.
Reimplement the old call to just use the new extended call.
The new call is versioned in the shared library as IBVERBS_1.4.
Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Mukesh Kacker <mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
include/infiniband/driver.h | 4 +++-
src/cmd.c | 50 +++++++++++++++++++++-----------------
src/libibverbs.map | 6 ++++-
3 files changed, 37 insertions(+), 23 deletions(-)
diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h
index ea3dade..9356dc8 100644
--- a/include/infiniband/driver.h
+++ b/include/infiniband/driver.h
@@ -234,6 +234,10 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
struct ibv_recv_wr **bad_wr);
int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
struct ibv_ah_attr *attr);
+int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah,
+ struct ibv_ah_attr *attr,
+ struct ibv_create_ah *cmd, size_t cmd_size,
+ struct ibv_create_ah_resp *resp, size_t resp_size);
int ibv_cmd_destroy_ah(struct ibv_ah *ah);
int ibv_cmd_attach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
int ibv_cmd_detach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
diff --git a/src/cmd.c b/src/cmd.c
index 11f6509..58b9dcd 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1493,38 +1493,44 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
return ret;
}
-int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
- struct ibv_ah_attr *attr)
+int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah, struct ibv_ah_attr *attr,
+ struct ibv_create_ah *cmd, size_t cmd_size,
+ struct ibv_create_ah_resp *resp, size_t resp_size)
{
- struct ibv_create_ah cmd;
- struct ibv_create_ah_resp resp;
-
- IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_AH, &resp, sizeof resp);
- cmd.user_handle = (uintptr_t) ah;
- cmd.pd_handle = pd->handle;
- cmd.attr.dlid = attr->dlid;
- cmd.attr.sl = attr->sl;
- cmd.attr.src_path_bits = attr->src_path_bits;
- cmd.attr.static_rate = attr->static_rate;
- cmd.attr.is_global = attr->is_global;
- cmd.attr.port_num = attr->port_num;
- cmd.attr.grh.flow_label = attr->grh.flow_label;
- cmd.attr.grh.sgid_index = attr->grh.sgid_index;
- cmd.attr.grh.hop_limit = attr->grh.hop_limit;
- cmd.attr.grh.traffic_class = attr->grh.traffic_class;
- memcpy(cmd.attr.grh.dgid, attr->grh.dgid.raw, 16);
+ IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_AH, resp, resp_size);
+ cmd->user_handle = (uintptr_t) ah;
+ cmd->pd_handle = pd->handle;
+ cmd->attr.dlid = attr->dlid;
+ cmd->attr.sl = attr->sl;
+ cmd->attr.src_path_bits = attr->src_path_bits;
+ cmd->attr.static_rate = attr->static_rate;
+ cmd->attr.is_global = attr->is_global;
+ cmd->attr.port_num = attr->port_num;
+ cmd->attr.grh.flow_label = attr->grh.flow_label;
+ cmd->attr.grh.sgid_index = attr->grh.sgid_index;
+ cmd->attr.grh.hop_limit = attr->grh.hop_limit;
+ cmd->attr.grh.traffic_class = attr->grh.traffic_class;
+ memcpy(cmd->attr.grh.dgid, attr->grh.dgid.raw, 16);
- if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
+ if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
return errno;
- (void) VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
+ (void) VALGRIND_MAKE_MEM_DEFINED(resp, sizeof *resp);
- ah->handle = resp.handle;
+ ah->handle = resp->handle;
ah->context = pd->context;
return 0;
}
+int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
+ struct ibv_ah_attr *attr)
+{
+ struct ibv_create_ah cmd;
+ struct ibv_create_ah_resp resp;
+ return ibv_cmd_create_ah_ex(pd, ah, attr, &cmd, sizeof(cmd), &resp, sizeof(resp));
+}
+
int ibv_cmd_destroy_ah(struct ibv_ah *ah)
{
struct ibv_destroy_ah cmd;
diff --git a/src/libibverbs.map b/src/libibverbs.map
index 46744e5..ddba63a 100644
--- a/src/libibverbs.map
+++ b/src/libibverbs.map
@@ -118,7 +118,6 @@ IBVERBS_1.1 {
ibv_cmd_create_qp_ex2;
ibv_cmd_open_qp;
ibv_cmd_rereg_mr;
-
} IBVERBS_1.0;
IBVERBS_1.3 {
@@ -130,3 +129,8 @@ IBVERBS_1.3 {
ibv_cmd_destroy_rwq_ind_table;
ibv_query_gid_type;
} IBVERBS_1.1;
+
+IBVERBS_1.4 {
+ global:
+ ibv_cmd_create_ah_ex;
+} IBVERBS_1.3;
--
git-series 0.8.10
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH libibverbs v3 2/3] Add padding to get proper end alignment of ibv_reg_mr_resp
[not found] ` <cover.b0b7418bec346c028215053b3e58e097aa822563.1474352400.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-20 6:22 ` [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters Knut Omang
@ 2016-09-20 6:22 ` Knut Omang
2016-09-20 6:22 ` [PATCH libibverbs v3 3/3] Provide remote XRC SRQ number in kernel post_send Knut Omang
2 siblings, 0 replies; 12+ messages in thread
From: Knut Omang @ 2016-09-20 6:22 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker, Knut Omang
The user/kernel level API requires all parameter blocks to be
64 bit end aligned.
Also clean up some valgrind/memory initialization issues.
Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Mukesh Kacker <mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
include/infiniband/kern-abi.h | 1 +
src/cmd.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/infiniband/kern-abi.h b/include/infiniband/kern-abi.h
index 381fd50..ddea393 100644
--- a/include/infiniband/kern-abi.h
+++ b/include/infiniband/kern-abi.h
@@ -382,6 +382,7 @@ struct ibv_reg_mr_resp {
__u32 mr_handle;
__u32 lkey;
__u32 rkey;
+ __u32 reserved;
};
struct ibv_rereg_mr {
diff --git a/src/cmd.c b/src/cmd.c
index 58b9dcd..381dcc7 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1500,6 +1500,7 @@ int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah, struct ibv_ah_att
IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_AH, resp, resp_size);
cmd->user_handle = (uintptr_t) ah;
cmd->pd_handle = pd->handle;
+ cmd->reserved = 0;
cmd->attr.dlid = attr->dlid;
cmd->attr.sl = attr->sl;
cmd->attr.src_path_bits = attr->src_path_bits;
@@ -1510,12 +1511,14 @@ int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah, struct ibv_ah_att
cmd->attr.grh.sgid_index = attr->grh.sgid_index;
cmd->attr.grh.hop_limit = attr->grh.hop_limit;
cmd->attr.grh.traffic_class = attr->grh.traffic_class;
+ cmd->attr.grh.reserved = 0;
+ cmd->attr.reserved = 0;
memcpy(cmd->attr.grh.dgid, attr->grh.dgid.raw, 16);
if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
return errno;
- (void) VALGRIND_MAKE_MEM_DEFINED(resp, sizeof *resp);
+ (void) VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
ah->handle = resp->handle;
ah->context = pd->context;
--
git-series 0.8.10
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH libibverbs v3 3/3] Provide remote XRC SRQ number in kernel post_send.
[not found] ` <cover.b0b7418bec346c028215053b3e58e097aa822563.1474352400.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-20 6:22 ` [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters Knut Omang
2016-09-20 6:22 ` [PATCH libibverbs v3 2/3] Add padding to get proper end alignment of ibv_reg_mr_resp Knut Omang
@ 2016-09-20 6:22 ` Knut Omang
2 siblings, 0 replies; 12+ messages in thread
From: Knut Omang @ 2016-09-20 6:22 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker, Knut Omang
Also proper end align the ibv_kern_send_wr struct.
Requires a corresponding kernel change.
Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Mukesh Kacker <mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
include/infiniband/kern-abi.h | 1 +
src/cmd.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/infiniband/kern-abi.h b/include/infiniband/kern-abi.h
index ddea393..a0b5315 100644
--- a/include/infiniband/kern-abi.h
+++ b/include/infiniband/kern-abi.h
@@ -821,6 +821,7 @@ struct ibv_kern_send_wr {
union {
struct {
__u32 remote_srqn;
+ __u32 reserved;
} xrc;
} qp_type;
};
diff --git a/src/cmd.c b/src/cmd.c
index 381dcc7..bd85add 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1323,6 +1323,8 @@ int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
tmp->wr.ud.remote_qpn = i->wr.ud.remote_qpn;
tmp->wr.ud.remote_qkey = i->wr.ud.remote_qkey;
} else {
+ if (ibqp->qp_type == IBV_QPT_XRC_SEND)
+ tmp->qp_type.xrc.remote_srqn = i->qp_type.xrc.remote_srqn;
switch (i->opcode) {
case IBV_WR_RDMA_WRITE:
case IBV_WR_RDMA_WRITE_WITH_IMM:
--
git-series 0.8.10
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
[not found] ` <d551c3792e884443903c67212f505082cd53b135.1474352400.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2016-09-20 11:17 ` Yishai Hadas
[not found] ` <550041ef-b105-c079-068c-d96278ec34f1-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: Yishai Hadas @ 2016-09-20 11:17 UTC (permalink / raw)
To: Knut Omang
Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker,
Jason Gunthorpe
On 9/20/2016 9:22 AM, Knut Omang wrote:
> The original call ibv_cmd_create_ah does not allow vendor specific request or
> response parameters to be defined and passed through to kernel space.
>
> To keep backward compatibility, introduce a new extended call which accepts
> cmd and resp parameters similar to other parts of the API.
> Reimplement the old call to just use the new extended call.
>
> The new call is versioned in the shared library as IBVERBS_1.4.
>
> Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Mukesh Kacker <mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
> include/infiniband/driver.h | 4 +++-
> src/cmd.c | 50 +++++++++++++++++++++-----------------
> src/libibverbs.map | 6 ++++-
> 3 files changed, 37 insertions(+), 23 deletions(-)
>
> diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h
> index ea3dade..9356dc8 100644
> --- a/include/infiniband/driver.h
> +++ b/include/infiniband/driver.h
> @@ -234,6 +234,10 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
> struct ibv_recv_wr **bad_wr);
> int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> struct ibv_ah_attr *attr);
> +int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah,
> + struct ibv_ah_attr *attr,
> + struct ibv_create_ah *cmd, size_t cmd_size,
> + struct ibv_create_ah_resp *resp, size_t resp_size);
> int ibv_cmd_destroy_ah(struct ibv_ah *ah);
> int ibv_cmd_attach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
> int ibv_cmd_detach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
> diff --git a/src/cmd.c b/src/cmd.c
> index 11f6509..58b9dcd 100644
> --- a/src/cmd.c
> +++ b/src/cmd.c
> @@ -1493,38 +1493,44 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
> return ret;
> }
>
> -int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> - struct ibv_ah_attr *attr)
> +int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah, struct ibv_ah_attr *attr,
> + struct ibv_create_ah *cmd, size_t cmd_size,
> + struct ibv_create_ah_resp *resp, size_t resp_size)
> {
> - struct ibv_create_ah cmd;
> - struct ibv_create_ah_resp resp;
> -
> - IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_AH, &resp, sizeof resp);
> - cmd.user_handle = (uintptr_t) ah;
> - cmd.pd_handle = pd->handle;
> - cmd.attr.dlid = attr->dlid;
> - cmd.attr.sl = attr->sl;
> - cmd.attr.src_path_bits = attr->src_path_bits;
> - cmd.attr.static_rate = attr->static_rate;
> - cmd.attr.is_global = attr->is_global;
> - cmd.attr.port_num = attr->port_num;
> - cmd.attr.grh.flow_label = attr->grh.flow_label;
> - cmd.attr.grh.sgid_index = attr->grh.sgid_index;
> - cmd.attr.grh.hop_limit = attr->grh.hop_limit;
> - cmd.attr.grh.traffic_class = attr->grh.traffic_class;
> - memcpy(cmd.attr.grh.dgid, attr->grh.dgid.raw, 16);
> + IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_AH, resp, resp_size);
> + cmd->user_handle = (uintptr_t) ah;
> + cmd->pd_handle = pd->handle;
> + cmd->attr.dlid = attr->dlid;
> + cmd->attr.sl = attr->sl;
> + cmd->attr.src_path_bits = attr->src_path_bits;
> + cmd->attr.static_rate = attr->static_rate;
> + cmd->attr.is_global = attr->is_global;
> + cmd->attr.port_num = attr->port_num;
> + cmd->attr.grh.flow_label = attr->grh.flow_label;
> + cmd->attr.grh.sgid_index = attr->grh.sgid_index;
> + cmd->attr.grh.hop_limit = attr->grh.hop_limit;
> + cmd->attr.grh.traffic_class = attr->grh.traffic_class;
> + memcpy(cmd->attr.grh.dgid, attr->grh.dgid.raw, 16);
>
> - if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
> + if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
> return errno;
>
> - (void) VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
> + (void) VALGRIND_MAKE_MEM_DEFINED(resp, sizeof *resp);
>
> - ah->handle = resp.handle;
> + ah->handle = resp->handle;
> ah->context = pd->context;
>
> return 0;
> }
>
> +int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> + struct ibv_ah_attr *attr)
> +{
> + struct ibv_create_ah cmd;
> + struct ibv_create_ah_resp resp;
> + return ibv_cmd_create_ah_ex(pd, ah, attr, &cmd, sizeof(cmd), &resp, sizeof(resp));
> +}
> +
> int ibv_cmd_destroy_ah(struct ibv_ah *ah)
> {
> struct ibv_destroy_ah cmd;
> diff --git a/src/libibverbs.map b/src/libibverbs.map
> index 46744e5..ddba63a 100644
> --- a/src/libibverbs.map
> +++ b/src/libibverbs.map
> @@ -118,7 +118,6 @@ IBVERBS_1.1 {
> ibv_cmd_create_qp_ex2;
> ibv_cmd_open_qp;
> ibv_cmd_rereg_mr;
> -
> } IBVERBS_1.0;
>
> IBVERBS_1.3 {
> @@ -130,3 +129,8 @@ IBVERBS_1.3 {
> ibv_cmd_destroy_rwq_ind_table;
> ibv_query_gid_type;
> } IBVERBS_1.1;
> +
> +IBVERBS_1.4 {
Any reason to add 1.4 instead of using 1.3 ? in my understanding the
idea is that new symbols for next release will use a new ABI version,
this is what 1.3 already supplied. Added Jason for his input as well.
> + global:
> + ibv_cmd_create_ah_ex;
When do you plan to contribute the driver code for that ? for now no
upstream drivers uses this API, taking some code for future usage with
no current usage is not the preferred way.
> +} IBVERBS_1.3;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
[not found] ` <550041ef-b105-c079-068c-d96278ec34f1-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2016-09-20 11:37 ` Knut Omang
[not found] ` <1474371459.8837.32.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-20 15:32 ` Jason Gunthorpe
1 sibling, 1 reply; 12+ messages in thread
From: Knut Omang @ 2016-09-20 11:37 UTC (permalink / raw)
To: Yishai Hadas
Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker,
Jason Gunthorpe
On Tue, 2016-09-20 at 14:17 +0300, Yishai Hadas wrote:
> On 9/20/2016 9:22 AM, Knut Omang wrote:
> >
> > The original call ibv_cmd_create_ah does not allow vendor specific request or
> > response parameters to be defined and passed through to kernel space.
> >
> > To keep backward compatibility, introduce a new extended call which accepts
> > cmd and resp parameters similar to other parts of the API.
> > Reimplement the old call to just use the new extended call.
> >
> > The new call is versioned in the shared library as IBVERBS_1.4.
> >
> > Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > Reviewed-by: Mukesh Kacker <mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > ---
> > include/infiniband/driver.h | 4 +++-
> > src/cmd.c | 50 +++++++++++++++++++++-----------------
> > src/libibverbs.map | 6 ++++-
> > 3 files changed, 37 insertions(+), 23 deletions(-)
> >
> > diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h
> > index ea3dade..9356dc8 100644
> > --- a/include/infiniband/driver.h
> > +++ b/include/infiniband/driver.h
> > @@ -234,6 +234,10 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
> > struct ibv_recv_wr **bad_wr);
> > int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> > struct ibv_ah_attr *attr);
> > +int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah,
> > + struct ibv_ah_attr *attr,
> > + struct ibv_create_ah *cmd, size_t cmd_size,
> > + struct ibv_create_ah_resp *resp, size_t resp_size);
> > int ibv_cmd_destroy_ah(struct ibv_ah *ah);
> > int ibv_cmd_attach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
> > int ibv_cmd_detach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
> > diff --git a/src/cmd.c b/src/cmd.c
> > index 11f6509..58b9dcd 100644
> > --- a/src/cmd.c
> > +++ b/src/cmd.c
> > @@ -1493,38 +1493,44 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
> > return ret;
> > }
> >
> > -int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> > - struct ibv_ah_attr *attr)
> > +int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah, struct ibv_ah_attr *attr,
> > + struct ibv_create_ah *cmd, size_t cmd_size,
> > + struct ibv_create_ah_resp *resp, size_t resp_size)
> > {
> > - struct ibv_create_ah cmd;
> > - struct ibv_create_ah_resp resp;
> > -
> > - IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_AH, &resp, sizeof resp);
> > - cmd.user_handle = (uintptr_t) ah;
> > - cmd.pd_handle = pd->handle;
> > - cmd.attr.dlid = attr->dlid;
> > - cmd.attr.sl = attr->sl;
> > - cmd.attr.src_path_bits = attr->src_path_bits;
> > - cmd.attr.static_rate = attr->static_rate;
> > - cmd.attr.is_global = attr->is_global;
> > - cmd.attr.port_num = attr->port_num;
> > - cmd.attr.grh.flow_label = attr->grh.flow_label;
> > - cmd.attr.grh.sgid_index = attr->grh.sgid_index;
> > - cmd.attr.grh.hop_limit = attr->grh.hop_limit;
> > - cmd.attr.grh.traffic_class = attr->grh.traffic_class;
> > - memcpy(cmd.attr.grh.dgid, attr->grh.dgid.raw, 16);
> > + IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_AH, resp, resp_size);
> > + cmd->user_handle = (uintptr_t) ah;
> > + cmd->pd_handle = pd->handle;
> > + cmd->attr.dlid = attr->dlid;
> > + cmd->attr.sl = attr->sl;
> > + cmd->attr.src_path_bits = attr->src_path_bits;
> > + cmd->attr.static_rate = attr->static_rate;
> > + cmd->attr.is_global = attr->is_global;
> > + cmd->attr.port_num = attr->port_num;
> > + cmd->attr.grh.flow_label = attr->grh.flow_label;
> > + cmd->attr.grh.sgid_index = attr->grh.sgid_index;
> > + cmd->attr.grh.hop_limit = attr->grh.hop_limit;
> > + cmd->attr.grh.traffic_class = attr->grh.traffic_class;
> > + memcpy(cmd->attr.grh.dgid, attr->grh.dgid.raw, 16);
> >
> > - if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
> > + if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
> > return errno;
> >
> > - (void) VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
> > + (void) VALGRIND_MAKE_MEM_DEFINED(resp, sizeof *resp);
> >
> > - ah->handle = resp.handle;
> > + ah->handle = resp->handle;
> > ah->context = pd->context;
> >
> > return 0;
> > }
> >
> > +int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> > + struct ibv_ah_attr *attr)
> > +{
> > + struct ibv_create_ah cmd;
> > + struct ibv_create_ah_resp resp;
> > + return ibv_cmd_create_ah_ex(pd, ah, attr, &cmd, sizeof(cmd), &resp, sizeof(resp));
> > +}
> > +
> > int ibv_cmd_destroy_ah(struct ibv_ah *ah)
> > {
> > struct ibv_destroy_ah cmd;
> > diff --git a/src/libibverbs.map b/src/libibverbs.map
> > index 46744e5..ddba63a 100644
> > --- a/src/libibverbs.map
> > +++ b/src/libibverbs.map
> > @@ -118,7 +118,6 @@ IBVERBS_1.1 {
> > ibv_cmd_create_qp_ex2;
> > ibv_cmd_open_qp;
> > ibv_cmd_rereg_mr;
> > -
> > } IBVERBS_1.0;
> >
> > IBVERBS_1.3 {
> > @@ -130,3 +129,8 @@ IBVERBS_1.3 {
> > ibv_cmd_destroy_rwq_ind_table;
> > ibv_query_gid_type;
> > } IBVERBS_1.1;
> > +
> > +IBVERBS_1.4 {
> Any reason to add 1.4 instead of using 1.3 ? in my understanding the
> idea is that new symbols for next release will use a new ABI version,
> this is what 1.3 already supplied. Added Jason for his input as well.
good point - Jason?
> >
> > + global:
> > + ibv_cmd_create_ah_ex;
> When do you plan to contribute the driver code for that ? for now no
> upstream drivers uses this API, taking some code for future usage with
> no current usage is not the preferred way.
The plan is ASAP, the kernel side has been approved for release by Oracle's
legal dep, but the user library is still stuck, and with an undesirable
license combination given Jason's recent consolidation efforts :-/
Knut
> >
> > +} IBVERBS_1.3;
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
[not found] ` <1474371459.8837.32.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2016-09-20 13:29 ` Leon Romanovsky
[not found] ` <20160920132945.GO26673-2ukJVAZIZ/Y@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: Leon Romanovsky @ 2016-09-20 13:29 UTC (permalink / raw)
To: Knut Omang
Cc: Yishai Hadas, Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
Mukesh Kacker, Jason Gunthorpe
[-- Attachment #1: Type: text/plain, Size: 6820 bytes --]
On Tue, Sep 20, 2016 at 01:37:39PM +0200, Knut Omang wrote:
> On Tue, 2016-09-20 at 14:17 +0300, Yishai Hadas wrote:
> > On 9/20/2016 9:22 AM, Knut Omang wrote:
> > >
> > > The original call ibv_cmd_create_ah does not allow vendor specific request or
> > > response parameters to be defined and passed through to kernel space.
> > >
> > > To keep backward compatibility, introduce a new extended call which accepts
> > > cmd and resp parameters similar to other parts of the API.
> > > Reimplement the old call to just use the new extended call.
> > >
> > > The new call is versioned in the shared library as IBVERBS_1.4.
> > >
> > > Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > > Reviewed-by: Mukesh Kacker <mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > > ---
> > > include/infiniband/driver.h | 4 +++-
> > > src/cmd.c | 50 +++++++++++++++++++++-----------------
> > > src/libibverbs.map | 6 ++++-
> > > 3 files changed, 37 insertions(+), 23 deletions(-)
> > >
> > > diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h
> > > index ea3dade..9356dc8 100644
> > > --- a/include/infiniband/driver.h
> > > +++ b/include/infiniband/driver.h
> > > @@ -234,6 +234,10 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
> > > struct ibv_recv_wr **bad_wr);
> > > int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> > > struct ibv_ah_attr *attr);
> > > +int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah,
> > > + struct ibv_ah_attr *attr,
> > > + struct ibv_create_ah *cmd, size_t cmd_size,
> > > + struct ibv_create_ah_resp *resp, size_t resp_size);
> > > int ibv_cmd_destroy_ah(struct ibv_ah *ah);
> > > int ibv_cmd_attach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
> > > int ibv_cmd_detach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
> > > diff --git a/src/cmd.c b/src/cmd.c
> > > index 11f6509..58b9dcd 100644
> > > --- a/src/cmd.c
> > > +++ b/src/cmd.c
> > > @@ -1493,38 +1493,44 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
> > > return ret;
> > > }
> > >
> > > -int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> > > - struct ibv_ah_attr *attr)
> > > +int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah, struct ibv_ah_attr *attr,
> > > + struct ibv_create_ah *cmd, size_t cmd_size,
> > > + struct ibv_create_ah_resp *resp, size_t resp_size)
> > > {
> > > - struct ibv_create_ah cmd;
> > > - struct ibv_create_ah_resp resp;
> > > -
> > > - IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_AH, &resp, sizeof resp);
> > > - cmd.user_handle = (uintptr_t) ah;
> > > - cmd.pd_handle = pd->handle;
> > > - cmd.attr.dlid = attr->dlid;
> > > - cmd.attr.sl = attr->sl;
> > > - cmd.attr.src_path_bits = attr->src_path_bits;
> > > - cmd.attr.static_rate = attr->static_rate;
> > > - cmd.attr.is_global = attr->is_global;
> > > - cmd.attr.port_num = attr->port_num;
> > > - cmd.attr.grh.flow_label = attr->grh.flow_label;
> > > - cmd.attr.grh.sgid_index = attr->grh.sgid_index;
> > > - cmd.attr.grh.hop_limit = attr->grh.hop_limit;
> > > - cmd.attr.grh.traffic_class = attr->grh.traffic_class;
> > > - memcpy(cmd.attr.grh.dgid, attr->grh.dgid.raw, 16);
> > > + IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_AH, resp, resp_size);
> > > + cmd->user_handle = (uintptr_t) ah;
> > > + cmd->pd_handle = pd->handle;
> > > + cmd->attr.dlid = attr->dlid;
> > > + cmd->attr.sl = attr->sl;
> > > + cmd->attr.src_path_bits = attr->src_path_bits;
> > > + cmd->attr.static_rate = attr->static_rate;
> > > + cmd->attr.is_global = attr->is_global;
> > > + cmd->attr.port_num = attr->port_num;
> > > + cmd->attr.grh.flow_label = attr->grh.flow_label;
> > > + cmd->attr.grh.sgid_index = attr->grh.sgid_index;
> > > + cmd->attr.grh.hop_limit = attr->grh.hop_limit;
> > > + cmd->attr.grh.traffic_class = attr->grh.traffic_class;
> > > + memcpy(cmd->attr.grh.dgid, attr->grh.dgid.raw, 16);
> > >
> > > - if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
> > > + if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
> > > return errno;
> > >
> > > - (void) VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
> > > + (void) VALGRIND_MAKE_MEM_DEFINED(resp, sizeof *resp);
> > >
> > > - ah->handle = resp.handle;
> > > + ah->handle = resp->handle;
> > > ah->context = pd->context;
> > >
> > > return 0;
> > > }
> > >
> > > +int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> > > + struct ibv_ah_attr *attr)
> > > +{
> > > + struct ibv_create_ah cmd;
> > > + struct ibv_create_ah_resp resp;
> > > + return ibv_cmd_create_ah_ex(pd, ah, attr, &cmd, sizeof(cmd), &resp, sizeof(resp));
> > > +}
> > > +
> > > int ibv_cmd_destroy_ah(struct ibv_ah *ah)
> > > {
> > > struct ibv_destroy_ah cmd;
> > > diff --git a/src/libibverbs.map b/src/libibverbs.map
> > > index 46744e5..ddba63a 100644
> > > --- a/src/libibverbs.map
> > > +++ b/src/libibverbs.map
> > > @@ -118,7 +118,6 @@ IBVERBS_1.1 {
> > > ibv_cmd_create_qp_ex2;
> > > ibv_cmd_open_qp;
> > > ibv_cmd_rereg_mr;
> > > -
> > > } IBVERBS_1.0;
> > >
> > > IBVERBS_1.3 {
> > > @@ -130,3 +129,8 @@ IBVERBS_1.3 {
> > > ibv_cmd_destroy_rwq_ind_table;
> > > ibv_query_gid_type;
> > > } IBVERBS_1.1;
> > > +
> > > +IBVERBS_1.4 {
> > Any reason to add 1.4 instead of using 1.3 ? in my understanding the
> > idea is that new symbols for next release will use a new ABI version,
> > this is what 1.3 already supplied. Added Jason for his input as well.
>
> good point - Jason?
>
> > >
> > > + global:
> > > + ibv_cmd_create_ah_ex;
> > When do you plan to contribute the driver code for that ? for now no
> > upstream drivers uses this API, taking some code for future usage with
> > no current usage is not the preferred way.
>
> The plan is ASAP, the kernel side has been approved for release by Oracle's
> legal dep, but the user library is still stuck, and with an undesirable
> license combination given Jason's recent consolidation efforts :-/
Jason didn't change licenses. You still can release your driver under
dual-license in similar way to other drivers.
>
> Knut
>
> > >
> > > +} IBVERBS_1.3;
> > >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
[not found] ` <20160920132945.GO26673-2ukJVAZIZ/Y@public.gmane.org>
@ 2016-09-20 14:05 ` Knut Omang
[not found] ` <1474380350.20134.162.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: Knut Omang @ 2016-09-20 14:05 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Yishai Hadas, Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
Mukesh Kacker, Jason Gunthorpe
On Tue, 2016-09-20 at 16:29 +0300, Leon Romanovsky wrote:
> On Tue, Sep 20, 2016 at 01:37:39PM +0200, Knut Omang wrote:
> > On Tue, 2016-09-20 at 14:17 +0300, Yishai Hadas wrote:
> > > On 9/20/2016 9:22 AM, Knut Omang wrote:
> > > >
> > > > The original call ibv_cmd_create_ah does not allow vendor specific request or
> > > > response parameters to be defined and passed through to kernel space.
> > > >
> > > > To keep backward compatibility, introduce a new extended call which accepts
> > > > cmd and resp parameters similar to other parts of the API.
> > > > Reimplement the old call to just use the new extended call.
> > > >
> > > > The new call is versioned in the shared library as IBVERBS_1.4.
> > > >
> > > > Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > > > Reviewed-by: Mukesh Kacker <mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > > > ---
> > > > include/infiniband/driver.h | 4 +++-
> > > > src/cmd.c | 50 +++++++++++++++++++++-----------------
> > > > src/libibverbs.map | 6 ++++-
> > > > 3 files changed, 37 insertions(+), 23 deletions(-)
> > > >
> > > > diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h
> > > > index ea3dade..9356dc8 100644
> > > > --- a/include/infiniband/driver.h
> > > > +++ b/include/infiniband/driver.h
> > > > @@ -234,6 +234,10 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
> > > > struct ibv_recv_wr **bad_wr);
> > > > int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> > > > struct ibv_ah_attr *attr);
> > > > +int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah,
> > > > + struct ibv_ah_attr *attr,
> > > > + struct ibv_create_ah *cmd, size_t cmd_size,
> > > > + struct ibv_create_ah_resp *resp, size_t resp_size);
> > > > int ibv_cmd_destroy_ah(struct ibv_ah *ah);
> > > > int ibv_cmd_attach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
> > > > int ibv_cmd_detach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
> > > > diff --git a/src/cmd.c b/src/cmd.c
> > > > index 11f6509..58b9dcd 100644
> > > > --- a/src/cmd.c
> > > > +++ b/src/cmd.c
> > > > @@ -1493,38 +1493,44 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
> > > > return ret;
> > > > }
> > > >
> > > > -int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> > > > - struct ibv_ah_attr *attr)
> > > > +int ibv_cmd_create_ah_ex(struct ibv_pd *pd, struct ibv_ah *ah, struct ibv_ah_attr *attr,
> > > > + struct ibv_create_ah *cmd, size_t cmd_size,
> > > > + struct ibv_create_ah_resp *resp, size_t resp_size)
> > > > {
> > > > - struct ibv_create_ah cmd;
> > > > - struct ibv_create_ah_resp resp;
> > > > -
> > > > - IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_AH, &resp, sizeof resp);
> > > > - cmd.user_handle = (uintptr_t) ah;
> > > > - cmd.pd_handle = pd->handle;
> > > > - cmd.attr.dlid = attr->dlid;
> > > > - cmd.attr.sl = attr->sl;
> > > > - cmd.attr.src_path_bits = attr->src_path_bits;
> > > > - cmd.attr.static_rate = attr->static_rate;
> > > > - cmd.attr.is_global = attr->is_global;
> > > > - cmd.attr.port_num = attr->port_num;
> > > > - cmd.attr.grh.flow_label = attr->grh.flow_label;
> > > > - cmd.attr.grh.sgid_index = attr->grh.sgid_index;
> > > > - cmd.attr.grh.hop_limit = attr->grh.hop_limit;
> > > > - cmd.attr.grh.traffic_class = attr->grh.traffic_class;
> > > > - memcpy(cmd.attr.grh.dgid, attr->grh.dgid.raw, 16);
> > > > + IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_AH, resp, resp_size);
> > > > + cmd->user_handle = (uintptr_t) ah;
> > > > + cmd->pd_handle = pd->handle;
> > > > + cmd->attr.dlid = attr->dlid;
> > > > + cmd->attr.sl = attr->sl;
> > > > + cmd->attr.src_path_bits = attr->src_path_bits;
> > > > + cmd->attr.static_rate = attr->static_rate;
> > > > + cmd->attr.is_global = attr->is_global;
> > > > + cmd->attr.port_num = attr->port_num;
> > > > + cmd->attr.grh.flow_label = attr->grh.flow_label;
> > > > + cmd->attr.grh.sgid_index = attr->grh.sgid_index;
> > > > + cmd->attr.grh.hop_limit = attr->grh.hop_limit;
> > > > + cmd->attr.grh.traffic_class = attr->grh.traffic_class;
> > > > + memcpy(cmd->attr.grh.dgid, attr->grh.dgid.raw, 16);
> > > >
> > > > - if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
> > > > + if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
> > > > return errno;
> > > >
> > > > - (void) VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
> > > > + (void) VALGRIND_MAKE_MEM_DEFINED(resp, sizeof *resp);
> > > >
> > > > - ah->handle = resp.handle;
> > > > + ah->handle = resp->handle;
> > > > ah->context = pd->context;
> > > >
> > > > return 0;
> > > > }
> > > >
> > > > +int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
> > > > + struct ibv_ah_attr *attr)
> > > > +{
> > > > + struct ibv_create_ah cmd;
> > > > + struct ibv_create_ah_resp resp;
> > > > + return ibv_cmd_create_ah_ex(pd, ah, attr, &cmd, sizeof(cmd), &resp, sizeof(resp));
> > > > +}
> > > > +
> > > > int ibv_cmd_destroy_ah(struct ibv_ah *ah)
> > > > {
> > > > struct ibv_destroy_ah cmd;
> > > > diff --git a/src/libibverbs.map b/src/libibverbs.map
> > > > index 46744e5..ddba63a 100644
> > > > --- a/src/libibverbs.map
> > > > +++ b/src/libibverbs.map
> > > > @@ -118,7 +118,6 @@ IBVERBS_1.1 {
> > > > ibv_cmd_create_qp_ex2;
> > > > ibv_cmd_open_qp;
> > > > ibv_cmd_rereg_mr;
> > > > -
> > > > } IBVERBS_1.0;
> > > >
> > > > IBVERBS_1.3 {
> > > > @@ -130,3 +129,8 @@ IBVERBS_1.3 {
> > > > ibv_cmd_destroy_rwq_ind_table;
> > > > ibv_query_gid_type;
> > > > } IBVERBS_1.1;
> > > > +
> > > > +IBVERBS_1.4 {
> > > Any reason to add 1.4 instead of using 1.3 ? in my understanding the
> > > idea is that new symbols for next release will use a new ABI version,
> > > this is what 1.3 already supplied. Added Jason for his input as well.
> >
> > good point - Jason?
> >
> > > >
> > > > + global:
> > > > + ibv_cmd_create_ah_ex;
> > > When do you plan to contribute the driver code for that ? for now no
> > > upstream drivers uses this API, taking some code for future usage with
> > > no current usage is not the preferred way.
> >
> > The plan is ASAP, the kernel side has been approved for release by Oracle's
> > legal dep, but the user library is still stuck, and with an undesirable
> > license combination given Jason's recent consolidation efforts :-/
>
> Jason didn't change licenses. You still can release your driver under
> dual-license in similar way to other drivers.
The problem is that libsif is stuck under a BSD only license imposed by
the first set of lawyers involved, and to be compatible, we need it
to be dual license GPLv2 + BSD like the rest of the provider libraries.
Knut
> >
> > Knut
> >
> > > >
> > > > +} IBVERBS_1.3;
> > > >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
[not found] ` <550041ef-b105-c079-068c-d96278ec34f1-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-09-20 11:37 ` Knut Omang
@ 2016-09-20 15:32 ` Jason Gunthorpe
[not found] ` <20160920153217.GE32020-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
1 sibling, 1 reply; 12+ messages in thread
From: Jason Gunthorpe @ 2016-09-20 15:32 UTC (permalink / raw)
To: Yishai Hadas
Cc: Knut Omang, Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
Mukesh Kacker
On Tue, Sep 20, 2016 at 02:17:04PM +0300, Yishai Hadas wrote:
> Any reason to add 1.4 instead of using 1.3 ? in my understanding the idea is
> that new symbols for next release will use a new ABI version, this is what
> 1.3 already supplied. Added Jason for his input as well.
Doug indicated he was going to roll a 1.3 release RSN, up to him what
number it will be eventually.
> >+ global:
> >+ ibv_cmd_create_ah_ex;
>
> When do you plan to contribute the driver code for that ? for now no
> upstream drivers uses this API, taking some code for future usage with no
> current usage is not the preferred way.
Even a github reference with your pre-submission driver would be useful
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
[not found] ` <1474380350.20134.162.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2016-09-20 15:51 ` Jason Gunthorpe
[not found] ` <20160920155136.GF32020-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: Jason Gunthorpe @ 2016-09-20 15:51 UTC (permalink / raw)
To: Knut Omang
Cc: Leon Romanovsky, Yishai Hadas, Doug Ledford,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker,
. Coulter, Susan K, Woodruff, Robert J
On Tue, Sep 20, 2016 at 04:05:50PM +0200, Knut Omang wrote:
> The problem is that libsif is stuck under a BSD only license imposed by
> the first set of lawyers involved, and to be compatible, we need it
> to be dual license GPLv2 + BSD like the rest of the provider libraries.
Here is some (not a lawyer) information you may find helpful.
Oracle is an OFA member and part of the purpose of groups of OFA is to
manage license issues across companies collaborating on the same code
base. Oracle will have agreed to various things on this topic when
they became a member. The OFA may be able to help you with your legal.
The OFA may choose to not distribute improperly licensed code in
OFED/etc.
GPLv2 compatability is important. Not just for the consolidated tree,
but for everyone. Distors will have complicated questions if asked to
ship a GPLv2 incompatible plugin at the same time as shipping a GPLv2
program that uses the plugin. You may find your module undistributed.
That said, it is widely regarded that the BSD 2 and 3 clause license
varients are GPLv2 compatible on their own without any additional
language.
My view on the OFA dual license scheme is that it is used to
provide absolute certainty that the code is GPLv2 compatible.
Many other projects rely on the compatibility without being explicit.
I would have no objection to a BSD 2/3 clause licensed provider in the
consolidated tree. (while being confused why adding the GPLv2 option
is such a difficult problem, and re-emphasising the view that the code
will be used and distributed under the GPLv2 in some situations.)
A GPLv2 incompatible option like the CDDL, Apache license, etc is not
acceptable. Do not get creative and add new clauses to the stanard BSD
license.
So, in short, I would urge you to work with your legal to use the OFA
dual license. If that is completely impossible then a standard BSD
license will work to some degree. Remember, it is very hard to change
licenses after the fact.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
[not found] ` <20160920155136.GF32020-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-22 4:35 ` Knut Omang
0 siblings, 0 replies; 12+ messages in thread
From: Knut Omang @ 2016-09-22 4:35 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Leon Romanovsky, Yishai Hadas, Doug Ledford,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker,
. Coulter, Susan K, Woodruff, Robert J
On Tue, 2016-09-20 at 09:51 -0600, Jason Gunthorpe wrote:
> On Tue, Sep 20, 2016 at 04:05:50PM +0200, Knut Omang wrote:
>
> > The problem is that libsif is stuck under a BSD only license imposed by
> > the first set of lawyers involved, and to be compatible, we need it
> > to be dual license GPLv2 + BSD like the rest of the provider libraries.
>
> Here is some (not a lawyer) information you may find helpful.
>
> Oracle is an OFA member and part of the purpose of groups of OFA is to
> manage license issues across companies collaborating on the same code
> base. Oracle will have agreed to various things on this topic when
> they became a member. The OFA may be able to help you with your legal.
>
> The OFA may choose to not distribute improperly licensed code in
> OFED/etc.
>
> GPLv2 compatability is important. Not just for the consolidated tree,
> but for everyone. Distors will have complicated questions if asked to
> ship a GPLv2 incompatible plugin at the same time as shipping a GPLv2
> program that uses the plugin. You may find your module undistributed.
>
> That said, it is widely regarded that the BSD 2 and 3 clause license
> varients are GPLv2 compatible on their own without any additional
> language.
>
> My view on the OFA dual license scheme is that it is used to
> provide absolute certainty that the code is GPLv2 compatible.
> Many other projects rely on the compatibility without being explicit.
>
> I would have no objection to a BSD 2/3 clause licensed provider in the
> consolidated tree. (while being confused why adding the GPLv2 option
> is such a difficult problem, and re-emphasising the view that the code
> will be used and distributed under the GPLv2 in some situations.)
>
> A GPLv2 incompatible option like the CDDL, Apache license, etc is not
> acceptable. Do not get creative and add new clauses to the stanard BSD
> license.
>
> So, in short, I would urge you to work with your legal to use the OFA
> dual license. If that is completely impossible then a standard BSD
> license will work to some degree. Remember, it is very hard to change
> licenses after the fact.
Thanks for spending time on this, Jason, appreciated!
I'll bring it forward as best as I can. The point of piggybacking on the OFA
work on licensing is a good point I'll forward to the legal dep.
And this discussion also reinforces my argument that we, the SIF software team
should persist in our request to get this right from the beginning.
Knut
>
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
[not found] ` <20160920153217.GE32020-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-22 4:46 ` Knut Omang
0 siblings, 0 replies; 12+ messages in thread
From: Knut Omang @ 2016-09-22 4:46 UTC (permalink / raw)
To: Jason Gunthorpe, Yishai Hadas
Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker
On Tue, 2016-09-20 at 09:32 -0600, Jason Gunthorpe wrote:
> On Tue, Sep 20, 2016 at 02:17:04PM +0300, Yishai Hadas wrote:
>
> > Any reason to add 1.4 instead of using 1.3 ? in my understanding the idea is
> > that new symbols for next release will use a new ABI version, this is what
> > 1.3 already supplied. Added Jason for his input as well.
>
> Doug indicated he was going to roll a 1.3 release RSN, up to him what
> number it will be eventually.
>
> > >+ global:
> > >+ ibv_cmd_create_ah_ex;
> >
> > When do you plan to contribute the driver code for that ? for now no
> > upstream drivers uses this API, taking some code for future usage with no
> > current usage is not the preferred way.
>
> Even a github reference with your pre-submission driver would be useful
Tried to find an Oracle employee active user without success so far,
so I need to validate that this is ok. In parallel I am pursuing getting
public git repos on the Oracle OSS site for it.
My plan is to post the driver in a big
file-by-file commit series rebased to the latest, but I have
got a bit delayed by other work, so I think realistically
that I am not ready until mid-Oct.
Thanks,
Knut
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-09-22 4:46 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-20 6:22 [PATCH libibverbs v3 0/3] SIF related libibverbs patches Knut Omang
[not found] ` <cover.b0b7418bec346c028215053b3e58e097aa822563.1474352400.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-20 6:22 ` [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters Knut Omang
[not found] ` <d551c3792e884443903c67212f505082cd53b135.1474352400.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-20 11:17 ` Yishai Hadas
[not found] ` <550041ef-b105-c079-068c-d96278ec34f1-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-09-20 11:37 ` Knut Omang
[not found] ` <1474371459.8837.32.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-20 13:29 ` Leon Romanovsky
[not found] ` <20160920132945.GO26673-2ukJVAZIZ/Y@public.gmane.org>
2016-09-20 14:05 ` Knut Omang
[not found] ` <1474380350.20134.162.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-20 15:51 ` Jason Gunthorpe
[not found] ` <20160920155136.GF32020-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-22 4:35 ` Knut Omang
2016-09-20 15:32 ` Jason Gunthorpe
[not found] ` <20160920153217.GE32020-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-22 4:46 ` Knut Omang
2016-09-20 6:22 ` [PATCH libibverbs v3 2/3] Add padding to get proper end alignment of ibv_reg_mr_resp Knut Omang
2016-09-20 6:22 ` [PATCH libibverbs v3 3/3] Provide remote XRC SRQ number in kernel post_send Knut Omang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).