VN2VN mode uses two multicast addresses which are both different from the one used in fabric mode. Add and delete these when setting up or tearing down fcoe instances.
Signed-off-by: Joe Eykholt <[email protected]> --- drivers/scsi/fcoe/fcoe.c | 11 ++++++++++- drivers/scsi/fcoe/libfcoe.c | 11 ++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index e6d2047..e29ed78 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -315,7 +315,11 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe, dev_unicast_add(netdev, flogi_maddr); if (fip->spma) dev_unicast_add(netdev, fip->ctl_src_addr); - dev_mc_add(netdev, FIP_ALL_ENODE_MACS, ETH_ALEN, 0); + if (fip->mode == FIP_MODE_VN2VN) { + dev_mc_add(netdev, FIP_ALL_VN2VN_MACS, ETH_ALEN, 0); + dev_mc_add(netdev, FIP_ALL_P2P_MACS, ETH_ALEN, 0); + } else + dev_mc_add(netdev, FIP_ALL_ENODE_MACS, ETH_ALEN, 0); /* * setup the receive function from ethernet driver @@ -402,6 +406,11 @@ void fcoe_interface_cleanup(struct fcoe_interface *fcoe) if (fip->spma) dev_unicast_delete(netdev, fip->ctl_src_addr); dev_mc_delete(netdev, FIP_ALL_ENODE_MACS, ETH_ALEN, 0); + if (fip->mode == FIP_MODE_VN2VN) { + dev_mc_delete(netdev, FIP_ALL_VN2VN_MACS, ETH_ALEN, 0); + dev_mc_delete(netdev, FIP_ALL_P2P_MACS, ETH_ALEN, 0); + } else + dev_mc_delete(netdev, FIP_ALL_ENODE_MACS, ETH_ALEN, 0); /* Tell the LLD we are done w/ FCoE */ ops = netdev->netdev_ops; diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 5fa1569..a306721 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c @@ -63,6 +63,7 @@ static int fcoe_ctlr_vn_lookup(struct fcoe_ctlr *, u32, u8 *); static u8 fcoe_all_fcfs[ETH_ALEN] = FIP_ALL_FCF_MACS; static u8 fcoe_all_enode[ETH_ALEN] = FIP_ALL_ENODE_MACS; static u8 fcoe_all_vn2vn[ETH_ALEN] = FIP_ALL_VN2VN_MACS; +static u8 fcoe_all_p2p[ETH_ALEN] = FIP_ALL_P2P_MACS; unsigned int libfcoe_debug_logging; module_param_named(debug_logging, libfcoe_debug_logging, int, S_IRUGO|S_IWUSR); @@ -1165,9 +1166,13 @@ static int fcoe_ctlr_recv_handler(struct fcoe_ctlr *fip, struct sk_buff *skb) if (skb->len < sizeof(*fiph)) goto drop; eh = eth_hdr(skb); - if (compare_ether_addr(eh->h_dest, fip->ctl_src_addr) && - compare_ether_addr(eh->h_dest, fip->mode == FIP_MODE_VN2VN ? - fcoe_all_vn2vn : fcoe_all_enode)) + if (fip->mode == FIP_MODE_VN2VN) { + if (compare_ether_addr(eh->h_dest, fip->ctl_src_addr) && + compare_ether_addr(eh->h_dest, fcoe_all_vn2vn) && + compare_ether_addr(eh->h_dest, fcoe_all_p2p)) + goto drop; + } else if (compare_ether_addr(eh->h_dest, fip->ctl_src_addr) && + compare_ether_addr(eh->h_dest, fcoe_all_enode)) goto drop; fiph = (struct fip_header *)skb->data; op = ntohs(fiph->fip_op); _______________________________________________ devel mailing list [email protected] http://www.open-fcoe.org/mailman/listinfo/devel
