Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: lpfc: vmid: VMID parameter initialization

Initialize parameters such as type of VMID, max number of VMIDs supported
and timeout value for the VMID registration based on the user input.

Link: https://lore.kernel.org/r/20210608043556.274139-6-muneendra.kumar@broadcom.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Gaurav Srivastava <gaurav.srivastava@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Muneendra Kumar <muneendra.kumar@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Gaurav Srivastava and committed by
Martin K. Petersen
7ba2272c 02169e84

+48
+48
drivers/scsi/lpfc/lpfc_attr.c
··· 6162 6162 */ 6163 6163 LPFC_ATTR_R(enable_mi, 1, 0, 1, "Enable MI"); 6164 6164 6165 + /* 6166 + * lpfc_max_vmid: Maximum number of VMs to be tagged. This is valid only if 6167 + * either vmid_app_header or vmid_priority_tagging is enabled. 6168 + * 4 - 255 = vmid support enabled for 4-255 VMs 6169 + * Value range is [4,255]. 6170 + */ 6171 + LPFC_ATTR_RW(max_vmid, LPFC_MIN_VMID, LPFC_MIN_VMID, LPFC_MAX_VMID, 6172 + "Maximum number of VMs supported"); 6173 + 6174 + /* 6175 + * lpfc_vmid_inactivity_timeout: Inactivity timeout duration in hours 6176 + * 0 = Timeout is disabled 6177 + * Value range is [0,24]. 6178 + */ 6179 + LPFC_ATTR_RW(vmid_inactivity_timeout, 4, 0, 24, 6180 + "Inactivity timeout in hours"); 6181 + 6182 + /* 6183 + * lpfc_vmid_app_header: Enable App Header VMID support 6184 + * 0 = Support is disabled (default) 6185 + * 1 = Support is enabled 6186 + * Value range is [0,1]. 6187 + */ 6188 + LPFC_ATTR_RW(vmid_app_header, LPFC_VMID_APP_HEADER_DISABLE, 6189 + LPFC_VMID_APP_HEADER_DISABLE, LPFC_VMID_APP_HEADER_ENABLE, 6190 + "Enable App Header VMID support"); 6191 + 6192 + /* 6193 + * lpfc_vmid_priority_tagging: Enable Priority Tagging VMID support 6194 + * 0 = Support is disabled (default) 6195 + * 1 = Allow supported targets only 6196 + * 2 = Allow all targets 6197 + * Value range is [0,2]. 6198 + */ 6199 + LPFC_ATTR_RW(vmid_priority_tagging, LPFC_VMID_PRIO_TAG_DISABLE, 6200 + LPFC_VMID_PRIO_TAG_DISABLE, 6201 + LPFC_VMID_PRIO_TAG_ALL_TARGETS, 6202 + "Enable Priority Tagging VMID support"); 6203 + 6165 6204 struct device_attribute *lpfc_hba_attrs[] = { 6166 6205 &dev_attr_nvme_info, 6167 6206 &dev_attr_scsi_stat, ··· 6320 6281 &dev_attr_lpfc_enable_bbcr, 6321 6282 &dev_attr_lpfc_enable_dpp, 6322 6283 &dev_attr_lpfc_enable_mi, 6284 + &dev_attr_lpfc_max_vmid, 6285 + &dev_attr_lpfc_vmid_inactivity_timeout, 6286 + &dev_attr_lpfc_vmid_app_header, 6287 + &dev_attr_lpfc_vmid_priority_tagging, 6323 6288 NULL, 6324 6289 }; 6325 6290 ··· 7400 7357 lpfc_enable_hba_heartbeat_init(phba, lpfc_enable_hba_heartbeat); 7401 7358 7402 7359 lpfc_EnableXLane_init(phba, lpfc_EnableXLane); 7360 + /* VMID Inits */ 7361 + lpfc_max_vmid_init(phba, lpfc_max_vmid); 7362 + lpfc_vmid_inactivity_timeout_init(phba, lpfc_vmid_inactivity_timeout); 7363 + lpfc_vmid_app_header_init(phba, lpfc_vmid_app_header); 7364 + lpfc_vmid_priority_tagging_init(phba, lpfc_vmid_priority_tagging); 7403 7365 if (phba->sli_rev != LPFC_SLI_REV4) 7404 7366 phba->cfg_EnableXLane = 0; 7405 7367 lpfc_XLanePriority_init(phba, lpfc_XLanePriority);