1/* 2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. 3 * All rights reserved 4 * www.brocade.com 5 * 6 * Linux driver for Brocade Fibre Channel Host Bus Adapter. 7 * 8 * This program is free software; you can redistribute it and/or modify it 9 * under the terms of the GNU General Public License (GPL) Version 2 as 10 * published by the Free Software Foundation 11 * 12 * This program is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * General Public License for more details. 16 */ 17 18#ifndef __BFA_DEFS_ETHPORT_H__ 19#define __BFA_DEFS_ETHPORT_H__ 20 21#include <defs/bfa_defs_status.h> 22#include <defs/bfa_defs_port.h> 23#include <protocol/types.h> 24#include <cna/pstats/phyport_defs.h> 25#include <cna/pstats/ethport_defs.h> 26 27struct bna_tx_info_s { 28 u32 miniport_state; 29 u32 adapter_state; 30 u64 tx_count; 31 u64 tx_wi; 32 u64 tx_sg; 33 u64 tx_tcp_chksum; 34 u64 tx_udp_chksum; 35 u64 tx_ip_chksum; 36 u64 tx_lsov1; 37 u64 tx_lsov2; 38 u64 tx_max_sg_len ; 39}; 40 41struct bna_rx_queue_info_s { 42 u16 q_id ; 43 u16 buf_size ; 44 u16 buf_count ; 45 u16 rsvd ; 46 u64 rx_count ; 47 u64 rx_dropped ; 48 u64 rx_unsupported ; 49 u64 rx_internal_err ; 50 u64 rss_count ; 51 u64 vlan_count ; 52 u64 rx_tcp_chksum ; 53 u64 rx_udp_chksum ; 54 u64 rx_ip_chksum ; 55 u64 rx_hds ; 56}; 57 58struct bna_rx_q_set_s { 59 u16 q_set_type; 60 u32 miniport_state; 61 u32 adapter_state; 62 struct bna_rx_queue_info_s rx_queue[2]; 63}; 64 65struct bna_port_stats_s { 66 struct bna_tx_info_s tx_stats; 67 u16 qset_count ; 68 struct bna_rx_q_set_s rx_qset[8]; 69}; 70 71struct bfa_ethport_stats_s { 72 struct bna_stats_txf txf_stats[1]; 73 struct bna_stats_rxf rxf_stats[1]; 74 struct bnad_drv_stats drv_stats; 75}; 76 77/** 78 * Ethernet port events 79 * Arguments below are in BFAL context from Mgmt 80 * BFA_PORT_AEN_ETH_LINKUP: [in]: mac [out]: mac 81 * BFA_PORT_AEN_ETH_LINKDOWN: [in]: mac [out]: mac 82 * BFA_PORT_AEN_ETH_ENABLE: [in]: mac [out]: mac 83 * BFA_PORT_AEN_ETH_DISABLE: [in]: mac [out]: mac 84 * 85 */ 86enum bfa_ethport_aen_event { 87 BFA_ETHPORT_AEN_LINKUP = 1, /* Base Port Ethernet link up event */ 88 BFA_ETHPORT_AEN_LINKDOWN = 2, /* Base Port Ethernet link down event */ 89 BFA_ETHPORT_AEN_ENABLE = 3, /* Base Port Ethernet link enable event */ 90 BFA_ETHPORT_AEN_DISABLE = 4, /* Base Port Ethernet link disable 91 * event */ 92}; 93 94struct bfa_ethport_aen_data_s { 95 mac_t mac; /* MAC address of the physical port */ 96}; 97 98 99#endif /* __BFA_DEFS_ETHPORT_H__ */ 100