mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
d3c995f1dc
FIP VLAN discovery discovers the FCoE VLAN that will be used by all other FIP protocols as well as by the FCoE encapsulation for Fibre Channel payloads on the established virtual link. One of the goals of FC-BB-5 was to be as nonintrusive as possible on initiators and targets, and therefore FIP VLAN discovery occurs in the native VLAN used by the initiator or target to exchange Ethernet traffic. The FIP VLAN discovery protocol is the only FIP protocol running on the native VLAN; all other FIP protocols run on the discovered FCoE VLANs. If an administrator has manually configured FCoE VLANs on ENodes and FCFs, there is no need to use this protocol. FIP and FCoE will run over the configured VLANs. An ENode without FCoE VLANs configuration would use this automated discovery protocol to discover over which VLANs FCoE is running. The ENode sends a FIP VLAN discovery request to a multicast MAC address called All-FCF-MACs, which is a multicast MAC address to which all FCFs listen. All FCFs that can be reached in the native VLAN of the ENode are expected to respond on the same VLAN with a response that lists one or more FCoE VLANs that are available for the ENode's VN_Port login. This protocol has the sole purpose of allowing the ENode to discover all the available FCoE VLANs. Now the ENode may enable a subset of these VLANs for FCoE Running the FIP protocol in these VLANs on a per VLAN basis. And FCoE data transactions also would occur on this VLAN. Hence, Except for FIP VLAN discovery, all other FIP and FCoE traffic runs on the selected FCoE VLAN. Its only the FIP VLAN Discovery protocol that is permitted to run on the Default native VLAN of the system. [**** NOTE ****] We are working on moving this feature definitions and functionality to libfcoe module. We need this patch to be approved, as Suse is looking forward to merge this feature in SLES 11 SP3 release. Once this patch is approved, we will submit patch which should move vlan discovery feature to libfoce. [Fengguang Wu <fengguang.wu@intel.com>: kmalloc cast removal] Signed-off-by: Anantha Prakash T <atungara@cisco.com> Signed-off-by: Hiral Patel <hiralpat@cisco.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
69 lines
1.7 KiB
C
69 lines
1.7 KiB
C
/*
|
|
* Copyright 2008 Cisco Systems, Inc. All rights reserved.
|
|
* Copyright 2007 Nuova Systems, Inc. All rights reserved.
|
|
*
|
|
* This program is free software; you may redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; version 2 of the License.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*/
|
|
|
|
#ifndef _FNIC_FIP_H_
|
|
#define _FNIC_FIP_H_
|
|
|
|
|
|
#define FCOE_CTLR_START_DELAY 2000 /* ms after first adv. to choose FCF */
|
|
#define FCOE_CTLR_FIPVLAN_TOV 2000 /* ms after FIP VLAN disc */
|
|
#define FCOE_CTLR_MAX_SOL 8
|
|
|
|
#define FINC_MAX_FLOGI_REJECTS 8
|
|
|
|
/*
|
|
* FIP_DT_VLAN descriptor.
|
|
*/
|
|
struct fip_vlan_desc {
|
|
struct fip_desc fd_desc;
|
|
__be16 fd_vlan;
|
|
} __attribute__((packed));
|
|
|
|
struct vlan {
|
|
__be16 vid;
|
|
__be16 type;
|
|
};
|
|
|
|
/*
|
|
* VLAN entry.
|
|
*/
|
|
struct fcoe_vlan {
|
|
struct list_head list;
|
|
u16 vid; /* vlan ID */
|
|
u16 sol_count; /* no. of sols sent */
|
|
u16 state; /* state */
|
|
};
|
|
|
|
enum fip_vlan_state {
|
|
FIP_VLAN_AVAIL = 0, /* don't do anything */
|
|
FIP_VLAN_SENT = 1, /* sent */
|
|
FIP_VLAN_USED = 2, /* succeed */
|
|
FIP_VLAN_FAILED = 3, /* failed to response */
|
|
};
|
|
|
|
struct fip_vlan {
|
|
struct ethhdr eth;
|
|
struct fip_header fip;
|
|
struct {
|
|
struct fip_mac_desc mac;
|
|
struct fip_wwn_desc wwnn;
|
|
} desc;
|
|
};
|
|
|
|
#endif /* __FINC_FIP_H_ */
|