Whamcloud - gitweb
LU-5151 lnet: return +ve for blocked lnet messsage 25/10625/6
authorLiang Zhen <liang.zhen@intel.com>
Fri, 6 Jun 2014 09:28:07 +0000 (17:28 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 11 Jun 2014 02:41:28 +0000 (02:41 +0000)
commit5f6879e3946ea805d2445292723ac4de6fdb926a
treeb3d979733612e56289e5cdce6d9a4b4199701241
parent18964424cb1179b9e8ca25288eb1b71ae11e2b4c
LU-5151 lnet: return +ve for blocked lnet messsage

returned value of lnet_post_send_locked and
lnet_post_routed_recv_locked are changed to -ve by:
http://review.whamcloud.com/#/c/9369/

this is wrong because callers rely on +ve to identify blocked
message which is not a failure.

To respect linux kernel coding style and not use positive error
code, this patch adds two macros as non-error returned values of
these functions:
  LNET_CREDIT_OK has credit for message
  LNET_CREDIT_WAIT no credit and message is blocked

both these functions will return these two values instead of 0
and EAGAIN

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id809e4fa6e22780a0bd9ad9c0f0ef96b2c9aa879
Reviewed-on: http://review.whamcloud.com/10625
Tested-by: Jenkins
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/lnet/lib-move.c