diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-27 21:48:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-27 21:48:56 -0400 |
commit | 8e8e43843ba3ced0c657cbc0fdb10644ec60f772 (patch) | |
tree | e64954326ced9c365c52c256f01b5f9fb1bcae66 /include | |
parent | ed85f2c3b2b72bd20f617ac749f5c22be8d0f66e (diff) | |
parent | 50fd4407b8bfbde7c1a0bfe4f24de7df37164342 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/usb/rndis_host.c
drivers/net/wireless/b43/dma.c
net/ipv6/ndisc.c
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 6 | ||||
-rw-r--r-- | include/net/neighbour.h | 4 | ||||
-rw-r--r-- | include/net/xfrm.h | 29 |
3 files changed, 37 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 15fa84a15c27..3b54f8a2c055 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -383,9 +383,11 @@ static inline void __napi_complete(struct napi_struct *n) | |||
383 | 383 | ||
384 | static inline void napi_complete(struct napi_struct *n) | 384 | static inline void napi_complete(struct napi_struct *n) |
385 | { | 385 | { |
386 | local_irq_disable(); | 386 | unsigned long flags; |
387 | |||
388 | local_irq_save(flags); | ||
387 | __napi_complete(n); | 389 | __napi_complete(n); |
388 | local_irq_enable(); | 390 | local_irq_restore(flags); |
389 | } | 391 | } |
390 | 392 | ||
391 | /** | 393 | /** |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 8bec0d69b270..dc420fecafb9 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -233,6 +233,10 @@ extern unsigned long neigh_rand_reach_time(unsigned long base); | |||
233 | extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, | 233 | extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, |
234 | struct sk_buff *skb); | 234 | struct sk_buff *skb); |
235 | extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat); | 235 | extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat); |
236 | extern struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, | ||
237 | struct net *net, | ||
238 | const void *key, | ||
239 | struct net_device *dev); | ||
236 | extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev); | 240 | extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev); |
237 | 241 | ||
238 | static inline | 242 | static inline |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index bed7d43932f6..b56b6a10fe5e 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -205,6 +205,7 @@ struct xfrm_state | |||
205 | * transformer. */ | 205 | * transformer. */ |
206 | const struct xfrm_type *type; | 206 | const struct xfrm_type *type; |
207 | struct xfrm_mode *inner_mode; | 207 | struct xfrm_mode *inner_mode; |
208 | struct xfrm_mode *inner_mode_iaf; | ||
208 | struct xfrm_mode *outer_mode; | 209 | struct xfrm_mode *outer_mode; |
209 | 210 | ||
210 | /* Security context */ | 211 | /* Security context */ |
@@ -388,6 +389,27 @@ enum { | |||
388 | extern int xfrm_register_mode(struct xfrm_mode *mode, int family); | 389 | extern int xfrm_register_mode(struct xfrm_mode *mode, int family); |
389 | extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family); | 390 | extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family); |
390 | 391 | ||
392 | static inline int xfrm_af2proto(unsigned int family) | ||
393 | { | ||
394 | switch(family) { | ||
395 | case AF_INET: | ||
396 | return IPPROTO_IPIP; | ||
397 | case AF_INET6: | ||
398 | return IPPROTO_IPV6; | ||
399 | default: | ||
400 | return 0; | ||
401 | } | ||
402 | } | ||
403 | |||
404 | static inline struct xfrm_mode *xfrm_ip2inner_mode(struct xfrm_state *x, int ipproto) | ||
405 | { | ||
406 | if ((ipproto == IPPROTO_IPIP && x->props.family == AF_INET) || | ||
407 | (ipproto == IPPROTO_IPV6 && x->props.family == AF_INET6)) | ||
408 | return x->inner_mode; | ||
409 | else | ||
410 | return x->inner_mode_iaf; | ||
411 | } | ||
412 | |||
391 | struct xfrm_tmpl | 413 | struct xfrm_tmpl |
392 | { | 414 | { |
393 | /* id in template is interpreted as: | 415 | /* id in template is interpreted as: |
@@ -532,6 +554,9 @@ struct xfrm_mode_skb_cb { | |||
532 | __be16 id; | 554 | __be16 id; |
533 | __be16 frag_off; | 555 | __be16 frag_off; |
534 | 556 | ||
557 | /* IP header length (excluding options or extension headers). */ | ||
558 | u8 ihl; | ||
559 | |||
535 | /* TOS for IPv4, class for IPv6. */ | 560 | /* TOS for IPv4, class for IPv6. */ |
536 | u8 tos; | 561 | u8 tos; |
537 | 562 | ||
@@ -541,6 +566,9 @@ struct xfrm_mode_skb_cb { | |||
541 | /* Protocol for IPv4, NH for IPv6. */ | 566 | /* Protocol for IPv4, NH for IPv6. */ |
542 | u8 protocol; | 567 | u8 protocol; |
543 | 568 | ||
569 | /* Option length for IPv4, zero for IPv6. */ | ||
570 | u8 optlen; | ||
571 | |||
544 | /* Used by IPv6 only, zero for IPv4. */ | 572 | /* Used by IPv6 only, zero for IPv4. */ |
545 | u8 flow_lbl[3]; | 573 | u8 flow_lbl[3]; |
546 | }; | 574 | }; |
@@ -1300,6 +1328,7 @@ extern int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, | |||
1300 | extern int xfrm_input_resume(struct sk_buff *skb, int nexthdr); | 1328 | extern int xfrm_input_resume(struct sk_buff *skb, int nexthdr); |
1301 | extern int xfrm_output_resume(struct sk_buff *skb, int err); | 1329 | extern int xfrm_output_resume(struct sk_buff *skb, int err); |
1302 | extern int xfrm_output(struct sk_buff *skb); | 1330 | extern int xfrm_output(struct sk_buff *skb); |
1331 | extern int xfrm_inner_extract_output(struct xfrm_state *x, struct sk_buff *skb); | ||
1303 | extern int xfrm4_extract_header(struct sk_buff *skb); | 1332 | extern int xfrm4_extract_header(struct sk_buff *skb); |
1304 | extern int xfrm4_extract_input(struct xfrm_state *x, struct sk_buff *skb); | 1333 | extern int xfrm4_extract_input(struct xfrm_state *x, struct sk_buff *skb); |
1305 | extern int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi, | 1334 | extern int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi, |