2 * Copyright (c) 2017 ETH Zurich.
5 * This file is distributed under the terms in the attached LICENSE file.
6 * If you do not find this file, copies can be found by writing to:
7 * ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
10 #define E10K_DEVIF_H_ 1
13 typedef void (*e10k_event_cb_t)(void* q);
17 * @brief create a handle to a queue of an e10k card. Assumes the driver is
20 * @param q Return pointer to the device queue
21 * @param cb Callback function when an interrupt is raised
22 * @param use_vf Start virtual functions, otherwise the physical function
24 * @param interrupts Use interrupts, otherwise polling
25 * @param default_q Request a handle to the default queue where
26 * all the not filtered packes go to. Mostly use when
27 * a queue is request from the driver itself.
29 * @returns error on NIC_ERR_ALLOC or SYS_ERR_OK on success
32 errval_t e10k_queue_create(struct e10k_queue** q, e10k_event_cb_t cb,
33 bool use_vf, bool interrupts, bool default_q);
34 errval_t e10k_queue_destroy(struct e10k_queue* q);
38 * @brief get the queue id of this queue handle. The returned id corresponds
39 * to the real id used on the card
41 * @param q handl to the device queue
43 * @returns the queues id
46 uint64_t e10k_queue_get_id(struct e10k_queue* q);