All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Karan Tilak Kumar <kartilak@cisco.com>, sebaddel@cisco.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	arulponn@cisco.com, djhawar@cisco.com, gcboffa@cisco.com,
	mkai2@cisco.com, satishkh@cisco.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Karan Tilak Kumar <kartilak@cisco.com>
Subject: Re: [PATCH 03/14] scsi: fnic: Add support for fabric based solicited requests and responses
Date: Wed, 12 Jun 2024 00:12:27 +0800	[thread overview]
Message-ID: <202406112309.8GiDUvIM-lkp@intel.com> (raw)
In-Reply-To: <20240610215100.673158-4-kartilak@cisco.com>

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@intel.com/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@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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406112309.8GiDUvIM-lkp@intel.com/

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

  parent reply	other threads:[~2024-06-11 16:12 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10 21:50 [PATCH 00/14] Introduce support for feature Fabric Discovery and Karan Tilak Kumar
2024-06-10 21:50 ` [PATCH 01/14] scsi: fnic: Replace shost_printk with pr_info/pr_err Karan Tilak Kumar
2024-06-11  6:32   ` Hannes Reinecke
2024-06-12 22:25     ` Karan Tilak Kumar (kartilak)
2024-06-10 21:50 ` [PATCH 02/14] scsi: fnic: Add headers and definitions for FDLS Karan Tilak Kumar
2024-06-11  6:53   ` Hannes Reinecke
2024-06-12 22:48     ` Karan Tilak Kumar (kartilak)
2024-06-10 21:50 ` [PATCH 03/14] scsi: fnic: Add support for fabric based solicited requests and responses Karan Tilak Kumar
2024-06-11  7:09   ` Hannes Reinecke
2024-06-17 19:36     ` Karan Tilak Kumar (kartilak)
2024-06-11 16:12   ` kernel test robot [this message]
2024-06-11 18:38   ` kernel test robot
2024-06-10 21:50 ` [PATCH 04/14] scsi: fnic: Add support for target " Karan Tilak Kumar
2024-06-11 13:31   ` Hannes Reinecke
2024-06-11 17:48     ` Karan Tilak Kumar (kartilak)
2024-06-26 10:01     ` Karan Tilak Kumar (kartilak)
2024-06-11 17:56   ` kernel test robot
2024-06-10 21:50 ` [PATCH 05/14] scsi: fnic: Add support for unsolicited " Karan Tilak Kumar
2024-06-12  6:31   ` Hannes Reinecke
2024-06-26  9:46     ` Karan Tilak Kumar (kartilak)
2024-06-10 21:50 ` [PATCH 06/14] scsi: fnic: Add and integrate support for FDMI Karan Tilak Kumar
2024-06-10 23:18   ` kernel test robot
2024-06-12  6:45   ` Hannes Reinecke
2024-06-18 17:50     ` Karan Tilak Kumar (kartilak)
2024-06-10 21:50 ` [PATCH 07/14] scsi: fnic: Add and integrate support for FIP Karan Tilak Kumar
2024-06-12  6:47   ` Hannes Reinecke
2024-06-15  3:44     ` Karan Tilak Kumar (kartilak)
2024-06-15  9:05       ` Hannes Reinecke
2024-06-17 18:56         ` Karan Tilak Kumar (kartilak)
2024-06-13 15:46   ` John Garry
2024-06-18 20:37     ` Karan Tilak Kumar (kartilak)
2024-08-09 16:36     ` Karan Tilak Kumar (kartilak)
2024-06-10 21:50 ` [PATCH 08/14] scsi: fnic: Add functionality in fnic to support FDLS Karan Tilak Kumar
2024-06-12  6:57   ` Hannes Reinecke
2024-06-15  3:47     ` Karan Tilak Kumar (kartilak)
2024-06-15  9:07       ` Hannes Reinecke
2024-06-17 19:25         ` Karan Tilak Kumar (kartilak)
2024-06-10 21:50 ` [PATCH 09/14] scsi: fnic: Modify IO path to use FDLS Karan Tilak Kumar
2024-06-12  7:18   ` Hannes Reinecke
2024-06-18 17:36     ` Karan Tilak Kumar (kartilak)
2024-06-10 21:50 ` [PATCH 10/14] scsi: fnic: Modify fnic interfaces " Karan Tilak Kumar
2024-06-10 21:50 ` [PATCH 11/14] scsi: fnic: Add stats and related functionality Karan Tilak Kumar
2024-06-10 21:50 ` [PATCH 12/14] scsi: fnic: Code cleanup Karan Tilak Kumar
2024-06-10 21:50 ` [PATCH 13/14] scsi: fnic: Add support to handle port channel RSCN Karan Tilak Kumar
2024-06-10 21:51 ` [PATCH 14/14] scsi: fnic: Increment driver version Karan Tilak Kumar

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=202406112309.8GiDUvIM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arulponn@cisco.com \
    --cc=djhawar@cisco.com \
    --cc=gcboffa@cisco.com \
    --cc=jejb@linux.ibm.com \
    --cc=kartilak@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=martin.petersen@oracle.com \
    --cc=mkai2@cisco.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=satishkh@cisco.com \
    --cc=sebaddel@cisco.com \
    /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.