All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Muneendra <muneendra.kumar@broadcom.com>,
	linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
	tj@kernel.org, linux-nvme@lists.infradead.org, hare@suse.de
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com,
	pbonzini@redhat.com,
	Gaurav Srivastava <gaurav.srivastava@broadcom.com>
Subject: Re: [PATCH v5 10/16] lpfc: vmid: Functions to manage vmids
Date: Sun, 20 Dec 2020 04:20:39 +0800	[thread overview]
Message-ID: <202012200434.2PvydHHW-lkp@intel.com> (raw)
In-Reply-To: <1608096586-21656-11-git-send-email-muneendra.kumar@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 6853 bytes --]

Hi Muneendra,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on mkp-scsi/for-next next-20201218]
[cannot apply to cgroup/for-next v5.10]
[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]

url:    https://github.com/0day-ci/linux/commits/Muneendra/blkcg-Support-to-track-FC-storage-blk-io-traffic/20201216-202913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: powerpc64-randconfig-r023-20201217 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://github.com/0day-ci/linux/commit/8417ca99565475d5bf5493657fcf90922607f1b1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Muneendra/blkcg-Support-to-track-FC-storage-blk-io-traffic/20201216-202913
        git checkout 8417ca99565475d5bf5493657fcf90922607f1b1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/scsi/lpfc/lpfc_scsi.c:5179:1: warning: no previous prototype for function 'lpfc_put_vmid_in_hashtable' [-Wmissing-prototypes]
   lpfc_put_vmid_in_hashtable(struct lpfc_vport *vport, u32 hash,
   ^
   drivers/scsi/lpfc/lpfc_scsi.c:5178:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int
   ^
   static 
>> drivers/scsi/lpfc/lpfc_scsi.c:5233:6: warning: no previous prototype for function 'lpfc_vmid_update_entry' [-Wmissing-prototypes]
   void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd
        ^
   drivers/scsi/lpfc/lpfc_scsi.c:5233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd
   ^
   static 
>> drivers/scsi/lpfc/lpfc_scsi.c:5254:6: warning: no previous prototype for function 'lpfc_vmid_assign_cs_ctl' [-Wmissing-prototypes]
   void lpfc_vmid_assign_cs_ctl(struct lpfc_vport *vport, struct lpfc_vmid *vmid)
        ^
   drivers/scsi/lpfc/lpfc_scsi.c:5254:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void lpfc_vmid_assign_cs_ctl(struct lpfc_vport *vport, struct lpfc_vmid *vmid)
   ^
   static 
   In file included from drivers/scsi/lpfc/lpfc_scsi.c:31:
   In file included from include/linux/blk-cgroup.h:17:
   include/linux/cgroup.h:748:23: warning: unused function 'cgroup_get_from_id' [-Wunused-function]
   static struct cgroup *cgroup_get_from_id(u64 id)
                         ^
   4 warnings generated.


vim +/lpfc_put_vmid_in_hashtable +5179 drivers/scsi/lpfc/lpfc_scsi.c

  5168	
  5169	/*
  5170	 * lpfc_put_vmid_from_hastable - put the VMID in the hash table
  5171	 * @vport: The virtual port for which this call is being executed.
  5172	 * @hash - calculated hash value
  5173	 * @vmp: Pointer to a VMID entry representing a VM sending IO
  5174	 *
  5175	 * This routine will insert the newly acquired vmid entity in the hash table.
  5176	 * Make sure to acquire the appropriate lock before invoking this routine.
  5177	 */
  5178	int
> 5179	lpfc_put_vmid_in_hashtable(struct lpfc_vport *vport, u32 hash,
  5180				   struct lpfc_vmid *vmp)
  5181	{
  5182		int count = 0;
  5183	
  5184		while (count < LPFC_VMID_HASH_SIZE) {
  5185			if (!vport->hash_table[hash]) {
  5186				vport->hash_table[hash] = vmp;
  5187				vmp->hash_index = hash;
  5188				return FAILURE;
  5189			}
  5190			/* if the slot is already occupied, a collision has occurred. */
  5191			/* Store in the next available slot */
  5192			count++;
  5193			hash++;
  5194			/* table is full */
  5195			if (hash == LPFC_VMID_HASH_SIZE)
  5196				hash = 0;
  5197		}
  5198		return 0;
  5199	}
  5200	
  5201	/*
  5202	 * lpfc_vmid_hash_fn- creates a hash value of the UUID
  5203	 * @uuid: uuid associated with the VE
  5204	 * @len: length of the UUID
  5205	 * Returns the calculated hash value
  5206	 */
  5207	int lpfc_vmid_hash_fn(char *vmid, int len)
  5208	{
  5209		int c;
  5210		int hash = 0;
  5211	
  5212		if (len == 0)
  5213			return 0;
  5214		while (len--) {
  5215			c = *vmid++;
  5216			if (c >= 'A' && c <= 'Z')
  5217				c += 'a' - 'A';
  5218	
  5219			hash = (hash + (c << LPFC_VMID_HASH_SHIFT) +
  5220				(c >> LPFC_VMID_HASH_SHIFT)) * 19;
  5221		}
  5222	
  5223		return hash & LPFC_VMID_HASH_MASK;
  5224	}
  5225	
  5226	/*
  5227	 * lpfc_vmid_update_entry - update the vmid entry in the hash table
  5228	 * @vport: The virtual port for which this call is being executed.
  5229	 * @cmd: address of scsi cmmd descriptor
  5230	 * @vmp: Pointer to a VMID entry representing a VM sending IO
  5231	 * @tag: VMID tag
  5232	 */
> 5233	void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd
  5234					   *cmd, struct lpfc_vmid *vmp,
  5235					   union lpfc_vmid_io_tag *tag)
  5236	{
  5237		u64 *lta;
  5238	
  5239		if (vport->vmid_priority_tagging)
  5240			tag->cs_ctl_vmid = vmp->un.cs_ctl_vmid;
  5241		else
  5242			tag->app_id = vmp->un.app_id;
  5243	
  5244		if (cmd->sc_data_direction == DMA_TO_DEVICE)
  5245			vmp->io_wr_cnt++;
  5246		else
  5247			vmp->io_rd_cnt++;
  5248	
  5249		/* update the last access timestamp in the table */
  5250		lta = per_cpu_ptr(vmp->last_io_time, raw_smp_processor_id());
  5251		*lta = jiffies;
  5252	}
  5253	
> 5254	void lpfc_vmid_assign_cs_ctl(struct lpfc_vport *vport, struct lpfc_vmid *vmid)
  5255	{
  5256		u32 hash;
  5257		struct lpfc_vmid *pvmid;
  5258	
  5259		if (vport->port_type == LPFC_PHYSICAL_PORT) {
  5260			vmid->un.cs_ctl_vmid = lpfc_vmid_get_cs_ctl(vport);
  5261		} else {
  5262			hash = lpfc_vmid_hash_fn(vmid->host_vmid, vmid->vmid_len);
  5263			pvmid =
  5264			    lpfc_get_vmid_from_hastable(vport->phba->pport, hash,
  5265							vmid->host_vmid);
  5266			if (!pvmid)
  5267				vmid->un.cs_ctl_vmid = pvmid->un.cs_ctl_vmid;
  5268			else
  5269				vmid->un.cs_ctl_vmid = lpfc_vmid_get_cs_ctl(vport);
  5270		}
  5271	}
  5272	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31312 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Muneendra <muneendra.kumar@broadcom.com>,
	linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
	tj@kernel.org, linux-nvme@lists.infradead.org, hare@suse.de
Cc: jsmart2021@gmail.com, kbuild-all@lists.01.org, mkumar@redhat.com,
	Gaurav Srivastava <gaurav.srivastava@broadcom.com>,
	emilne@redhat.com, clang-built-linux@googlegroups.com,
	pbonzini@redhat.com
Subject: Re: [PATCH v5 10/16] lpfc: vmid: Functions to manage vmids
Date: Sun, 20 Dec 2020 04:20:39 +0800	[thread overview]
Message-ID: <202012200434.2PvydHHW-lkp@intel.com> (raw)
In-Reply-To: <1608096586-21656-11-git-send-email-muneendra.kumar@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 6853 bytes --]

Hi Muneendra,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on mkp-scsi/for-next next-20201218]
[cannot apply to cgroup/for-next v5.10]
[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]

