Whamcloud - gitweb
LU-10214 lnet: allow expressions for route config 11/30511/4
authorAmir Shehata <amir.shehata@intel.com>
Thu, 12 Apr 2018 03:24:43 +0000 (20:24 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 2 May 2018 02:21:14 +0000 (02:21 +0000)
commit235e8dea46f6f9ec0021c789cb5b9214cee94e38
tree6abb276ef5c75446b584e758f2878edc05632b3d
parent81af3db1998c2c4cca1af8f463c986257fefca4f
LU-10214 lnet: allow expressions for route config

Support the ip2nets syntax for route gateway configuration. Only support
a maximum of 128 gateways per configuration command. This upper limit is
to prevent a large number of routes to be configured by mistake. This
feature is available from both command line and YAML interfaces.

Command line examples:
lnetctl route add --net tcp1 --gateway 12.3.4.[2-6]@tcp
lnetctl route del --net tcp1 --gateway 12.3.4.[2-6]@tcp

YAML examples:
route:
    - net: tcp1
      gateway: 12.3.4.[2-20]@tcp

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I0d8a0f94cce7140602a64f13f0401ef209f3ca57
Reviewed-on: https://review.whamcloud.com/30511
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/utils/lnetconfig/liblnetconfig.c