1/* 2 * Copyright (c) 2018, ETH Zurich. 3 * All rights reserved. 4 * 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, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef QUEUE_MANAGER_CLIENT_H_ 11#define QUEUE_MANAGER_CLIENT_H_ 1 12 13typedef enum { 14 QUEUE_TYPE_UNKNOWN = 0, 15 QUEUE_TYPE_E1K = 1, 16 QUEUE_TYPE_E10K = 2, 17 QUEUE_TYPE_SFxxxx = 3, 18 QUEUE_TYPE_IOAT_DMA = 4, 19 QUEUE_TYPE_XPHI_DMA = 5, 20 QUEUE_TYPE_AHCI = 6, 21 QUEUE_TYPE_MAX = 7 22} queue_t; 23 24 25 26struct queue 27{ 28 struct { 29 struct capref registers; 30 struct capref interrupt; 31 struct capref vspace; 32 } caps; 33 queue_t type; 34 uint64_t id; 35}; 36 37 38errval_t qmng_init(void); 39 40errval_t qmng_alloc_queue(queue_t type, nodeid_t proximity, struct queue *q); 41errval_t qmng_alloc_queue_by_id(queue_t type, uint64_t id, struct queue *q); 42errval_t qmng_release_queue(struct queue *q); 43 44#endif 45