diff mbox

[rdma-core,6/7] ibverbs: Update man pages to include cvlan offloads options

Message ID 1489490143-29018-7-git-send-email-yishaih@mellanox.com (mailing list archive)
State Superseded
Headers show

Commit Message

Yishai Hadas March 14, 2017, 11:15 a.m. UTC
From: Noa Osherovich <noaos@mellanox.com>

Provide information about the cvlan stripping offload for
- ibv_create_wq
- ibv_modify_wq
- ibv_create_cq_ex
- ibv_query_device_ex

Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
---
 libibverbs/man/ibv_create_cq_ex.3    |  9 +++++++--
 libibverbs/man/ibv_create_wq.3       | 10 ++++++++++
 libibverbs/man/ibv_modify_wq.3       |  2 ++
 libibverbs/man/ibv_query_device_ex.3 |  1 +
 4 files changed, 20 insertions(+), 2 deletions(-)

Comments

Jason Gunthorpe March 14, 2017, 3:48 p.m. UTC | #1
On Tue, Mar 14, 2017 at 01:15:42PM +0200, Yishai Hadas wrote:
> From: Noa Osherovich <noaos@mellanox.com>
> 
> Provide information about the cvlan stripping offload for
> - ibv_create_wq
> - ibv_modify_wq
> - ibv_create_cq_ex
> - ibv_query_device_ex

I continue to be annoyed that these patches are extending the 'common'
API without providing enough descriptive information to understand
exactly what these new options are supposed to do and how to implement
them.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yishai Hadas March 14, 2017, 4:41 p.m. UTC | #2
On 3/14/2017 5:48 PM, Jason Gunthorpe wrote:
> On Tue, Mar 14, 2017 at 01:15:42PM +0200, Yishai Hadas wrote:
>> From: Noa Osherovich <noaos@mellanox.com>
>>
>> Provide information about the cvlan stripping offload for
>> - ibv_create_wq
>> - ibv_modify_wq
>> - ibv_create_cq_ex
>> - ibv_query_device_ex
>
> I continue to be annoyed that these patches are extending the 'common'
> API without providing enough descriptive information to understand
> exactly what these new options are supposed to do and how to implement
> them.

This man page patch follows other man pages spirit which basically adds 
the new fields with some extra notes, there is no new verbs around and 
we expect that it will be enough.

In addition, each patch expects to be clear from usage point of view and 
its purpose, it includes relevant notes in code when we found it helpful 
and has a detailed commit log.

However, if you find some specific patch that needs some extended commit 
log or you can point on a specific note that needs some man page 
extension please point on and we'll send an update for.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jason Gunthorpe March 14, 2017, 4:57 p.m. UTC | #3
On Tue, Mar 14, 2017 at 06:41:17PM +0200, Yishai Hadas wrote:
> On 3/14/2017 5:48 PM, Jason Gunthorpe wrote:
> >On Tue, Mar 14, 2017 at 01:15:42PM +0200, Yishai Hadas wrote:
> >>From: Noa Osherovich <noaos@mellanox.com>
> >>
> >>Provide information about the cvlan stripping offload for
> >>- ibv_create_wq
> >>- ibv_modify_wq
> >>- ibv_create_cq_ex
> >>- ibv_query_device_ex
> >
> >I continue to be annoyed that these patches are extending the 'common'
> >API without providing enough descriptive information to understand
> >exactly what these new options are supposed to do and how to implement
> >them.
> 
> This man page patch follows other man pages spirit which basically adds the
> new fields with some extra notes, there is no new verbs around and we expect
> that it will be enough.
> 
> In addition, each patch expects to be clear from usage point of view and its
> purpose, it includes relevant notes in code when we found it helpful and has
> a detailed commit log.
>
> However, if you find some specific patch that needs some extended commit log
> or you can point on a specific note that needs some man page extension
> please point on and we'll send an update for.

As I said, it is all inadequate.

If you want to extend the comon API you need to describe your
extensions *somewhere* to a spec-level quality.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/libibverbs/man/ibv_create_cq_ex.3 b/libibverbs/man/ibv_create_cq_ex.3
index a6ae769..020bbb4 100644
--- a/libibverbs/man/ibv_create_cq_ex.3
+++ b/libibverbs/man/ibv_create_cq_ex.3
@@ -17,10 +17,10 @@  creates a completion queue (CQ) for RDMA device context
 .I context\fR.
 The argument
 .I cq_attr
-is a pointer to struct ibv_create_cq_attr_ex as defined in <infiniband/verbs.h>.
+is a pointer to struct ibv_cq_init_attr_ex as defined in <infiniband/verbs.h>.
 .PP
 .nf