url:    https://github.com/0day-ci/linux/commits/Muneendra/blkcg-Support-to-track-FC-storage-blk-io-traffic/20201216-202913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: powerpc64-randconfig-r023-20201217 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://github.com/0day-ci/linux/commit/8417ca99565475d5bf5493657fcf90922607f1b1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Muneendra/blkcg-Support-to-track-FC-storage-blk-io-traffic/20201216-202913
        git checkout 8417ca99565475d5bf5493657fcf90922607f1b1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/scsi/lpfc/lpfc_scsi.c:5179:1: warning: no previous prototype for function 'lpfc_put_vmid_in_hashtable' [-Wmissing-prototypes]
   lpfc_put_vmid_in_hashtable(struct lpfc_vport *vport, u32 hash,
   ^
   drivers/scsi/lpfc/lpfc_scsi.c:5178:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int
   ^
   static 
>> drivers/scsi/lpfc/lpfc_scsi.c:5233:6: warning: no previous prototype for function 'lpfc_vmid_update_entry' [-Wmissing-prototypes]
   void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd
        ^
   drivers/scsi/lpfc/lpfc_scsi.c:5233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd
   ^
   static 
>> drivers/scsi/lpfc/lpfc_scsi.c:5254:6: warning: no previous prototype for function 'lpfc_vmid_assign_cs_ctl' [-Wmissing-prototypes]
   void lpfc_vmid_assign_cs_ctl(struct lpfc_vport *vport, struct lpfc_vmid *vmid)
        ^
   drivers/scsi/lpfc/lpfc_scsi.c:5254:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void lpfc_vmid_assign_cs_ctl(struct lpfc_vport *vport, struct lpfc_vmid *vmid)
   ^
   static 
   In file included from drivers/scsi/lpfc/lpfc_scsi.c:31:
   In file included from include/linux/blk-cgroup.h:17:
   include/linux/cgroup.h:748:23: warning: unused function 'cgroup_get_from_id' [-Wunused-function]
   static struct cgroup *cgroup_get_from_id(u64 id)
                         ^
   4 warnings generated.


vim +/lpfc_put_vmid_in_hashtable +5179 drivers/scsi/lpfc/lpfc_scsi.c

  5168	
  5169	/*
  5170	 * lpfc_put_vmid_from_hastable - put the VMID in the hash table
  5171	 * @vport: The virtual port for which this call is being executed.
  5172	 * @hash - calculated hash value
  5173	 * @vmp: Pointer to a VMID entry representing a VM sending IO
  5174	 *
  5175	 * This routine will insert the newly acquired vmid entity in the hash table.
  5176	 * Make sure to acquire the appropriate lock before invoking this routine.
  5177	 */
  5178	int
> 5179	lpfc_put_vmid_in_hashtable(struct lpfc_vport *vport, u32 hash,
  5180				   struct lpfc_vmid *vmp)
  5181	{
  5182		int count = 0;
  5183	
  5184		while (count < LPFC_VMID_HASH_SIZE) {
  5185			if (!vport->hash_table[hash]) {
  5186				vport->hash_table[hash] = vmp;
  5187				vmp->hash_index = hash;
  5188				return FAILURE;
  5189			}
  5190			/* if the slot is already occupied, a collision has occurred. */
  5191			/* Store in the next available slot */
  5192			count++;
  5193			hash++;
  5194			/* table is full */
  5195			if (hash == LPFC_VMID_HASH_SIZE)
  5196				hash = 0;
  5197		}
  5198		return 0;
  5199	}
  5200	
  5201	/*
  5202	 * lpfc_vmid_hash_fn- creates a hash value of the UUID
  5203	 * @uuid: uuid associated with the VE
  5204	 * @len: length of the UUID
  5205	 * Returns the calculated hash value
  5206	 */
  5207	int lpfc_vmid_hash_fn(char *vmid, int len)
  5208	{
  5209		int c;
  5210		int hash = 0;
  5211	
  5212		if (len == 0)
  5213			return 0;
  5214		while (len--) {
  5215			c = *vmid++;
  5216			if (c >= 'A' && c <= 'Z')
  5217				c += 'a' - 'A';
  5218	
  5219			hash = (hash + (c << LPFC_VMID_HASH_SHIFT) +
  5220				(c >> LPFC_VMID_HASH_SHIFT)) * 19;
  5221		}
  5222	
  5223		return hash & LPFC_VMID_HASH_MASK;
  5224	}
  5225	
  5226	/*
  5227	 * lpfc_vmid_update_entry - update the vmid entry in the hash table
  5228	 * @vport: The virtual port for which this call is being executed.
  5229	 * @cmd: address of scsi cmmd descriptor
  5230	 * @vmp: Pointer to a VMID entry representing a VM sending IO
  5231	 * @tag: VMID tag
  5232	 */
> 5233	void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd
  5234					   *cmd, struct lpfc_vmid *vmp,
  5235					   union lpfc_vmid_io_tag *tag)
  5236	{
  5237		u64 *lta;
  5238	
  5239		if (vport->vmid_priority_tagging)
  5240			tag->cs_ctl_vmid = vmp->un.cs_ctl_vmid;
  5241		else
  5242			tag->app_id = vmp->un.app_id;
  5243	
  5244		if (cmd->sc_data_direction == DMA_TO_DEVICE)
  5245			vmp->io_wr_cnt++;
  5246		else
  5247			vmp->io_rd_cnt++;
  5248	
  5249		/* update the last access timestamp in the table */
  5250		lta = per_cpu_ptr(vmp->last_io_time, raw_smp_processor_id());
  5251		*lta = jiffies;
  5252	}
  5253	
