1 /****************************************************************************
2 * Driver for Solarflare network controllers -
3 * resource management for Xen backend, OpenOnload, etc
4 * (including support for SFE4001 10GBT NIC)
6 * This file provides private API of efrm library to be used from the SFC
9 * Copyright 2005-2007: Solarflare Communications Inc,
10 * 9501 Jeronimo Road, Suite 250,
11 * Irvine, CA 92618, USA
13 * Developed and maintained by Solarflare Communications:
14 * <linux-xen-drivers@solarflare.com>
15 * <onload-dev@solarflare.com>
17 * Certain parts of the driver were implemented by
18 * Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
19 * OKTET Labs Ltd, Russia,
20 * http://oktetlabs.ru, <info@oktetlabs.ru>
21 * by request of Solarflare Communications
24 * This program is free software; you can redistribute it and/or modify it
25 * under the terms of the GNU General Public License version 2 as published
26 * by the Free Software Foundation, incorporated herein by reference.
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
33 * You should have received a copy of the GNU General Public License
34 * along with this program; if not, write to the Free Software
35 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
36 ****************************************************************************
39 #ifndef __CI_EFRM_DRIVER_PRIVATE_H__
40 #define __CI_EFRM_DRIVER_PRIVATE_H__
42 #include <ci/efrm/resource.h>
43 #include <ci/efrm/sysdep.h>
45 /*--------------------------------------------------------------------
49 *--------------------------------------------------------------------*/
51 /* Internal structure for resource driver */
52 extern struct efrm_resource_manager *efrm_rm_table[];
54 /*--------------------------------------------------------------------
56 * efrm_nic_table handling
58 *--------------------------------------------------------------------*/
62 extern void efrm_driver_ctor(void);
63 extern void efrm_driver_dtor(void);
64 extern int efrm_driver_register_nic(struct efrm_nic *, int nic_index,
66 extern int efrm_driver_unregister_nic(struct efrm_nic *);
68 /*--------------------------------------------------------------------
70 * create/destroy resource managers
72 *--------------------------------------------------------------------*/
74 struct vi_resource_dimensions {
75 unsigned evq_int_min, evq_int_lim;
76 unsigned evq_timer_min, evq_timer_lim;
77 unsigned rxq_min, rxq_lim;
78 unsigned txq_min, txq_lim;
81 /*! Initialise resources */
83 efrm_resources_init(const struct vi_resource_dimensions *,
84 int buffer_table_min, int buffer_table_lim);
86 /*! Tear down resources */
87 extern void efrm_resources_fini(void);
89 #endif /* __CI_EFRM_DRIVER_PRIVATE_H__ */