[openib-general] [PATCH v5 2/3] ofed_1_2 Changes to ofed scripts for Chelsio T3 Support.

Vladimir Sokolovsky vlad at mellanox.co.il
Tue Jan 16 23:44:43 PST 2007


Applied.

Regards,
Vladimir

On Tue, 2007-01-16 at 13:51 -0600, Steve Wise wrote:
> Changes to ofed scripts for Chelsio T3 Support.
> 
> - added cxgb3 and iw_cxgb3 config stuff
> - visit and build driver/net/cxgb3 to get the cxgb3 driver
> 
> Signed-off-by: Steve Wise <swise at opengridcomputing.com>
> ---
> 
>  ofed_scripts/Makefile  |   73 +++++++++++++++++++++++++++++++++++++++++++++++-
>  ofed_scripts/configure |   52 ++++++++++++++++++++++++++++++++++
>  2 files changed, 123 insertions(+), 2 deletions(-)
> 
> diff --git a/ofed_scripts/Makefile b/ofed_scripts/Makefile
> index 63dca81..276400b 100644
> --- a/ofed_scripts/Makefile
> +++ b/ofed_scripts/Makefile
> @@ -33,6 +33,13 @@ uninstall: uninstall_iscsi
>  clean_kernel: clean_kernel_iscsi
>  endif
>  
> +ifeq ($(CONFIG_CHELSIO_T3),m)
> +kernel:	kernel_cxgb3
> +install_kernel: install_kernel_cxgb3
> +uninstall: uninstall_cxgb3
> +clean_kernel: clean_kernel_cxgb3
> +endif
> +
>  #########################
>  #	make kernel	#
>  #########################
> @@ -46,7 +53,9 @@ kernel:
>  	@echo "Kernel sources: $(KSRC)"
>  	env EXTRA_CFLAGS="$(OPENIB_KERNEL_EXTRA_CFLAGS) $(KERNEL_MEMTRACK_CFLAGS) -I$(CWD)/include -I$(CWD)/drivers/infiniband/include \
>  		-I$(CWD)/drivers/infiniband/ulp/ipoib \
> -		-I$(CWD)/drivers/infiniband/debug" \
> +		-I$(CWD)/drivers/infiniband/debug \
> +		-I$(CWD)/drivers/infiniband/hw/cxgb3/core \
> +		-I$(CWD)/drivers/net/cxgb3 " \
>      	$(MAKE) -C $(KSRC) SUBDIRS="$(CWD)/drivers/infiniband" KERNELRELEASE=$(KVERSION) \
>  		EXTRAVERSION=$(EXTRAVERSION) V=1 $(WITH_MAKE_PARAMS) \
>  		CONFIG_INFINIBAND=$(CONFIG_INFINIBAND) \
> @@ -75,6 +84,8 @@ kernel:
>          	CONFIG_INFINIBAND_VNIC=$(CONFIG_INFINIBAND_VNIC) \
>          	CONFIG_INFINIBAND_VNIC_DEBUG=$(CONFIG_INFINIBAND_VNIC_DEBUG) \
>          	CONFIG_INFINIBAND_VNIC_STATS=$(CONFIG_INFINIBAND_VNIC_STATS) \
> +        	CONFIG_INFINIBAND_CXGB3=$(CONFIG_INFINIBAND_CXGB3) \
> +        	CONFIG_INFINIBAND_CXGB3_DEBUG=$(CONFIG_INFINIBAND_CXGB3_DEBUG) \
>  		LINUXINCLUDE=' \
>  		$(BACKPORT_INCLUDES) \
>  		-I$(CWD)/include \
> @@ -105,6 +116,23 @@ kernel_iscsi:
>  		cat $(CWD)/drivers/scsi/Module.symvers >> $(CWD)/drivers/infiniband/Module.symvers; \
>  	fi;
>  
> +kernel_cxgb3:
> +	echo "Building drivers/net/cxgb3"; \
> +	$(MAKE) -C $(KSRC) SUBDIRS="$(CWD)/drivers/net/cxgb3" KERNELRELEASE=$(KVERSION) \
> +	        EXTRAVERSION=$(EXTRAVERSION) V=1 $(WITH_MAKE_PARAMS) \
> +	        CONFIG_CHELSIO_T3=$(CONFIG_CHELSIO_T3) \
> +	        LINUXINCLUDE=' \
> +	        $(BACKPORT_INCLUDES) \
> +	        -I$(CWD)/include \
> +	        -Iinclude \
> +	        $$(if $$(KBUILD_SRC),-Iinclude2 -I$$(srctree)/include) \
> +	        -include include/linux/autoconf.h \
> +	        -include $(CWD)/include/linux/autoconf.h \
> +	        ' \
> +	        modules; \
> +	if [ -f $(CWD)/drivers/net/cxgb3/Module.symvers ]; then \
> +		cat $(CWD)/drivers/net/cxgb3/Module.symvers >> $(CWD)/drivers/infiniband/Module.symvers; \
> +	fi;
>  
>  #########################
>  #	Install kernel	#
> @@ -181,6 +209,33 @@ install_kernel_iscsi:
>  	
>  	$(DEPMOD) -r -ae $(KVERSION)
>  
> +install_kernel_cxgb3:
> +	$(MAKE) -C $(KSRC) SUBDIRS="$(CWD)/drivers/net/cxgb3" \
> +		KERNELRELEASE=$(KVERSION) EXTRAVERSION=$(EXTRAVERSION) \
> +		INSTALL_MOD_DIR="drivers/net/cxgb3" INSTALL_MOD_PATH=$(CWD) \
> +		$(WITH_MAKE_PARAMS) modules_install;
> +
> +	# Backup original cxgb3.ko kernel module under 'prefix'/backup directory
> +	if [ -d $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/net/cxgb3 ]; then \
> +		mkdir -p $(DESTDIR)/$(prefix)/backup; \
> +		if [ ! -f $(DESTDIR)/$(prefix)/backup/cxgb3_ko-$(KVERSION).tgz ]; then \
> +			tar czfP $(DESTDIR)/$(prefix)/backup/cxgb3_ko-$(KVERSION).tgz $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/net/cxgb3/cxgb3.ko; \
> +		fi; \
> +		/bin/rm -f $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/net/cxgb3/cxgb3.ko; \
> +	fi;
> +
> +	# Copy new cxgb3 kernel module to $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/net/cxgb3     
> +	if [ -d $(CWD)/lib/modules/$(KVERSION)/drivers/net/cxgb3 ]; then \
> +		mkdir -p $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/net/cxgb3; \
> +		mv $(CWD)/lib/modules/$(KVERSION)/drivers/net/cxgb3/cxgb3.ko $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/net/cxgb3; \
> +	fi; \
> +	if [ -d $(CWD)/lib/modules/$(KVERSION)/extra ]; then \
> +		mkdir -p $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/net/cxgb3; \
> +		mv $(CWD)/lib/modules/$(KVERSION)/extra/cxgb3.ko $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/net/cxgb3 ; \
> +	fi;
> +	
> +	$(DEPMOD) -r -ae $(KVERSION)
> +
>  clean: clean_kernel
>  
>  clean_kernel:
> @@ -189,6 +244,9 @@ clean_kernel:
>  clean_kernel_iscsi:
>  	$(MAKE) -C $(KSRC) SUBDIRS="$(CWD)/scsi" KERNELRELEASE=$(KVERSION) EXTRAVERSION=$(EXTRAVERSION) $(WITH_MAKE_PARAMS) clean
>  
> +clean_kernel_cxgb3:
> +	$(MAKE) -C $(KSRC) SUBDIRS="$(CWD)/drivers/net/cxgb3" KERNELRELEASE=$(KVERSION) EXTRAVERSION=$(EXTRAVERSION) $(WITH_MAKE_PARAMS) clean
> +
>  uninstall:
>  	if [ -f $(DESTDIR)/$(prefix)/backup/infiniband_ko-$(KVERSION).tgz ]; then \
>  		rm -rf $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/infiniband; \
> @@ -209,18 +267,31 @@ uninstall_iscsi:
>  
>  	$(DEPMOD) -r -ae $(KVERSION)
>  
> +uninstall_cxgb3:
> +	if [ -f $(DESTDIR)/$(prefix)/backup/cxgb3_ko-$(KVERSION).tgz ]; then \
> +	         /bin/rm $(DESTDIR)/$(MODULES_DIR)/kernel/drivers/net/cxgb3/cxgb3.ko ; \
> +	         tar xzfP $(DESTDIR)/$(prefix)/backup/cxgb3_ko-$(KVERSION).tgz; \
> +	         /bin/rm -f $(DESTDIR)/$(prefix)/backup/cxgb3_ko-$(KVERSION).tgz; \
> +	fi;
> +
> +
> +	$(DEPMOD) -r -ae $(KVERSION)
> +
>  help:
>  	@echo
>  	@echo kernel: 		        build kernel modules
>  	@echo kernel_iscsi:             build iSCSI kernel modules
> +	@echo kernel_cxgb3:             build cxgb3 kernel module
>  	@echo all: 		        build kernel modules
>  	@echo
>  	@echo install_kernel:	        install kernel modules under $(DESTDIR)/$(MODULES_DIR)
>  	@echo install_kernel_iscsi:     install iSCSI kernel modules under $(DESTDIR)/$(MODULES_DIR)
> +	@echo install_kernel_cxgb3:    	install cxgb3 kernel module under $(DESTDIR)/$(MODULES_DIR)
>  	@echo install:	        	run install_kernel
>  	@echo
>  	@echo clean:	        	delete kernel modules binaries
>  	@echo clean_kernel:	        delete kernel modules binaries
>  	@echo clean_kernel_iscsi:	delete iscsi kernel modules binaries
> +	@echo clean_kernel_cxgb3:	delete cxgb3 kernel module binaries
>  	@echo uninstall:        	delete installed environment
>  	@echo
> diff --git a/ofed_scripts/configure b/ofed_scripts/configure
> index b99104d..e0b188f 100755
> --- a/ofed_scripts/configure
> +++ b/ofed_scripts/configure
> @@ -129,6 +129,12 @@ Usage:  `basename $0` [options]
>      --with-vnic_stats-mod    make CONFIG_INFINIBAND_VNIC_STATS=y [no]
>      --without-vnic_stats-mod    [yes]
>  
> +    --with-cxgb3-mod    make CONFIG_INFINIBAND_CXGB3=m [no]
> +    --without-cxgb3-mod    [yes]
> +
> +    --with-cxgb3_debug-mod    make CONFIG_INFINIBAND_CXGB3_DEBUG=y [no]
> +    --without-cxgb3_debug-mod    [yes]
> +
>      --help - print out options
>  
> 
> @@ -210,7 +216,10 @@ get_backport_dir()
>          2.6.19*)
>                  echo 2.6.19
>          ;;
> -        2.6.2[0-9]*)
> +        2.6.20*)
> +                echo 2.6.20
> +        ;;
> +        2.6.2[1-9]*)
>                  echo
>          ;;
>          *)
> @@ -625,6 +634,20 @@ main()
>                          --without-vnic_stats-mod)
>                              CONFIG_INFINIBAND_VNIC_STATS=
>                          ;;
> +                        --with-cxgb3-mod)
> +                            CONFIG_INFINIBAND_CXGB3="m"
> +                            CONFIG_CHELSIO_T3="m"
> +                        ;;
> +                        --without-cxgb3-mod)
> +                            CONFIG_INFINIBAND_CXGB3=
> +                            CONFIG_CHELSIO_T3=
> +                        ;;
> +                        --with-cxgb3_debug-mod)
> +                            CONFIG_INFINIBAND_CXGB3_DEBUG="y"
> +                        ;;
> +                        --without-cxgb3_debug-mod)
> +                            CONFIG_INFINIBAND_CXGB3_DEBUG=
> +                        ;;
>                          --with-modprobe|--without-modprobe)
>                          ;;
>                          -h | --help)
> @@ -698,6 +721,8 @@ CONFIG_INFINIBAND_RDS=${CONFIG_INFINIBAN
>  CONFIG_INFINIBAND_RDS_DEBUG=${CONFIG_INFINIBAND_RDS_DEBUG:-''}
>  CONFIG_INFINIBAND_MADEYE=${CONFIG_INFINIBAND_MADEYE:-''}
>  CONFIG_INFINIBAND_VNIC=${CONFIG_INFINIBAND_VNIC:-''}
> +CONFIG_INFINIBAND_CXGB3=${CONFIG_INFINIBAND_CXGB3:-''}
> +CONFIG_CHELSIO_T3=${CONFIG_CHELSIO_T3:-''}
>  
>  CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=${CONFIG_INFINIBAND_IPOIB_DEBUG_DATA:-''}
>  CONFIG_INFINIBAND_SDP_SEND_ZCOPY=${CONFIG_INFINIBAND_SDP_SEND_ZCOPY:-''}
> @@ -708,6 +733,7 @@ CONFIG_INFINIBAND_IPATH=${CONFIG_INFINIB
>  CONFIG_INFINIBAND_MTHCA_DEBUG=${CONFIG_INFINIBAND_MTHCA_DEBUG:-''}
>  CONFIG_INFINIBAND_VNIC_DEBUG=${CONFIG_INFINIBAND_VNIC_DEBUG:-''}
>  CONFIG_INFINIBAND_VNIC_STATS=${CONFIG_INFINIBAND_VNIC_STATS:-''}
> +CONFIG_INFINIBAND_CXGB3_DEBUG=${CONFIG_INFINIBAND_CXGB3_DEBUG:-''}
>  
>          # Check for minimal supported kernel version
>          if ! check_kerver ${KVERSION} ${MIN_KVERSION}; then
> @@ -762,6 +788,8 @@ CONFIG_INFINIBAND_RDS=${CONFIG_INFINIBAN
>  CONFIG_INFINIBAND_RDS_DEBUG=${CONFIG_INFINIBAND_RDS_DEBUG}
>  CONFIG_INFINIBAND_MADEYE=${CONFIG_INFINIBAND_MADEYE}
>  CONFIG_INFINIBAND_VNIC=${CONFIG_INFINIBAND_VNIC}
> +CONFIG_INFINIBAND_CXGB3=${CONFIG_INFINIBAND_CXGB3}
> +CONFIG_CHELSIO_T3=${CONFIG_CHELSIO_T3}
>  
>  CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=${CONFIG_INFINIBAND_IPOIB_DEBUG_DATA}
>  CONFIG_INFINIBAND_SDP_SEND_ZCOPY=${CONFIG_INFINIBAND_SDP_SEND_ZCOPY}
> @@ -772,6 +800,7 @@ CONFIG_INFINIBAND_IPATH=${CONFIG_INFINIB
>  CONFIG_INFINIBAND_MTHCA_DEBUG=${CONFIG_INFINIBAND_MTHCA_DEBUG}
>  CONFIG_INFINIBAND_VNIC_DEBUG=${CONFIG_INFINIBAND_VNIC_DEBUG}
>  CONFIG_INFINIBAND_VNIC_STATS=${CONFIG_INFINIBAND_VNIC_STATS}
> +CONFIG_INFINIBAND_CXGB3_DEBUG=${CONFIG_INFINIBAND_CXGB3_DEBUG}
>  
>  EOFCONFIG
>          echo "Created ${CONFIG}:"
> @@ -912,6 +941,21 @@ if [ "X${CONFIG_INFINIBAND_VNIC_STATS}" 
>  else
>          DEFINE_INFINIBAND_VNIC_STATS="#undef CONFIG_INFINIBAND_VNIC_STATS"
>  fi
> +if [ "X${CONFIG_INFINIBAND_CXGB3}" == "Xm" ]; then
> +        DEFINE_INFINIBAND_CXGB3="#define CONFIG_INFINIBAND_CXGB3 1"
> +else
> +        DEFINE_INFINIBAND_CXGB3="#undef CONFIG_INFINIBAND_CXGB3"
> +fi
> +if [ "X${CONFIG_INFINIBAND_CXGB3_DEBUG}" == "Xy" ]; then
> +        DEFINE_INFINIBAND_CXGB3_DEBUG="#define CONFIG_INFINIBAND_CXGB3_DEBUG 1"
> +else
> +        DEFINE_INFINIBAND_CXGB3_DEBUG="#undef CONFIG_INFINIBAND_CXGB3_DEBUG"
> +fi
> +if [ "X${CONFIG_CHELSIO_T3}" == "Xm" ]; then
> +        DEFINE_CHELSIO_T3="#define CONFIG_CHELSIO_T3 1"
> +else
> +        DEFINE_CHELSIO_T3="#undef CONFIG_CHELSIO_T3"
> +fi
>  cat >> ${AUTOCONF_H} << EOFAUTOCONF
>  #undef CONFIG_INFINIBAND
>  #undef CONFIG_INFINIBAND_IPOIB
> @@ -934,6 +978,9 @@ #undef CONFIG_INFINIBAND_MADEYE
>  #undef CONFIG_INFINIBAND_VNIC
>  #undef CONFIG_INFINIBAND_VNIC_DEBUG
>  #undef CONFIG_INFINIBAND_VNIC_STATS
> +#undef CONFIG_INFINIBAND_CXGB3
> +#undef CONFIG_INFINIBAND_CXGB3_DEBUG
> +#undef CONFIG_CHELSIO_T3
>  
>  #undef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA
>  #undef CONFIG_INFINIBAND_SDP_SEND_ZCOPY
> @@ -954,6 +1001,8 @@ #undef CONFIG_INFINIBAND_MTHCA_DEBUG
>  ${DEFINE_INFINIBAND_ADDR_TRANS}
>  ${DEFINE_INFINIBAND_MTHCA}
>  ${DEFINE_INFINIBAND_VNIC}
> +${DEFINE_INFINIBAND_CXGB3}
> +${DEFINE_CHELSIO_T3}
>  
>  ${DEFINE_INFINIBAND_IPOIB_DEBUG}
>  ${DEFINE_INFINIBAND_ISER}
> @@ -964,6 +1013,7 @@ #undef CONFIG_INFINIBAND_MTHCA_DEBUG
>  ${DEFINE_INFINIBAND_RDS_DEBUG}
>  ${DEFINE_INFINIBAND_VNIC_DEBUG}
>  ${DEFINE_INFINIBAND_VNIC_STATS}
> +${DEFINE_INFINIBAND_CXGB3_DEBUG}
>  
>  ${DEFINE_INFINIBAND_IPOIB_DEBUG_DATA}
>  ${DEFINE_INFINIBAND_SDP_SEND_ZCOPY}
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general




More information about the general mailing list