From: Chad Dupuis <chad.dupuis@qlogic.com>
To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com
Cc: chad.dupuis@qlogic.com, saurav.kashyap@qlogic.com,
linux-scsi@vger.kernel.org
Subject: [PATCH 2/5] bnx2fc: Print when we send a fip keep alive.
Date: Fri, 1 Apr 2016 09:10:20 -0400 [thread overview]
Message-ID: <1459516223-32106-3-git-send-email-chad.dupuis@qlogic.com> (raw)
In-Reply-To: <1459516223-32106-1-git-send-email-chad.dupuis@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 600c29d..d95eee6 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -127,6 +127,11 @@ module_param_named(tm_timeout, bnx2fc_tm_timeout, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(tm_timeout, " Change the default timeout for "
"task management commands. Default 60 seconds.");
+uint bnx2fc_log_fka;
+module_param_named(log_fka, bnx2fc_log_fka, uint, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(log_fka, " Print message to kernel log when fcoe is "
+ "initiating a FIP keep alive when debug logging is enabled.");
+
static int bnx2fc_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu);
/* notification function for CPU hotplug events */
@@ -1081,6 +1086,20 @@ static u8 *bnx2fc_get_src_mac(struct fc_lport *lport)
*/
static void bnx2fc_fip_send(struct fcoe_ctlr *fip, struct sk_buff *skb)
{
+ struct fip_header *fiph;
+ struct ethhdr *eth_hdr;
+ u16 op;
+ u8 sub;
+
+ fiph = (struct fip_header *) ((void *)skb->data + 2 * ETH_ALEN + 2);
+ eth_hdr = (struct ethhdr *)skb_mac_header(skb);
+ op = ntohs(fiph->fip_op);
+ sub = fiph->fip_subcode;
+
+ if (op == FIP_OP_CTRL && sub == FIP_SC_SOL && bnx2fc_log_fka)
+ BNX2FC_MISC_DBG("Sending FKA from %pM to %pM.\n",
+ eth_hdr->h_source, eth_hdr->h_dest);
+
skb->dev = bnx2fc_from_ctlr(fip)->netdev;
dev_queue_xmit(skb);
}
--
2.0.0.rc0.26.g779792a
next prev parent reply other threads:[~2016-04-01 13:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-01 13:10 [PATCH 0/5] bnx2fc: Update driver to 2.10.3 Chad Dupuis
2016-04-01 13:10 ` [PATCH 1/5] bnx2fc: Add driver tunables Chad Dupuis
2016-04-01 13:56 ` Johannes Thumshirn
2016-04-01 14:06 ` Chad Dupuis
2016-04-01 18:57 ` James Bottomley
2016-04-04 14:23 ` Chad Dupuis
2016-04-04 7:01 ` Johannes Thumshirn
2016-04-01 13:10 ` Chad Dupuis [this message]
2016-04-01 13:57 ` [PATCH 2/5] bnx2fc: Print when we send a fip keep alive Johannes Thumshirn
2016-04-01 13:10 ` [PATCH 3/5] bnx2fc: Print netdev device name when FCoE is successfully initialized Chad Dupuis
2016-04-01 13:58 ` Johannes Thumshirn
2016-04-01 14:08 ` Chad Dupuis
2016-04-01 13:10 ` [PATCH 4/5] bnx2fc: Check sc_cmd device and host pointer before returning the command to the mid-layer Chad Dupuis
2016-04-01 14:02 ` Johannes Thumshirn
2016-04-01 13:10 ` [PATCH 5/5] bnx2fc: Update version number to 2.10.3 Chad Dupuis
2016-04-01 14:02 ` Johannes Thumshirn
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=1459516223-32106-3-git-send-email-chad.dupuis@qlogic.com \
--to=chad.dupuis@qlogic.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=saurav.kashyap@qlogic.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;
as well as URLs for NNTP newsgroup(s).