Whamcloud - gitweb
LU-5435 lnet: LNet drop rule implementation 14/11314/10
authorLiang Zhen <liang.zhen@intel.com>
Mon, 4 Aug 2014 09:16:56 +0000 (17:16 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 1 Nov 2014 04:42:14 +0000 (04:42 +0000)
commita3488d2f33e3ba4ae1d9c127132a6b75b5bb0112
tree704e1e9a95b66ab9a1383136d46c8359510dc806
parent727c49e570544e19f16d1f6dd9ea5d7b7feeff78
LU-5435 lnet: LNet drop rule implementation

This is implementation of LNet Drop Rule, which can randomly drop
LNet messages at specified rate.

LNet Drop Rule can only be applied to receive side of message. User
can add drop_rule either on end point of cluster (client/server) or
on LNet routers.

Here are lctl command to control LNet Drop Rules:
- net_drop_add -s SRC_NID -d DEST_NID --rate VALUE
  drop 1/@VALUE of messages from @SRC_NID to @DEST_NID

- net_drop_del -s SRC_NID -d DEST_NID
  remove all drop rules from @SRC_NID to @DEST_NID

- net_drop_list
  list all drop rules on current node

Examples:
- lctl net_drop_add -s *@o2ib0 -d 192.168.1.102@tcp 1000
  add new drop rule, it will drop 1/1000 messages from network o2ib0
  to 192.168.1.102@tcp

- lctl net_drop_add -s 10.8.6.123@o2ib1 -d * 500
  add new drop rule, it will drop 1/500 messages from 10.8.6.123@o2ib1
  to all nodes

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Ib4cc384a8a191e88bd5f293cf1a5d7f524970d01
Reviewed-on: http://review.whamcloud.com/11314
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/libcfs_ioctl.h
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-types.h
lnet/include/lnet/lnetctl.h
lnet/lnet/Makefile.in
lnet/lnet/api-ni.c
lnet/lnet/autoMakefile.am
lnet/lnet/lib-move.c
lnet/lnet/net_fault.c [new file with mode: 0644]
lnet/utils/portals.c
lustre/utils/lctl.c