jimmyH / qla2xxx-ipofc

IP over Fibre Channel support for Qlogic HBAs
Other
17 stars 5 forks source link

Unable to compile on latest kernel #1

Open petero-dk opened 7 years ago

petero-dk commented 7 years ago

This is an old and not much updated repo (I get that) I am still trying though.

I just got my hands on a couple of servers with these built in (dont ask how old any of this is) they run Ubuntu the latest just fine with a kernel version 4.8. When I build I get a lot of errors. You have not described how you compiled, is there a trick to it?

petero-dk commented 7 years ago

This is the output from the build.sh install


peter@ubuntu:~/projects/qla2xxx-ipofc$ extras/build.sh install
QLA2XXX -- Building the qla2xxx driver...
make: Entering directory '/usr/src/linux-headers-4.8.0-34-generic'
  CC [M]  /home/peter/projects/qla2xxx-ipofc/qla_os.o
  CC [M]  /home/peter/projects/qla2xxx-ipofc/qla_iocb.o
  CC [M]  /home/peter/projects/qla2xxx-ipofc/qla_attr.o
  CC [M]  /home/peter/projects/qla2xxx-ipofc/qla_dfs.o
  CC [M]  /home/peter/projects/qla2xxx-ipofc/qla_mid.o
/home/peter/projects/qla2xxx-ipofc/qla_os.c:299:24: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .change_queue_depth = qla2x00_change_queue_depth,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:299:24: note: (near initialization for ‘qla2xxx_driver_template.change_queue_depth’)
/home/peter/projects/qla2xxx-ipofc/qla_os.c:300:2: error: unknown field ‘change_queue_type’ specified in initializer
  .change_queue_type = qla2x00_change_queue_type,
  ^
/home/peter/projects/qla2xxx-ipofc/qla_os.c:300:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .change_queue_type = qla2x00_change_queue_type,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:300:23: note: (near initialization for ‘qla2xxx_driver_template.bios_param’)
  CC [M]  /home/peter/projects/qla2xxx-ipofc/qla_bsg.o
/home/peter/projects/qla2xxx-ipofc/qla_os.c: In function ‘__qla2xxx_eh_generic_reset’:
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1118:37: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘u64 {aka long long unsigned int}’ [-Wformat=]
      "%s RESET ISSUED nexus=%ld:%d:%d cmd=%p.\n", name, vha->host_no,
                                     ^
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1143:40: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘u64 {aka long long unsigned int}’ [-Wformat=]
      "%s RESET SUCCEEDED nexus:%ld:%d:%d cmd=%p.\n", name,
                                        ^
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1150:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘u64 {aka long long unsigned int}’ [-Wformat=]
      "%s RESET FAILED: %s nexus=%ld:%d:%d cmd=%p.\n", name,
                                         ^
/home/peter/projects/qla2xxx-ipofc/qla_os.c: In function ‘qla2xxx_slave_configure’:
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1432:3: error: implicit declaration of function ‘scsi_activate_tcq’ [-Werror=implicit-function-declaration]
   scsi_activate_tcq(sdev, req->max_q_depth);
   ^~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1434:3: error: implicit declaration of function ‘scsi_deactivate_tcq’ [-Werror=implicit-function-declaration]
   scsi_deactivate_tcq(sdev, req->max_q_depth);
   ^~~~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c: In function ‘qla2x00_handle_queue_full’:
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1452:57: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘u64 {aka long long unsigned int}’ [-Wformat=]
      "Queue depth adjusted-down to %d for nexus=%ld:%d:%d.\n",
                                                         ^
/home/peter/projects/qla2xxx-ipofc/qla_os.c: In function ‘qla2x00_adjust_sdev_qdepth_up’:
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1469:10: error: ‘struct scsi_device’ has no member named ‘ordered_tags’; did you mean ‘simple_tags’?
  if (sdev->ordered_tags)
          ^~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1470:3: error: implicit declaration of function ‘scsi_adjust_queue_depth’ [-Werror=implicit-function-declaration]
   scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, qdepth);
   ^~~~~~~~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1470:33: error: ‘MSG_ORDERED_TAG’ undeclared (first use in this function)
   scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, qdepth);
                                 ^~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1470:33: note: each undeclared identifier is reported only once for each function it appears in
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1472:33: error: ‘MSG_SIMPLE_TAG’ undeclared (first use in this function)
   scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, qdepth);
                                 ^~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1475:55: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘u64 {aka long long unsigned int}’ [-Wformat=]
      "Queue depth adjusted-up to %d for nexus=%ld:%d:%d.\n",
                                                       ^
/home/peter/projects/qla2xxx-ipofc/qla_os.c: In function ‘qla2x00_change_queue_depth’:
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1483:7: error: ‘SCSI_QDEPTH_DEFAULT’ undeclared (first use in this function)
  case SCSI_QDEPTH_DEFAULT:
       ^~~~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1484:33: error: implicit declaration of function ‘scsi_get_tag_type’ [-Werror=implicit-function-declaration]
   scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth);
                                 ^~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1486:7: error: ‘SCSI_QDEPTH_QFULL’ undeclared (first use in this function)
  case SCSI_QDEPTH_QFULL:
       ^~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1489:7: error: ‘SCSI_QDEPTH_RAMP_UP’ undeclared (first use in this function)
  case SCSI_QDEPTH_RAMP_UP:
       ^~~~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c: In function ‘qla2x00_change_queue_type’:
/home/peter/projects/qla2xxx-ipofc/qla_os.c:1503:3: error: implicit declaration of function ‘scsi_set_tag_type’ [-Werror=implicit-function-declaration]
   scsi_set_tag_type(sdev, tag_type);
   ^~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_os.c: In function ‘qla2x00_probe_one’:
/home/peter/projects/qla2xxx-ipofc/qla_os.c:2719:6: warning: format ‘%d’ expects argument of type ‘int’, but argument 11 has type ‘u64 {aka long long unsigned int}’ [-Wformat=]
      "max_id=%d this_id=%d "
      ^~~~~~~~~~~~~~~~~~~~~~~
/home/peter/projects/qla2xxx-ipofc/qla_iocb.c: In function ‘qla2x00_start_scsi’:
/home/peter/projects/qla2xxx-ipofc/qla_iocb.c:409:6: error: implicit declaration of function ‘scsi_populate_tag_msg’ [-Werror=implicit-function-declaration]
  if (scsi_populate_tag_msg(cmd, tag)) {
      ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/home/peter/projects/qla2xxx-ipofc/qla_os.o' failed
make[1]: *** [/home/peter/projects/qla2xxx-ipofc/qla_os.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/home/peter/projects/qla2xxx-ipofc/qla_iocb.o' failed
make[1]: *** [/home/peter/projects/qla2xxx-ipofc/qla_iocb.o] Error 1
Makefile:1491: recipe for target '_module_/home/peter/projects/qla2xxx-ipofc' failed
make: *** [_module_/home/peter/projects/qla2xxx-ipofc] Error 2
make: Leaving directory '/usr/src/linux-headers-4.8.0-34-generic'
QLA2XXX -- Must be root to install...
peter@ubuntu:~/projects/qla2xxx-ipofc$ ls
extras            qla2xip.c   qla_bsg.h  qla_def.h     qla_gbl.h   qla_inline.h  qla_isr.o  qla_mr.c   qla_nx.h        qla_target.c   README.md
Kconfig           qla2xip.h   qla_bsg.o  qla_devtbl.h  qla_gs.c    qla_iocb.c    qla_mbx.c  qla_mr.h   qla_os.c        qla_target.h   tcm_qla2xxx.c
LICENSE.qla2xxx   qla_attr.c  qla_dbg.c  qla_dfs.c     qla_gs.o    qla_ip.c      qla_mbx.o  qla_nx2.c  qla_settings.h  qla_tmpl.c     tcm_qla2xxx.h
Makefile          qla_attr.o  qla_dbg.h  qla_dfs.o     qla_init.c  qla_ip.h      qla_mid.c  qla_nx2.h  qla_sup.c       qla_tmpl.h
Module.supported  qla_bsg.c   qla_dbg.o  qla_fw.h      qla_init.o  qla_isr.c     qla_mid.o  qla_nx.c   qla_sup.o       qla_version.h
peter@ubuntu:~/projects/qla2xxx-ipofc$
jimmyH commented 7 years ago

@petero-dk there have been a number of changes in the latest kernel which prevent this from compiling. I had a quick check at the latest version of the official drivers on the QLogic website (imported on the qla2xxx-official-releases branch) , but they still only support RHEL7.3 / SLES12, so the driver would need porting to support kernel 4.8.

petero-dk commented 7 years ago

Hi @jimmyH in the official linux kernel, there are support for the qla2xxx in kernel 4.8 - I have been playing around with those. Obviously they do not support ipofc do you remember what you did in order to merge the old ipofc with the latest driver batch?

We only need to compile the ipofc module? Correct?

jimmyH commented 7 years ago

@petero-dk I'd forgotten that the mainline kernel had its' own version of the qla2xxx drivers. I have a vague recollection that this was based on an earlier version of the QLogic driver - so there are some differences from the starting point I used. To add the IPoFC changes there need to be a few changes in the rest of the qla2xxx drivers (see 635a8c08).

Unless we can understand why I was getting limited to ~700mbit/s I'm not sure it is worth porting to the latest kernel version(s).