1/*
2 * Copyright (c) 2007-12 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, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
8 */
9
10#ifndef Queue_Manager_local_H_
11#define Queue_Manager_local_H_
12#include <net_queue_manager/net_queue_manager.h>
13
14// registered buffers:
15extern struct buffer_descriptor *buffers_list;
16
17/* NETD connections */
18#define NETD_BUF_NR 2
19struct devq *netd[NETD_BUF_NR];
20
21// Measurement purpose, counting interrupt numbers
22extern uint64_t interrupt_counter;
23extern uint64_t total_rx_p_count;
24extern uint64_t total_interrupt_time;
25extern struct client_closure *g_cl;
26extern uint64_t total_rx_datasize;
27
28// Function prototypes for ether services
29//struct buffer_descriptor *find_buffer(uint64_t buffer_id);
30
31// Function prototypes for ether_control service
32void init_soft_filters_service(struct net_soft_filter_state *state, char *service_name, uint64_t qid,
33                               size_t rx_bufsz);
34void sf_process_received_packet(struct driver_rx_buffer *buf, size_t count,
35                                uint64_t flags);
36
37
38// To get the mac address from device
39uint64_t get_mac_addr_from_device(void);
40
41// Fn ptrs to manage receive buffers in queue
42extern ether_rx_register_buffer rx_register_buffer_fn_ptr;
43extern ether_rx_get_free_slots rx_get_free_slots_fn_ptr;
44
45// support for loopback device
46extern bool is_loopback_device;
47struct buffer_descriptor *get_lo_receiver(void *opaque);
48
49void* sf_rx_ring_buffer(void *opaque);
50
51#endif // Queue_Manager_local_H_
52
53