-struct ibv_create_cq_attr_ex {
+struct ibv_cq_init_attr_ex {
 .in +8
 int                     cqe;               /* Minimum number of entries required for CQ */
 void                    *cq_context;       /* Consumer-supplied context returned for completion events */
@@ -28,6 +28,7 @@  struct ibv_comp_channel *channel;          /* Completion channel where completio
 int                     comp_vector;       /* Completion vector used to signal completion events. Must be >= 0 and < context->num_comp_vectors. */
 uint64_t                wc_flags;          /* The wc_flags that should be returned in ibv_poll_cq_ex. Or'ed bit of enum ibv_wc_flags_ex. */
 uint32_t                comp_mask;         /* compatibility mask (extended verb). */
+uint32_t                flags              /* One or more flags from enum ibv_create_cq_attr_flags */
 .in -8
 };
 
@@ -40,6 +41,7 @@  enum ibv_wc_flags_ex {
         IBV_WC_EX_WITH_SL                    = 1 << 5,  /* Require sl in WC */
         IBV_WC_EX_WITH_DLID_PATH_BITS        = 1 << 6,  /* Require dlid path bits in WC */
         IBV_WC_EX_WITH_COMPLETION_TIMESTAMP  = 1 << 7,  /* Require completion timestamp in WC /*
+        IBV_WC_EX_WITH_CVLAN                 = 1 << 8,  /* Require VLAN info in WC */
 };
 
 enum ibv_cq_init_attr_mask {
@@ -128,6 +130,9 @@  Below members and functions are used in order to poll the current completion. Th
 .BI "uint64_t ibv_wc_read_completion_ts(struct ibv_cq_ex " "*cq"); \c
  Get the completion timestamp from the current completion.
 
+.BI "uint16_t ibv_wc_read_cvlan(struct ibv_cq_ex " "*cq"); \c
+ Get the CVLAN field from the current completion.
+
 .SH "RETURN VALUE"
 .B ibv_create_cq_ex()
 returns a pointer to the CQ, or NULL if the request fails.
diff --git a/libibverbs/man/ibv_create_wq.3 b/libibverbs/man/ibv_create_wq.3
index aad6741..81fea04 100644
--- a/libibverbs/man/ibv_create_wq.3
+++ b/libibverbs/man/ibv_create_wq.3
@@ -31,8 +31,18 @@  uint32_t                   max_sge;       /* Requested max number of scatter/gat
 struct  ibv_pd            *pd;            /* PD to be associated with the WQ */
 struct  ibv_cq            *cq;            /* CQ to be associated with the WQ */
 uint32_t                   comp_mask;     /* Identifies valid fields. Use ibv_wq_init_attr_mask */
+uint32_t                  create_flags    /* Creation flags for this WQ, use enum ibv_wq_flags */
 .in -8
 };
+.sp
+.nf
+enum ibv_wq_flags {
+.in +8
+IBV_WQ_FLAGS_CVLAN_STRIPPING            = 1 << 0,
+IBV_WQ_FLAGS_RESERVED                   = 1 << 1,
+.in -8
+};
+.nf
 .fi
 .PP
 The function
diff --git a/libibverbs/man/ibv_modify_wq.3 b/libibverbs/man/ibv_modify_wq.3
index f17faed..1972ec2 100644
--- a/libibverbs/man/ibv_modify_wq.3
+++ b/libibverbs/man/ibv_modify_wq.3
@@ -26,6 +26,8 @@  struct ibv_wq_attr {
 uint32_t                attr_mask;     /* Use enum ibv_wq_attr_mask */
 enum ibv_wq_state       wq_state;      /* Move to this state */
 enum ibv_wq_state       curr_wq_state; /* Assume this is the current state */
+uint32_t                flags;         /* Flags values to modify, use enum ibv_wq_flags */
+uint32_t                flags_mask;    /* Which flags to modify, use enum ibv_wq_flags */
 .in -8
 };
 .fi
diff --git a/libibverbs/man/ibv_query_device_ex.3 b/libibverbs/man/ibv_query_device_ex.3
index c291017..7f58355 100644
--- a/libibverbs/man/ibv_query_device_ex.3
+++ b/libibverbs/man/ibv_query_device_ex.3
@@ -32,6 +32,7 @@  struct ibv_tso_caps    tso_caps;                   /* TCP segmentation offload c
 struct ibv_rss_caps    rss_caps;                   /* RSS capabilities */
 uint32_t               max_wq_type_rq;             /* Max Work Queue from type RQ */
 struct ibv_packet_pacing_caps packet_pacing_caps; /* Packet pacing capabilities */
+uint32_t               raw_packet_caps;            /* Raw packet capabilities, use enum ibv_raw_packet_caps */
 .in -8
 };