diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-28 23:04:50 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-28 23:04:50 -0700 |
| commit | f30c12fd6406414bdbcb240cd61a3fa4466bb1b3 (patch) | |
| tree | 4528d9c1d39670da99d4f6e5ce4383ac3663d4ef /include | |
| parent | 4b1dbe3320722454c280bf3e769833da5d3676e7 (diff) | |
| parent | 9f3cd7bdbca045f59d052250c0057e5ccff017fb (diff) | |
Merge bk://kernel.bkbits.net/davem/net-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/proc_fs.h | 1 | ||||
| -rw-r--r-- | include/net/neighbour.h | 31 | ||||
| -rw-r--r-- | include/net/pkt_sched.h | 1 | ||||
| -rw-r--r-- | include/net/tcp.h | 37 |
4 files changed, 32 insertions, 38 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index abcfc4bca268..c83dd15b728c 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -79,6 +79,7 @@ struct kcore_list { extern struct proc_dir_entry proc_root; extern struct proc_dir_entry *proc_root_fs; extern struct proc_dir_entry *proc_net; +extern struct proc_dir_entry *proc_net_stat; extern struct proc_dir_entry *proc_bus; extern struct proc_dir_entry *proc_root_driver; extern struct proc_dir_entry *proc_root_kcore; diff --git a/include/net/neighbour.h b/include/net/neighbour.h index e66c71da2357..40073cf19863 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -7,6 +7,11 @@ * Authors: * Pedro Roque <roque@di.fc.ul.pt> * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> + * + * Changes: + * + * Harald Welte: <laforge@gnumonks.org> + * - Add neighbour cache statistics like rtstat */ /* The following flags & states are exported to user space, @@ -90,12 +95,25 @@ struct neigh_parms struct neigh_statistics { - unsigned long allocs; - unsigned long res_failed; - unsigned long rcv_probes_mcast; - unsigned long rcv_probes_ucast; + unsigned long allocs; /* number of allocated neighs */ + unsigned long destroys; /* number of destroyed neighs */ + unsigned long hash_grows; /* number of hash resizes */ + + unsigned long res_failed; /* nomber of failed resolutions */ + + unsigned long lookups; /* number of lookups */ + unsigned long hits; /* number of hits (among lookups) */ + + unsigned long rcv_probes_mcast; /* number of received mcast ipv6 */ + unsigned long rcv_probes_ucast; /* number of received ucast ipv6 */ + + unsigned long periodic_gc_runs; /* number of periodic GC runs */ + unsigned long forced_gc_runs; /* number of forced GC runs */ }; +#define NEIGH_CACHE_STAT_INC(tbl, field) \ + (per_cpu_ptr((tbl)->stats, smp_processor_id())->field++) + struct neighbour { struct neighbour *next; @@ -172,12 +190,15 @@ struct neigh_table unsigned long last_rand; struct neigh_parms *parms_list; kmem_cache_t *kmem_cachep; - struct neigh_statistics stats; + struct neigh_statistics *stats; struct neighbour **hash_buckets; unsigned int hash_mask; __u32 hash_rnd; unsigned int hash_chain_gc; struct pneigh_entry **phash_buckets; +#ifdef CONFIG_PROC_FS + struct proc_dir_entry *pde; +#endif }; /* flags for neigh_update() */ diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index bce3aaf91235..c632d5408275 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -80,6 +80,7 @@ struct Qdisc int padded; struct Qdisc_ops *ops; u32 handle; + u32 parent; atomic_t refcnt; struct sk_buff_head q; struct net_device *dev; diff --git a/include/net/tcp.h b/include/net/tcp.h index eb0f1970a40f..68e15e26d7ed 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -961,7 +961,8 @@ extern void tcp_clear_xmit_timers(struct sock *); extern void tcp_delete_keepalive_timer (struct sock *); extern void tcp_reset_keepalive_timer (struct sock *, unsigned long); -extern int tcp_sync_mss(struct sock *sk, u32 pmtu); +extern unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu); +extern unsigned int tcp_current_mss(struct sock *sk, int large); extern const char timer_bug_msg[]; @@ -1035,37 +1036,6 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long }; } -/* Compute the current effective MSS, taking SACKs and IP options, - * and even PMTU discovery events into account. - * - * LARGESEND note: !urg_mode is overkill, only frames up to snd_up - * cannot be large. However, taking into account rare use of URG, this - * is not a big flaw. - */ - -static inline unsigned int tcp_current_mss(struct sock *sk, int large) -{ - struct tcp_opt *tp = tcp_sk(sk); - struct dst_entry *dst = __sk_dst_get(sk); - int do_large, mss_now; - - do_large = (large && - (sk->sk_route_caps & NETIF_F_TSO) && - !tp->urg_mode); - mss_now = do_large ? tp->mss_cache : tp->mss_cache_std; - - if (dst) { - u32 mtu = dst_pmtu(dst); - if (mtu != tp->pmtu_cookie || - tp->ext2_header_len != dst->header_len) - mss_now = tcp_sync_mss(sk, mtu); - } - if (tp->eff_sacks) - mss_now -= (TCPOLEN_SACK_BASE_ALIGNED + - (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK)); - return mss_now; -} - /* Initialize RCV_MSS value. * RCV_MSS is an our guess about MSS used by the peer. * We haven't any direct information about the MSS. @@ -1180,7 +1150,8 @@ struct tcp_skb_cb { __u16 urg_ptr; /* Valid w/URG flags is set. */ __u32 ack_seq; /* Sequence number ACK'd */ - __u32 tso_factor; + __u16 tso_factor; /* If > 1, TSO frame */ + __u16 tso_mss; /* MSS that FACTOR's in terms of*/ }; #define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) |
