Whamcloud - gitweb
LU-6045 lnet: return appropriate errno when adding route 16/13116/2
authorAmir Shehata <amir.shehata@intel.com>
Thu, 18 Dec 2014 03:31:54 +0000 (19:31 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 7 Jan 2015 17:06:15 +0000 (17:06 +0000)
commit0f9f4b1b234bdc12a2604225d8c6398a355b75a4
tree49ddd4a71dcfae164712d195c3ee328b2fd70c2d
parent2bcfce77a2712960fadac2f034c1df4826780608
LU-6045 lnet: return appropriate errno when adding route

When adding route it ignored specific scenarios, namely:
1. route already exists
2. route is on a local net
3. route is unreacheable

This patch returns the appropriate return codes from the lower level
function lnet_add_route(), and then ignores the above case from the
calling function, lnet_parse_route().  This is needed so we don't
halt processing routes in the module parameters.

However, we can now add routes dynamically, and it should be returned
to the user whether adding the requested route succeeded or failed.

In userspace it is determined whether to continue adding routes or to
halt processing.  Currently "lnetctl import < config" continues
adding the rest of the configuration and reports at the end which
operations passed and which ones failed.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ie5367cae74e2b30fc29c33c46d31e11a1629bb5a
Reviewed-on: http://review.whamcloud.com/13116
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/lnet/config.c
lnet/lnet/router.c