[openib-general] [PATCH 0/4] [RFC] Consolidate modify_qp checks

Roland Dreier rolandd at cisco.com
Fri Feb 10 16:51:57 PST 2006


Here is a series of patches that adds a new function ib_modify_qp_is_ok(),
which low-level drivers can use to replace boilerplate logic for
validating the parameters to the modify_qp method.

In addition to getting rid of duplicated bugs, this ends up saving
quite a lot of duplicated code across mthca, ipath and ehca:

 core/verbs.c            |  260 ++++++++++++++++++++++++++++++++++++++++++++
 hw/ehca/ehca_qp.c       |  283 +++---------------------------------------------
 hw/ipath/ipath_verbs.c  |  252 +-----------------------------------------
 hw/mthca/mthca_cmd.c    |   98 ++++++++++------
 hw/mthca/mthca_cmd.h    |    5 
 hw/mthca/mthca_qp.c     |  263 ++------------------------------------------
 include/rdma/ib_verbs.h |   18 +++
 7 files changed, 384 insertions(+), 795 deletions(-)

I made this a library function rather than putting the logic directly
into the ib_modify_qp() to give low-level drivers more flexibility in
their implementation, and also to simplify things for things like
iWARP drivers, where modify_qp will be somewhat different.

I'll commit the core and mthca pieces soon if no one objects.  Once
that happens, I hope the PathScale and IBM people can check what I did
to ipath and ehca and commit the changes there as well.



More information about the general mailing list