1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright (c) 2009-2012 Emulex. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 28 29 /* 30 * Header file related to Ring handling 31 * 32 */ 33 34 #ifndef _OCE_RING_H_ 35 #define _OCE_RING_H_ 36 37 /* 38 * helper functions 39 */ 40 void oce_group_rings(struct oce_dev *dev); 41 boolean_t oce_fill_rings_capab(struct oce_dev *, mac_capab_rings_t *); 42 43 /* 44 * mac_capab_rings_t member functions 45 */ 46 void oce_get_ring(void *, mac_ring_type_t, const int, const int, 47 mac_ring_info_t *, mac_ring_handle_t); 48 void oce_get_group(void *, mac_ring_type_t, const int, mac_group_info_t *, 49 mac_group_handle_t); 50 51 52 /* 53 * Ring level operations 54 */ 55 int oce_ring_start(mac_ring_driver_t, uint64_t); 56 void oce_ring_stop(mac_ring_driver_t); 57 mblk_t *oce_ring_tx(void *, mblk_t *); 58 mblk_t *oce_ring_rx_poll(void *, int); 59 uint_t oce_ring_common_drain(struct oce_eq *); 60 int oce_ring_intr_enable(mac_intr_handle_t); 61 int oce_ring_intr_disable(mac_intr_handle_t); 62 int oce_ring_rx_stat(mac_ring_driver_t, uint_t, uint64_t *); 63 int oce_ring_tx_stat(mac_ring_driver_t, uint_t, uint64_t *); 64 65 66 /* 67 * Group level operations 68 */ 69 int oce_m_start_group(mac_group_driver_t); 70 void oce_m_stop_group(mac_group_driver_t); 71 int oce_group_addmac(void *, const uint8_t *); 72 int oce_group_remmac(void *, const uint8_t *); 73 74 #endif /* _OCE_RING_H_ */