[Open-FCoE] [PATCH] [RFC] libfc: do not change the fh_rx_id of a recevied frame

Joe Eykholt jeykholt at cisco.com
Tue Feb 10 19:05:16 UTC 2009


Yi Zou wrote:
> This causes my wireshark to report bad fc crc on some incoming PLOGI frame
> since the frame is changed by the change of the fh_rx_id here.
> 
> I am not sure why we need this here, but I don't think we should change the
> incoming frame to the least. The changed fh->fh_rx_id is not used in folloing
> flow. I also think the whole "if (fh->fh_type != FC_TYPE_BLS) {..}" there
> can be removed.
> 
> Signed-off-by: Yi Zou <yi.zou at intel.com>
> ---
> 
>  drivers/scsi/libfc/fc_exch.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
> index 1af0820..da3e5b9 100644
> --- a/drivers/scsi/libfc/fc_exch.c
> +++ b/drivers/scsi/libfc/fc_exch.c
> @@ -651,7 +651,6 @@ static struct fc_exch *fc_exch_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)
>  		if (fh->fh_type != FC_TYPE_BLS) {
>  			rxid = ntohs(fh->fh_rx_id);
>  			WARN_ON(rxid != FC_XID_UNKNOWN);
> -			fh->fh_rx_id = htons(ep->rxid);
>  		}
>  		fc_exch_hold(ep);	/* hold for caller */
>  		spin_unlock_bh(&ep->ex_lock);	/* lock from exch_get */
> 
> _______________________________________________
> devel mailing list
> devel at open-fcoe.org
> http://www.open-fcoe.org/mailman/listinfo/devel

All this should be deleted, including the
comment, plus the declaration of rx_id.

                /*
                 * Set the responder ID in the frame header.
                 * The old one should've been 0xffff.
                 * If it isn't, don't assign one.
                 * Incoming basic link service frames may specify
                 * a referenced RX_ID.
                 */
                if (fh->fh_type != FC_TYPE_BLS) {
                        rxid = ntohs(fh->fh_rx_id);
                        WARN_ON(rxid != FC_XID_UNKNOWN);
                        fh->fh_rx_id = htons(ep->rxid);
                }


	Joe




More information about the devel mailing list