diff options
| author | David S. Miller <davem@nuts.davemloft.net> | 2004-02-03 20:48:53 -0800 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-02-03 20:48:53 -0800 |
| commit | 22da2e737547ff89c0f8f8b807307da677e13449 (patch) | |
| tree | 497a110e1315379e9628274ebef0a5c0b5ced670 /include | |
| parent | 25b160e30eda99ccc6065c0120a07e00dfa43de4 (diff) | |
| parent | a47940cd6f47220f11a7fa0f2ba2a1c51f8a2adc (diff) | |
Merge nuts.davemloft.net:/disk1/BK/network-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/inetdevice.h | 1 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_conntrack_core.h | 1 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
| -rw-r--r-- | include/linux/pkt_sched.h | 31 | ||||
| -rw-r--r-- | include/linux/sctp.h | 62 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 2 | ||||
| -rw-r--r-- | include/linux/tcp.h | 14 | ||||
| -rw-r--r-- | include/net/irda/irlmp_frame.h | 2 | ||||
| -rw-r--r-- | include/net/irda/timer.h | 18 | ||||
| -rw-r--r-- | include/net/pkt_sched.h | 3 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 2 | ||||
| -rw-r--r-- | include/net/tcp.h | 66 |
12 files changed, 159 insertions, 44 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 18913dfaddb1..1c5eb02667bb 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -21,6 +21,7 @@ struct ipv4_devconf int medium_id; int no_xfrm; int no_policy; + int force_igmp_version; void *sysctl; }; diff --git a/include/linux/netfilter_ipv4/ip_conntrack_core.h b/include/linux/netfilter_ipv4/ip_conntrack_core.h index ea15674261a2..4c8b5d189089 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_core.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_core.h @@ -50,5 +50,6 @@ static inline int ip_conntrack_confirm(struct sk_buff *skb) extern struct list_head *ip_conntrack_hash; extern struct list_head ip_conntrack_expect_list; DECLARE_RWLOCK_EXTERN(ip_conntrack_lock); +DECLARE_RWLOCK_EXTERN(ip_conntrack_expect_tuple_lock); #endif /* _IP_CONNTRACK_CORE_H */ diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 4dba6ec06e3a..becde5e0fd9d 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -807,6 +807,7 @@ #define PCI_DEVICE_ID_APPLE_UNI_N_AGP2 0x0034 #define PCI_DEVICE_ID_APPLE_KAUAI_ATA 0x003b #define PCI_DEVICE_ID_APPLE_KEYLARGO_I 0x003e +#define PCI_DEVICE_ID_APPLE_K2_GMAC 0x004c #define PCI_DEVICE_ID_APPLE_TIGON3 0x1645 #define PCI_VENDOR_ID_YAMAHA 0x1073 diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index d97edad0effc..8ae0e141cb05 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h @@ -290,6 +290,37 @@ struct tc_htb_xstats __u32 ctokens; }; +/* HFSC section */ + +struct tc_hfsc_qopt +{ + __u16 defcls; /* default class */ +}; + +struct tc_service_curve +{ + __u32 m1; /* slope of the first segment in bps */ + __u32 d; /* x-projection of the first segment in us */ + __u32 m2; /* slope of the second segment in bps */ +}; + +struct tc_hfsc_stats +{ + __u64 work; /* total work done */ + __u64 rtwork; /* work done by real-time criteria */ + __u32 period; /* current period */ + __u32 level; /* class level in hierarchy */ +}; + +enum +{ + TCA_HFSC_UNSPEC, + TCA_HFSC_RSC, + TCA_HFSC_FSC, + TCA_HFSC_USC, + TCA_HFSC_MAX = TCA_HFSC_USC +}; + /* CBQ section */ #define TC_CBQ_MAXPRIO 8 diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 9ddc3bd5cd81..a851af99af70 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -61,14 +61,14 @@ typedef struct sctphdr { __u16 dest; __u32 vtag; __u32 checksum; -} sctp_sctphdr_t __attribute__((packed)); +} __attribute__((packed)) sctp_sctphdr_t; /* Section 3.2. Chunk Field Descriptions. */ typedef struct sctp_chunkhdr { __u8 type; __u8 flags; __u16 length; -} sctp_chunkhdr_t __attribute__((packed)); +} __attribute__((packed)) sctp_chunkhdr_t; /* Section 3.2. Chunk Type Values. @@ -152,7 +152,7 @@ enum { SCTP_CHUNK_FLAG_T = 0x01 }; typedef struct sctp_paramhdr { __u16 type; __u16 length; -} sctp_paramhdr_t __attribute((packed)); +} __attribute__((packed)) sctp_paramhdr_t; typedef enum { @@ -202,12 +202,12 @@ typedef struct sctp_datahdr { __u16 ssn; __u32 ppid; __u8 payload[0]; -} sctp_datahdr_t __attribute__((packed)); +} __attribute__((packed)) sctp_datahdr_t; typedef struct sctp_data_chunk { sctp_chunkhdr_t chunk_hdr; sctp_datahdr_t data_hdr; -} sctp_data_chunk_t __attribute__((packed)); +} __attribute__((packed)) sctp_data_chunk_t; /* DATA Chuck Specific Flags */ enum { @@ -232,48 +232,48 @@ typedef struct sctp_inithdr { __u16 num_inbound_streams; __u32 initial_tsn; __u8 params[0]; -} sctp_inithdr_t __attribute__((packed)); +} __attribute__((packed)) sctp_inithdr_t; typedef struct sctp_init_chunk { sctp_chunkhdr_t chunk_hdr; sctp_inithdr_t init_hdr; -} sctp_init_chunk_t __attribute__((packed)); +} __attribute__((packed)) sctp_init_chunk_t; /* Section 3.3.2.1. IPv4 Address Parameter (5) */ typedef struct sctp_ipv4addr_param { sctp_paramhdr_t param_hdr; struct in_addr addr; -} sctp_ipv4addr_param_t __attribute__((packed)); +} __attribute__((packed)) sctp_ipv4addr_param_t; /* Section 3.3.2.1. IPv6 Address Parameter (6) */ typedef struct sctp_ipv6addr_param { sctp_paramhdr_t param_hdr; struct in6_addr addr; -} sctp_ipv6addr_param_t __attribute__((packed)); +} __attribute__((packed)) sctp_ipv6addr_param_t; /* Section 3.3.2.1 Cookie Preservative (9) */ typedef struct sctp_cookie_preserve_param { sctp_paramhdr_t param_hdr; uint32_t lifespan_increment; -} sctp_cookie_preserve_param_t __attribute__((packed)); +} __attribute__((packed)) sctp_cookie_preserve_param_t; /* Section 3.3.2.1 Host Name Address (11) */ typedef struct sctp_hostname_param { sctp_paramhdr_t param_hdr; uint8_t hostname[0]; -} sctp_hostname_param_t __attribute__((packed)); +} __attribute__((packed)) sctp_hostname_param_t; /* Section 3.3.2.1 Supported Address Types (12) */ typedef struct sctp_supported_addrs_param { sctp_paramhdr_t param_hdr; uint16_t types[0]; -} sctp_supported_addrs_param_t __attribute__((packed)); +} __attribute__((packed)) sctp_supported_addrs_param_t; /* Appendix A. ECN Capable (32768) */ typedef struct sctp_ecn_capable_param { sctp_paramhdr_t param_hdr; -} sctp_ecn_capable_param_t __attribute__((packed)); +} __attribute__((packed)) sctp_ecn_capable_param_t; @@ -287,13 +287,13 @@ typedef sctp_init_chunk_t sctp_initack_chunk_t; typedef struct sctp_cookie_param { sctp_paramhdr_t p; __u8 body[0]; -} sctp_cookie_param_t __attribute__((packed)); +} __attribute__((packed)) sctp_cookie_param_t; /* Section 3.3.3.1 Unrecognized Parameters (8) */ typedef struct sctp_unrecognized_param { sctp_paramhdr_t param_hdr; sctp_paramhdr_t unrecognized; -} sctp_unrecognized_param_t __attribute__((packed)); +} __attribute__((packed)) sctp_unrecognized_param_t; @@ -308,7 +308,7 @@ typedef struct sctp_unrecognized_param { typedef struct sctp_gap_ack_block { __u16 start; __u16 end; -} sctp_gap_ack_block_t __attribute__((packed)); +} __attribute__((packed)) sctp_gap_ack_block_t; typedef uint32_t sctp_dup_tsn_t; @@ -323,12 +323,12 @@ typedef struct sctp_sackhdr { __u16 num_gap_ack_blocks; __u16 num_dup_tsns; sctp_sack_variable_t variable[0]; -} sctp_sackhdr_t __attribute__((packed)); +} __attribute__((packed)) sctp_sackhdr_t; typedef struct sctp_sack_chunk { sctp_chunkhdr_t chunk_hdr; sctp_sackhdr_t sack_hdr; -} sctp_sack_chunk_t __attribute__((packed)); +} __attribute__((packed)) sctp_sack_chunk_t; /* RFC 2960. Section 3.3.5 Heartbeat Request (HEARTBEAT) (4): @@ -340,12 +340,12 @@ typedef struct sctp_sack_chunk { typedef struct sctp_heartbeathdr { sctp_paramhdr_t info; -} sctp_heartbeathdr_t __attribute__((packed)); +} __attribute__((packed)) sctp_heartbeathdr_t; typedef struct sctp_heartbeat_chunk { sctp_chunkhdr_t chunk_hdr; sctp_heartbeathdr_t hb_hdr; -} sctp_heartbeat_chunk_t __attribute__((packed)); +} __attribute__((packed)) sctp_heartbeat_chunk_t; /* For the abort and shutdown ACK we must carry the init tag in the @@ -354,7 +354,7 @@ typedef struct sctp_heartbeat_chunk { */ typedef struct sctp_abort_chunk { sctp_chunkhdr_t uh; -} sctp_abort_chunkt_t __attribute__((packed)); +} __attribute__((packed)) sctp_abort_chunkt_t; /* For the graceful shutdown we must carry the tag (in common header) @@ -362,14 +362,12 @@ typedef struct sctp_abort_chunk { */ typedef struct sctp_shutdownhdr { __u32 cum_tsn_ack; -} sctp_shutdownhdr_t __attribute__((packed)); +} __attribute__((packed)) sctp_shutdownhdr_t; struct sctp_shutdown_chunk_t { sctp_chunkhdr_t chunk_hdr; sctp_shutdownhdr_t shutdown_hdr; -} __attribute__((packed)); - - +} __attribute__ ((packed)); /* RFC 2960. Section 3.3.10 Operation Error (ERROR) (9) */ @@ -377,12 +375,12 @@ typedef struct sctp_errhdr { __u16 cause; __u16 length; __u8 variable[0]; -} sctp_errhdr_t __attribute__((packed)); +} __attribute__((packed)) sctp_errhdr_t; typedef struct sctp_operr_chunk { sctp_chunkhdr_t chunk_hdr; sctp_errhdr_t err_hdr; -} sctp_operr_chunk_t __attribute__((packed)); +} __attribute__((packed)) sctp_operr_chunk_t; /* RFC 2960 3.3.10 - Operation Error * @@ -460,7 +458,7 @@ typedef struct sctp_ecnehdr { typedef struct sctp_ecne_chunk { sctp_chunkhdr_t chunk_hdr; sctp_ecnehdr_t ence_hdr; -} sctp_ecne_chunk_t __attribute__((packed)); +} __attribute__((packed)) sctp_ecne_chunk_t; /* RFC 2960. Appendix A. Explicit Congestion Notification. * Congestion Window Reduced (CWR) (13) @@ -472,7 +470,7 @@ typedef struct sctp_cwrhdr { typedef struct sctp_cwr_chunk { sctp_chunkhdr_t chunk_hdr; sctp_cwrhdr_t cwr_hdr; -} sctp_cwr_chunk_t __attribute__((packed)); +} __attribute__((packed)) sctp_cwr_chunk_t; /* * ADDIP Section 3.1 New Chunk Types @@ -513,16 +511,16 @@ typedef struct sctp_cwr_chunk { typedef struct sctp_addip_param { sctp_paramhdr_t param_hdr; __u32 crr_id; -}sctp_addip_param_t __attribute__((packed)); +} __attribute__((packed)) sctp_addip_param_t; typedef struct sctp_addiphdr { __u32 serial; __u8 params[0]; -} sctp_addiphdr_t __attribute__((packed)); +} __attribute__((packed)) sctp_addiphdr_t; typedef struct sctp_addip_chunk { sctp_chunkhdr_t chunk_hdr; sctp_addiphdr_t addip_hdr; -} sctp_addip_chunk_t __attribute__((packed)); +} __attribute__((packed)) sctp_addip_chunk_t; #endif /* __LINUX_SCTP_H__ */ diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 0d5b121f54a0..935be9d21b69 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -311,6 +311,7 @@ enum NET_TCP_FRTO=92, NET_TCP_LOW_LATENCY=93, NET_IPV4_IPFRAG_SECRET_INTERVAL=94, + NET_TCP_WESTWOOD=95, }; enum { @@ -360,6 +361,7 @@ enum NET_IPV4_CONF_MEDIUM_ID=14, NET_IPV4_CONF_NOXFRM=15, NET_IPV4_CONF_NOPOLICY=16, + NET_IPV4_CONF_FORCE_IGMP_VERSION=17, }; /* /proc/sys/net/ipv4/netfilter */ diff --git a/include/linux/tcp.h b/include/linux/tcp.h index d25e5bd21c4d..1b35358879ce 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -374,6 +374,20 @@ struct tcp_opt { __u32 frto_highmark; /* snd_nxt when RTO occurred */ unsigned long last_synq_overflow; + +/* TCP Westwood structure */ + struct { + __u32 bw_sample; /* bandwidth sample */ + __u32 bw_ns_est; /* first bandwidth estimation..not too smoothed 8) */ + __u32 bw_est; /* bandwidth estimate */ + __u32 rtt_win_sx; /* here starts a new evaluation... */ + __u32 bk; + __u32 snd_una; /* used for evaluating the number of acked bytes */ + __u32 cumul_ack; + __u32 accounted; + __u32 rtt; + __u32 rtt_min; /* minimum observed RTT */ + } westwood; }; /* WARNING: don't change the layout of the members in tcp_sock! */ diff --git a/include/net/irda/irlmp_frame.h b/include/net/irda/irlmp_frame.h index 779d34acc394..eb3ad158c023 100644 --- a/include/net/irda/irlmp_frame.h +++ b/include/net/irda/irlmp_frame.h @@ -40,7 +40,7 @@ #define CONTROL_BIT 0x80 -inline void irlmp_send_data_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap, +void irlmp_send_data_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap, int expedited, struct sk_buff *skb); void irlmp_send_lcf_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap, __u8 opcode, struct sk_buff *skb); diff --git a/include/net/irda/timer.h b/include/net/irda/timer.h index 739a89d3750d..61103a361d6e 100644 --- a/include/net/irda/timer.h +++ b/include/net/irda/timer.h @@ -74,19 +74,19 @@ typedef void (*TIMER_CALLBACK)(void *); void irda_start_timer(struct timer_list *ptimer, int timeout, void* data, TIMER_CALLBACK callback); -inline void irlap_start_slot_timer(struct irlap_cb *self, int timeout); -inline void irlap_start_query_timer(struct irlap_cb *self, int timeout); -inline void irlap_start_final_timer(struct irlap_cb *self, int timeout); -inline void irlap_start_wd_timer(struct irlap_cb *self, int timeout); -inline void irlap_start_backoff_timer(struct irlap_cb *self, int timeout); +void irlap_start_slot_timer(struct irlap_cb *self, int timeout); +void irlap_start_query_timer(struct irlap_cb *self, int timeout); +void irlap_start_final_timer(struct irlap_cb *self, int timeout); +void irlap_start_wd_timer(struct irlap_cb *self, int timeout); +void irlap_start_backoff_timer(struct irlap_cb *self, int timeout); void irlap_start_mbusy_timer(struct irlap_cb *self, int timeout); void irlap_stop_mbusy_timer(struct irlap_cb *); -inline void irlmp_start_watchdog_timer(struct lsap_cb *, int timeout); -inline void irlmp_start_discovery_timer(struct irlmp_cb *, int timeout); -inline void irlmp_start_idle_timer(struct lap_cb *, int timeout); -inline void irlmp_stop_idle_timer(struct lap_cb *self); +void irlmp_start_watchdog_timer(struct lsap_cb *, int timeout); +void irlmp_start_discovery_timer(struct irlmp_cb *, int timeout); +void irlmp_start_idle_timer(struct lap_cb *, int timeout); +void irlmp_stop_idle_timer(struct lap_cb *self); #endif diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 270523896c4d..35f600ba43ba 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -203,6 +203,7 @@ typedef long psched_tdiff_t; #define PSCHED_GET_TIME(stamp) do_gettimeofday(&(stamp)) #define PSCHED_US2JIFFIE(usecs) (((usecs)+(1000000/HZ-1))/(1000000/HZ)) +#define PSCHED_JIFFIE2US(delay) ((delay)*(1000000/HZ)) #define PSCHED_EXPORTLIST EXPORT_SYMBOL(psched_tod_diff); @@ -251,6 +252,7 @@ extern PSCHED_WATCHER psched_time_mark; #endif #define PSCHED_US2JIFFIE(delay) (((delay)+(1<<PSCHED_JSCALE)-1)>>PSCHED_JSCALE) +#define PSCHED_JIFFIE2US(delay) ((delay)<<PSCHED_JSCALE) #elif PSCHED_CLOCK_SOURCE == PSCHED_CPU @@ -261,6 +263,7 @@ extern int psched_clock_scale; EXPORT_SYMBOL(psched_clock_scale); #define PSCHED_US2JIFFIE(delay) (((delay)+psched_clock_per_hz-1)/psched_clock_per_hz) +#define PSCHED_JIFFIE2US(delay) ((delay)*psched_clock_per_hz) #ifdef CONFIG_X86_TSC diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 92394f3de76a..a36880e6733f 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -369,7 +369,7 @@ typedef struct sctp_sender_hb_info { struct sctp_paramhdr param_hdr; union sctp_addr daddr; unsigned long sent_at; -} sctp_sender_hb_info_t __attribute__((packed)); +} __attribute__((packed)) sctp_sender_hb_info_t; /* * RFC 2960 1.3.2 Sequenced Delivery within Streams diff --git a/include/net/tcp.h b/include/net/tcp.h index 4ef3b80fe541..55c5ea8f16ac 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -579,6 +579,7 @@ extern int sysctl_tcp_adv_win_scale; extern int sysctl_tcp_tw_reuse; extern int sysctl_tcp_frto; extern int sysctl_tcp_low_latency; +extern int sysctl_tcp_westwood; extern atomic_t tcp_memory_allocated; extern atomic_t tcp_sockets_allocated; @@ -738,7 +739,7 @@ DECLARE_SNMP_STAT(struct tcp_mib, tcp_statistics); #define TCP_ADD_STATS_BH(field, val) SNMP_ADD_STATS_BH(tcp_statistics, field, val) #define TCP_ADD_STATS_USER(field, val) SNMP_ADD_STATS_USER(tcp_statistics, field, val) -extern inline void tcp_put_port(struct sock *sk); +extern void tcp_put_port(struct sock *sk); extern void tcp_inherit_port(struct sock *sk, struct sock *child); extern void tcp_v4_err(struct sk_buff *skb, u32); @@ -2019,4 +2020,67 @@ struct tcp_iter_state { extern int tcp_proc_register(struct tcp_seq_afinfo *afinfo); extern void tcp_proc_unregister(struct tcp_seq_afinfo *afinfo); +/* TCP Westwood functions and constants */ + +#define TCP_WESTWOOD_INIT_RTT (20*HZ) /* maybe too conservative?! */ +#define TCP_WESTWOOD_RTT_MIN (HZ/20) /* 50ms */ + +static inline void tcp_westwood_update_rtt(struct tcp_opt *tp, __u32 rtt_seq) +{ + if (sysctl_tcp_westwood) + tp->westwood.rtt = rtt_seq; +} + +void __tcp_westwood_fast_bw(struct sock *, struct sk_buff *); +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) + __tcp_westwood_fast_bw(sk, skb); +} + +static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb) +{ + if (sysctl_tcp_westwood) + __tcp_westwood_slow_bw(sk, skb); +} + +static inline __u32 __tcp_westwood_bw_rttmin(const struct tcp_opt *tp) +{ + return max((tp->westwood.bw_est) * (tp->westwood.rtt_min) / + (__u32) (tp->mss_cache), + 2U); +} + +static inline __u32 tcp_westwood_bw_rttmin(const struct tcp_opt *tp) +{ + return sysctl_tcp_westwood ? __tcp_westwood_bw_rttmin(tp) : 0; +} + +static inline int tcp_westwood_ssthresh(struct tcp_opt *tp) +{ + __u32 ssthresh = 0; + + if (sysctl_tcp_westwood) { + ssthresh = __tcp_westwood_bw_rttmin(tp); + if (ssthresh) + tp->snd_ssthresh = ssthresh; + } + + return (ssthresh != 0); +} + +static inline int tcp_westwood_cwnd(struct tcp_opt *tp) +{ + __u32 cwnd = 0; + + if (sysctl_tcp_westwood) { + cwnd = __tcp_westwood_bw_rttmin(tp); + if (cwnd) + tp->snd_cwnd = cwnd; + } + + return (cwnd != 0); +} #endif /* _TCP_H */ |
