From: Robert Love <robert.w.love@intel.com>
To: linux-scsi@vger.kernel.org
Cc: Ross Brattain <ross.b.brattain@intel.com>, Vasu Dev <vasu.dev@intel.com>
Subject: [PATCH 09/10] fcoe: add fip retry to avoid missing critical keep alive
Date: Wed, 27 Jul 2011 15:11:05 -0700 [thread overview]
Message-ID: <20110727221105.23675.3526.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110727221018.23675.3551.stgit@localhost6.localdomain6>
From: Vasu Dev <vasu.dev@intel.com>
Use pending queue to retry FIP frame in case its tx
fails and use common pending queue for both fcoe
and fip frames using fcoe_port_send.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
drivers/scsi/fcoe/fcoe.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 945df21..528b86b 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -487,6 +487,19 @@ static int fcoe_fip_recv(struct sk_buff *skb, struct net_device *netdev,
}
/**
+ * fcoe_port_send() - Send an Ethernet-encapsulated FIP/FCoE frame
+ * @port: The FCoE port
+ * @skb: The FIP/FCoE packet to be sent
+ */
+static void fcoe_port_send(struct fcoe_port *port, struct sk_buff *skb)
+{
+ if (port->fcoe_pending_queue.qlen)
+ fcoe_check_wait_queue(port->lport, skb);
+ else if (fcoe_start_io(skb))
+ fcoe_check_wait_queue(port->lport, skb);
+}
+
+/**
* fcoe_fip_send() - Send an Ethernet-encapsulated FIP frame
* @fip: The FCoE controller
* @skb: The FIP packet to be sent
@@ -494,7 +507,7 @@ static int fcoe_fip_recv(struct sk_buff *skb, struct net_device *netdev,
static void fcoe_fip_send(struct fcoe_ctlr *fip, struct sk_buff *skb)
{
skb->dev = fcoe_from_ctlr(fip)->netdev;
- dev_queue_xmit(skb);
+ fcoe_port_send(lport_priv(fip->lp), skb);
}
/**
@@ -1575,11 +1588,7 @@ int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
/* send down to lld */
fr_dev(fp) = lport;
- if (port->fcoe_pending_queue.qlen)
- fcoe_check_wait_queue(lport, skb);
- else if (fcoe_start_io(skb))
- fcoe_check_wait_queue(lport, skb);
-
+ fcoe_port_send(port, skb);
return 0;
}
next prev parent reply other threads:[~2011-07-27 22:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-27 22:10 [PATCH 00/10] libfc, libfcoe and fcoe updates for scsi-misc Robert Love
2011-07-27 22:10 ` [PATCH 01/10] fcoe: remove unused ptype field in fcoe_rcv_info Robert Love
2011-07-27 22:10 ` [PATCH 02/10] libfc: use FC_MAX_ERROR_CNT Robert Love
2011-07-27 22:10 ` [PATCH 03/10] libfc: release exchg cache Robert Love
2011-07-27 22:10 ` [PATCH 04/10] libfc, fcoe: ignore rx frame with wrong xid info Robert Love
2011-07-27 22:10 ` [PATCH 05/10] libfc: two minor changes in comments Robert Love
2011-07-27 22:10 ` [PATCH 06/10] libfc: cleanup sending SRR request Robert Love
2011-07-27 22:10 ` [PATCH 07/10] libfc: Remove the reference to FCP packet from scsi_cmnd in case of error Robert Love
2011-07-27 22:11 ` [PATCH 08/10] libfc: fix warn on in lport retry Robert Love
2011-07-27 22:11 ` Robert Love [this message]
2011-07-27 22:11 ` [PATCH 10/10] fcoe: cleanup cpu selection for incoming requests Robert Love
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110727221105.23675.3526.stgit@localhost6.localdomain6 \
--to=robert.w.love@intel.com \
--cc=linux-scsi@vger.kernel.org \
--cc=ross.b.brattain@intel.com \
--cc=vasu.dev@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox