From owner-p4-projects@FreeBSD.ORG Mon Aug 25 00:48:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 04EC81065691; Mon, 25 Aug 2008 00:48:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC997106568A for ; Mon, 25 Aug 2008 00:48:43 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C9F028FC0A for ; Mon, 25 Aug 2008 00:48:43 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7P0mhsF099475 for ; Mon, 25 Aug 2008 00:48:43 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7P0mhBV099473 for perforce@freebsd.org; Mon, 25 Aug 2008 00:48:43 GMT (envelope-from julian@freebsd.org) Date: Mon, 25 Aug 2008 00:48:43 GMT Message-Id: <200808250048.m7P0mhBV099473@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Cc: Subject: PERFORCE change 148311 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2008 00:48:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=148311 Change 148311 by julian@julian_trafmon1 on 2008/08/25 00:48:28 loop back changes Affected files ... .. //depot/projects/vimage-commit3/src/sys/dev/wpi/if_wpi.c#3 integrate .. //depot/projects/vimage-commit3/src/sys/netinet/tcp_syncache.c#9 integrate .. //depot/projects/vimage-commit3/src/sys/netinet/tcp_syncache.h#3 integrate Differences ... ==== //depot/projects/vimage-commit3/src/sys/dev/wpi/if_wpi.c#3 (text+ko) ==== @@ -19,7 +19,7 @@ #define VERSION "20071127" #include -__FBSDID("$FreeBSD: src/sys/dev/wpi/if_wpi.c,v 1.16 2008/06/23 15:40:56 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/wpi/if_wpi.c,v 1.17 2008/08/24 22:42:39 benjsc Exp $"); /* * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters. @@ -148,10 +148,10 @@ { 0x8086, 0x4222, 0x0, "Intel(R) PRO/Wireless 3945ABG" }, { 0x8086, 0x4227, 0x0, "Intel(R) PRO/Wireless 3945ABG" }, /* The below entries only support BG */ - { 0x8086, 0x4222, 0x1005, "Intel(R) PRO/Wireless 3945AB" }, - { 0x8086, 0x4222, 0x1034, "Intel(R) PRO/Wireless 3945AB" }, - { 0x8086, 0x4222, 0x1014, "Intel(R) PRO/Wireless 3945AB" }, - { 0x8086, 0x4222, 0x1044, "Intel(R) PRO/Wireless 3945AB" }, + { 0x8086, 0x4222, 0x1005, "Intel(R) PRO/Wireless 3945BG" }, + { 0x8086, 0x4222, 0x1034, "Intel(R) PRO/Wireless 3945BG" }, + { 0x8086, 0x4227, 0x1014, "Intel(R) PRO/Wireless 3945BG" }, + { 0x8086, 0x4222, 0x1044, "Intel(R) PRO/Wireless 3945BG" }, { 0, 0, 0, NULL } }; ==== //depot/projects/vimage-commit3/src/sys/netinet/tcp_syncache.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/tcp_syncache.c,v 1.154 2008/08/23 14:22:12 bz Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/tcp_syncache.c,v 1.155 2008/08/25 00:33:30 julian Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -108,67 +108,12 @@ &tcp_syncookiesonly, 0, "Use only TCP SYN cookies"); -#define SYNCOOKIE_SECRET_SIZE 8 /* dwords */ -#define SYNCOOKIE_LIFETIME 16 /* seconds */ - -struct syncache { - TAILQ_ENTRY(syncache) sc_hash; - struct in_conninfo sc_inc; /* addresses */ - int sc_rxttime; /* retransmit time */ - u_int16_t sc_rxmits; /* retransmit counter */ - - u_int32_t sc_tsreflect; /* timestamp to reflect */ - u_int32_t sc_ts; /* our timestamp to send */ - u_int32_t sc_tsoff; /* ts offset w/ syncookies */ - u_int32_t sc_flowlabel; /* IPv6 flowlabel */ - tcp_seq sc_irs; /* seq from peer */ - tcp_seq sc_iss; /* our ISS */ - struct mbuf *sc_ipopts; /* source route */ - - u_int16_t sc_peer_mss; /* peer's MSS */ - u_int16_t sc_wnd; /* advertised window */ - u_int8_t sc_ip_ttl; /* IPv4 TTL */ - u_int8_t sc_ip_tos; /* IPv4 TOS */ - u_int8_t sc_requested_s_scale:4, - sc_requested_r_scale:4; - u_int16_t sc_flags; -#define SCF_NOOPT 0x01 /* no TCP options */ -#define SCF_WINSCALE 0x02 /* negotiated window scaling */ -#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */ - /* MSS is implicit */ -#define SCF_UNREACH 0x10 /* icmp unreachable received */ -#define SCF_SIGNATURE 0x20 /* send MD5 digests */ -#define SCF_SACK 0x80 /* send SACK option */ -#define SCF_ECN 0x100 /* send ECN setup packet */ -#ifndef TCP_OFFLOAD_DISABLE - struct toe_usrreqs *sc_tu; /* TOE operations */ - void *sc_toepcb; /* TOE protocol block */ -#endif -#ifdef MAC - struct label *sc_label; /* MAC label reference */ -#endif - struct ucred *sc_cred; /* cred cache for jail checks */ -}; - #ifdef TCP_OFFLOAD_DISABLE #define TOEPCB_ISSET(sc) (0) #else #define TOEPCB_ISSET(sc) ((sc)->sc_toepcb != NULL) #endif - -struct syncache_head { - struct mtx sch_mtx; - TAILQ_HEAD(sch_head, syncache) sch_bucket; - struct callout sch_timer; - int sch_nextc; - u_int sch_length; - u_int sch_oddeven; - u_int32_t sch_secbits_odd[SYNCOOKIE_SECRET_SIZE]; - u_int32_t sch_secbits_even[SYNCOOKIE_SECRET_SIZE]; - u_int sch_reseed; /* time_uptime, seconds */ -}; - static void syncache_drop(struct syncache *, struct syncache_head *); static void syncache_free(struct syncache *); static void syncache_insert(struct syncache *, struct syncache_head *); @@ -197,17 +142,6 @@ #define TCP_SYNCACHE_HASHSIZE 512 #define TCP_SYNCACHE_BUCKETLIMIT 30 -struct tcp_syncache { - struct syncache_head *hashbase; - uma_zone_t zone; - u_int hashsize; - u_int hashmask; - u_int bucket_limit; - u_int cache_count; /* XXX: unprotected */ - u_int cache_limit; - u_int rexmt_limit; - u_int hash_secret; -}; static struct tcp_syncache tcp_syncache; SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache"); ==== //depot/projects/vimage-commit3/src/sys/netinet/tcp_syncache.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95 - * $FreeBSD: src/sys/netinet/tcp_syncache.h,v 1.3 2008/07/21 02:11:06 kmacy Exp $ + * $FreeBSD: src/sys/netinet/tcp_syncache.h,v 1.4 2008/08/25 00:33:30 julian Exp $ */ #ifndef _NETINET_TCP_SYNCACHE_H_ @@ -51,5 +51,71 @@ int syncache_pcbcount(void); int syncache_pcblist(struct sysctl_req *req, int max_pcbs, int *pcbs_exported); +struct syncache { + TAILQ_ENTRY(syncache) sc_hash; + struct in_conninfo sc_inc; /* addresses */ + int sc_rxttime; /* retransmit time */ + u_int16_t sc_rxmits; /* retransmit counter */ + + u_int32_t sc_tsreflect; /* timestamp to reflect */ + u_int32_t sc_ts; /* our timestamp to send */ + u_int32_t sc_tsoff; /* ts offset w/ syncookies */ + u_int32_t sc_flowlabel; /* IPv6 flowlabel */ + tcp_seq sc_irs; /* seq from peer */ + tcp_seq sc_iss; /* our ISS */ + struct mbuf *sc_ipopts; /* source route */ + + u_int16_t sc_peer_mss; /* peer's MSS */ + u_int16_t sc_wnd; /* advertised window */ + u_int8_t sc_ip_ttl; /* IPv4 TTL */ + u_int8_t sc_ip_tos; /* IPv4 TOS */ + u_int8_t sc_requested_s_scale:4, + sc_requested_r_scale:4; + u_int16_t sc_flags; +#define SCF_NOOPT 0x01 /* no TCP options */ +#define SCF_WINSCALE 0x02 /* negotiated window scaling */ +#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */ + /* MSS is implicit */ +#define SCF_UNREACH 0x10 /* icmp unreachable received */ +#define SCF_SIGNATURE 0x20 /* send MD5 digests */ +#define SCF_SACK 0x80 /* send SACK option */ +#define SCF_ECN 0x100 /* send ECN setup packet */ +#ifndef TCP_OFFLOAD_DISABLE + struct toe_usrreqs *sc_tu; /* TOE operations */ + void *sc_toepcb; /* TOE protocol block */ +#endif +#ifdef MAC + struct label *sc_label; /* MAC label reference */ +#endif + struct ucred *sc_cred; /* cred cache for jail checks */ +}; + +#define SYNCOOKIE_SECRET_SIZE 8 /* dwords */ +#define SYNCOOKIE_LIFETIME 16 /* seconds */ + +struct syncache_head { + struct mtx sch_mtx; + TAILQ_HEAD(sch_head, syncache) sch_bucket; + struct callout sch_timer; + int sch_nextc; + u_int sch_length; + u_int sch_oddeven; + u_int32_t sch_secbits_odd[SYNCOOKIE_SECRET_SIZE]; + u_int32_t sch_secbits_even[SYNCOOKIE_SECRET_SIZE]; + u_int sch_reseed; /* time_uptime, seconds */ +}; + +struct tcp_syncache { + struct syncache_head *hashbase; + uma_zone_t zone; + u_int hashsize; + u_int hashmask; + u_int bucket_limit; + u_int cache_count; /* XXX: unprotected */ + u_int cache_limit; + u_int rexmt_limit; + u_int hash_secret; +}; + #endif /* _KERNEL */ -#endif /* _NETINET_TCP_SYNCACHE_H_ */ +#endif /* !_NETINET_TCP_SYNCACHE_H_ */