From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 14 15:35:44 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E265B1065674; Tue, 14 Dec 2010 15:35:44 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B54608FC15; Tue, 14 Dec 2010 15:35:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBEFZiLO022620; Tue, 14 Dec 2010 15:35:44 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBEFZia3022618; Tue, 14 Dec 2010 15:35:44 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201012141535.oBEFZia3022618@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 14 Dec 2010 15:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216435 - stable/7/lib/csu/ia64 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 15:35:45 -0000 Author: tijl Date: Tue Dec 14 15:35:44 2010 New Revision: 216435 URL: http://svn.freebsd.org/changeset/base/216435 Log: MFC r216351: Add a .note.ABI-tag section to ia64 startup files by linking crtbrand.c in crt1.o. On other architectures crtbrand.c is included from crt1.c, but that's not a C source code file on ia64. Instead it is compiled separately and included in crt1.o using incremental linking. Approved by: re (kensmith), kib (mentor) Modified: stable/7/lib/csu/ia64/Makefile Directory Properties: stable/7/lib/csu/ (props changed) Modified: stable/7/lib/csu/ia64/Makefile ============================================================================== --- stable/7/lib/csu/ia64/Makefile Tue Dec 14 15:33:59 2010 (r216434) +++ stable/7/lib/csu/ia64/Makefile Tue Dec 14 15:35:44 2010 (r216435) @@ -2,22 +2,43 @@ .PATH: ${.CURDIR}/../common -SRCS= crt1.S crti.S crtn.S +SRCS= crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -Wall -Wno-unused \ - -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +OBJS+= crt1.o gcrt1.o Scrt1.o +CFLAGS+= -Wall -Wno-unused all: ${OBJS} CLEANFILES= ${OBJS} +CLEANFILES+= crt1_.o gcrt1_.o Scrt1_.o +CLEANFILES+= crtbrand.o gcrtbrand.o Scrtbrand.o -gcrt1.o: crt1.S - ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.ALLSRC} +crt1_.o: crt1.S + ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC} -Scrt1.o: crt1.S - ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.ALLSRC} +crtbrand.o: crtbrand.c + ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC} + +crt1.o: crt1_.o crtbrand.o + ${LD} ${LDFLAGS} -r -o ${.TARGET} crt1_.o crtbrand.o + +gcrt1_.o: crt1.S + ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.ALLSRC} + +gcrtbrand.o: crtbrand.c + ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.ALLSRC} + +gcrt1.o: gcrt1_.o gcrtbrand.o + ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC} + +Scrt1_.o: crt1.S + ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.ALLSRC} + +Scrtbrand.o: crtbrand.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.ALLSRC} + +Scrt1.o: Scrt1_.o Scrtbrand.o + ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC} realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 14 20:00:55 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7D71106564A; Tue, 14 Dec 2010 20:00:55 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B50208FC14; Tue, 14 Dec 2010 20:00:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBEK0tC3028778; Tue, 14 Dec 2010 20:00:55 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBEK0tOO028776; Tue, 14 Dec 2010 20:00:55 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201012142000.oBEK0tOO028776@svn.freebsd.org> From: Jack F Vogel Date: Tue, 14 Dec 2010 20:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216441 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 20:00:55 -0000 Author: jfv Date: Tue Dec 14 20:00:55 2010 New Revision: 216441 URL: http://svn.freebsd.org/changeset/base/216441 Log: MFC r216172, r216176 Correct the RX discard and refresh_mbuf logic to match igb, the old discard code could cause panics due to a bad pointer, now simply have discard always free mbufs and depend on refresh. In the refresh code, make sure the mbuf and soft buf struct are properly reset. Approved by: re Modified: stable/7/sys/dev/e1000/if_em.c Modified: stable/7/sys/dev/e1000/if_em.c ============================================================================== --- stable/7/sys/dev/e1000/if_em.c Tue Dec 14 19:59:39 2010 (r216440) +++ stable/7/sys/dev/e1000/if_em.c Tue Dec 14 20:00:55 2010 (r216441) @@ -516,7 +516,7 @@ em_attach(device_t dev) /* Sysctl for setting the interface flow control */ em_set_flow_cntrl(adapter, "flow_control", - "max number of rx packets to process", + "configure flow control", &adapter->fc_setting, em_fc_setting); /* @@ -3595,46 +3595,43 @@ em_refresh_mbufs(struct rx_ring *rxr, in cleaned = -1; while (i != limit) { rxbuf = &rxr->rx_buffers[i]; - /* - ** Just skip entries with a buffer, - ** they can only be due to an error - ** and are to be reused. - */ - if (rxbuf->m_head != NULL) - goto reuse; - m = m_getjcl(M_DONTWAIT, MT_DATA, - M_PKTHDR, adapter->rx_mbuf_sz); - /* - ** If we have a temporary resource shortage - ** that causes a failure, just abort refresh - ** for now, we will return to this point when - ** reinvoked from em_rxeof. - */ - if (m == NULL) - goto update; + if (rxbuf->m_head == NULL) { + m = m_getjcl(M_DONTWAIT, MT_DATA, + M_PKTHDR, adapter->rx_mbuf_sz); + /* + ** If we have a temporary resource shortage + ** that causes a failure, just abort refresh + ** for now, we will return to this point when + ** reinvoked from em_rxeof. + */ + if (m == NULL) + goto update; + } else + m = rxbuf->m_head; + m->m_len = m->m_pkthdr.len = adapter->rx_mbuf_sz; + m->m_flags |= M_PKTHDR; + m->m_data = m->m_ext.ext_buf; /* Use bus_dma machinery to setup the memory mapping */ error = bus_dmamap_load_mbuf_sg(rxr->rxtag, rxbuf->map, m, segs, &nsegs, BUS_DMA_NOWAIT); if (error != 0) { + printf("Refresh mbufs: hdr dmamap load" + " failure - %d\n", error); m_free(m); + rxbuf->m_head = NULL; goto update; } - - /* If nsegs is wrong then the stack is corrupt. */ - KASSERT(nsegs == 1, ("Too many segments returned!")); - + rxbuf->m_head = m; bus_dmamap_sync(rxr->rxtag, rxbuf->map, BUS_DMASYNC_PREREAD); - rxbuf->m_head = m; rxr->rx_base[i].buffer_addr = htole64(segs[0].ds_addr); -reuse: + cleaned = i; /* Calculate next index */ if (++i == adapter->num_rx_desc) i = 0; - /* This is the work marker for refresh */ rxr->next_to_refresh = i; } update: @@ -4052,8 +4049,8 @@ em_rxeof(struct rx_ring *rxr, int count, len = le16toh(cur->length); eop = (status & E1000_RXD_STAT_EOP) != 0; - if ((rxr->discard == TRUE) || (cur->errors & - E1000_RXD_ERR_FRAME_ERR_MASK)) { + if ((cur->errors & E1000_RXD_ERR_FRAME_ERR_MASK) || + (rxr->discard == TRUE)) { ifp->if_ierrors++; ++rxr->rx_discarded; if (!eop) /* Catch subsequent segs */ @@ -4146,9 +4143,7 @@ next_desc: static __inline void em_rx_discard(struct rx_ring *rxr, int i) { - struct adapter *adapter = rxr->adapter; struct em_buffer *rbuf; - struct mbuf *m; rbuf = &rxr->rx_buffers[i]; /* Free any previous pieces */ @@ -4158,14 +4153,14 @@ em_rx_discard(struct rx_ring *rxr, int i rxr->fmp = NULL; rxr->lmp = NULL; } - - /* Reset state, keep loaded DMA map and reuse */ - m = rbuf->m_head; - m->m_len = m->m_pkthdr.len = adapter->rx_mbuf_sz; - m->m_flags |= M_PKTHDR; - m->m_data = m->m_ext.ext_buf; - m->m_next = NULL; - + /* + ** Free buffer and allow em_refresh_mbufs() + ** to clean up and recharge buffer. + */ + if (rbuf->m_head) { + m_free(rbuf->m_head); + rbuf->m_head = NULL; + } return; } From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 14 21:33:17 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F99A106566C; Tue, 14 Dec 2010 21:33:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CFB38FC12; Tue, 14 Dec 2010 21:33:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBELXHpn031291; Tue, 14 Dec 2010 21:33:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBELXHXx031289; Tue, 14 Dec 2010 21:33:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201012142133.oBELXHXx031289@svn.freebsd.org> From: John Baldwin Date: Tue, 14 Dec 2010 21:33:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216449 - stable/7/sys/dev/cxgb X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 21:33:17 -0000 Author: jhb Date: Tue Dec 14 21:33:17 2010 New Revision: 216449 URL: http://svn.freebsd.org/changeset/base/216449 Log: When the per-queueset transmit kthread is idle, do not pass a sleep priority of '1' to tsleep(). This caused the priority of this kthread to be raised higher than every other thread in the system. Instead, leave the priority of the kthread at its existing level. This is a direct commit to stable/7 as this code is no longer present in 8.x and later. Reviewed by: np Approved by: re (kib) Modified: stable/7/sys/dev/cxgb/cxgb_multiq.c Modified: stable/7/sys/dev/cxgb/cxgb_multiq.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_multiq.c Tue Dec 14 20:57:40 2010 (r216448) +++ stable/7/sys/dev/cxgb/cxgb_multiq.c Tue Dec 14 21:33:17 2010 (r216449) @@ -624,7 +624,7 @@ cxgb_pcpu_start_proc(void *arg) continue; } done: - tsleep(qs, 1, "cxgbidle", idleticks); + tsleep(qs, 0, "cxgbidle", idleticks); } if (bootverbose) From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 15 16:04:37 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52D9D106564A; Wed, 15 Dec 2010 16:04:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25CAE8FC0A; Wed, 15 Dec 2010 16:04:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBFG4bnQ059941; Wed, 15 Dec 2010 16:04:37 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBFG4bGx059940; Wed, 15 Dec 2010 16:04:37 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201012151604.oBFG4bGx059940@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 15 Dec 2010 16:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216459 - in stable/7/sys: . cddl/contrib/opensolaris contrib/dev/acpica contrib/pf X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 16:04:37 -0000 Author: bz Date: Wed Dec 15 16:04:36 2010 New Revision: 216459 URL: http://svn.freebsd.org/changeset/base/216459 Log: Record merge-info for r216172,216176 previously merged as r216441. Approved by: re (kib) Modified: Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 15 22:48:44 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61BF3106566C; Wed, 15 Dec 2010 22:48:44 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FB998FC12; Wed, 15 Dec 2010 22:48:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBFMmivw097212; Wed, 15 Dec 2010 22:48:44 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBFMmijK097210; Wed, 15 Dec 2010 22:48:44 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201012152248.oBFMmijK097210@svn.freebsd.org> From: Jack F Vogel Date: Wed, 15 Dec 2010 22:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216465 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 22:48:44 -0000 Author: jfv Date: Wed Dec 15 22:48:44 2010 New Revision: 216465 URL: http://svn.freebsd.org/changeset/base/216465 Log: MFC r216173 Remove the test for a minimum frame size from the IPV6 TX context descriptor setup, when using VLANs and HW TAGGING the length of an ICMP6 frame will fail this test and be discarded. Approved by: re Modified: stable/7/sys/dev/e1000/if_igb.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/e1000/if_igb.c ============================================================================== --- stable/7/sys/dev/e1000/if_igb.c Wed Dec 15 20:08:29 2010 (r216464) +++ stable/7/sys/dev/e1000/if_igb.c Wed Dec 15 22:48:44 2010 (r216465) @@ -3264,8 +3264,6 @@ igb_tx_ctx_setup(struct tx_ring *txr, st case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(mp->m_data + ehdrlen); ip_hlen = sizeof(struct ip6_hdr); - if (mp->m_len < ehdrlen + ip_hlen) - return (FALSE); ipproto = ip6->ip6_nxt; type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_IPV6; break;