Re: [PATCH 02/22] libfc: additional debugging messages

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

 



On 08/03/2016 07:33 PM, Bart Van Assche wrote:
> On 08/03/2016 06:13 AM, Hannes Reinecke wrote:
>> @@ -1121,8 +1124,10 @@ static void fc_rport_prli_resp(struct fc_seq
>> *sp, struct fc_frame *fp,
>>          fc_rport_enter_rtv(rdata);
>>
>>      } else {
>> -        FC_RPORT_DBG(rdata, "Bad ELS response for PRLI command\n");
>> -        fc_rport_error_retry(rdata, fp);
>> +        rjt = fc_frame_payload_get(fp, sizeof (*rjt));
>> +        FC_RPORT_DBG(rdata, "PRLI ELS rejected, reason %x expl %x\n",
>> +                 rjt->er_reason, rjt->er_explan);
>> +        fc_rport_error_retry(rdata, NULL);
>>      }
> 
> Shouldn't the type of the frame be checked in this code instead of
> assuming that it's a reject?
> 
I've asked me the same question, but as it stands FC-LS only allows for
two frame types (LS_ACC or LS_RJT).
And it's (more-or-less) consistent usage throughout libfc.
But yeah, for safety one really should check for LS_ACC and LS_RJT and
throw an error for any other type.
However, that should be done throughout libfc, and would warrant a
different patch.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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