PERFORCE change 166266 for review
Andre Oppermann
andre at FreeBSD.org
Sun Jul 19 12:16:56 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166266
Change 166266 by andre at andre_flirtbox on 2009/07/19 12:15:56
IFC.
Affected files ...
.. //depot/projects/tcp_reass/amd64/amd64/pmap.c#9 integrate
.. //depot/projects/tcp_reass/arm/conf/AVILA#7 integrate
.. //depot/projects/tcp_reass/arm/conf/CAMBRIA#3 integrate
.. //depot/projects/tcp_reass/cam/ata/ata_da.c#2 integrate
.. //depot/projects/tcp_reass/geom/vinum/geom_vinum.c#4 integrate
.. //depot/projects/tcp_reass/i386/i386/pmap.c#8 integrate
.. //depot/projects/tcp_reass/net80211/ieee80211_freebsd.c#6 integrate
.. //depot/projects/tcp_reass/net80211/ieee80211_input.c#8 integrate
.. //depot/projects/tcp_reass/net80211/ieee80211_input.h#4 integrate
.. //depot/projects/tcp_reass/net80211/ieee80211_ioctl.h#7 integrate
.. //depot/projects/tcp_reass/netinet6/in6_mcast.c#5 integrate
.. //depot/projects/tcp_reass/nfsclient/nfs_vnops.c#10 integrate
.. //depot/projects/tcp_reass/vm/vm_page.c#9 integrate
Differences ...
==== //depot/projects/tcp_reass/amd64/amd64/pmap.c#9 (text+ko) ====
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.663 2009/07/12 23:31:20 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.664 2009/07/18 01:50:05 alc Exp $");
/*
* Manages physical address maps.
@@ -752,21 +752,6 @@
/* The PAT bit is different for PTE's and PDE's. */
pat_flag = is_pde ? PG_PDE_PAT : PG_PTE_PAT;
- /* If we don't support PAT, map extended modes to older ones. */
- if (!(cpu_feature & CPUID_PAT)) {
- switch (mode) {
- case PAT_UNCACHEABLE:
- case PAT_WRITE_THROUGH:
- case PAT_WRITE_BACK:
- break;
- case PAT_UNCACHED:
- case PAT_WRITE_COMBINING:
- case PAT_WRITE_PROTECTED:
- mode = PAT_UNCACHEABLE;
- break;
- }
- }
-
/* Map the caching mode to a PAT index. */
switch (mode) {
case PAT_UNCACHEABLE:
@@ -4295,7 +4280,9 @@
pa += PAGE_SIZE;
}
pmap_invalidate_range(kernel_pmap, va, tmpva);
- pmap_invalidate_cache();
+ /* If "Self Snoop" is supported, do nothing. */
+ if (!(cpu_feature & CPUID_SS))
+ pmap_invalidate_cache();
return ((void *)(va + offset));
}
@@ -4634,7 +4621,9 @@
*/
if (changed) {
pmap_invalidate_range(kernel_pmap, base, tmpva);
- pmap_invalidate_cache();
+ /* If "Self Snoop" is supported, do nothing. */
+ if (!(cpu_feature & CPUID_SS))
+ pmap_invalidate_cache();
}
return (error);
}
==== //depot/projects/tcp_reass/arm/conf/AVILA#7 (text+ko) ====
@@ -16,7 +16,7 @@
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
-# $FreeBSD: src/sys/arm/conf/AVILA,v 1.32 2009/05/27 16:16:56 thompsa Exp $
+# $FreeBSD: src/sys/arm/conf/AVILA,v 1.33 2009/07/17 18:35:45 rpaulo Exp $
ident AVILA
@@ -105,6 +105,7 @@
device wlan # 802.11 support
options IEEE80211_DEBUG
options IEEE80211_SUPPORT_TDMA
+options IEEE80211_SUPPORT_MESH
device wlan_wep # 802.11 WEP support
device wlan_ccmp # 802.11 CCMP support
device wlan_tkip # 802.11 TKIP support
==== //depot/projects/tcp_reass/arm/conf/CAMBRIA#3 (text+ko) ====
@@ -16,7 +16,7 @@
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
-# $FreeBSD: src/sys/arm/conf/CAMBRIA,v 1.11 2009/05/10 00:00:25 kuriyama Exp $
+# $FreeBSD: src/sys/arm/conf/CAMBRIA,v 1.12 2009/07/17 18:35:45 rpaulo Exp $
ident CAMBRIA
@@ -108,6 +108,7 @@
device wlan # 802.11 support
options IEEE80211_DEBUG
options IEEE80211_SUPPORT_TDMA
+options IEEE80211_SUPPORT_MESH
device wlan_wep # 802.11 WEP support
device wlan_ccmp # 802.11 CCMP support
device wlan_tkip # 802.11 TKIP support
==== //depot/projects/tcp_reass/cam/ata/ata_da.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.1 2009/07/10 08:18:08 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.2 2009/07/17 21:48:08 mav Exp $");
#include <sys/param.h>
@@ -275,7 +275,6 @@
if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) {
ccb = cam_periph_getccb(periph, /*priority*/1);
- ccb->ccb_h.ccb_state = ADA_CCB_DUMP;
cam_fill_ataio(&ccb->ataio,
1,
adadone,
@@ -289,7 +288,9 @@
ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0);
else
ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0);
- xpt_polled_action(ccb);
+ cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0,
+ /*sense_flags*/SF_RETRY_UA,
+ softc->disk->d_devstat);
if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
xpt_print(periph->path, "Synchronize cache failed\n");
==== //depot/projects/tcp_reass/geom/vinum/geom_vinum.c#4 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum.c,v 1.28 2009/05/06 19:34:32 lulf Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum.c,v 1.29 2009/07/18 11:12:48 lulf Exp $");
#include <sys/param.h>
#include <sys/bio.h>
@@ -133,10 +133,12 @@
error = ENXIO;
gp = pp->geom;
sc = gp->softc;
- if (dw > 0 && dr == 0)
- dr = 1;
- else if (dw < 0 && dr == 0)
- dr = -1;
+ /*
+ * We want to modify the read count with the write count in case we have
+ * plexes in a RAID-5 organization.
+ */
+ dr += dw;
+
LIST_FOREACH(d, &sc->drives, drive) {
if (d->consumer == NULL)
continue;
==== //depot/projects/tcp_reass/i386/i386/pmap.c#8 (text+ko) ====
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.640 2009/07/12 23:31:20 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.641 2009/07/18 01:50:05 alc Exp $");
/*
* Manages physical address maps.
@@ -4420,7 +4420,9 @@
pa += PAGE_SIZE;
}
pmap_invalidate_range(kernel_pmap, va, tmpva);
- pmap_invalidate_cache();
+ /* If "Self Snoop" is supported, do nothing. */
+ if (!(cpu_feature & CPUID_SS))
+ pmap_invalidate_cache();
return ((void *)(va + offset));
}
@@ -4467,7 +4469,9 @@
* Flush CPU caches to make sure any data isn't cached that shouldn't
* be, etc.
*/
- pmap_invalidate_cache();
+ /* If "Self Snoop" is supported, do nothing. */
+ if (!(cpu_feature & CPUID_SS))
+ pmap_invalidate_cache();
}
int
@@ -4526,7 +4530,9 @@
* be, etc.
*/
pmap_invalidate_range(kernel_pmap, base, tmpva);
- pmap_invalidate_cache();
+ /* If "Self Snoop" is supported, do nothing. */
+ if (!(cpu_feature & CPUID_SS))
+ pmap_invalidate_cache();
return (0);
}
==== //depot/projects/tcp_reass/net80211/ieee80211_freebsd.c#6 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.36 2009/06/05 23:10:30 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.37 2009/07/18 20:19:53 sam Exp $");
/*
* IEEE 802.11 support (FreeBSD-specific code)
@@ -53,6 +53,7 @@
#include <net/route.h>
#include <net80211/ieee80211_var.h>
+#include <net80211/ieee80211_input.h>
SYSCTL_NODE(_net, OID_AUTO, wlan, CTLFLAG_RD, 0, "IEEE 80211 parameters");
@@ -408,6 +409,43 @@
return m;
}
+/*
+ * Re-align the payload in the mbuf. This is mainly used (right now)
+ * to handle IP header alignment requirements on certain architectures.
+ */
+struct mbuf *
+ieee80211_realign(struct ieee80211vap *vap, struct mbuf *m, size_t align)
+{
+ int pktlen, space;
+ struct mbuf *n;
+
+ pktlen = m->m_pkthdr.len;
+ space = pktlen + align;
+ if (space < MINCLSIZE)
+ n = m_gethdr(M_DONTWAIT, MT_DATA);
+ else {
+ n = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR,
+ space <= MCLBYTES ? MCLBYTES :
+#if MJUMPAGESIZE != MCLBYTES
+ space <= MJUMPAGESIZE ? MJUMPAGESIZE :
+#endif
+ space <= MJUM9BYTES ? MJUM9BYTES : MJUM16BYTES);
+ }
+ if (__predict_true(n != NULL)) {
+ m_move_pkthdr(n, m);
+ n->m_data = (caddr_t)(ALIGN(n->m_data + align) - align);
+ m_copydata(m, 0, pktlen, mtod(n, caddr_t));
+ n->m_len = pktlen;
+ } else {
+ IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY,
+ mtod(m, const struct ieee80211_frame *), NULL,
+ "%s", "no mbuf to realign");
+ vap->iv_stats.is_rx_badalign++;
+ }
+ m_freem(m);
+ return n;
+}
+
int
ieee80211_add_callback(struct mbuf *m,
void (*func)(struct ieee80211_node *, void *, int), void *arg)
==== //depot/projects/tcp_reass/net80211/ieee80211_input.c#8 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.131 2009/07/11 15:02:45 rpaulo Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.132 2009/07/18 20:19:53 sam Exp $");
#include "opt_wlan.h"
@@ -285,53 +285,9 @@
}
#ifdef ALIGNED_POINTER
if (!ALIGNED_POINTER(mtod(m, caddr_t) + sizeof(*eh), uint32_t)) {
- struct mbuf *n, *n0, **np;
- caddr_t newdata;
- int off, pktlen;
-
- n0 = NULL;
- np = &n0;
- off = 0;
- pktlen = m->m_pkthdr.len;
- while (pktlen > off) {
- if (n0 == NULL) {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
- if (n == NULL) {
- m_freem(m);
- return NULL;
- }
- M_MOVE_PKTHDR(n, m);
- n->m_len = MHLEN;
- } else {
- MGET(n, M_DONTWAIT, MT_DATA);
- if (n == NULL) {
- m_freem(m);
- m_freem(n0);
- return NULL;
- }
- n->m_len = MLEN;
- }
- if (pktlen - off >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
- if (n->m_flags & M_EXT)
- n->m_len = n->m_ext.ext_size;
- }
- if (n0 == NULL) {
- newdata =
- (caddr_t)ALIGN(n->m_data + sizeof(*eh)) -
- sizeof(*eh);
- n->m_len -= newdata - n->m_data;
- n->m_data = newdata;
- }
- if (n->m_len > pktlen - off)
- n->m_len = pktlen - off;
- m_copydata(m, off, n->m_len, mtod(n, caddr_t));
- off += n->m_len;
- *np = n;
- np = &n->m_next;
- }
- m_freem(m);
- m = n0;
+ m = ieee80211_realign(vap, m, sizeof(*eh));
+ if (m == NULL)
+ return NULL;
}
#endif /* ALIGNED_POINTER */
if (llc != NULL) {
==== //depot/projects/tcp_reass/net80211/ieee80211_input.h#4 (text+ko) ====
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/net80211/ieee80211_input.h,v 1.3 2009/03/24 20:39:08 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_input.h,v 1.4 2009/07/18 20:19:53 sam Exp $
*/
#ifndef _NET80211_IEEE80211_INPUT_H_
#define _NET80211_IEEE80211_INPUT_H_
@@ -146,6 +146,7 @@
struct ieee80211_node *, struct mbuf *);
struct mbuf *ieee80211_defrag(struct ieee80211_node *,
struct mbuf *, int);
+struct mbuf *ieee80211_realign(struct ieee80211vap *, struct mbuf *, size_t);
struct mbuf *ieee80211_decap(struct ieee80211vap *, struct mbuf *, int);
struct mbuf *ieee80211_decap1(struct mbuf *, int *);
int ieee80211_setup_rates(struct ieee80211_node *ni,
==== //depot/projects/tcp_reass/net80211/ieee80211_ioctl.h#7 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.38 2009/07/11 15:02:45 rpaulo Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.39 2009/07/18 20:19:53 sam Exp $
*/
#ifndef _NET80211_IEEE80211_IOCTL_H_
#define _NET80211_IEEE80211_IOCTL_H_
@@ -235,8 +235,9 @@
uint32_t is_hwmp_wrongseq; /* wrong hwmp seq no. */
uint32_t is_hwmp_rootreqs; /* root PREQs sent */
uint32_t is_hwmp_rootrann; /* root RANNs sent */
+ uint32_t is_rx_badalign; /* dropped 'cuz misaligned */
- uint32_t is_spare[16];
+ uint32_t is_spare[15];
};
/*
==== //depot/projects/tcp_reass/netinet6/in6_mcast.c#5 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet6/in6_mcast.c,v 1.7 2009/07/14 22:48:30 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet6/in6_mcast.c,v 1.8 2009/07/18 17:38:18 bms Exp $");
#include "opt_inet6.h"
@@ -2160,14 +2160,24 @@
if (error)
return (EADDRNOTAVAIL);
/*
+ * Some badly behaved applications don't pass an ifindex
+ * or a scope ID, which is an API violation. In this case,
+ * perform a lookup as per a v6 join.
+ *
* XXX For now, stomp on zone ID for the corner case.
* This is not the 'KAME way', but we need to see the ifp
* directly until such time as this implementation is
* refactored, assuming the scope IDs are the way to go.
*/
ifindex = ntohs(gsa->sin6.sin6_addr.s6_addr16[1]);
- KASSERT(ifindex != 0, ("%s: bad zone ID", __func__));
- ifp = ifnet_byindex(ifindex);
+ if (ifindex == 0) {
+ CTR2(KTR_MLD, "%s: warning: no ifindex, looking up "
+ "ifp for group %s.", __func__,
+ ip6_sprintf(ip6tbuf, &gsa->sin6.sin6_addr));
+ ifp = in6p_lookup_mcast_ifp(inp, &gsa->sin6);
+ } else {
+ ifp = ifnet_byindex(ifindex);
+ }
if (ifp == NULL)
return (EADDRNOTAVAIL);
}
==== //depot/projects/tcp_reass/nfsclient/nfs_vnops.c#10 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vnops.c,v 1.316 2009/07/14 22:54:29 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vnops.c,v 1.317 2009/07/17 19:38:07 rmacklem Exp $");
/*
* vnode op calls for Sun NFS version 2 and 3
@@ -1061,7 +1061,8 @@
if (error == 0)
newvp = NFSTOV(np);
vfs_unbusy(mp);
- vn_lock(dvp, ltype | LK_RETRY);
+ if (newvp != dvp)
+ vn_lock(dvp, ltype | LK_RETRY);
if (dvp->v_iflag & VI_DOOMED) {
if (error == 0) {
if (newvp == dvp)
==== //depot/projects/tcp_reass/vm/vm_page.c#9 (text+ko) ====
@@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_page.c,v 1.379 2009/07/12 23:31:20 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_page.c,v 1.380 2009/07/18 01:50:05 alc Exp $");
#include "opt_vm.h"
@@ -1161,7 +1161,9 @@
mtx_unlock(&vm_page_queue_free_mtx);
if (object != NULL) {
- if (object->memattr != VM_MEMATTR_DEFAULT)
+ /* Ignore device objects; the pager sets "memattr" for them. */
+ if (object->memattr != VM_MEMATTR_DEFAULT &&
+ object->type != OBJT_DEVICE)
pmap_page_set_memattr(m, object->memattr);
vm_page_insert(m, object, pindex);
} else
More information about the p4-projects
mailing list