[ofa-general] [PATCH] libibumad: umad_get_pkey() function

Sasha Khapyorsky sashak at voltaire.com
Tue Jan 15 06:10:13 PST 2008


On 21:06 Mon 14 Jan     , Hal Rosenstock wrote:
> On 1/13/08, Sasha Khapyorsky <sashak at voltaire.com> wrote:
> >
> > This returns value of pkey_index in network byte order from user_mad
> > header. If we are running with kernel where pkey_index is not supported
> > yet it will return 0.
> >
> > Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
> > ---
> >  libibumad/include/infiniband/umad.h |    1 +
> >  libibumad/src/libibumad.map         |    1 +
> >  libibumad/src/umad.c                |   13 ++++++++++++-
> >  3 files changed, 14 insertions(+), 1 deletions(-)
> >
> > diff --git a/libibumad/include/infiniband/umad.h b/libibumad/include/infiniband/umad.h
> > index 681b440..742c7b0 100644
> > --- a/libibumad/include/infiniband/umad.h
> > +++ b/libibumad/include/infiniband/umad.h
> > @@ -174,6 +174,7 @@ int umad_set_grh(void *umad, void *mad_addr);
> >  int    umad_set_addr_net(void *umad, int dlid, int dqp, int sl, int qkey);
> >  int    umad_set_addr(void *umad, int dlid, int dqp, int sl, int qkey);
> >  int    umad_set_pkey(void *umad, int pkey_index);
> > +int    umad_get_pkey(void *umad);
> >
> >  int    umad_send(int portid, int agentid, void *umad, int length,
> >                  int timeout_ms, int retries);
> > diff --git a/libibumad/src/libibumad.map b/libibumad/src/libibumad.map
> > index 9444aa9..0154b7f 100644
> > --- a/libibumad/src/libibumad.map
> > +++ b/libibumad/src/libibumad.map
> > @@ -15,6 +15,7 @@ IBUMAD_1.0 {
> >                umad_size;
> >                umad_set_grh;
> >                umad_set_pkey;
> > +               umad_get_pkey;
> 
> Shouldn't running rev in libibumad.ver be updated to go along with
> this added API ?

Yes, I think it should. Also we will need to add man page for this new
function.

Sasha



More information about the general mailing list