Whamcloud - gitweb
LU-6399 lnet: socket cleanup 79/14179/8
authorAlexander Boyko <c17825@cray.com>
Mon, 7 May 2018 13:56:51 +0000 (09:56 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 21 May 2018 16:51:38 +0000 (16:51 +0000)
commite37335b2d8c2dc74badea8978ab3f46a63621265
tree0a6a7993220a1115cff378845cd8be81e74d746b
parent4813eee9b06f6ceb4f39cce42d904ec1516a824a
LU-6399 lnet: socket cleanup

The ioctl request was designed to get all needed information
through socket from usermode. But the same patterns with tricks
was used at kernel by lib-socket..
The patch changes this behavior from socket to kernel socket.
For libcfs_sock_ioctl tricks with usermode call removed,
kernel_sock_ioctl is used instead. But this call handle SIOCGIFADDR
and SIOCGIFNETMASK. For SIOCGIFFLAGS we take device flag directly.
Function libcfs_ipif_enumerate() which are used SIOCGIFCONF command
totally rewriten to get device names without ioctl requests.

Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: Idf0da800a49dbefa419fc5fecaa9ee1bd4d85327
Reviewed-on: https://review.whamcloud.com/14179
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/autoconf/lustre-libcfs.m4
lnet/lnet/lib-socket.c