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