Bhanu Gollapudi wrote:
> libfcoe module doesnt send port keep alive every
> FIP_VN_KA_PERIOD due to improper assignment of timeout value.
> Update the port_ka_time appropriately by incrementing it by
> FIP_VN_KA_PERIOD in fcoe_ctlr_timeout(), so that the link_work
> is scheduled to send the port LKA.
> 
> Signed-off-by: Bhanu Gollapudi <[email protected]>
> ---
>  drivers/scsi/fcoe/libfcoe.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
> index 9823291..511cb6b 100644
> --- a/drivers/scsi/fcoe/libfcoe.c
> +++ b/drivers/scsi/fcoe/libfcoe.c
> @@ -1187,7 +1187,7 @@ static void fcoe_ctlr_timeout(unsigned long arg)
>                       next_timer = fip->ctlr_ka_time;
>  
>               if (time_after_eq(jiffies, fip->port_ka_time)) {
> -                     fip->port_ka_time += jiffies +
> +                     fip->port_ka_time = jiffies +
>                               msecs_to_jiffies(FIP_VN_KA_PERIOD);

Good find.  I guess nothing needed port keep-alives so far.
Controller keep-alives have been critical.

Maybe the intent was to do:
                        fip->port_ka_time += msec_to_jiffies(FIP_VN_KA_PERIOD);

Since the old time was presumably just before the current jiffies.
This would schedule the next port keep-alive exactly 90 seconds after
the previous one was scheduled, so there's no slippage due to late
handling.  However, I think any slippage will be minor (way less than
a second) so the patch is OK as you have it.

>                       fip->send_port_ka = 1;
>               }

acked-by: Joe Eykholt <[email protected]>

        Regards,
        Joe
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to