summaryrefslogtreecommitdiff
path: root/drivers/scsi/qedf/qedf_fip.c
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@cavium.com>2017-08-15 20:08:17 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-25 05:29:02 +0300
commita3cd42a9d627fd7c472664e454108829886e123f (patch)
treeb0e46b950dcbac4e5d0f645082d3849195dffd14 /drivers/scsi/qedf/qedf_fip.c
parent01fd76a76552b801897ac087e4e2d7667dd7c458 (diff)
downloadlinux-a3cd42a9d627fd7c472664e454108829886e123f.tar.xz
scsi: qedf: Use granted MAC from the FCF for the FCoE source address if it is available.
Currently in the driver we've been using the fc_fcoe_set_mac() function to set the source MAC for FCoE traffic. This works well in most cases as it uses the spec. default FCF-MAC. However, if the administrator changes the FCF-MAC switch, then any FCoE traffic we send will be dropped by the switch. Instead we should check the granted MAC from the FLOGI payload and use that address if it is present. Otherwise, fall back to using the the default FCF-MAC and the fabric ID of the port as the FCoE MAC address. Once this address is known we need to set it when doing non-offload traffic, offload traffic and setting the data_src_address libfcoe uses for FIP keep alive messages. Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf/qedf_fip.c')
-rw-r--r--drivers/scsi/qedf/qedf_fip.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/scsi/qedf/qedf_fip.c b/drivers/scsi/qedf/qedf_fip.c
index aefd24ca9604..28ce0f7ffc7b 100644
--- a/drivers/scsi/qedf/qedf_fip.c
+++ b/drivers/scsi/qedf/qedf_fip.c
@@ -242,26 +242,9 @@ void qedf_fip_recv(struct qedf_ctx *qedf, struct sk_buff *skb)
}
}
-void qedf_update_src_mac(struct fc_lport *lport, u8 *addr)
-{
- struct qedf_ctx *qedf = lport_priv(lport);
-
- QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC,
- "Setting data_src_addr=%pM.\n", addr);
- ether_addr_copy(qedf->data_src_addr, addr);
-}
-
u8 *qedf_get_src_mac(struct fc_lport *lport)
{
- u8 mac[ETH_ALEN];
- u8 port_id[3];
struct qedf_ctx *qedf = lport_priv(lport);
- /* We need to use the lport port_id to create the data_src_addr */
- if (is_zero_ether_addr(qedf->data_src_addr)) {
- hton24(port_id, lport->port_id);
- fc_fcoe_set_mac(mac, port_id);
- qedf->ctlr.update_mac(lport, mac);
- }
return qedf->data_src_addr;
}