lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 25 Oct 2023 18:52:34 +0800
From:   kernel test robot <lkp@...el.com>
To:     Karan Tilak Kumar <kartilak@...co.com>, sebaddel@...co.com
Cc:     oe-kbuild-all@...ts.linux.dev, arulponn@...co.com,
        djhawar@...co.com, gcboffa@...co.com, mkai2@...co.com,
        satishkh@...co.com, jejb@...ux.ibm.com, martin.petersen@...cle.com,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        Karan Tilak Kumar <kartilak@...co.com>
Subject: Re: [PATCH 07/13] scsi: fnic: Modify ISRs to support multiqueue(MQ)

Hi Karan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on jejb-scsi/for-next next-20231025]
[cannot apply to linus/master v6.6-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Karan-Tilak-Kumar/scsi-fnic-Modify-definitions-to-sync-with-VIC-firmware/20231021-031259
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20231020190629.338623-8-kartilak%40cisco.com
patch subject: [PATCH 07/13] scsi: fnic: Modify ISRs to support multiqueue(MQ)
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231025/202310251847.4T8BVZAZ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231025/202310251847.4T8BVZAZ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310251847.4T8BVZAZ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/scsi/fnic/fnic_isr.c:242:5: warning: no previous prototype for 'fnic_set_intr_mode_msix' [-Wmissing-prototypes]
     242 | int fnic_set_intr_mode_msix(struct fnic *fnic)
         |     ^~~~~~~~~~~~~~~~~~~~~~~


vim +/fnic_set_intr_mode_msix +242 drivers/scsi/fnic/fnic_isr.c

   241	
 > 242	int fnic_set_intr_mode_msix(struct fnic *fnic)
   243	{
   244		unsigned int n = ARRAY_SIZE(fnic->rq);
   245		unsigned int m = ARRAY_SIZE(fnic->wq);
   246		unsigned int o = ARRAY_SIZE(fnic->hw_copy_wq);
   247		unsigned int min_irqs = n + m + 1 + 1; /*rq, raw wq, wq, err*/
   248	
   249		/*
   250		 * We need n RQs, m WQs, o Copy WQs, n+m+o CQs, and n+m+o+1 INTRs
   251		 * (last INTR is used for WQ/RQ errors and notification area)
   252		 */
   253		FNIC_ISR_DBG(KERN_INFO, fnic->lport->host,
   254			"fnic<%d>: %s: %d: rq-array size: %d wq-array size: %d copy-wq array size: %d\n",
   255			fnic->fnic_num, __func__, __LINE__, n, m, o);
   256		FNIC_ISR_DBG(KERN_INFO, fnic->lport->host,
   257			"fnic<%d>: %s: %d: rq_count: %d raw_wq_count: %d wq_copy_count: %d cq_count: %d\n",
   258			fnic->fnic_num, __func__, __LINE__, fnic->rq_count, fnic->raw_wq_count,
   259			fnic->wq_copy_count, fnic->cq_count);
   260	
   261		if (fnic->rq_count <= n && fnic->raw_wq_count <= m &&
   262			fnic->wq_copy_count <= o) {
   263			int vec_count = 0;
   264			int vecs = fnic->rq_count + fnic->raw_wq_count + fnic->wq_copy_count + 1;
   265	
   266			vec_count = pci_alloc_irq_vectors(fnic->pdev, min_irqs, vecs,
   267						PCI_IRQ_MSIX | PCI_IRQ_AFFINITY);
   268			FNIC_ISR_DBG(KERN_INFO, fnic->lport->host,
   269						"fnic<%d>: %s: %d: allocated %d MSI-X vectors\n",
   270						fnic->fnic_num, __func__, __LINE__, vec_count);
   271	
   272			if (vec_count > 0) {
   273				if (vec_count < vecs) {
   274					FNIC_ISR_DBG(KERN_ERR, fnic->lport->host,
   275					"fnic<%d>: %s: %d: interrupts number mismatch: vec_count: %d vecs: %d\n",
   276					fnic->fnic_num, __func__, __LINE__, vec_count, vecs);
   277					if (vec_count < min_irqs) {
   278						FNIC_ISR_DBG(KERN_ERR, fnic->lport->host,
   279									"fnic<%d>: %s: %d: no interrupts for copy wq\n",
   280									fnic->fnic_num, __func__, __LINE__);
   281						return 1;
   282					}
   283				}
   284	
   285				fnic->rq_count = n;
   286				fnic->raw_wq_count = m;
   287				fnic->cpy_wq_base = fnic->rq_count + fnic->raw_wq_count;
   288				fnic->wq_copy_count = vec_count - n - m - 1;
   289				fnic->wq_count = fnic->raw_wq_count + fnic->wq_copy_count;
   290				if (fnic->cq_count != vec_count - 1) {
   291					FNIC_ISR_DBG(KERN_ERR, fnic->lport->host,
   292					"fnic<%d>: %s: %d: CQ count: %d does not match MSI-X vector count: %d\n",
   293					fnic->fnic_num, __func__, __LINE__, fnic->cq_count, vec_count);
   294					fnic->cq_count = vec_count - 1;
   295				}
   296				fnic->intr_count = vec_count;
   297				fnic->err_intr_offset = fnic->rq_count + fnic->wq_count;
   298	
   299				FNIC_ISR_DBG(KERN_INFO, fnic->lport->host,
   300					"fnic<%d>: %s: %d: rq_count: %d raw_wq_count: %d cpy_wq_base: %d\n",
   301					fnic->fnic_num, __func__, __LINE__, fnic->rq_count,
   302					fnic->raw_wq_count, fnic->cpy_wq_base);
   303	
   304				FNIC_ISR_DBG(KERN_INFO, fnic->lport->host,
   305					"fnic<%d>: %s: %d: wq_copy_count: %d wq_count: %d cq_count: %d\n",
   306					fnic->fnic_num, __func__, __LINE__, fnic->wq_copy_count,
   307					fnic->wq_count, fnic->cq_count);
   308	
   309				FNIC_ISR_DBG(KERN_INFO, fnic->lport->host,
   310					"fnic<%d>: %s: %d: intr_count: %d err_intr_offset: %u",
   311					fnic->fnic_num, __func__, __LINE__, fnic->intr_count,
   312					fnic->err_intr_offset);
   313	
   314				vnic_dev_set_intr_mode(fnic->vdev, VNIC_DEV_INTR_MODE_MSIX);
   315				FNIC_ISR_DBG(KERN_INFO, fnic->lport->host,
   316						"fnic<%d>: %s: %d: fnic using MSI-X\n", fnic->fnic_num,
   317						__func__, __LINE__);
   318				return 0;
   319			}
   320		}
   321		return 1;
   322	} //fnic_set_intr_mode_msix
   323	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists