aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 12:13:41 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 12:13:41 -0400
commitb9066c268abfe353edf5d646bb486bc03c839348 (patch)
treeb352204c6a773978efc902b28f0b25125f4a0e5b /include
parent0c27011a7562f2b67bec61509e21113ec125aba1 (diff)
parent85553ddafc5415534bcbe63ffa3af6506e6a754e (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits) [IPSEC]: Add xfrm_sysctl.txt. [BRIDGE]: Round off STP perodic timers. [BRIDGE]: Reduce frequency of forwarding cleanup timer in bridge. [TCP] tcp_probe: use GCC printf attribute [TCP] tcp_probe: a trivial fix for mismatched number of printl arguments. [IPV6] ADDRCONF: Fix conflicts in DEVCONF_xxx constant. [NET] napi: Call __netif_rx_complete in netif_rx_complete [TCP]: Consolidate checking for tcp orphan count being too big. [SOCK]: Shrink struct sock by 8 bytes on 64-bit. [AF_PACKET]: Kill CONFIG_PACKET_SOCKET. [IPV6]: Fix build warning. [AF_PACKET]: Kill bogus CONFIG_PACKET_MULTICAST [IPV4]: Kill references to bogus non-existent CONFIG_IP_NOSIOCRT [IPSEC]: Fix panic when using inter address familiy IPsec on loopback. [NET]: parse ip:port strings correctly in in4_pton [IPV6] ROUTE: No longer handle ::/0 specially. [IPSEC]: Fix IPv6 AH calculation in outbound [XFRM]: xfrm_larval_drop sysctl should be __read_mostly. [XFRM]: Allow XFRM_ACQ_EXPIRES to be tunable via sysctl. [CASSINI]: Fix printk message typo. ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/ipv6.h3
-rw-r--r--include/linux/netdevice.h27
-rw-r--r--include/net/sock.h2
-rw-r--r--include/net/tcp.h6
-rw-r--r--include/net/xfrm.h1
5 files changed, 20 insertions, 19 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 09ea01a8a99c..648bd1f0912d 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -209,9 +209,8 @@ enum {
209 DEVCONF_RTR_PROBE_INTERVAL, 209 DEVCONF_RTR_PROBE_INTERVAL,
210 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, 210 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
211 DEVCONF_PROXY_NDP, 211 DEVCONF_PROXY_NDP,
212 __DEVCONF_OPTIMISTIC_DAD,
213 DEVCONF_ACCEPT_SOURCE_ROUTE,
214 DEVCONF_OPTIMISTIC_DAD, 212 DEVCONF_OPTIMISTIC_DAD,
213 DEVCONF_ACCEPT_SOURCE_ROUTE,
215 DEVCONF_MAX 214 DEVCONF_MAX
216}; 215};
217 216
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f671cd2f133f..3a70f553b28f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -910,6 +910,17 @@ static inline int netif_rx_reschedule(struct net_device *dev, int undo)
910 return 0; 910 return 0;
911} 911}
912 912
913/* same as netif_rx_complete, except that local_irq_save(flags)
914 * has already been issued
915 */
916static inline void __netif_rx_complete(struct net_device *dev)
917{
918 BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state));
919 list_del(&dev->poll_list);
920 smp_mb__before_clear_bit();
921 clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
922}
923
913/* Remove interface from poll list: it must be in the poll list 924/* Remove interface from poll list: it must be in the poll list
914 * on current cpu. This primitive is called by dev->poll(), when 925 * on current cpu. This primitive is called by dev->poll(), when
915 * it completes the work. The device cannot be out of poll list at this 926 * it completes the work. The device cannot be out of poll list at this
@@ -920,10 +931,7 @@ static inline void netif_rx_complete(struct net_device *dev)
920 unsigned long flags; 931 unsigned long flags;
921 932
922 local_irq_save(flags); 933 local_irq_save(flags);
923 BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state)); 934 __netif_rx_complete(dev);
924 list_del(&dev->poll_list);
925 smp_mb__before_clear_bit();
926 clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
927 local_irq_restore(flags); 935 local_irq_restore(flags);
928} 936}
929 937
@@ -940,17 +948,6 @@ static inline void netif_poll_enable(struct net_device *dev)
940 clear_bit(__LINK_STATE_RX_SCHED, &dev->state); 948 clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
941} 949}
942 950
943/* same as netif_rx_complete, except that local_irq_save(flags)
944 * has already been issued
945 */
946static inline void __netif_rx_complete(struct net_device *dev)
947{
948 BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state));
949 list_del(&dev->poll_list);
950 smp_mb__before_clear_bit();
951 clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
952}
953
954static inline void netif_tx_lock(struct net_device *dev) 951static inline void netif_tx_lock(struct net_device *dev)
955{ 952{
956 spin_lock(&dev->_xmit_lock); 953 spin_lock(&dev->_xmit_lock);
diff --git a/include/net/sock.h b/include/net/sock.h
index 689b886038da..dfeb8b13024f 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -218,13 +218,13 @@ struct sock {
218 atomic_t sk_rmem_alloc; 218 atomic_t sk_rmem_alloc;
219 atomic_t sk_wmem_alloc; 219 atomic_t sk_wmem_alloc;
220 atomic_t sk_omem_alloc; 220 atomic_t sk_omem_alloc;
221 int sk_sndbuf;
221 struct sk_buff_head sk_receive_queue; 222 struct sk_buff_head sk_receive_queue;
222 struct sk_buff_head sk_write_queue; 223 struct sk_buff_head sk_write_queue;
223 struct sk_buff_head sk_async_wait_queue; 224 struct sk_buff_head sk_async_wait_queue;
224 int sk_wmem_queued; 225 int sk_wmem_queued;
225 int sk_forward_alloc; 226 int sk_forward_alloc;
226 gfp_t sk_allocation; 227 gfp_t sk_allocation;
227 int sk_sndbuf;
228 int sk_route_caps; 228 int sk_route_caps;
229 int sk_gso_type; 229 int sk_gso_type;
230 int sk_rcvlowat; 230 int sk_rcvlowat;
diff --git a/include/net/tcp.h b/include/net/tcp.h
index e22b4f0305a3..a8af9ae00177 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -254,6 +254,12 @@ static inline int between(__u32 seq1, __u32 seq2, __u32 seq3)
254 return seq3 - seq2 >= seq1 - seq2; 254 return seq3 - seq2 >= seq1 - seq2;
255} 255}
256 256
257static inline int tcp_too_many_orphans(struct sock *sk, int num)
258{
259 return (num > sysctl_tcp_max_orphans) ||
260 (sk->sk_wmem_queued > SOCK_MIN_SNDBUF &&
261 atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]);
262}
257 263
258extern struct proto tcp_prot; 264extern struct proto tcp_prot;
259 265
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 39ef925d39dd..90185e8b335e 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -237,7 +237,6 @@ extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo);
237extern int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo); 237extern int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo);
238extern void km_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c); 238extern void km_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c);
239extern void km_state_notify(struct xfrm_state *x, struct km_event *c); 239extern void km_state_notify(struct xfrm_state *x, struct km_event *c);
240#define XFRM_ACQ_EXPIRES 30
241 240
242struct xfrm_tmpl; 241struct xfrm_tmpl;
243extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); 242extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol);