blob: e5d4da43d2b8a13f624325cb649edbba2c090c38 [file] [log] [blame]
Dave Hudsondcd08fb2013-11-22 09:25:16 -06001/*
2 * sfe.h
3 * Shortcut forwarding engine.
4 *
Matthew McClintocka3221942014-01-16 11:44:26 -06005 * Copyright (c) 2013 Qualcomm Atheros, Inc.
6 *
7 * All Rights Reserved.
8 * Qualcomm Atheros Confidential and Proprietary.
Dave Hudsondcd08fb2013-11-22 09:25:16 -06009 */
10
11/*
12 * Select whether we "hook" in below or above the Ethernet bridge layer.
13 *
14 * XXX - note that hooking below the bridge (set this value to 0) will
15 * not currently work completely cleanly within Linux. In order to make
16 * this work properly we need to resync stats to Linux. Arguably if we
17 * want to do this we also need to validate that the source MAC address
18 * of any packets is actually correct too. Right now we're relying on
19 * the bridge layer to do this sort of thing for us.
20 */
21#define SFE_HOOK_ABOVE_BRIDGE 1
22
23/*
24 * Debug output verbosity level.
25 */
26#define DEBUG_LEVEL 2
27
28#if (DEBUG_LEVEL < 1)
29#define DEBUG_ERROR(s, ...)
30#else
31#define DEBUG_ERROR(s, ...) \
32 printk("%s[%u]: ERROR:", __FILE__, __LINE__); \
33 printk(s, ##__VA_ARGS__)
34#endif
35
36#if (DEBUG_LEVEL < 2)
37#define DEBUG_WARN(s, ...)
38#else
39#define DEBUG_WARN(s, ...) \
40 printk("%s[%u]: WARN:", __FILE__, __LINE__); \
41 printk(s, ##__VA_ARGS__);
42#endif
43
44#if (DEBUG_LEVEL < 3)
45#define DEBUG_INFO(s, ...)
46#else
47#define DEBUG_INFO(s, ...) \
48 printk("%s[%u]: INFO:", __FILE__, __LINE__); \
49 printk(s, ##__VA_ARGS__);
50#endif
51
52#if (DEBUG_LEVEL < 4)
53#define DEBUG_TRACE(s, ...)
54#else
55#define DEBUG_TRACE(s, ...) \
56 printk("%s[%u]: TRACE:", __FILE__, __LINE__); \
57 printk(s, ##__VA_ARGS__);
58#endif
59
60