Re: [PATCH 03/14] scsi: fnic: Add support for fabric based solicited requests and responses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 linus/master v6.10-rc3 next-20240611]
[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-Replace-shost_printk-with-pr_info-pr_err/20240611-060227
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20240610215100.673158-4-kartilak%40cisco.com
patch subject: [PATCH 03/14] scsi: fnic: Add support for fabric based solicited requests and responses
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20240611/202406112309.8GiDUvIM-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240611/202406112309.8GiDUvIM-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406112309.8GiDUvIM-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/scsi/fnic/fdls_disc.c:894:10: warning: variable 'reason_code' set but not used [-Wunused-but-set-variable]
     894 |         uint8_t reason_code;
         |                 ^
>> drivers/scsi/fnic/fdls_disc.c:1009:26: warning: variable 'els_rjt' set but not used [-Wunused-but-set-variable]
    1009 |         struct fc_els_reject_s *els_rjt;
         |                                 ^
>> drivers/scsi/fnic/fdls_disc.c:1520:11: warning: variable 's_id' set but not used [-Wunused-but-set-variable]
    1520 |         uint32_t s_id = 0;
         |                  ^
>> drivers/scsi/fnic/fdls_disc.c:1521:11: warning: variable 'd_id' set but not used [-Wunused-but-set-variable]
    1521 |         uint32_t d_id = 0;
         |                  ^
   drivers/scsi/fnic/fdls_disc.c:627:13: warning: unused function 'fnic_fdls_start_flogi' [-Wunused-function]
     627 | static void fnic_fdls_start_flogi(struct fnic_iport_s *iport)
         |             ^~~~~~~~~~~~~~~~~~~~~
   5 warnings generated.


vim +/els_rjt +1009 drivers/scsi/fnic/fdls_disc.c

  1000	
  1001	static void
  1002	fdls_process_flogi_rsp(struct fnic_iport_s *iport, struct fc_hdr_s *fchdr,
  1003						   void *rx_frame)
  1004	{
  1005		struct fnic_fdls_fabric_s *fabric = &iport->fabric;
  1006		struct fc_els_s *flogi_rsp = (struct fc_els_s *) fchdr;
  1007		uint8_t *fcid;
  1008		int rdf_size;
> 1009		struct fc_els_reject_s *els_rjt;
  1010		uint8_t fcmac[6] = { 0x0E, 0XFC, 0x00, 0x00, 0x00, 0x00 };
  1011		struct fnic *fnic = iport->fnic;
  1012	
  1013		FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1014					 "0x%x: FDLS processing FLOGI response", iport->fcid);
  1015	
  1016		if (fdls_get_state(fabric) != FDLS_STATE_FABRIC_FLOGI) {
  1017			FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1018						 "FLOGI response received in state (%d). Dropping frame",
  1019						 fdls_get_state(fabric));
  1020			return;
  1021		}
  1022	
  1023		switch (flogi_rsp->command) {
  1024		case FC_LS_ACC:
  1025			if (iport->fabric.timer_pending) {
  1026				FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1027							 "iport fcid: 0x%x Canceling fabric disc timer\n",
  1028							 iport->fcid);
  1029				fnic_del_fabric_timer_sync();
  1030			}
  1031	
  1032			iport->fabric.timer_pending = 0;
  1033			iport->fabric.retry_counter = 0;
  1034			fcid = FNIC_GET_D_ID(fchdr);
  1035			iport->fcid = ntoh24(fcid);
  1036			FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1037						 "0x%x: FLOGI response accepted", iport->fcid);
  1038	
  1039			/* Learn the Service Params */
  1040			rdf_size = ntohs(flogi_rsp->u.csp_flogi.b2b_rdf_size);
  1041			if ((rdf_size >= FNIC_MIN_DATA_FIELD_SIZE)
  1042				&& (rdf_size < FNIC_FC_MAX_PAYLOAD_LEN))
  1043				iport->max_payload_size = MIN(rdf_size,
  1044									  iport->max_payload_size);
  1045	
  1046			FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1047						 "max_payload_size from fabric: %d set: %d", rdf_size,
  1048						 iport->max_payload_size);
  1049	
  1050			iport->r_a_tov = ntohl(flogi_rsp->u.csp_flogi.r_a_tov);
  1051			iport->e_d_tov = ntohl(flogi_rsp->u.csp_flogi.e_d_tov);
  1052	
  1053			if (flogi_rsp->u.csp_flogi.features & FNIC_FC_EDTOV_NSEC)
  1054				iport->e_d_tov = iport->e_d_tov / FNIC_NSEC_TO_MSEC;
  1055	
  1056			FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1057						 "From fabric: R_A_TOV: %d E_D_TOV: %d",
  1058						 iport->r_a_tov, iport->e_d_tov);
  1059	
  1060			if (IS_FNIC_FCP_INITIATOR(fnic)) {
  1061				fc_host_fabric_name(iport->fnic->lport->host) =
  1062					get_unaligned_be64(&flogi_rsp->node_name);
  1063				fc_host_port_id(iport->fnic->lport->host) = iport->fcid;
  1064			}
  1065	
  1066			fnic_fdls_learn_fcoe_macs(iport, rx_frame, fcid);
  1067	
  1068			memcpy(&fcmac[3], fcid, 3);
  1069			FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1070				 "Adding vNIC device MAC addr: %02x:%02x:%02x:%02x:%02x:%02x",
  1071				 fcmac[0], fcmac[1], fcmac[2], fcmac[3], fcmac[4],
  1072				 fcmac[5]);
  1073			vnic_dev_add_addr(iport->fnic->vdev, fcmac);
  1074	
  1075			if (fdls_get_state(fabric) == FDLS_STATE_FABRIC_FLOGI) {
  1076				fnic_fdls_start_plogi(iport);
  1077				FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1078							 "FLOGI response received. Starting PLOGI");
  1079			} else {
  1080				/* From FDLS_STATE_FABRIC_FLOGI state fabric can only go to
  1081				 * FDLS_STATE_LINKDOWN
  1082				 * state, hence we don't have to worry about undoing:
  1083				 * the fnic_fdls_register_portid and vnic_dev_add_addr
  1084				 */
  1085				FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1086					 "FLOGI response received in state (%d). Dropping frame",
  1087					 fdls_get_state(fabric));
  1088			}
  1089			break;
  1090	
  1091		case FC_LS_REJ:
  1092			els_rjt = (struct fc_els_reject_s *) fchdr;
  1093			if (fabric->retry_counter < iport->max_flogi_retries) {
  1094				FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1095					 "FLOGI returned FC_LS_REJ BUSY. Retry from timer routine %p",
  1096					 iport);
  1097	
  1098				/* Retry Flogi again from the timer routine. */
  1099				fabric->flags |= FNIC_FDLS_RETRY_FRAME;
  1100	
  1101			} else {
  1102				FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1103						 "FLOGI returned FC_LS_REJ. Halting discovery %p", iport);
  1104				if (iport->fabric.timer_pending) {
  1105					FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1106								 "iport 0x%p Canceling fabric disc timer\n",
  1107								 iport);
  1108					fnic_del_fabric_timer_sync();
  1109				}
  1110				fabric->timer_pending = 0;
  1111				fabric->retry_counter = 0;
  1112			}
  1113			break;
  1114	
  1115		default:
  1116			FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
  1117						 "FLOGI response not accepted: 0x%x",
  1118						 flogi_rsp->command);
  1119			break;
  1120		}
  1121	}
  1122	

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux