diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 19:46:45 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 19:46:45 -0400 |
commit | 2b235826098bb653982894dfc3f70fd029f6c2e4 (patch) | |
tree | ec525ddba74f58017a3f145bb68cf94376648c1c /include/linux | |
parent | b4b52db71529bbe46da914eda772fb574914c94d (diff) | |
parent | c77054e518d9163578cfcad09826d7b959f95ece (diff) |
Merge branch 'master'
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/aio.h | 34 | ||||
-rw-r--r-- | include/linux/connector.h | 21 | ||||
-rw-r--r-- | include/linux/if_ether.h | 2 | ||||
-rw-r--r-- | include/linux/key-ui.h | 28 | ||||
-rw-r--r-- | include/linux/key.h | 78 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 7 | ||||
-rw-r--r-- | include/linux/netdevice.h | 89 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/ip_nat_core.h | 12 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 14 | ||||
-rw-r--r-- | include/linux/sched.h | 12 | ||||
-rw-r--r-- | include/linux/sysctl.h | 26 |
11 files changed, 248 insertions, 75 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index a4d5af907f90..60def658b246 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -43,6 +43,40 @@ struct kioctx; | |||
43 | #define kiocbIsKicked(iocb) test_bit(KIF_KICKED, &(iocb)->ki_flags) | 43 | #define kiocbIsKicked(iocb) test_bit(KIF_KICKED, &(iocb)->ki_flags) |
44 | #define kiocbIsCancelled(iocb) test_bit(KIF_CANCELLED, &(iocb)->ki_flags) | 44 | #define kiocbIsCancelled(iocb) test_bit(KIF_CANCELLED, &(iocb)->ki_flags) |
45 | 45 | ||
46 | /* is there a better place to document function pointer methods? */ | ||
47 | /** | ||
48 | * ki_retry - iocb forward progress callback | ||
49 | * @kiocb: The kiocb struct to advance by performing an operation. | ||
50 | * | ||
51 | * This callback is called when the AIO core wants a given AIO operation | ||
52 | * to make forward progress. The kiocb argument describes the operation | ||
53 | * that is to be performed. As the operation proceeds, perhaps partially, | ||
54 | * ki_retry is expected to update the kiocb with progress made. Typically | ||
55 | * ki_retry is set in the AIO core and it itself calls file_operations | ||
56 | * helpers. | ||
57 | * | ||
58 | * ki_retry's return value determines when the AIO operation is completed | ||
59 | * and an event is generated in the AIO event ring. Except the special | ||
60 | * return values described below, the value that is returned from ki_retry | ||
61 | * is transferred directly into the completion ring as the operation's | ||
62 | * resulting status. Once this has happened ki_retry *MUST NOT* reference | ||
63 | * the kiocb pointer again. | ||
64 | * | ||
65 | * If ki_retry returns -EIOCBQUEUED it has made a promise that aio_complete() | ||
66 | * will be called on the kiocb pointer in the future. The AIO core will | ||
67 | * not ask the method again -- ki_retry must ensure forward progress. | ||
68 | * aio_complete() must be called once and only once in the future, multiple | ||
69 | * calls may result in undefined behaviour. | ||
70 | * | ||
71 | * If ki_retry returns -EIOCBRETRY it has made a promise that kick_iocb() | ||
72 | * will be called on the kiocb pointer in the future. This may happen | ||
73 | * through generic helpers that associate kiocb->ki_wait with a wait | ||
74 | * queue head that ki_retry uses via current->io_wait. It can also happen | ||
75 | * with custom tracking and manual calls to kick_iocb(), though that is | ||
76 | * discouraged. In either case, kick_iocb() must be called once and only | ||
77 | * once. ki_retry must ensure forward progress, the AIO core will wait | ||
78 | * indefinitely for kick_iocb() to be called. | ||
79 | */ | ||
46 | struct kiocb { | 80 | struct kiocb { |
47 | struct list_head ki_run_list; | 81 | struct list_head ki_run_list; |
48 | long ki_flags; | 82 | long ki_flags; |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 96de26301f84..86d4b0a81713 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -104,12 +104,19 @@ struct cn_queue_dev { | |||
104 | struct sock *nls; | 104 | struct sock *nls; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | struct cn_callback { | 107 | struct cn_callback_id { |
108 | unsigned char name[CN_CBQ_NAMELEN]; | 108 | unsigned char name[CN_CBQ_NAMELEN]; |
109 | |||
110 | struct cb_id id; | 109 | struct cb_id id; |
110 | }; | ||
111 | |||
112 | struct cn_callback_data { | ||
113 | void (*destruct_data) (void *); | ||
114 | void *ddata; | ||
115 | |||
116 | void *callback_priv; | ||
111 | void (*callback) (void *); | 117 | void (*callback) (void *); |
112 | void *priv; | 118 | |
119 | void *free; | ||
113 | }; | 120 | }; |
114 | 121 | ||
115 | struct cn_callback_entry { | 122 | struct cn_callback_entry { |
@@ -118,8 +125,8 @@ struct cn_callback_entry { | |||
118 | struct work_struct work; | 125 | struct work_struct work; |
119 | struct cn_queue_dev *pdev; | 126 | struct cn_queue_dev *pdev; |
120 | 127 | ||
121 | void (*destruct_data) (void *); | 128 | struct cn_callback_id id; |
122 | void *ddata; | 129 | struct cn_callback_data data; |
123 | 130 | ||
124 | int seq, group; | 131 | int seq, group; |
125 | struct sock *nls; | 132 | struct sock *nls; |
@@ -144,7 +151,7 @@ int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); | |||
144 | void cn_del_callback(struct cb_id *); | 151 | void cn_del_callback(struct cb_id *); |
145 | int cn_netlink_send(struct cn_msg *, u32, int); | 152 | int cn_netlink_send(struct cn_msg *, u32, int); |
146 | 153 | ||
147 | int cn_queue_add_callback(struct cn_queue_dev *dev, struct cn_callback *cb); | 154 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); |
148 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 155 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
149 | 156 | ||
150 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); | 157 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); |
@@ -152,6 +159,8 @@ void cn_queue_free_dev(struct cn_queue_dev *dev); | |||
152 | 159 | ||
153 | int cn_cb_equal(struct cb_id *, struct cb_id *); | 160 | int cn_cb_equal(struct cb_id *, struct cb_id *); |
154 | 161 | ||
162 | void cn_queue_wrapper(void *data); | ||
163 | |||
155 | extern int cn_already_initialized; | 164 | extern int cn_already_initialized; |
156 | 165 | ||
157 | #endif /* __KERNEL__ */ | 166 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index fc2d4c8225aa..d21c305c6c64 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -111,7 +111,9 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) | |||
111 | return (struct ethhdr *)skb->mac.raw; | 111 | return (struct ethhdr *)skb->mac.raw; |
112 | } | 112 | } |
113 | 113 | ||
114 | #ifdef CONFIG_SYSCTL | ||
114 | extern struct ctl_table ether_table[]; | 115 | extern struct ctl_table ether_table[]; |
115 | #endif | 116 | #endif |
117 | #endif | ||
116 | 118 | ||
117 | #endif /* _LINUX_IF_ETHER_H */ | 119 | #endif /* _LINUX_IF_ETHER_H */ |
diff --git a/include/linux/key-ui.h b/include/linux/key-ui.h index cc326174a808..918c34a8347e 100644 --- a/include/linux/key-ui.h +++ b/include/linux/key-ui.h | |||
@@ -42,11 +42,14 @@ struct keyring_list { | |||
42 | /* | 42 | /* |
43 | * check to see whether permission is granted to use a key in the desired way | 43 | * check to see whether permission is granted to use a key in the desired way |
44 | */ | 44 | */ |
45 | static inline int key_permission(const struct key *key, key_perm_t perm) | 45 | static inline int key_permission(const key_ref_t key_ref, key_perm_t perm) |
46 | { | 46 | { |
47 | struct key *key = key_ref_to_ptr(key_ref); | ||
47 | key_perm_t kperm; | 48 | key_perm_t kperm; |
48 | 49 | ||
49 | if (key->uid == current->fsuid) | 50 | if (is_key_possessed(key_ref)) |
51 | kperm = key->perm >> 24; | ||
52 | else if (key->uid == current->fsuid) | ||
50 | kperm = key->perm >> 16; | 53 | kperm = key->perm >> 16; |
51 | else if (key->gid != -1 && | 54 | else if (key->gid != -1 && |
52 | key->perm & KEY_GRP_ALL && | 55 | key->perm & KEY_GRP_ALL && |
@@ -65,11 +68,14 @@ static inline int key_permission(const struct key *key, key_perm_t perm) | |||
65 | * check to see whether permission is granted to use a key in at least one of | 68 | * check to see whether permission is granted to use a key in at least one of |
66 | * the desired ways | 69 | * the desired ways |
67 | */ | 70 | */ |
68 | static inline int key_any_permission(const struct key *key, key_perm_t perm) | 71 | static inline int key_any_permission(const key_ref_t key_ref, key_perm_t perm) |
69 | { | 72 | { |
73 | struct key *key = key_ref_to_ptr(key_ref); | ||
70 | key_perm_t kperm; | 74 | key_perm_t kperm; |
71 | 75 | ||
72 | if (key->uid == current->fsuid) | 76 | if (is_key_possessed(key_ref)) |
77 | kperm = key->perm >> 24; | ||
78 | else if (key->uid == current->fsuid) | ||
73 | kperm = key->perm >> 16; | 79 | kperm = key->perm >> 16; |
74 | else if (key->gid != -1 && | 80 | else if (key->gid != -1 && |
75 | key->perm & KEY_GRP_ALL && | 81 | key->perm & KEY_GRP_ALL && |
@@ -94,13 +100,17 @@ static inline int key_task_groups_search(struct task_struct *tsk, gid_t gid) | |||
94 | return ret; | 100 | return ret; |
95 | } | 101 | } |
96 | 102 | ||
97 | static inline int key_task_permission(const struct key *key, | 103 | static inline int key_task_permission(const key_ref_t key_ref, |
98 | struct task_struct *context, | 104 | struct task_struct *context, |
99 | key_perm_t perm) | 105 | key_perm_t perm) |
100 | { | 106 | { |
107 | struct key *key = key_ref_to_ptr(key_ref); | ||
101 | key_perm_t kperm; | 108 | key_perm_t kperm; |
102 | 109 | ||
103 | if (key->uid == context->fsuid) { | 110 | if (is_key_possessed(key_ref)) { |
111 | kperm = key->perm >> 24; | ||
112 | } | ||
113 | else if (key->uid == context->fsuid) { | ||
104 | kperm = key->perm >> 16; | 114 | kperm = key->perm >> 16; |
105 | } | 115 | } |
106 | else if (key->gid != -1 && | 116 | else if (key->gid != -1 && |
@@ -121,9 +131,9 @@ static inline int key_task_permission(const struct key *key, | |||
121 | 131 | ||
122 | } | 132 | } |
123 | 133 | ||
124 | extern struct key *lookup_user_key(struct task_struct *context, | 134 | extern key_ref_t lookup_user_key(struct task_struct *context, |
125 | key_serial_t id, int create, int partial, | 135 | key_serial_t id, int create, int partial, |
126 | key_perm_t perm); | 136 | key_perm_t perm); |
127 | 137 | ||
128 | extern long join_session_keyring(const char *name); | 138 | extern long join_session_keyring(const char *name); |
129 | 139 | ||
diff --git a/include/linux/key.h b/include/linux/key.h index 970bbd916cf4..f1efa016dbf3 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -35,11 +35,18 @@ struct key; | |||
35 | 35 | ||
36 | #undef KEY_DEBUGGING | 36 | #undef KEY_DEBUGGING |
37 | 37 | ||
38 | #define KEY_USR_VIEW 0x00010000 /* user can view a key's attributes */ | 38 | #define KEY_POS_VIEW 0x01000000 /* possessor can view a key's attributes */ |
39 | #define KEY_USR_READ 0x00020000 /* user can read key payload / view keyring */ | 39 | #define KEY_POS_READ 0x02000000 /* possessor can read key payload / view keyring */ |
40 | #define KEY_USR_WRITE 0x00040000 /* user can update key payload / add link to keyring */ | 40 | #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */ |
41 | #define KEY_USR_SEARCH 0x00080000 /* user can find a key in search / search a keyring */ | 41 | #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */ |
42 | #define KEY_USR_LINK 0x00100000 /* user can create a link to a key/keyring */ | 42 | #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */ |
43 | #define KEY_POS_ALL 0x1f000000 | ||
44 | |||
45 | #define KEY_USR_VIEW 0x00010000 /* user permissions... */ | ||
46 | #define KEY_USR_READ 0x00020000 | ||
47 | #define KEY_USR_WRITE 0x00040000 | ||
48 | #define KEY_USR_SEARCH 0x00080000 | ||
49 | #define KEY_USR_LINK 0x00100000 | ||
43 | #define KEY_USR_ALL 0x001f0000 | 50 | #define KEY_USR_ALL 0x001f0000 |
44 | 51 | ||
45 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ | 52 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ |
@@ -67,6 +74,38 @@ struct keyring_name; | |||
67 | 74 | ||
68 | /*****************************************************************************/ | 75 | /*****************************************************************************/ |
69 | /* | 76 | /* |
77 | * key reference with possession attribute handling | ||
78 | * | ||
79 | * NOTE! key_ref_t is a typedef'd pointer to a type that is not actually | ||
80 | * defined. This is because we abuse the bottom bit of the reference to carry a | ||
81 | * flag to indicate whether the calling process possesses that key in one of | ||
82 | * its keyrings. | ||
83 | * | ||
84 | * the key_ref_t has been made a separate type so that the compiler can reject | ||
85 | * attempts to dereference it without proper conversion. | ||
86 | * | ||
87 | * the three functions are used to assemble and disassemble references | ||
88 | */ | ||
89 | typedef struct __key_reference_with_attributes *key_ref_t; | ||
90 | |||
91 | static inline key_ref_t make_key_ref(const struct key *key, | ||
92 | unsigned long possession) | ||
93 | { | ||
94 | return (key_ref_t) ((unsigned long) key | possession); | ||
95 | } | ||
96 | |||
97 | static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) | ||
98 | { | ||
99 | return (struct key *) ((unsigned long) key_ref & ~1UL); | ||
100 | } | ||
101 | |||
102 | static inline unsigned long is_key_possessed(const key_ref_t key_ref) | ||
103 | { | ||
104 | return (unsigned long) key_ref & 1UL; | ||
105 | } | ||
106 | |||
107 | /*****************************************************************************/ | ||
108 | /* | ||
70 | * authentication token / access credential / keyring | 109 | * authentication token / access credential / keyring |
71 | * - types of key include: | 110 | * - types of key include: |
72 | * - keyrings | 111 | * - keyrings |
@@ -215,20 +254,25 @@ static inline struct key *key_get(struct key *key) | |||
215 | return key; | 254 | return key; |
216 | } | 255 | } |
217 | 256 | ||
257 | static inline void key_ref_put(key_ref_t key_ref) | ||
258 | { | ||
259 | key_put(key_ref_to_ptr(key_ref)); | ||
260 | } | ||
261 | |||
218 | extern struct key *request_key(struct key_type *type, | 262 | extern struct key *request_key(struct key_type *type, |
219 | const char *description, | 263 | const char *description, |
220 | const char *callout_info); | 264 | const char *callout_info); |
221 | 265 | ||
222 | extern int key_validate(struct key *key); | 266 | extern int key_validate(struct key *key); |
223 | 267 | ||
224 | extern struct key *key_create_or_update(struct key *keyring, | 268 | extern key_ref_t key_create_or_update(key_ref_t keyring, |
225 | const char *type, | 269 | const char *type, |
226 | const char *description, | 270 | const char *description, |
227 | const void *payload, | 271 | const void *payload, |
228 | size_t plen, | 272 | size_t plen, |
229 | int not_in_quota); | 273 | int not_in_quota); |
230 | 274 | ||
231 | extern int key_update(struct key *key, | 275 | extern int key_update(key_ref_t key, |
232 | const void *payload, | 276 | const void *payload, |
233 | size_t plen); | 277 | size_t plen); |
234 | 278 | ||
@@ -243,9 +287,9 @@ extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, | |||
243 | 287 | ||
244 | extern int keyring_clear(struct key *keyring); | 288 | extern int keyring_clear(struct key *keyring); |
245 | 289 | ||
246 | extern struct key *keyring_search(struct key *keyring, | 290 | extern key_ref_t keyring_search(key_ref_t keyring, |
247 | struct key_type *type, | 291 | struct key_type *type, |
248 | const char *description); | 292 | const char *description); |
249 | 293 | ||
250 | extern int keyring_add_key(struct key *keyring, | 294 | extern int keyring_add_key(struct key *keyring, |
251 | struct key *key); | 295 | struct key *key); |
@@ -285,6 +329,10 @@ extern void key_init(void); | |||
285 | #define key_serial(k) 0 | 329 | #define key_serial(k) 0 |
286 | #define key_get(k) ({ NULL; }) | 330 | #define key_get(k) ({ NULL; }) |
287 | #define key_put(k) do { } while(0) | 331 | #define key_put(k) do { } while(0) |
332 | #define key_ref_put(k) do { } while(0) | ||
333 | #define make_key_ref(k) ({ NULL; }) | ||
334 | #define key_ref_to_ptr(k) ({ NULL; }) | ||
335 | #define is_key_possessed(k) 0 | ||
288 | #define alloc_uid_keyring(u) 0 | 336 | #define alloc_uid_keyring(u) 0 |
289 | #define switch_uid_keyring(u) do { } while(0) | 337 | #define switch_uid_keyring(u) do { } while(0) |
290 | #define __install_session_keyring(t, k) ({ NULL; }) | 338 | #define __install_session_keyring(t, k) ({ NULL; }) |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 47da39ba3f03..2f0299a448f6 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -183,7 +183,7 @@ struct of_device_id | |||
183 | char name[32]; | 183 | char name[32]; |
184 | char type[32]; | 184 | char type[32]; |
185 | char compatible[128]; | 185 | char compatible[128]; |
186 | #if __KERNEL__ | 186 | #ifdef __KERNEL__ |
187 | void *data; | 187 | void *data; |
188 | #else | 188 | #else |
189 | kernel_ulong_t data; | 189 | kernel_ulong_t data; |
@@ -209,10 +209,11 @@ struct pcmcia_device_id { | |||
209 | /* for real multi-function devices */ | 209 | /* for real multi-function devices */ |
210 | __u8 function; | 210 | __u8 function; |
211 | 211 | ||
212 | /* for pseude multi-function devices */ | 212 | /* for pseudo multi-function devices */ |
213 | __u8 device_no; | 213 | __u8 device_no; |
214 | 214 | ||
215 | __u32 prod_id_hash[4]; | 215 | __u32 prod_id_hash[4] |
216 | __attribute__((aligned(sizeof(__u32)))); | ||
216 | 217 | ||
217 | /* not matched against in kernelspace*/ | 218 | /* not matched against in kernelspace*/ |
218 | #ifdef __KERNEL__ | 219 | #ifdef __KERNEL__ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c717907896d..368e4c825ff1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -265,6 +265,8 @@ struct net_device | |||
265 | * the interface. | 265 | * the interface. |
266 | */ | 266 | */ |
267 | char name[IFNAMSIZ]; | 267 | char name[IFNAMSIZ]; |
268 | /* device name hash chain */ | ||
269 | struct hlist_node name_hlist; | ||
268 | 270 | ||
269 | /* | 271 | /* |
270 | * I/O specific fields | 272 | * I/O specific fields |
@@ -292,6 +294,21 @@ struct net_device | |||
292 | 294 | ||
293 | /* ------- Fields preinitialized in Space.c finish here ------- */ | 295 | /* ------- Fields preinitialized in Space.c finish here ------- */ |
294 | 296 | ||
297 | /* Net device features */ | ||
298 | unsigned long features; | ||
299 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | ||
300 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | ||
301 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | ||
302 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ | ||
303 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ | ||
304 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ | ||
305 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ | ||
306 | #define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ | ||
307 | #define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ | ||
308 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | ||
309 | #define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ | ||
310 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | ||
311 | |||
295 | struct net_device *next_sched; | 312 | struct net_device *next_sched; |
296 | 313 | ||
297 | /* Interface index. Unique device identifier */ | 314 | /* Interface index. Unique device identifier */ |
@@ -316,9 +333,6 @@ struct net_device | |||
316 | * will (read: may be cleaned up at will). | 333 | * will (read: may be cleaned up at will). |
317 | */ | 334 | */ |
318 | 335 | ||
319 | /* These may be needed for future network-power-down code. */ | ||
320 | unsigned long trans_start; /* Time (in jiffies) of last Tx */ | ||
321 | unsigned long last_rx; /* Time of last Rx */ | ||
322 | 336 | ||
323 | unsigned short flags; /* interface flags (a la BSD) */ | 337 | unsigned short flags; /* interface flags (a la BSD) */ |
324 | unsigned short gflags; | 338 | unsigned short gflags; |
@@ -328,15 +342,12 @@ struct net_device | |||
328 | unsigned mtu; /* interface MTU value */ | 342 | unsigned mtu; /* interface MTU value */ |
329 | unsigned short type; /* interface hardware type */ | 343 | unsigned short type; /* interface hardware type */ |
330 | unsigned short hard_header_len; /* hardware hdr length */ | 344 | unsigned short hard_header_len; /* hardware hdr length */ |
331 | void *priv; /* pointer to private data */ | ||
332 | 345 | ||
333 | struct net_device *master; /* Pointer to master device of a group, | 346 | struct net_device *master; /* Pointer to master device of a group, |
334 | * which this device is member of. | 347 | * which this device is member of. |
335 | */ | 348 | */ |
336 | 349 | ||
337 | /* Interface address info. */ | 350 | /* Interface address info. */ |
338 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | ||
339 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address */ | ||
340 | unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ | 351 | unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ |
341 | unsigned char addr_len; /* hardware address length */ | 352 | unsigned char addr_len; /* hardware address length */ |
342 | unsigned short dev_id; /* for shared network cards */ | 353 | unsigned short dev_id; /* for shared network cards */ |
@@ -346,8 +357,6 @@ struct net_device | |||
346 | int promiscuity; | 357 | int promiscuity; |
347 | int allmulti; | 358 | int allmulti; |
348 | 359 | ||
349 | int watchdog_timeo; | ||
350 | struct timer_list watchdog_timer; | ||
351 | 360 | ||
352 | /* Protocol specific pointers */ | 361 | /* Protocol specific pointers */ |
353 | 362 | ||
@@ -358,32 +367,62 @@ struct net_device | |||
358 | void *ec_ptr; /* Econet specific data */ | 367 | void *ec_ptr; /* Econet specific data */ |
359 | void *ax25_ptr; /* AX.25 specific data */ | 368 | void *ax25_ptr; /* AX.25 specific data */ |
360 | 369 | ||
361 | struct list_head poll_list; /* Link to poll list */ | 370 | /* |
371 | * Cache line mostly used on receive path (including eth_type_trans()) | ||
372 | */ | ||
373 | struct list_head poll_list ____cacheline_aligned_in_smp; | ||
374 | /* Link to poll list */ | ||
375 | |||
376 | int (*poll) (struct net_device *dev, int *quota); | ||
362 | int quota; | 377 | int quota; |
363 | int weight; | 378 | int weight; |
379 | unsigned long last_rx; /* Time of last Rx */ | ||
380 | /* Interface address info used in eth_type_trans() */ | ||
381 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast | ||
382 | because most packets are unicast) */ | ||
383 | |||
384 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | ||
364 | 385 | ||
386 | /* | ||
387 | * Cache line mostly used on queue transmit path (qdisc) | ||
388 | */ | ||
389 | /* device queue lock */ | ||
390 | spinlock_t queue_lock ____cacheline_aligned_in_smp; | ||
365 | struct Qdisc *qdisc; | 391 | struct Qdisc *qdisc; |
366 | struct Qdisc *qdisc_sleeping; | 392 | struct Qdisc *qdisc_sleeping; |
367 | struct Qdisc *qdisc_ingress; | ||
368 | struct list_head qdisc_list; | 393 | struct list_head qdisc_list; |
369 | unsigned long tx_queue_len; /* Max frames per queue allowed */ | 394 | unsigned long tx_queue_len; /* Max frames per queue allowed */ |
370 | 395 | ||
371 | /* ingress path synchronizer */ | 396 | /* ingress path synchronizer */ |
372 | spinlock_t ingress_lock; | 397 | spinlock_t ingress_lock; |
398 | struct Qdisc *qdisc_ingress; | ||
399 | |||
400 | /* | ||
401 | * One part is mostly used on xmit path (device) | ||
402 | */ | ||
373 | /* hard_start_xmit synchronizer */ | 403 | /* hard_start_xmit synchronizer */ |
374 | spinlock_t xmit_lock; | 404 | spinlock_t xmit_lock ____cacheline_aligned_in_smp; |
375 | /* cpu id of processor entered to hard_start_xmit or -1, | 405 | /* cpu id of processor entered to hard_start_xmit or -1, |
376 | if nobody entered there. | 406 | if nobody entered there. |
377 | */ | 407 | */ |
378 | int xmit_lock_owner; | 408 | int xmit_lock_owner; |
379 | /* device queue lock */ | 409 | void *priv; /* pointer to private data */ |
380 | spinlock_t queue_lock; | 410 | int (*hard_start_xmit) (struct sk_buff *skb, |
411 | struct net_device *dev); | ||
412 | /* These may be needed for future network-power-down code. */ | ||
413 | unsigned long trans_start; /* Time (in jiffies) of last Tx */ | ||
414 | |||
415 | int watchdog_timeo; /* used by dev_watchdog() */ | ||
416 | struct timer_list watchdog_timer; | ||
417 | |||
418 | /* | ||
419 | * refcnt is a very hot point, so align it on SMP | ||
420 | */ | ||
381 | /* Number of references to this device */ | 421 | /* Number of references to this device */ |
382 | atomic_t refcnt; | 422 | atomic_t refcnt ____cacheline_aligned_in_smp; |
423 | |||
383 | /* delayed register/unregister */ | 424 | /* delayed register/unregister */ |
384 | struct list_head todo_list; | 425 | struct list_head todo_list; |
385 | /* device name hash chain */ | ||
386 | struct hlist_node name_hlist; | ||
387 | /* device index hash chain */ | 426 | /* device index hash chain */ |
388 | struct hlist_node index_hlist; | 427 | struct hlist_node index_hlist; |
389 | 428 | ||
@@ -396,21 +435,6 @@ struct net_device | |||
396 | NETREG_RELEASED, /* called free_netdev */ | 435 | NETREG_RELEASED, /* called free_netdev */ |
397 | } reg_state; | 436 | } reg_state; |
398 | 437 | ||
399 | /* Net device features */ | ||
400 | unsigned long features; | ||
401 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | ||
402 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | ||
403 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | ||
404 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ | ||
405 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ | ||
406 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ | ||
407 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ | ||
408 | #define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ | ||
409 | #define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ | ||
410 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | ||
411 | #define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ | ||
412 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | ||
413 | |||
414 | /* Called after device is detached from network. */ | 438 | /* Called after device is detached from network. */ |
415 | void (*uninit)(struct net_device *dev); | 439 | void (*uninit)(struct net_device *dev); |
416 | /* Called after last user reference disappears. */ | 440 | /* Called after last user reference disappears. */ |
@@ -419,10 +443,7 @@ struct net_device | |||
419 | /* Pointers to interface service routines. */ | 443 | /* Pointers to interface service routines. */ |
420 | int (*open)(struct net_device *dev); | 444 | int (*open)(struct net_device *dev); |
421 | int (*stop)(struct net_device *dev); | 445 | int (*stop)(struct net_device *dev); |
422 | int (*hard_start_xmit) (struct sk_buff *skb, | ||
423 | struct net_device *dev); | ||
424 | #define HAVE_NETDEV_POLL | 446 | #define HAVE_NETDEV_POLL |
425 | int (*poll) (struct net_device *dev, int *quota); | ||
426 | int (*hard_header) (struct sk_buff *skb, | 447 | int (*hard_header) (struct sk_buff *skb, |
427 | struct net_device *dev, | 448 | struct net_device *dev, |
428 | unsigned short type, | 449 | unsigned short type, |
diff --git a/include/linux/netfilter_ipv4/ip_nat_core.h b/include/linux/netfilter_ipv4/ip_nat_core.h index 3b50eb91f007..30db23f06b03 100644 --- a/include/linux/netfilter_ipv4/ip_nat_core.h +++ b/include/linux/netfilter_ipv4/ip_nat_core.h | |||
@@ -5,16 +5,14 @@ | |||
5 | 5 | ||
6 | /* This header used to share core functionality between the standalone | 6 | /* This header used to share core functionality between the standalone |
7 | NAT module, and the compatibility layer's use of NAT for masquerading. */ | 7 | NAT module, and the compatibility layer's use of NAT for masquerading. */ |
8 | extern int ip_nat_init(void); | ||
9 | extern void ip_nat_cleanup(void); | ||
10 | 8 | ||
11 | extern unsigned int nat_packet(struct ip_conntrack *ct, | 9 | extern unsigned int ip_nat_packet(struct ip_conntrack *ct, |
12 | enum ip_conntrack_info conntrackinfo, | 10 | enum ip_conntrack_info conntrackinfo, |
13 | unsigned int hooknum, | 11 | unsigned int hooknum, |
14 | struct sk_buff **pskb); | 12 | struct sk_buff **pskb); |
15 | 13 | ||
16 | extern int icmp_reply_translation(struct sk_buff **pskb, | 14 | extern int ip_nat_icmp_reply_translation(struct sk_buff **pskb, |
17 | struct ip_conntrack *ct, | 15 | struct ip_conntrack *ct, |
18 | enum ip_nat_manip_type manip, | 16 | enum ip_nat_manip_type manip, |
19 | enum ip_conntrack_dir dir); | 17 | enum ip_conntrack_dir dir); |
20 | #endif /* _IP_NAT_CORE_H */ | 18 | #endif /* _IP_NAT_CORE_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b86a4b77007e..eb36fd293b41 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -392,6 +392,7 @@ | |||
392 | #define PCI_DEVICE_ID_NS_87560_USB 0x0012 | 392 | #define PCI_DEVICE_ID_NS_87560_USB 0x0012 |
393 | #define PCI_DEVICE_ID_NS_83815 0x0020 | 393 | #define PCI_DEVICE_ID_NS_83815 0x0020 |
394 | #define PCI_DEVICE_ID_NS_83820 0x0022 | 394 | #define PCI_DEVICE_ID_NS_83820 0x0022 |
395 | #define PCI_DEVICE_ID_NS_SATURN 0x0035 | ||
395 | #define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500 | 396 | #define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500 |
396 | #define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501 | 397 | #define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501 |
397 | #define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502 | 398 | #define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502 |
@@ -769,6 +770,8 @@ | |||
769 | #define PCI_DEVICE_ID_TI_TVP4010 0x3d04 | 770 | #define PCI_DEVICE_ID_TI_TVP4010 0x3d04 |
770 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 | 771 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 |
771 | #define PCI_DEVICE_ID_TI_4450 0x8011 | 772 | #define PCI_DEVICE_ID_TI_4450 0x8011 |
773 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 | ||
774 | #define PCI_DEVICE_ID_TI_X515 0x8036 | ||
772 | #define PCI_DEVICE_ID_TI_1130 0xac12 | 775 | #define PCI_DEVICE_ID_TI_1130 0xac12 |
773 | #define PCI_DEVICE_ID_TI_1031 0xac13 | 776 | #define PCI_DEVICE_ID_TI_1031 0xac13 |
774 | #define PCI_DEVICE_ID_TI_1131 0xac15 | 777 | #define PCI_DEVICE_ID_TI_1131 0xac15 |
@@ -785,12 +788,17 @@ | |||
785 | #define PCI_DEVICE_ID_TI_4451 0xac42 | 788 | #define PCI_DEVICE_ID_TI_4451 0xac42 |
786 | #define PCI_DEVICE_ID_TI_4510 0xac44 | 789 | #define PCI_DEVICE_ID_TI_4510 0xac44 |
787 | #define PCI_DEVICE_ID_TI_4520 0xac46 | 790 | #define PCI_DEVICE_ID_TI_4520 0xac46 |
791 | #define PCI_DEVICE_ID_TI_7510 0xac47 | ||
792 | #define PCI_DEVICE_ID_TI_7610 0xac48 | ||
793 | #define PCI_DEVICE_ID_TI_7410 0xac49 | ||
788 | #define PCI_DEVICE_ID_TI_1410 0xac50 | 794 | #define PCI_DEVICE_ID_TI_1410 0xac50 |
789 | #define PCI_DEVICE_ID_TI_1420 0xac51 | 795 | #define PCI_DEVICE_ID_TI_1420 0xac51 |
790 | #define PCI_DEVICE_ID_TI_1451A 0xac52 | 796 | #define PCI_DEVICE_ID_TI_1451A 0xac52 |
791 | #define PCI_DEVICE_ID_TI_1620 0xac54 | 797 | #define PCI_DEVICE_ID_TI_1620 0xac54 |
792 | #define PCI_DEVICE_ID_TI_1520 0xac55 | 798 | #define PCI_DEVICE_ID_TI_1520 0xac55 |
793 | #define PCI_DEVICE_ID_TI_1510 0xac56 | 799 | #define PCI_DEVICE_ID_TI_1510 0xac56 |
800 | #define PCI_DEVICE_ID_TI_X620 0xac8d | ||
801 | #define PCI_DEVICE_ID_TI_X420 0xac8e | ||
794 | 802 | ||
795 | #define PCI_VENDOR_ID_SONY 0x104d | 803 | #define PCI_VENDOR_ID_SONY 0x104d |
796 | #define PCI_DEVICE_ID_SONY_CXD3222 0x8039 | 804 | #define PCI_DEVICE_ID_SONY_CXD3222 0x8039 |
@@ -976,6 +984,7 @@ | |||
976 | #define PCI_DEVICE_ID_SUN_SABRE 0xa000 | 984 | #define PCI_DEVICE_ID_SUN_SABRE 0xa000 |
977 | #define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 | 985 | #define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 |
978 | #define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801 | 986 | #define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801 |
987 | #define PCI_DEVICE_ID_SUN_CASSINI 0xabba | ||
979 | 988 | ||
980 | #define PCI_VENDOR_ID_CMD 0x1095 | 989 | #define PCI_VENDOR_ID_CMD 0x1095 |
981 | #define PCI_DEVICE_ID_CMD_640 0x0640 | 990 | #define PCI_DEVICE_ID_CMD_640 0x0640 |
@@ -2187,7 +2196,12 @@ | |||
2187 | #define PCI_DEVICE_ID_ENE_1211 0x1211 | 2196 | #define PCI_DEVICE_ID_ENE_1211 0x1211 |
2188 | #define PCI_DEVICE_ID_ENE_1225 0x1225 | 2197 | #define PCI_DEVICE_ID_ENE_1225 0x1225 |
2189 | #define PCI_DEVICE_ID_ENE_1410 0x1410 | 2198 | #define PCI_DEVICE_ID_ENE_1410 0x1410 |
2199 | #define PCI_DEVICE_ID_ENE_710 0x1411 | ||
2200 | #define PCI_DEVICE_ID_ENE_712 0x1412 | ||
2190 | #define PCI_DEVICE_ID_ENE_1420 0x1420 | 2201 | #define PCI_DEVICE_ID_ENE_1420 0x1420 |
2202 | #define PCI_DEVICE_ID_ENE_720 0x1421 | ||
2203 | #define PCI_DEVICE_ID_ENE_722 0x1422 | ||
2204 | |||
2191 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | 2205 | #define PCI_VENDOR_ID_CHELSIO 0x1425 |
2192 | 2206 | ||
2193 | #define PCI_VENDOR_ID_MIPS 0x153f | 2207 | #define PCI_VENDOR_ID_MIPS 0x153f |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 49e617fa0f66..c3ba31f210a9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -107,13 +107,25 @@ extern unsigned long nr_iowait(void); | |||
107 | 107 | ||
108 | #include <asm/processor.h> | 108 | #include <asm/processor.h> |
109 | 109 | ||
110 | /* | ||
111 | * Task state bitmask. NOTE! These bits are also | ||
112 | * encoded in fs/proc/array.c: get_task_state(). | ||
113 | * | ||
114 | * We have two separate sets of flags: task->state | ||
115 | * is about runnability, while task->exit_state are | ||
116 | * about the task exiting. Confusing, but this way | ||
117 | * modifying one set can't modify the other one by | ||
118 | * mistake. | ||
119 | */ | ||
110 | #define TASK_RUNNING 0 | 120 | #define TASK_RUNNING 0 |
111 | #define TASK_INTERRUPTIBLE 1 | 121 | #define TASK_INTERRUPTIBLE 1 |
112 | #define TASK_UNINTERRUPTIBLE 2 | 122 | #define TASK_UNINTERRUPTIBLE 2 |
113 | #define TASK_STOPPED 4 | 123 | #define TASK_STOPPED 4 |
114 | #define TASK_TRACED 8 | 124 | #define TASK_TRACED 8 |
125 | /* in tsk->exit_state */ | ||
115 | #define EXIT_ZOMBIE 16 | 126 | #define EXIT_ZOMBIE 16 |
116 | #define EXIT_DEAD 32 | 127 | #define EXIT_DEAD 32 |
128 | /* in tsk->state again */ | ||
117 | #define TASK_NONINTERACTIVE 64 | 129 | #define TASK_NONINTERACTIVE 64 |
118 | 130 | ||
119 | #define __set_task_state(tsk, state_value) \ | 131 | #define __set_task_state(tsk, state_value) \ |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 3a29a9f9b451..fc8e367f671e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -202,7 +202,8 @@ enum | |||
202 | NET_TR=14, | 202 | NET_TR=14, |
203 | NET_DECNET=15, | 203 | NET_DECNET=15, |
204 | NET_ECONET=16, | 204 | NET_ECONET=16, |
205 | NET_SCTP=17, | 205 | NET_SCTP=17, |
206 | NET_LLC=18, | ||
206 | }; | 207 | }; |
207 | 208 | ||
208 | /* /proc/sys/kernel/random */ | 209 | /* /proc/sys/kernel/random */ |
@@ -522,6 +523,29 @@ enum { | |||
522 | NET_IPX_FORWARDING=2 | 523 | NET_IPX_FORWARDING=2 |
523 | }; | 524 | }; |
524 | 525 | ||
526 | /* /proc/sys/net/llc */ | ||
527 | enum { | ||
528 | NET_LLC2=1, | ||
529 | NET_LLC_STATION=2, | ||
530 | }; | ||
531 | |||
532 | /* /proc/sys/net/llc/llc2 */ | ||
533 | enum { | ||
534 | NET_LLC2_TIMEOUT=1, | ||
535 | }; | ||
536 | |||
537 | /* /proc/sys/net/llc/station */ | ||
538 | enum { | ||
539 | NET_LLC_STATION_ACK_TIMEOUT=1, | ||
540 | }; | ||
541 | |||
542 | /* /proc/sys/net/llc/llc2/timeout */ | ||
543 | enum { | ||
544 | NET_LLC2_ACK_TIMEOUT=1, | ||
545 | NET_LLC2_P_TIMEOUT=2, | ||
546 | NET_LLC2_REJ_TIMEOUT=3, | ||
547 | NET_LLC2_BUSY_TIMEOUT=4, | ||
548 | }; | ||
525 | 549 | ||
526 | /* /proc/sys/net/appletalk */ | 550 | /* /proc/sys/net/appletalk */ |
527 | enum { | 551 | enum { |