[openfabrics-ewg] iSER support in OFED 1.1 for SLERT

Erez Zilber erezz at voltaire.com
Mon Jan 22 01:37:58 PST 2007


>>> Well, as soon as I said that we would never change the suse minor number
>>> for a maintenance kernel release.....   The current SLES/D maintenance
>>> kernel found in the Novell updates site has the revision: 2.6.16.27-0.6
>>>
>>> So, the test above will fail on that kernel and iser will yet again not
>>> be built.
>>>
>>> It's probably best to use this test for SLES 10:
>>>
>>>         case ${K_VER} in
>>>          -    2.6.16.21-0.8-smp)
>>>          +    2.6.16*)
>>>     
>> But, it'll also catch all kernel.org kernels and any other 2.6.16 based distro,
>> so that's no good.
>> Something like 2.6.16.*-*.*) would be a bit safer.
>>
>> I'm not strong on shell glob pattern but I think we even want something that
>> matches regexp 2\.6\.16\.?[0-9]+-[0-9]+\.[0-9]+-smp). It's a pity SLES does
>> not label its kernels more clearly. Something like
>> 2.6.16.21-0.8-smp-sles10 would be much better (like fedora does).
>>
>>   
> Alex,
> 
> Since you (Novell) define the policy of SLES kernel versions, can you
> define a rule that we can use instead of the rule that I suggested
> (2.6.16.21*)? using something like 2.6.16* may be problematic because it
> will also catch something like 2.6.16.1 and we don't want this.
> 

I think that the following patch should do the work. It checks if the kernel is 2.6.16.*. If the result is true, it checks if /lib/modules/${K_VER} belongs to a package. This test will be successful for any SLES 10 version. It will fail if you use something like 2.6.16.21 from kernel.org.


diff -rup OFED-1.1/build_env.sh OFED-1.1-fix-for-SLERT/build_env.sh
--- OFED-1.1/build_env.sh	2006-10-19 16:18:25.000000000 +0200
+++ OFED-1.1-fix-for-SLERT/build_env.sh	2007-01-22 11:14:58.000000000 +0200
@@ -131,9 +131,13 @@ esac
 IB_KERNEL_PACKAGES="$BASIC_IB_KERNEL_PACKAGES $KERNEL_TECHNOLOGY_PREVIEW ib_sdp ib_srp" #ib_rds 
 
 case ${K_VER} in
-    2.6.16.21-0.8-smp)
+    2.6.16.*)
     # Currently ISER is supported only on SLES10
-    IB_KERNEL_PACKAGES="$IB_KERNEL_PACKAGES ib_iser"
+    # make sure that the original SLES10 kernel is running
+    rpm -qf /lib/modules/${K_VER} > /dev/null 2>&1
+    if [ $? -eq 0 ]; then
+        IB_KERNEL_PACKAGES="$IB_KERNEL_PACKAGES ib_iser"
+    fi
     ;;
     2.6.5-7.244*)
     # Currently ib_verbs, ib_mthca, ib_ipoib and ib_srp are supported on SLES9 SP3
@@ -1458,12 +1462,20 @@ set_package_deps()
                             OPENIB_PACKAGES=$(echo "$OPENIB_PACKAGES kernel-ib" | tr -s ' ' '\n' | sort -n | uniq)
                     ;;
                     ib_iser)
-                        # Currently ISER is supported only on SLES10 RC1
+                        # Currently ISER is supported only on SLES10
+                        # make sure that the original SLES10 kernel is running
                         # 2.6.[1-9][6-9]*)
                         case ${K_VER} in
-                        2.6.16.21-0.8-smp)
-                            OPENIB_KERNEL_PACKAGES=$(echo "$OPENIB_KERNEL_PACKAGES ib_verbs ${ll_driver} ib_iser" | tr -s ' ' '\n' | sort -n | uniq)
-                            OPENIB_PACKAGES=$(echo "$OPENIB_PACKAGES kernel-ib" | tr -s ' ' '\n' | sort -n | uniq)
+                        2.6.16.*)
+                            rpm -qf /lib/modules/${K_VER} > /dev/null 2>&1
+                            if [ $? -eq 0 ]; then
+                                OPENIB_KERNEL_PACKAGES=$(echo "$OPENIB_KERNEL_PACKAGES ib_verbs ${ll_driver} ib_iser" | tr -s ' ' '\n' | sort -n | uniq)
+                                OPENIB_PACKAGES=$(echo "$OPENIB_PACKAGES kernel-ib" | tr -s ' ' '\n' | sort -n | uniq)
+                            else
+                                if [ "$prog" == "build.sh" ]; then
+                                    warn_echo ISER is not supported by this kernel
+                                fi
+                            fi
                         ;;
                         *)
                             if [ "$prog" == "build.sh" ]; then

-- 
____________________________________________________________

Erez Zilber   |  972-9-971-7689

Software Engineer, Storage Team

Voltaire – _The Grid Backbone_

 __

 www.voltaire.com <http://www.voltaire.com/>

<mailto:g at voltaire.com>

  






More information about the ewg mailing list