Skip to content

Commit

Permalink
[SCSI] libfcoe: fix VN2VN N_Port_ID Beacon source MAC
Browse files Browse the repository at this point in the history
FC-BB-6 v1.04 7.9.8.14 N_Port_ID Beacon:

"A N_Port_ID Beacon is multicast and uses the VN_Port MAC address as source
address."

Currently, libfcoe is using ENode MAC, this seems ok and functionality wise
not a problem in my back to back testing setup, however, just fix this to
make libfcoe VN2VN support more spec compliant.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Yi Zou authored and James Bottomley committed May 10, 2012
1 parent 949e71f commit d227f02
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/scsi/fcoe/fcoe_ctlr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,13 @@ static void fcoe_ctlr_vn_send(struct fcoe_ctlr *fip,
frame = (struct fip_frame *)skb->data;
memset(frame, 0, len);
memcpy(frame->eth.h_dest, dest, ETH_ALEN);
memcpy(frame->eth.h_source, fip->ctl_src_addr, ETH_ALEN);

if (sub == FIP_SC_VN_BEACON) {
hton24(frame->eth.h_source, FIP_VN_FC_MAP);
hton24(frame->eth.h_source + 3, fip->port_id);
} else {
memcpy(frame->eth.h_source, fip->ctl_src_addr, ETH_ALEN);
}
frame->eth.h_proto = htons(ETH_P_FIP);

frame->fip.fip_ver = FIP_VER_ENCAPS(FIP_VER);
Expand Down

0 comments on commit d227f02

Please sign in to comment.