> 5254	void lpfc_vmid_assign_cs_ctl(struct lpfc_vport *vport, struct lpfc_vmid *vmid)
  5255	{
  5256		u32 hash;
  5257		struct lpfc_vmid *pvmid;
  5258	
  5259		if (vport->port_type == LPFC_PHYSICAL_PORT) {
  5260			vmid->un.cs_ctl_vmid = lpfc_vmid_get_cs_ctl(vport);
  5261		} else {
  5262			hash = lpfc_vmid_hash_fn(vmid->host_vmid, vmid->vmid_len);
  5263			pvmid =
  5264			    lpfc_get_vmid_from_hastable(vport->phba->pport, hash,
  5265							vmid->host_vmid);
  5266			if (!pvmid)
  5267				vmid->un.cs_ctl_vmid = pvmid->un.cs_ctl_vmid;
  5268			else
  5269				vmid->un.cs_ctl_vmid = lpfc_vmid_get_cs_ctl(vport);
  5270		}
  5271	}
  5272	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31312 bytes --]

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v5 10/16] lpfc: vmid: Functions to manage vmids
Date: Sun, 20 Dec 2020 04:20:39 +0800	[thread overview]
Message-ID: <202012200434.2PvydHHW-lkp@intel.com> (raw)
In-Reply-To: <1608096586-21656-11-git-send-email-muneendra.kumar@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 7027 bytes --]

Hi Muneendra,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on mkp-scsi/for-next next-20201218]
[cannot apply to cgroup/for-next v5.10]
[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]

url:    https://github.com/0day-ci/linux/commits/Muneendra/blkcg-Support-to-track-FC-storage-blk-io-traffic/20201216-202913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: powerpc64-randconfig-r023-20201217 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://github.com/0day-ci/linux/commit/8417ca99565475d5bf5493657fcf90922607f1b1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Muneendra/blkcg-Support-to-track-FC-storage-blk-io-traffic/20201216-202913
        git checkout 8417ca99565475d5bf5493657fcf90922607f1b1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/scsi/lpfc/lpfc_scsi.c:5179:1: warning: no previous prototype for function 'lpfc_put_vmid_in_hashtable' [-Wmissing-prototypes]
   lpfc_put_vmid_in_hashtable(struct lpfc_vport *vport, u32 hash,
   ^
   drivers/scsi/lpfc/lpfc_scsi.c:5178:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int
   ^
   static 
>> drivers/scsi/lpfc/lpfc_scsi.c:5233:6: warning: no previous prototype for function 'lpfc_vmid_update_entry' [-Wmissing-prototypes]
   void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd
        ^
   drivers/scsi/lpfc/lpfc_scsi.c:5233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd
   ^
   static 
>> drivers/scsi/lpfc/lpfc_scsi.c:5254:6: warning: no previous prototype for function 'lpfc_vmid_assign_cs_ctl' [-Wmissing-prototypes]
   void lpfc_vmid_assign_cs_ctl(struct lpfc_vport *vport, struct lpfc_vmid *vmid)
        ^
   drivers/scsi/lpfc/lpfc_scsi.c:5254:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void lpfc_vmid_assign_cs_ctl(struct lpfc_vport *vport, struct lpfc_vmid *vmid)
   ^
   static 
   In file included from drivers/scsi/lpfc/lpfc_scsi.c:31:
   In file included from include/linux/blk-cgroup.h:17:
   include/linux/cgroup.h:748:23: warning: unused function 'cgroup_get_from_id' [-Wunused-function]
   static struct cgroup *cgroup_get_from_id(u64 id)
                         ^
   4 warnings generated.


vim +/lpfc_put_vmid_in_hashtable +5179 drivers/scsi/lpfc/lpfc_scsi.c

  5168	
  5169	/*
  5170	 * lpfc_put_vmid_from_hastable - put the VMID in the hash table
  5171	 * @vport: The virtual port for which this call is being executed.
  5172	 * @hash - calculated hash value
  5173	 * @vmp: Pointer to a VMID entry representing a VM sending IO
  5174	 *
  5175	 * This routine will insert the newly acquired vmid entity in the hash table.
  5176	 * Make sure to acquire the appropriate lock before invoking this routine.
  5177	 */
  5178	int
> 5179	lpfc_put_vmid_in_hashtable(struct lpfc_vport *vport, u32 hash,
  5180				   struct lpfc_vmid *vmp)
  5181	{
  5182		int count = 0;
  5183	
  5184		while (count < LPFC_VMID_HASH_SIZE) {
  5185			if (!vport->hash_table[hash]) {
  5186				vport->hash_table[hash] = vmp;
  5187				vmp->hash_index = hash;
  5188				return FAILURE;
  5189			}
  5190			/* if the slot is already occupied, a collision has occurred. */
  5191			/* Store in the next available slot */
  5192			count++;
  5193			hash++;
  5194			/* table is full */
  5195			if (hash == LPFC_VMID_HASH_SIZE)
  5196				hash = 0;
  5197		}
  5198		return 0;
  5199	}
  5200	
  5201	/*
  5202	 * lpfc_vmid_hash_fn- creates a hash value of the UUID
  5203	 * @uuid: uuid associated with the VE
  5204	 * @len: length of the UUID
  5205	 * Returns the calculated hash value
  5206	 */
  5207	int lpfc_vmid_hash_fn(char *vmid, int len)
  5208	{
  5209		int c;
  5210		int hash = 0;
  5211	
  5212		if (len == 0)
  5213			return 0;
  5214		while (len--) {
  5215			c = *vmid++;
  5216			if (c >= 'A' && c <= 'Z')
  5217				c += 'a' - 'A';
  5218	
  5219			hash = (hash + (c << LPFC_VMID_HASH_SHIFT) +
  5220				(c >> LPFC_VMID_HASH_SHIFT)) * 19;
  5221		}
  5222	
  5223		return hash & LPFC_VMID_HASH_MASK;
  5224	}
  5225	
  5226	/*
  5227	 * lpfc_vmid_update_entry - update the vmid entry in the hash table
  5228	 * @vport: The virtual port for which this call is being executed.
  5229	 * @cmd: address of scsi cmmd descriptor
  5230	 * @vmp: Pointer to a VMID entry representing a VM sending IO
  5231	 * @tag: VMID tag
  5232	 */
> 5233	void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd
  5234					   *cmd, struct lpfc_vmid *vmp,
  5235					   union lpfc_vmid_io_tag *tag)
  5236	{
  5237		u64 *lta;
  5238	
  5239		if (vport->vmid_priority_tagging)
  5240			tag->cs_ctl_vmid = vmp->un.cs_ctl_vmid;
  5241		else
  5242			tag->app_id = vmp->un.app_id;
  5243	
  5244		if (cmd->sc_data_direction == DMA_TO_DEVICE)
  5245			vmp->io_wr_cnt++;
  5246		else
  5247			vmp->io_rd_cnt++;
  5248	
  5249		/* update the last access timestamp in the table */
  5250		lta = per_cpu_ptr(vmp->last_io_time, raw_smp_processor_id());
  5251		*lta = jiffies;
  5252	}
  5253	
> 5254	void lpfc_vmid_assign_cs_ctl(struct lpfc_vport *vport, struct lpfc_vmid *vmid)
  5255	{
  5256		u32 hash;
  5257		struct lpfc_vmid *pvmid;
  5258	
  5259		if (vport->port_type == LPFC_PHYSICAL_PORT) {
  5260			vmid->un.cs_ctl_vmid = lpfc_vmid_get_cs_ctl(vport);
  5261		} else {
  5262			hash = lpfc_vmid_hash_fn(vmid->host_vmid, vmid->vmid_len);
  5263			pvmid =
  5264			    lpfc_get_vmid_from_hastable(vport->phba->pport, hash,
  5265							vmid->host_vmid);
  5266			if (!pvmid)
  5267				vmid->un.cs_ctl_vmid = pvmid->un.cs_ctl_vmid;
  5268			else
  5269				vmid->un.cs_ctl_vmid = lpfc_vmid_get_cs_ctl(vport);
  5270		}
  5271	}
  5272	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31312 bytes --]

  parent reply	other threads:[~2020-12-19 20:21 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  5:29 [PATCH v5 00/16] blkcg:Support to track FC storage blk io traffic Muneendra
2020-12-16  5:29 ` Muneendra
2020-12-16  5:29 ` [PATCH v5 01/16] cgroup: Added cgroup_get_from_id Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29 ` [PATCH v5 02/16] blkcg: Added a app identifier support for blkcg Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-19 17:12   ` Randy Dunlap
2020-12-19 17:12     ` Randy Dunlap
2020-12-22  6:02     ` Muneendra Kumar M
2020-12-22  6:02       ` Muneendra Kumar M
2020-12-16  5:29 ` [PATCH v5 03/16] nvme: Added a newsysfs attribute appid_store Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29 ` [PATCH v5 04/16] lpfc: vmid: Add the datastructure for supporting VMID in lpfc Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29 ` [PATCH v5 05/16] lpfc: vmid: Supplementary data structures for vmid and APIs Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29 ` [PATCH v5 06/16] lpfc: vmid: Forward declarations for APIs Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29 ` [PATCH v5 07/16] lpfc: vmid: VMID params initialization Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29 ` [PATCH v5 08/16] lpfc: vmid: Add support for vmid in mailbox command, does vmid resource allocation and vmid cleanup Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16 15:13   ` kernel test robot
2020-12-16 15:13     ` kernel test robot
2020-12-16 15:13     ` kernel test robot
2020-12-19 15:58   ` kernel test robot
2020-12-19 15:58     ` kernel test robot
2020-12-19 15:58     ` kernel test robot
2020-12-16  5:29 ` [PATCH v5 09/16] lpfc: vmid: Implements ELS commands for appid patch Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16 15:47   ` kernel test robot
2020-12-16 15:47     ` kernel test robot
2020-12-16 15:47     ` kernel test robot
2020-12-19 18:04   ` kernel test robot
2020-12-19 18:04     ` kernel test robot
2020-12-19 18:04     ` kernel test robot
2020-12-16  5:29 ` [PATCH v5 10/16] lpfc: vmid: Functions to manage vmids Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16 16:23   ` kernel test robot
2020-12-16 16:23     ` kernel test robot
2020-12-16 16:23     ` kernel test robot
2020-12-19 20:20   ` kernel test robot [this message]
2020-12-19 20:20     ` kernel test robot
2020-12-19 20:20     ` kernel test robot
2020-12-16  5:29 ` [PATCH v5 11/16] lpfc: vmid: Implements CT commands for appid Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16 16:57   ` kernel test robot
2020-12-16 16:57     ` kernel test robot
2020-12-16 16:57     ` kernel test robot
2020-12-19 23:27   ` kernel test robot
2020-12-19 23:27     ` kernel test robot
2020-12-19 23:27     ` kernel test robot
2020-12-16  5:29 ` [PATCH v5 12/16] lpfc: vmid: Appends the vmid in the wqe before sending Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29 ` [PATCH v5 13/16] lpfc: vmid: Timeout implementation for vmid Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16 17:51   ` kernel test robot
2020-12-16 17:51     ` kernel test robot
2020-12-16 17:51     ` kernel test robot
2020-12-16  5:29 ` [PATCH v5 14/16] lpfc: vmid: Adding qfpa and vmid timeout check in worker thread Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16 18:31   ` kernel test robot
2020-12-16 18:31     ` kernel test robot
2020-12-16 18:31     ` kernel test robot
2020-12-16  5:29 ` [PATCH v5 15/16] lpfc: vmid: Introducing vmid in io path Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-16  5:29 ` [PATCH v5 16/16] scsi: Made changes in Kconfig to select BLK_CGROUP_FC_APPID Muneendra
2020-12-16  5:29   ` Muneendra
2020-12-19 17:15   ` Randy Dunlap
2020-12-19 17:15     ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202012200434.2PvydHHW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=emilne@redhat.com \
    --cc=gaurav.srivastava@broadcom.com \
    --cc=hare@suse.de \
    --cc=jsmart2021@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkumar@redhat.com \
    --cc=muneendra.kumar@broadcom.com \
    --cc=pbonzini@redhat.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.