[Open-FCoE] [RFC PATCH 5/5] libfc: stop sending KA if port is not logged in

Joe Eykholt joe.eykholt at gmail.com
Fri Jan 14 23:21:44 UTC 2011


On 1/14/11 12:13 PM, Vasu Dev wrote:

There's no description on this patch.  Note that the series description never
gets committed, so the individual patch descriptions are what's important
for posterity.
> Reported-by: Frank Zhang<frank_1.Zhang at intel.com>
> Signed-off-by: Vasu Dev<vasu.dev at intel.com>
> ---
>
>   drivers/scsi/fcoe/libfcoe.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
> index 625c6be..c04e208 100644
> --- a/drivers/scsi/fcoe/libfcoe.c
> +++ b/drivers/scsi/fcoe/libfcoe.c
> @@ -464,7 +464,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip,
>
>   	fcf = fip->sel_fcf;
>   	lp = fip->lp;
> -	if (!fcf || (ports&&  !lp->port_id))
> +	if (!fcf || (lport&&  !lp->port_id))
>   		return;

I think the above change might be wrong.   At least I don't see what it fixes.

If we're sending a port keep-alive, (ports is != 0) then there's no point in
doing it if the port_id is zero.  However, for the controller keep-alive,
we want to send it even if we happen to be logged off at this instant.
At least that was my intent.  I guess we won't get a CVL if we're not logged in,
so maybe there's no need in doing the KA in that case either.
>
>   	len = sizeof(*kal) + ports * sizeof(*vn);
> @@ -1649,7 +1649,7 @@ static void fcoe_ctlr_timer_work(struct work_struct *work)
>   	}
>
>   	if (send_ctlr_ka)
> -		fcoe_ctlr_send_keep_alive(fip, NULL, 0, fip->ctl_src_addr);
> +		fcoe_ctlr_send_keep_alive(fip, fip->lp, 0, fip->ctl_src_addr);

This can be left as is.   The second arg shouldn't be used if the third arg is 0.
>
>   	if (send_port_ka) {
>   		mutex_lock(&fip->lp->lp_mutex);
>
> _______________________________________________
> devel mailing list
> devel at open-fcoe.org
> https://lists.open-fcoe.org/mailman/listinfo/devel




More information about the devel mailing list