]> git.openfabrics.org - ~vlad/ofed_scripts.git/commitdiff
ofed-scripts: Enable iwpmd for iWarp drivers
authorTatyana Nikolova <tatyana.e.nikolova@intel.com>
Thu, 25 May 2017 04:54:48 +0000 (23:54 -0500)
committerVladimir Sokolovsky <vlad@mellanox.com>
Thu, 25 May 2017 20:47:13 +0000 (23:47 +0300)
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
install.pl

index bfdae147724f6ee29224ec709eed7e9467dcd91c..9bae21c658c3e2fd500eb68548c64aa5ebd27a3b 100755 (executable)
@@ -636,6 +636,7 @@ my @kernel_modules = (@basic_kernel_modules, @ulp_modules);
 
 my $kernel_configure_options = '';
 my $user_configure_options = '';
+my $enable_iwpmd = 0;
 
 my @misc_packages = ("ofed-docs", "ofed-scripts");
 
@@ -2522,6 +2523,14 @@ sub install_kernel_rpm
         print RED "See $ofedlogs/$name.rpminstall.log", RESET "\n";
         exit 1;
     }
+
+    if ($name eq "compat-rdma") {
+        for my $module (@selected_kernel_modules) {
+            if ($module eq "i40iw" or $module eq "cxgb4" or $module eq "nes") {
+                $enable_iwpmd = 1;
+            }
+        }
+    }
 }
 
 sub install_rpm_32
@@ -3478,6 +3487,14 @@ sub main
         }
     }
 
+    if ($enable_iwpmd eq 1) {
+        system("command -v \"systemctl\" > /dev/nul");
+        my $res = $? >> 8;
+        if ($res eq 0) {
+            system("systemctl enable iwpmd");
+        }
+    }
+
     print GREEN "\nInstallation finished successfully.", RESET;
     if ($interactive) {
         print GREEN "\nPress any key to continue...", RESET;