Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Apr 2012 14:51:04 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r233876 - in projects/pf/head/sys: amd64/conf contrib/pf/net i386/conf ofed/drivers/infiniband/ulp/ipoib
Message-ID:  <201204041451.q34Ep4u6008802@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Apr  4 14:51:04 2012
New Revision: 233876
URL: http://svn.freebsd.org/changeset/base/233876

Log:
  Merge head r233864 through r233874.

Modified:
  projects/pf/head/sys/amd64/conf/NOTES
  projects/pf/head/sys/contrib/pf/net/if_pfsync.c
  projects/pf/head/sys/i386/conf/NOTES
  projects/pf/head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
Directory Properties:
  projects/pf/head/   (props changed)
  projects/pf/head/sys/   (props changed)
  projects/pf/head/sys/contrib/pf/   (props changed)

Modified: projects/pf/head/sys/amd64/conf/NOTES
==============================================================================
--- projects/pf/head/sys/amd64/conf/NOTES	Wed Apr  4 14:50:21 2012	(r233875)
+++ projects/pf/head/sys/amd64/conf/NOTES	Wed Apr  4 14:51:04 2012	(r233876)
@@ -298,18 +298,18 @@ options 	DRM_DEBUG	# Include debug print
 # wpi:	Intel 3945ABG Wireless LAN controller
 #	Requires the wpi firmware module
 
-device		ed
+device		ed		# NE[12]000, SMC Ultra, 3c503, DS8390 cards
 options 	ED_3C503
 options 	ED_HPP
 options 	ED_SIC
-device		ipw
-device		iwi
-device		iwn
-device		mwl
-device		nfe
-device		nve
+device		ipw		# Intel 2100 wireless NICs.
+device		iwi		# Intel 2200BG/2225BG/2915ABG wireless NICs.
+device		iwn		# Intel 4965/1000/5000/6000 wireless NICs.
+device		mwl		# Marvell 88W8363 802.11n wireless NICs.
+device		nfe		# nVidia nForce MCP on-board Ethernet
+device		nve		# nVidia nForce MCP on-board Ethernet Networking
 device		sfxge
-device		wpi
+device		wpi		# Intel 3945ABG wireless NICs.
 
 # IEEE 802.11 adapter firmware modules
 

Modified: projects/pf/head/sys/contrib/pf/net/if_pfsync.c
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/if_pfsync.c	Wed Apr  4 14:50:21 2012	(r233875)
+++ projects/pf/head/sys/contrib/pf/net/if_pfsync.c	Wed Apr  4 14:51:04 2012	(r233876)
@@ -51,6 +51,7 @@
  * 1.146 - bzero() mbuf before sparsely filling it with data
  * 1.170 - SIOCSIFMTU checks
  * 1.126, 1.142 - deferred packets processing
+ * 1.173 - correct expire time processing
  */
 
 #include "opt_inet.h"
