This source file includes following definitions.
- fcoe_netdev
1
2
3
4
5
6
7
8 #ifndef _FCOE_H_
9 #define _FCOE_H_
10
11 #include <linux/skbuff.h>
12 #include <linux/kthread.h>
13
14 #define FCOE_MAX_QUEUE_DEPTH 256
15 #define FCOE_MIN_QUEUE_DEPTH 32
16
17 #define FCOE_WORD_TO_BYTE 4
18
19 #define FCOE_VERSION "0.1"
20 #define FCOE_NAME "fcoe"
21 #define FCOE_VENDOR "Open-FCoE.org"
22
23 #define FCOE_MAX_LUN 0xFFFF
24 #define FCOE_MAX_FCP_TARGET 256
25
26 #define FCOE_MAX_OUTSTANDING_COMMANDS 1024
27
28 #define FCOE_MIN_XID 0x0000
29 #define FCOE_MAX_XID 0x0FFF
30
31 extern unsigned int fcoe_debug_logging;
32
33 #define FCOE_LOGGING 0x01
34 #define FCOE_NETDEV_LOGGING 0x02
35
36 #define FCOE_CHECK_LOGGING(LEVEL, CMD) \
37 do { \
38 if (unlikely(fcoe_debug_logging & LEVEL)) \
39 do { \
40 CMD; \
41 } while (0); \
42 } while (0)
43
44 #define FCOE_DBG(fmt, args...) \
45 FCOE_CHECK_LOGGING(FCOE_LOGGING, \
46 pr_info("fcoe: " fmt, ##args);)
47
48 #define FCOE_NETDEV_DBG(netdev, fmt, args...) \
49 FCOE_CHECK_LOGGING(FCOE_NETDEV_LOGGING, \
50 pr_info("fcoe: %s: " fmt, \
51 netdev->name, ##args);)
52
53
54
55
56
57
58
59
60
61
62
63
64
65 struct fcoe_interface {
66 struct list_head list;
67 struct net_device *netdev;
68 struct net_device *realdev;
69 struct packet_type fcoe_packet_type;
70 struct packet_type fip_packet_type;
71 struct packet_type fip_vlan_packet_type;
72 struct fc_exch_mgr *oem;
73 u8 removed;
74 u8 priority;
75 };
76
77 #define fcoe_to_ctlr(x) \
78 (struct fcoe_ctlr *)(((struct fcoe_ctlr *)(x)) - 1)
79
80 #define fcoe_from_ctlr(x) \
81 ((struct fcoe_interface *)((x) + 1))
82
83
84
85
86
87 static inline struct net_device *fcoe_netdev(const struct fc_lport *lport)
88 {
89 return ((struct fcoe_interface *)
90 ((struct fcoe_port *)lport_priv(lport))->priv)->netdev;
91 }
92
93 #endif