xref: /openbmc/linux/drivers/scsi/fnic/fnic_fip.h (revision 7cc39531)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright 2008 Cisco Systems, Inc.  All rights reserved.
4  * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
5  */
6 
7 #ifndef _FNIC_FIP_H_
8 #define _FNIC_FIP_H_
9 
10 
11 #define FCOE_CTLR_START_DELAY    2000    /* ms after first adv. to choose FCF */
12 #define FCOE_CTLR_FIPVLAN_TOV    2000    /* ms after FIP VLAN disc */
13 #define FCOE_CTLR_MAX_SOL        8
14 
15 #define FINC_MAX_FLOGI_REJECTS   8
16 
17 struct vlan {
18 	__be16 vid;
19 	__be16 type;
20 };
21 
22 /*
23  * VLAN entry.
24  */
25 struct fcoe_vlan {
26 	struct list_head list;
27 	u16 vid;		/* vlan ID */
28 	u16 sol_count;		/* no. of sols sent */
29 	u16 state;		/* state */
30 };
31 
32 enum fip_vlan_state {
33 	FIP_VLAN_AVAIL  = 0,	/* don't do anything */
34 	FIP_VLAN_SENT   = 1,	/* sent */
35 	FIP_VLAN_USED   = 2,	/* succeed */
36 	FIP_VLAN_FAILED = 3,	/* failed to response */
37 };
38 
39 struct fip_vlan {
40 	struct ethhdr eth;
41 	struct fip_header fip;
42 	struct {
43 		struct fip_mac_desc mac;
44 		struct fip_wwn_desc wwnn;
45 	} desc;
46 };
47 
48 #endif  /* __FINC_FIP_H_ */
49