LU-8915 lnet: migrate LNet selftest group handling to Netlink Replace the LSTIO_GROUP_LIST and LSTIO_GROUP_INFO ioctls with a Netlink backend. Make this transitition transparent to the user. Be aware this newer version of lnet_selftest.ko doesn't support older versions of the lst tool. While the old interface allows only setting one group up at a time the Netlink interface can be used to setup many groups at one time. Currently we don't change the interface to handle larger NIDs but this new interface will allow us to use the new NID format in a follow on patch. Change-Id: I18f07b380d353425c6e127e4fbd0f30e41f66944 Test-Parameters: trivial testlist=lnet-selftest Signed-off-by: James Simmons <jsimmons@infradead.org> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49314 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com> Reviewed-by: Chris Horn <chris.horn@hpe.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-8915 lnet: migrate LNet selftest session handling to Netlink The currently LNet selftest ioctl interface has a few issues which can be resolved using Netlink. The first is the current API using struct list_head is disliked by the Linux VFS maintainers. While we technically don't need to use the struct list_head directly its still confusing and passing pointers from userland to kernel space is also frowned on. Second issue that is exposed with debug kernels is that ioctl handling done with the lstcon_ioctl_handler can easily end up in a might_sleep state. The new Netlink work is also needed for the IPv6 support. Update the session handling to work with large NIDs. Internally use struct lst_session_id which supports large NIDs instead of struct lst_sid. Lastly we have been wanting YAMl handling with LNet selftest (LU-10975) which comes naturally with this work. Test-Parameters: trivial testlist=lnet-selftest Change-Id: I6ac56e51c6bfcf651a28388129020249166a7034 Signed-off-by: James Simmons <jsimmons@infradead.org> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/43298 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
LU-14487 lnet: remove references to Sun Trademark. "lustre" is no longer a Trademark of Sun Microsystems. There is no need to acknowledge the trademark in every file, so just remove all these claims. Test-Parameters: trivial Signed-off-by: Mr NeilBrown <neilb@suse.de> Change-Id: If7e61a7583ca80f024638b6f04382898c75acc91 Reviewed-on: https://review.whamcloud.com/42138 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org>
LU-13344 lnet: stop using struct timeval The struct timeval is not 2038 safe so the Linux kernel is moving away from its use. The use of rpe_stamp hasn't been used since Lustre 2.2 so remove the userland use of this field. This frees use to change rpe_stamp to an equivalent struct timespec64 for future use. Greatly simplify lnet_sock_[read|write] by using jiffies values of sk_sndtimeo, sk_rcvtimeo cached in struct sock. Change-Id: Ib58193756ec4a526e55bc810c05abd3920b2b269 Signed-off-by: James Simmons <jsimmons@infradead.org> Reviewed-on: https://review.whamcloud.com/38105 Tested-by: jenkins <devops@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Tested-by: Maloo <maloo@whamcloud.com>
LU-6202 libcfs: replace libcfs_register_ioctl with a blocking notifier_chain libcfs allows other modules to register handlers for ioctls. The implementation it uses for this is nearly identical to a blocking notifier chain, so change to use that. The biggest difference is that the return value from notifier has a defined format, where libcfs_register_ioctl uses -EINVAL to mean "continue". This requires a little bit of conversion. Linux-commit: 912a846027c203370f4837a2b2db7ba2ebe1b47c Change-Id: I84657fc1befd004eb09de37b5549af8bff034738 Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/33284 Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Ben Evans <bevans@cray.com> Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-9019 selftest: remove remaining cfs_time wrappers Remove remaining libcfs time wrappers from lnet selftest. Migrate crp_stamp to nanoseconds and both timestamps nd_stamp, sn_start to ktime. The move away from jiffies which can vary on platforms to something that is the consistent on every node. This will ensure that the reported results to the user will always be correct. Test-Parameters: trivial testlist=lnet-selftest Change-Id: Id8d1b195f690c69635de60dd9b501f6d97f90f4d Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/31041 Tested-by: Jenkins Reviewed-by: Doug Oucharek <dougso@me.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-9859 libcfs: delete libcfs/linux/libcfs.h Lustre uses libcfs.h as a the header to include all headers. This approach has drawbacks like colliding with MOFED compat headers that do the same thing. This patch is the first step to unwind including libcfs.h everywhere. This starts with eliminating linux/libcfs.h. Test-Parameters: trivial Change-Id: Id2040d4295c16135561c8251e160cb2117ee21b8 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/30706 Reviewed-by: Doug Oucharek <dougso@me.com> Tested-by: Jenkins Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
LU-6245 uapi: move libcfs/lnet UAPI header into own uapi directory Move all the libcfs/lnet headers shared between user land and kernel space to the new lnet uapi directory. Test-Parameters: trivial Change-Id: Id6142b0e890fd47d3318dc3c98e64f72b5df2594 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/28089 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6142 selftest: remove typedefs from lnet selftest Change the typedefs in lnet selftest to proper structures. Several other style changes to fix checkpatch issues with code impacted by tyepdef change. Test-Parameters: testlist=lnet-selftest Change-Id: I941d460566673ccb5bccad9f3506f90ede47ed67 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/27298 Reviewed-by: Doug Oucharek <doug@cadentcomputing.com> Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Olaf Weber <olaf.weber@hpe.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6142 lnet: remove most of typedefs from LNet headers Remove the majority of typedefs from the LNet headers. Change them into structures instead. Currently only lnet_nid_t, lnet_pid_t, and lnet_kiov_t are left. Test-Parameters: trivial Change-Id: Ib083d305ab945bab8d78ac96d17015550c0f9486 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber <olaf@sgi.com> Tested-by: Jenkins Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6245 libcfs: add ktime_get_real_seconds support In newer kernels time support is moving to u64 to avoid the 2038 limitation. The function get_seconds() which only returns a 32 bit value is being replaced by a new function ktime_get_real_seconds(). This patch adds a wrapper for older platforms that lack this function. Only the libcfs/LNet layer has been ported in this patch since it is a huge change. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Change-Id: Ic16859f1b052bfb72299cc85fe50364a9e70d660 Reviewed-on: https://review.whamcloud.com/22866 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6142 lnet: change lnet selftest UAPI typedefs to proper structure The upstream kernel requires proper structures so convert all the UAPI typdefs in lnetst.h. Test-Parameters: trivial testlist=lnet-selftest Change-Id: I6a342e91a5331a946b74a01229deed2bfa6b6441 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/24188 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
LU-8648 all: remove all Sun license and URL references The link to the GPL license at Sun is no longer there. Also Sun Inc is gone so lets remove all references to it in our source code. Test-Parameters: trivial Change-Id: Ib47d07dcef49a1ef624d0d8a4a91b9731f486278 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: http://review.whamcloud.com/22800 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Frank Zago <fzago@cray.com>
LU-2675 lnet: assume a kernel build In lnet/lnet/ and lnet/selftest/ assume a kernel build (assume that __KERNEL__ is defined). Remove some common code only needed for user space LNet. Signed-off-by: John L. Hammond <john.hammond@intel.com> Change-Id: I79d6f50bac895116628c93c35e23f64dd102780f Reviewed-on: http://review.whamcloud.com/13121 Tested-by: Jenkins Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Amir Shehata <amir.shehata@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5396 lnet: make some functions static Some functions and variables are only used in their C file, so reduce their scope. This reduces the code size, and fixes sparse warnings such as: warning: symbol 'proc_lnet_routes' was not declared. Should it be static? warning: symbol 'proc_lnet_routers' was not declared. Should it be static? Some prototypes were removed from C files and added to the proper header. Change-Id: I6b0c527d64ea9e3394cc686699d2e75eec5c16a2 Signed-off-by: Frank Zago <fzago@cray.com> Reviewed-on: http://review.whamcloud.com/12206 Tested-by: Jenkins Reviewed-by: James Simmons <uja.ornl@gmail.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-6068 misc: update Intel copyright messages 2014 Update the copyright messages for changes made in 2014. In some cases, changes made in 2013 did not generate an updated copyright message, so these files are updated accordingly. In some cases there were no licenses on newly-added files, so add them (either with new copyrights, or including copyrights from the source files). Some types of changes that are not actually changing the code (e.g. whitespace, mass changes to add or remote prefixes, patches updating the copyright messages, patch reversions and the reverted patch, patches that only delete code, etc.) have been excluded. The updatecw.sh script was updated to fix a number of problems: - it now handles comments in nroff (man page) files properly - remove need to handle non-Intel copyrights specially - allow subdirectory to be specified on command-line - improve script debugging when running with "sh -vx" - print patches changing the most files, to catch mass replacements There are still a few cases that need to be fixed up by hand (e.g. files split up and "git log --follow" can't find the original). Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: Ib4875400a4908dc79ddc8b82ab0fe3ee903ebbe5 Reviewed-on: http://review.whamcloud.com/13174 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5396 lnet: add sparse annotation __user wherever needed This fixes sparse warnings such as: .../api-ni.c:1639:33: warning: incorrect type in argument 3 (different address spaces) .../api-ni.c:1639:33: expected struct lnet_process_id_t [noderef] [usertype] <asn:1>*ids .../api-ni.c:1639:33: got struct lnet_process_id_t [usertype] *<noident> There is no code change. Change-Id: Iff822b1e6036709e3bd660fe14d8faa58b308995 Signed-off-by: frank zago <fzago@cray.com> Reviewed-on: http://review.whamcloud.com/11819 Tested-by: Jenkins Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5396: add spare annotation __user wherever needed This fixes sparse warnings such as: .../api-ni.c:1639:33: warning: incorrect type in argument 3 (different address spaces) .../api-ni.c:1639:33: expected struct lnet_process_id_t [noderef] [usertype] <asn:1>*ids .../api-ni.c:1639:33: got struct lnet_process_id_t [usertype] *<noident> There is no code change. Signed-off-by: frank zago <fzago@cray.com> Change-Id: I683ce17935ce0cc76ce4b450bc3750b7bca4d9a8 Reviewed-on: http://review.whamcloud.com/11202 Tested-by: Jenkins Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Patrick Farrell <paf@cray.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3963 libcfs: convert LNET layer to linux list api This patch converts all cfs_list primitives to the linux api for the LNET layer. Change-Id: Id790b87d253db759edb921f4828f04b11bbe6fe9 Signed-off-by: James Simmons <uja.ornl@gmail.com> Reviewed-on: http://review.whamcloud.com/9369 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Amir Shehata <amir.shehata@intel.com>
LU-3963 lnet: convert cfs_atomic primitives This patch convers all cfs_atomic primitives in lnet/ directory. Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: I81426bd7a8a1a97ea5f198d99193649fbbf5389a Reviewed-on: http://review.whamcloud.com/7070 Tested-by: Hudson Reviewed-by: Bob Glossman <bob.glossman@intel.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>