diff options
| author | David S. Miller <davem@nuts.davemloft.net> | 2004-09-26 22:16:02 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-09-26 22:16:02 -0700 |
| commit | 9c80ee75ffa8e176ca6e39738e8c580e2f71819c (patch) | |
| tree | 7a8c4a943e3fdd33c8d58298c3e5a6ae70883555 /include | |
| parent | 3c417db9f490d67074de52e3239f27402e8056e7 (diff) | |
| parent | e3ede754864448c81e0d3c0fb9a75d6706daa3d6 (diff) | |
Merge bk://212.42.230.204/netfilter-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc64/iommu.h | 4 | ||||
| -rw-r--r-- | include/asm-ppc64/machdep.h | 2 | ||||
| -rw-r--r-- | include/asm-ppc64/systemcfg.h | 49 | ||||
| -rw-r--r-- | include/linux/tcp.h | 10 | ||||
| -rw-r--r-- | include/linux/wait.h | 23 | ||||
| -rw-r--r-- | include/net/addrconf.h | 4 | ||||
| -rw-r--r-- | include/net/dn_neigh.h | 1 | ||||
| -rw-r--r-- | include/net/neighbour.h | 31 | ||||
| -rw-r--r-- | include/net/tcp.h | 28 |
9 files changed, 80 insertions, 72 deletions
diff --git a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h index 2985dcf9bfea..e67575457fb2 100644 --- a/include/asm-ppc64/iommu.h +++ b/include/asm-ppc64/iommu.h @@ -108,7 +108,7 @@ struct scatterlist; /* Walks all buses and creates iommu tables */ extern void iommu_setup_pSeries(void); -extern void iommu_setup_pmac(void); +extern void iommu_setup_u3(void); /* Creates table for an individual device node */ extern void iommu_devnode_init(struct device_node *dn); @@ -155,6 +155,8 @@ extern void tce_init_iSeries(void); extern void pci_iommu_init(void); extern void pci_dma_init_direct(void); +extern void alloc_u3_dart_table(void); + extern int ppc64_iommu_off; #endif /* _ASM_IOMMU_H */ diff --git a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h index e0fc14a61891..e3b860769cd8 100644 --- a/include/asm-ppc64/machdep.h +++ b/include/asm-ppc64/machdep.h @@ -58,7 +58,7 @@ struct machdep_calls { int local); /* special for kexec, to be called in real mode, linar mapping is * destroyed as well */ - void (*htpe_clear_all)(void); + void (*hpte_clear_all)(void); void (*tce_build)(struct iommu_table * tbl, long index, diff --git a/include/asm-ppc64/systemcfg.h b/include/asm-ppc64/systemcfg.h index 7cefeef2baa2..b7d6e0f340fe 100644 --- a/include/asm-ppc64/systemcfg.h +++ b/include/asm-ppc64/systemcfg.h @@ -59,54 +59,7 @@ struct systemcfg { #ifdef __KERNEL__ extern struct systemcfg *systemcfg; -#else - -/* Processor Version Register (PVR) field extraction */ -#define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */ -#define PVR_REV(pvr) (((pvr) >> 0) & 0xFFFF) /* Revison field */ - -/* Processor Version Numbers */ -#define PV_NORTHSTAR 0x0033 -#define PV_PULSAR 0x0034 -#define PV_POWER4 0x0035 -#define PV_ICESTAR 0x0036 -#define PV_SSTAR 0x0037 -#define PV_POWER4p 0x0038 -#define PV_GPUL 0x0039 -#define PV_POWER5 0x003a -#define PV_970FX 0x003c -#define PV_630 0x0040 -#define PV_630p 0x0041 - -/* Platforms supported by PPC64 */ -#define PLATFORM_PSERIES 0x0100 -#define PLATFORM_PSERIES_LPAR 0x0101 -#define PLATFORM_ISERIES_LPAR 0x0201 -#define PLATFORM_POWERMAC 0x0400 - -/* Compatibility with drivers coming from PPC32 world */ -#define _machine (systemcfg->platform) -#define _MACH_Pmac PLATFORM_POWERMAC - - -static inline volatile struct systemcfg *systemcfg_init(void) -{ - int fd = open("/proc/ppc64/systemcfg", O_RDONLY); - volatile struct systemcfg *ret; - - if (fd == -1) - return 0; - ret = mmap(0, sizeof(struct systemcfg), PROT_READ, MAP_SHARED, fd, 0); - close(fd); - if (!ret) - return 0; - if (ret->version.major != SYSTEMCFG_MAJOR || ret->version.minor < SYSTEMCFG_MINOR) { - munmap((void *)ret, sizeof(struct systemcfg)); - return 0; - } - return ret; -} -#endif /* __KERNEL__ */ +#endif #endif /* __ASSEMBLY__ */ diff --git a/include/linux/tcp.h b/include/linux/tcp.h index c03df4894379..f374df7a823f 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -205,6 +205,13 @@ typedef struct tcp_pcount { __u32 val; } tcp_pcount_t; +enum tcp_congestion_algo { + TCP_RENO=0, + TCP_VEGAS, + TCP_WESTWOOD, + TCP_BIC, +}; + struct tcp_opt { int tcp_header_len; /* Bytes of tcp header to send */ @@ -265,7 +272,7 @@ struct tcp_opt { __u8 frto_counter; /* Number of new acks after RTO */ __u32 frto_highmark; /* snd_nxt when RTO occurred */ - __u8 unused_pad; + __u8 adv_cong; /* Using Vegas, Westwood, or BIC */ __u8 defer_accept; /* User waits for some data after accept() */ /* one byte hole, try to pack */ @@ -412,7 +419,6 @@ struct tcp_opt { __u32 beg_snd_nxt; /* right edge during last RTT */ __u32 beg_snd_una; /* left edge during last RTT */ __u32 beg_snd_cwnd; /* saves the size of the cwnd */ - __u8 do_vegas; /* do vegas for this connection */ __u8 doing_vegas_now;/* if true, do vegas for this RTT */ __u16 cntRTT; /* # of RTTs measured within last RTT */ __u32 minRTT; /* min of RTTs measured within last RTT (in usec) */ diff --git a/include/linux/wait.h b/include/linux/wait.h index 4417f800a639..21cd4df67b24 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -156,6 +156,29 @@ do { \ __wait_event(wq, condition); \ } while (0) +#define __wait_event_timeout(wq, condition, ret) \ +do { \ + DEFINE_WAIT(__wait); \ + \ + for (;;) { \ + prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \ + if (condition) \ + break; \ + ret = schedule_timeout(ret); \ + if (!ret) \ + break; \ + } \ + finish_wait(&wq, &__wait); \ +} while (0) + +#define wait_event_timeout(wq, condition, timeout) \ +({ \ + long __ret = timeout; \ + if (!(condition)) \ + __wait_event_timeout(wq, condition, __ret); \ + __ret; \ +}) + #define __wait_event_interruptible(wq, condition, ret) \ do { \ DEFINE_WAIT(__wait); \ diff --git a/include/net/addrconf.h b/include/net/addrconf.h index fc2b279cd148..50f4c2c4df86 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -74,7 +74,7 @@ extern int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2); extern void addrconf_join_solict(struct net_device *dev, struct in6_addr *addr); -extern void addrconf_leave_solict(struct net_device *dev, +extern void addrconf_leave_solict(struct inet6_dev *idev, struct in6_addr *addr); /* @@ -89,6 +89,7 @@ extern int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr, struct in6_addr *src_addr); extern int ipv6_dev_mc_inc(struct net_device *dev, struct in6_addr *addr); +extern int __ipv6_dev_mc_dec(struct inet6_dev *idev, struct in6_addr *addr); extern int ipv6_dev_mc_dec(struct net_device *dev, struct in6_addr *addr); extern void ipv6_mc_up(struct inet6_dev *idev); extern void ipv6_mc_down(struct inet6_dev *idev); @@ -111,6 +112,7 @@ extern void ipv6_sock_ac_close(struct sock *sk); extern int inet6_ac_check(struct sock *sk, struct in6_addr *addr, int ifindex); extern int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr); +extern int __ipv6_dev_ac_dec(struct inet6_dev *idev, struct in6_addr *addr); extern int ipv6_dev_ac_dec(struct net_device *dev, struct in6_addr *addr); extern int ipv6_chk_acast_addr(struct net_device *dev, struct in6_addr *addr); diff --git a/include/net/dn_neigh.h b/include/net/dn_neigh.h index b0c2802a5216..4b1eb038d637 100644 --- a/include/net/dn_neigh.h +++ b/include/net/dn_neigh.h @@ -18,7 +18,6 @@ struct dn_neigh { extern void dn_neigh_init(void); extern void dn_neigh_cleanup(void); -extern struct neighbour *dn_neigh_lookup(struct neigh_table *tbl, const void *ptr); extern int dn_neigh_router_hello(struct sk_buff *skb); extern int dn_neigh_endnode_hello(struct sk_buff *skb); extern void dn_neigh_pointopoint_hello(struct sk_buff *skb); diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 88c2d3ec20cf..e66c71da2357 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -47,6 +47,7 @@ #include <linux/skbuff.h> #include <linux/netdevice.h> #include <linux/rcupdate.h> +#include <linux/seq_file.h> #include <linux/err.h> #include <linux/sysctl.h> @@ -139,9 +140,6 @@ struct pneigh_entry u8 key[0]; }; -#define NEIGH_HASHMASK 0x1F -#define PNEIGH_HASHMASK 0xF - /* * neighbour table manipulation */ @@ -175,8 +173,11 @@ struct neigh_table struct neigh_parms *parms_list; kmem_cache_t *kmem_cachep; struct neigh_statistics stats; - struct neighbour *hash_buckets[NEIGH_HASHMASK+1]; - struct pneigh_entry *phash_buckets[PNEIGH_HASHMASK+1]; + struct neighbour **hash_buckets; + unsigned int hash_mask; + __u32 hash_rnd; + unsigned int hash_chain_gc; + struct pneigh_entry **phash_buckets; }; /* flags for neigh_update() */ @@ -191,6 +192,8 @@ extern int neigh_table_clear(struct neigh_table *tbl); extern struct neighbour * neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev); +extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl, + const void *pkey); extern struct neighbour * neigh_create(struct neigh_table *tbl, const void *pkey, struct net_device *dev); @@ -224,6 +227,24 @@ extern int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); extern int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); extern void neigh_app_ns(struct neighbour *n); +extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie); +extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *)); +extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *)); + +struct neigh_seq_state { + struct neigh_table *tbl; + void *(*neigh_sub_iter)(struct neigh_seq_state *state, + struct neighbour *n, loff_t *pos); + unsigned int bucket; + unsigned int flags; +#define NEIGH_SEQ_NEIGH_ONLY 0x00000001 +#define NEIGH_SEQ_IS_PNEIGH 0x00000002 +#define NEIGH_SEQ_SKIP_NOARP 0x00000004 +}; +extern void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, unsigned int); +extern void *neigh_seq_next(struct seq_file *, void *, loff_t *); +extern void neigh_seq_stop(struct seq_file *, void *); + extern int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, int p_id, int pdev_id, diff --git a/include/net/tcp.h b/include/net/tcp.h index 63ed0f745a8d..eb0f1970a40f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1271,6 +1271,13 @@ static __inline__ unsigned int tcp_packets_in_flight(struct tcp_opt *tp) tcp_get_pcount(&tp->retrans_out)); } +/* + * Which congestion algorithim is in use on the connection. + */ +#define tcp_is_vegas(__tp) ((__tp)->adv_cong == TCP_VEGAS) +#define tcp_is_westwood(__tp) ((__tp)->adv_cong == TCP_WESTWOOD) +#define tcp_is_bic(__tp) ((__tp)->adv_cong == TCP_BIC) + /* Recalculate snd_ssthresh, we want to set it to: * * Reno: @@ -1283,7 +1290,7 @@ static __inline__ unsigned int tcp_packets_in_flight(struct tcp_opt *tp) */ static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) { - if (sysctl_tcp_bic) { + if (tcp_is_bic(tp)) { if (sysctl_tcp_bic_fast_convergence && tp->snd_cwnd < tp->bictcp.last_max_cwnd) tp->bictcp.last_max_cwnd @@ -1302,11 +1309,6 @@ static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) /* Stop taking Vegas samples for now. */ #define tcp_vegas_disable(__tp) ((__tp)->vegas.doing_vegas_now = 0) - -/* Is this TCP connection using Vegas (regardless of whether it is taking - * Vegas measurements at the current time)? - */ -#define tcp_is_vegas(__tp) ((__tp)->vegas.do_vegas) static inline void tcp_vegas_enable(struct tcp_opt *tp) { @@ -1340,7 +1342,7 @@ static inline void tcp_vegas_enable(struct tcp_opt *tp) /* Should we be taking Vegas samples right now? */ #define tcp_vegas_enabled(__tp) ((__tp)->vegas.doing_vegas_now) -extern void tcp_vegas_init(struct tcp_opt *tp); +extern void tcp_ca_init(struct tcp_opt *tp); static inline void tcp_set_ca_state(struct tcp_opt *tp, u8 ca_state) { @@ -2024,7 +2026,7 @@ extern void tcp_proc_unregister(struct tcp_seq_afinfo *afinfo); static inline void tcp_westwood_update_rtt(struct tcp_opt *tp, __u32 rtt_seq) { - if (sysctl_tcp_westwood) + if (tcp_is_westwood(tp)) tp->westwood.rtt = rtt_seq; } @@ -2033,13 +2035,13 @@ void __tcp_westwood_slow_bw(struct sock *, struct sk_buff *); static inline void tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb) { - if (sysctl_tcp_westwood) + if (tcp_is_westwood(tcp_sk(sk))) __tcp_westwood_fast_bw(sk, skb); } static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb) { - if (sysctl_tcp_westwood) + if (tcp_is_westwood(tcp_sk(sk))) __tcp_westwood_slow_bw(sk, skb); } @@ -2052,14 +2054,14 @@ static inline __u32 __tcp_westwood_bw_rttmin(const struct tcp_opt *tp) static inline __u32 tcp_westwood_bw_rttmin(const struct tcp_opt *tp) { - return sysctl_tcp_westwood ? __tcp_westwood_bw_rttmin(tp) : 0; + return tcp_is_westwood(tp) ? __tcp_westwood_bw_rttmin(tp) : 0; } static inline int tcp_westwood_ssthresh(struct tcp_opt *tp) { __u32 ssthresh = 0; - if (sysctl_tcp_westwood) { + if (tcp_is_westwood(tp)) { ssthresh = __tcp_westwood_bw_rttmin(tp); if (ssthresh) tp->snd_ssthresh = ssthresh; @@ -2072,7 +2074,7 @@ static inline int tcp_westwood_cwnd(struct tcp_opt *tp) { __u32 cwnd = 0; - if (sysctl_tcp_westwood) { + if (tcp_is_westwood(tp)) { cwnd = __tcp_westwood_bw_rttmin(tp); if (cwnd) tp->snd_cwnd = cwnd; |
