* [PATCH] fcoe: fix reset of fip selection time.
@ 2016-02-29 11:36 Usha Ketineni
2016-02-29 20:16 ` [Open-FCoE] " Neil Horman
2016-03-01 2:02 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Usha Ketineni @ 2016-02-29 11:36 UTC (permalink / raw)
To: linux-scsi; +Cc: fcoe-devel
Do not reset fip selection time for every advertisement
in fcoe_ctlr_recv_adv() but set it only once for the first
validated FCF. Otherwise FCF selection won't happen when the
advertisements consistently arrive with sub FCOE_CTLR_START_DELAY
periodicity.
Tested-by: Narendra K <narendra_k@dell.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Usha Ketineni <usha.k.ketineni@intel.com>
---
drivers/scsi/fcoe/fcoe_ctlr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index d68d572..0c85ef6 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -1079,7 +1079,8 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb)
* If this is the first validated FCF, note the time and
* set a timer to trigger selection.
*/
- if (mtu_valid && !fip->sel_fcf && fcoe_ctlr_fcf_usable(fcf)) {
+ if (mtu_valid && !fip->sel_fcf && !fip->sel_time &&
+ fcoe_ctlr_fcf_usable(fcf)) {
fip->sel_time = jiffies +
msecs_to_jiffies(FCOE_CTLR_START_DELAY);
if (!timer_pending(&fip->timer) ||
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Open-FCoE] [PATCH] fcoe: fix reset of fip selection time.
2016-02-29 11:36 [PATCH] fcoe: fix reset of fip selection time Usha Ketineni
@ 2016-02-29 20:16 ` Neil Horman
2016-03-01 2:02 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Neil Horman @ 2016-02-29 20:16 UTC (permalink / raw)
To: Usha Ketineni; +Cc: linux-scsi, fcoe-devel
On Mon, Feb 29, 2016 at 03:36:52AM -0800, Usha Ketineni wrote:
> Do not reset fip selection time for every advertisement
> in fcoe_ctlr_recv_adv() but set it only once for the first
> validated FCF. Otherwise FCF selection won't happen when the
> advertisements consistently arrive with sub FCOE_CTLR_START_DELAY
> periodicity.
>
> Tested-by: Narendra K <narendra_k@dell.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
> Acked-by: Vasu Dev <vasu.dev@intel.com>
> Signed-off-by: Usha Ketineni <usha.k.ketineni@intel.com>
> ---
> drivers/scsi/fcoe/fcoe_ctlr.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
> index d68d572..0c85ef6 100644
> --- a/drivers/scsi/fcoe/fcoe_ctlr.c
> +++ b/drivers/scsi/fcoe/fcoe_ctlr.c
> @@ -1079,7 +1079,8 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb)
> * If this is the first validated FCF, note the time and
> * set a timer to trigger selection.
> */
> - if (mtu_valid && !fip->sel_fcf && fcoe_ctlr_fcf_usable(fcf)) {
> + if (mtu_valid && !fip->sel_fcf && !fip->sel_time &&
> + fcoe_ctlr_fcf_usable(fcf)) {
> fip->sel_time = jiffies +
> msecs_to_jiffies(FCOE_CTLR_START_DELAY);
> if (!timer_pending(&fip->timer) ||
>
> _______________________________________________
> fcoe-devel mailing list
> fcoe-devel@open-fcoe.org
> http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fcoe: fix reset of fip selection time.
2016-02-29 11:36 [PATCH] fcoe: fix reset of fip selection time Usha Ketineni
2016-02-29 20:16 ` [Open-FCoE] " Neil Horman
@ 2016-03-01 2:02 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-03-01 2:02 UTC (permalink / raw)
To: Usha Ketineni; +Cc: linux-scsi, fcoe-devel
>>>>> "Usha" == Usha Ketineni <usha.k.ketineni@intel.com> writes:
Usha> Do not reset fip selection time for every advertisement in
Usha> fcoe_ctlr_recv_adv() but set it only once for the first validated
Usha> FCF. Otherwise FCF selection won't happen when the advertisements
Usha> consistently arrive with sub FCOE_CTLR_START_DELAY periodicity.
Applied to 4.6/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-01 2:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 11:36 [PATCH] fcoe: fix reset of fip selection time Usha Ketineni
2016-02-29 20:16 ` [Open-FCoE] " Neil Horman
2016-03-01 2:02 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox