On 24-Feb-19 15:06, Noa Osherovich wrote: > Update pyverbs.md with small examples: > - Query a port > - Extended query device > - Create a PD > - Create a MR > - Create a MW > - Create a DM > - Create a DmMr > > Signed-off-by: Noa Osherovich <noaos@xxxxxxxxxxxx> > --- > Documentation/pyverbs.md | 129 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 129 insertions(+) > > diff --git a/Documentation/pyverbs.md b/Documentation/pyverbs.md > index a3e85c26574a..62faaed97b13 100644 > --- a/Documentation/pyverbs.md > +++ b/Documentation/pyverbs.md > @@ -23,6 +23,7 @@ when needed (e.g. user buffer for memory region). The memory will be accessible > to the users, but not allocated or freed by them. > > ## Usage Examples > +Note that all examples use a hard-coded device name ('mlx5_0'). > ##### Open an IB device > > Import the device module and open a device by name: > @@ -96,3 +97,131 @@ print(gid) > ``` > > 'gid' is Pyverbs' equivalent to ibv_gid, provided to the user by Pyverbs. > + > +##### Query port > +The following code snippet provides an example of pyverbs' equivalent of > +querying an a port. Context's query_port() command wraps ibv_query_port(). Hey Noa, 'querying an a port' -> 'querying a port'.