From owner-p4-projects@FreeBSD.ORG Sun Apr 11 11:52:20 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 339FD16A4D0; Sun, 11 Apr 2004 11:52:20 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E33AF16A4CE for ; Sun, 11 Apr 2004 11:52:19 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA6C343D55 for ; Sun, 11 Apr 2004 11:52:19 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i3BIqJGe057347 for ; Sun, 11 Apr 2004 11:52:19 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i3BIqJ81057335 for perforce@freebsd.org; Sun, 11 Apr 2004 11:52:19 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 11 Apr 2004 11:52:19 -0700 (PDT) Message-Id: <200404111852.i3BIqJ81057335@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 50864 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2004 18:52:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=50864 Change 50864 by rwatson@rwatson_paprika on 2004/04/11 11:51:52 Integrate netperf_socket: nfs server build fix. pf fixes. if_nge watchdog timer fix. Affected files ... .. //depot/projects/netperf_socket/sys/contrib/pf/net/pf.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/nge/if_nge.c#6 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_subs.c#6 integrate Differences ... ==== //depot/projects/netperf_socket/sys/contrib/pf/net/pf.c#6 (text+ko) ==== @@ -1,5 +1,5 @@ -/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.6 2004/03/30 18:28:30 mlaier Exp $ */ -/* $OpenBSD: pf.c,v 1.389.2.2 2004/03/14 00:13:42 brad Exp $ */ +/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.7 2004/04/11 17:35:40 mlaier Exp $ */ +/* $OpenBSD: pf.c,v 1.389.2.3 2004/04/10 09:38:19 brad Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -4312,6 +4312,7 @@ struct pf_tree_node key; struct pf_state_peer *src, *dst; u_int8_t dws; + int copyback = 0; /* * Only the first 8 bytes of the TCP header can be @@ -4349,9 +4350,11 @@ /* Demodulate sequence number */ seq = ntohl(th.th_seq) - src->seqdiff; - if (src->seqdiff) - pf_change_a(&th.th_seq, &th.th_sum, + if (src->seqdiff) { + pf_change_a(&th.th_seq, icmpsum, htonl(seq), 0); + copyback = 1; + } if (!SEQ_GEQ(src->seqhi, seq) || !SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws))) { @@ -4371,7 +4374,7 @@ if (STATE_TRANSLATE(*state)) { if (direction == PF_IN) { pf_change_icmp(pd2.src, &th.th_sport, - saddr, &(*state)->lan.addr, + daddr, &(*state)->lan.addr, (*state)->lan.port, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, pd2.af); @@ -4382,6 +4385,10 @@ pd2.ip_sum, icmpsum, pd->ip_sum, 0, pd2.af); } + copyback = 1; + } + + if (copyback) { switch (pd2.af) { #ifdef INET case AF_INET: @@ -4402,8 +4409,6 @@ #endif /* INET6 */ } m_copyback(m, off2, 8, (caddr_t)&th); - } else if (src->seqdiff) { - m_copyback(m, off2, 8, (caddr_t)&th); } return (PF_PASS); ==== //depot/projects/netperf_socket/sys/dev/nge/if_nge.c#6 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.56 2004/04/11 16:26:39 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.57 2004/04/11 18:28:14 ru Exp $"); /* * National Semiconductor DP83820/DP83821 gigabit ethernet driver @@ -1412,15 +1412,12 @@ nge_txeof(sc) struct nge_softc *sc; { - struct nge_desc *cur_tx = NULL; + struct nge_desc *cur_tx; struct ifnet *ifp; u_int32_t idx; ifp = &sc->arpcom.ac_if; - /* Clear the timeout timer. */ - ifp->if_timer = 0; - /* * Go through our tx list and free mbufs for those * frames that have been transmitted. @@ -1453,17 +1450,17 @@ if (cur_tx->nge_mbuf != NULL) { m_freem(cur_tx->nge_mbuf); cur_tx->nge_mbuf = NULL; + ifp->if_flags &= ~IFF_OACTIVE; } sc->nge_cdata.nge_tx_cnt--; NGE_INC(idx, NGE_TX_LIST_CNT); - ifp->if_timer = 0; } sc->nge_cdata.nge_tx_cons = idx; - if (cur_tx != NULL) - ifp->if_flags &= ~IFF_OACTIVE; + if (idx == sc->nge_cdata.nge_tx_prod) + ifp->if_timer = 0; return; } ==== //depot/projects/netperf_socket/sys/nfsclient/nfs_subs.c#6 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_subs.c,v 1.126 2004/04/11 13:30:20 peadar Exp $"); +__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_subs.c,v 1.127 2004/04/11 17:15:36 marcel Exp $"); /* * These functions support the macros and help fiddle mbuf chains for @@ -435,7 +435,7 @@ sysent[SYS_nfsclnt].sy_narg = nfs_prev_nfsclnt_sy_narg; sysent[SYS_nfsclnt].sy_call = nfs_prev_nfsclnt_sy_call; - KASSERT(TAILQ_ISEMPTY(&nfs_reqq), + KASSERT(TAILQ_EMPTY(&nfs_reqq), ("nfs_uninit: request queue not empty")); /*