@@ -508,11 +509,16 @@ pfsync_state_import(struct pfsync_state 
 	st->creation = time_uptime - ntohl(sp->creation);
 	st->expire = time_second;
 	if (sp->expire) {
-		/* XXX No adaptive scaling. */
-		st->expire -= r->timeout[sp->timeout] - ntohl(sp->expire);
+		uint32_t timeout;
+
+		timeout = r->timeout[sp->timeout];
+		if (!timeout)
+			timeout = pf_default_rule.timeout[sp->timeout];
+
+		/* sp->expire may have been adaptively scaled by export. */
+		st->expire -= timeout - ntohl(sp->expire);
 	}
 
-	st->expire = ntohl(sp->expire) + time_second;
 	st->direction = sp->direction;
 	st->log = sp->log;
 	st->timeout = sp->timeout;
@@ -899,7 +905,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, st
 		pfsync_alloc_scrub_memory(&sp->dst, &st->dst);
 		pf_state_peer_ntoh(&sp->src, &st->src);
 		pf_state_peer_ntoh(&sp->dst, &st->dst);
-		st->expire = ntohl(sp->expire) + time_second;
+		st->expire = time_second;
 		st->timeout = sp->timeout;
 		st->pfsync_time = time_uptime;
 		PF_STATE_UNLOCK(st);
@@ -988,7 +994,7 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, 
 		pfsync_alloc_scrub_memory(&up->dst, &st->dst);
 		pf_state_peer_ntoh(&up->src, &st->src);
 		pf_state_peer_ntoh(&up->dst, &st->dst);
-		st->expire = ntohl(up->expire) + time_second;
+		st->expire = time_second;
 		st->timeout = up->timeout;
 		st->pfsync_time = time_uptime;
 		PF_STATE_UNLOCK(st);
@@ -1427,12 +1433,6 @@ pfsync_out_upd_c(struct pf_state *st, st
 	pf_state_peer_hton(&st->src, &up->src);
 	pf_state_peer_hton(&st->dst, &up->dst);
 	up->creatorid = st->creatorid;
-
-	up->expire = pf_state_expires(st);
-	if (up->expire <= time_second)
-		up->expire = htonl(0);
-	else
-		up->expire = htonl(up->expire - time_second);
 	up->timeout = st->timeout;
 
 	return (sizeof(*up));

Modified: projects/pf/head/sys/i386/conf/NOTES
==============================================================================
--- projects/pf/head/sys/i386/conf/NOTES	Wed Apr  4 14:50:21 2012	(r233875)
+++ projects/pf/head/sys/i386/conf/NOTES	Wed Apr  4 14:51:04 2012	(r233876)
@@ -574,7 +574,7 @@ hint.mse.0.irq="5"
 
 device		ce
 device		cp
-device		cs
+device		cs		# Crystal Semiconductor CS89x0 NIC
 hint.cs.0.at="isa"
 hint.cs.0.port="0x300"
 device		ctau
@@ -583,7 +583,7 @@ hint.ctau.0.port="0x240"
 hint.ctau.0.irq="15"
 hint.ctau.0.drq="7"
 #options 	NETGRAPH_CRONYX		# Enable NETGRAPH support for Cronyx adapter(s)
-device		ed
+device		ed		# NE[12]000, SMC Ultra, 3c503, DS8390 cards
 options 	ED_3C503
 options 	ED_HPP
 options 	ED_SIC
@@ -591,21 +591,22 @@ hint.ed.0.at="isa"
 hint.ed.0.port="0x280"
 hint.ed.0.irq="5"
 hint.ed.0.maddr="0xd8000"
-device		ie			# Hints only required for Starlan
+device		ie		# EtherExpress 8/16, 3C507, StarLAN 10 etc.
+# Hints only required for Starlan
 hint.ie.2.at="isa"
 hint.ie.2.port="0x300"
 hint.ie.2.irq="5"
 hint.ie.2.maddr="0xd0000"
-device		ipw
-device		iwi
-device		iwn
+device		ipw		# Intel 2100 wireless NICs.
+device		iwi		# Intel 2200BG/2225BG/2915ABG wireless NICs.
+device		iwn		# Intel 4965/1000/5000/6000 wireless NICs.
 # Hint for the i386-only ISA front-end of le(4).
 hint.le.0.at="isa"
 hint.le.0.port="0x280"
 hint.le.0.irq="10"
 hint.le.0.drq="0"
-device		mwl
-device		nfe		# nVidia nForce MCP on-board Ethernet Networking
+device		mwl		# Marvell 88W8363 802.11n wireless NICs.
+device		nfe		# nVidia nForce MCP on-board Ethernet
 device		nve		# nVidia nForce MCP on-board Ethernet Networking
 device		sbni
 hint.sbni.0.at="isa"
@@ -617,7 +618,7 @@ hint.wl.0.at="isa"
 hint.wl.0.port="0x300"
 options 	WLCACHE		# enables the signal-strength cache
 options 	WLDEBUG		# enables verbose debugging output
-device		wpi
+device		wpi		# Intel 3945ABG wireless NICs.
 
 # IEEE 802.11 adapter firmware modules
 

Modified: projects/pf/head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
==============================================================================
--- projects/pf/head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c	Wed Apr  4 14:50:21 2012	(r233875)
+++ projects/pf/head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c	Wed Apr  4 14:51:04 2012	(r233876)
@@ -876,7 +876,7 @@ ipoib_intf_alloc(const char *name)
 	dev->if_output = ipoib_output;
 	dev->if_input = ipoib_input;
 	dev->if_resolvemulti = ipoib_resolvemulti;
-	dev->if_baudrate = IF_Gbps(10LL);
+	dev->if_baudrate = IF_Gbps(10UL);
 	dev->if_broadcastaddr = priv->broadcastaddr;
 	dev->if_snd.ifq_maxlen = ipoib_sendq_size * 2;
 	sdl = (struct sockaddr_dl *)dev->if_addr->ifa_addr;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204041451.q34Ep4u6008802>