Hiral Patel | d3c995f | 2013-02-25 16:18:36 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2008 Cisco Systems, Inc. All rights reserved. |
| 3 | * Copyright 2007 Nuova Systems, Inc. All rights reserved. |
| 4 | * |
| 5 | * This program is free software; you may redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; version 2 of the License. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 10 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 11 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 12 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
| 13 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
| 14 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 15 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 16 | * SOFTWARE. |
| 17 | */ |
| 18 | |
| 19 | #ifndef _FNIC_FIP_H_ |
| 20 | #define _FNIC_FIP_H_ |
| 21 | |
| 22 | |
| 23 | #define FCOE_CTLR_START_DELAY 2000 /* ms after first adv. to choose FCF */ |
| 24 | #define FCOE_CTLR_FIPVLAN_TOV 2000 /* ms after FIP VLAN disc */ |
| 25 | #define FCOE_CTLR_MAX_SOL 8 |
| 26 | |
| 27 | #define FINC_MAX_FLOGI_REJECTS 8 |
| 28 | |
| 29 | /* |
| 30 | * FIP_DT_VLAN descriptor. |
| 31 | */ |
| 32 | struct fip_vlan_desc { |
| 33 | struct fip_desc fd_desc; |
| 34 | __be16 fd_vlan; |
| 35 | } __attribute__((packed)); |
| 36 | |
| 37 | struct vlan { |
| 38 | __be16 vid; |
| 39 | __be16 type; |
| 40 | }; |
| 41 | |
| 42 | /* |
| 43 | * VLAN entry. |
| 44 | */ |
| 45 | struct fcoe_vlan { |
| 46 | struct list_head list; |
| 47 | u16 vid; /* vlan ID */ |
| 48 | u16 sol_count; /* no. of sols sent */ |
| 49 | u16 state; /* state */ |
| 50 | }; |
| 51 | |
| 52 | enum fip_vlan_state { |
| 53 | FIP_VLAN_AVAIL = 0, /* don't do anything */ |
| 54 | FIP_VLAN_SENT = 1, /* sent */ |
| 55 | FIP_VLAN_USED = 2, /* succeed */ |
| 56 | FIP_VLAN_FAILED = 3, /* failed to response */ |
| 57 | }; |
| 58 | |
| 59 | struct fip_vlan { |
| 60 | struct ethhdr eth; |
| 61 | struct fip_header fip; |
| 62 | struct { |
| 63 | struct fip_mac_desc mac; |
| 64 | struct fip_wwn_desc wwnn; |
| 65 | } desc; |
| 66 | }; |
| 67 | |
| 68 | #endif /* __FINC_FIP_H_ */ |