Date: Sun, 11 Apr 2004 11:52:19 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 50864 for review Message-ID: <200404111852.i3BIqJ81057335@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> -__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 <sys/cdefs.h> -__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")); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404111852.i3BIqJ81057335>