PERFORCE change 100323 for review
Kip Macy
kmacy at FreeBSD.org
Fri Jun 30 00:17:06 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100323
Change 100323 by kmacy at kmacy_storage:sun4v_work_stable on 2006/06/30 00:16:09
IFC
Affected files ...
.. //depot/projects/kmacy_sun4v_stable/src/share/man/man4/uplcom.4#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/conf/files.ia64#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/conf/kern.mk#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/conf/kern.pre.mk#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/puc.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/puc_cfg.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/puc_pccard.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/puc_pci.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/pucdata.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/ia64/ia64/emulate.c#1 branch
.. //depot/projects/kmacy_sun4v_stable/src/sys/ia64/ia64/trap.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/ia64/include/md_var.h#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/kern/sched_4bsd.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/kern/sched_core.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/kern/sysv_sem.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/net/if.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/net/if_atmsubr.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/net/if_gif.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/net/if_stf.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/net/if_tun.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/net/if_vlan.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/netinet/if_ether.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/netinet/in_pcb.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/netinet/ip_divert.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/netinet/ip_fw2.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/netinet/ip_output.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/netinet/tcp_input.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/netinet6/in6.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/netinet6/in6_pcb.c#3 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/netinet6/in6_var.h#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/nfsclient/bootp_subr.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/sys/nfsclient/nfs_diskless.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/usr.bin/tail/extern.h#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/usr.bin/tail/forward.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/usr.bin/tail/tail.1#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/usr.bin/tail/tail.c#2 integrate
.. //depot/projects/kmacy_sun4v_stable/src/usr.sbin/kgmon/kgmon.c#2 integrate
Differences ...
==== //depot/projects/kmacy_sun4v_stable/src/share/man/man4/uplcom.4#2 (text+ko) ====
@@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/uplcom.4,v 1.12 2005/07/16 09:18:58 hrs Exp $
+.\" $FreeBSD: src/share/man/man4/uplcom.4,v 1.13 2006/06/29 08:28:18 takawata Exp $
.\"
.Dd July 16, 2005
.Dt UPLCOM 4
@@ -91,6 +91,8 @@
SOURCENEXT KeikaiDenwa 8 (with and without charger)
.It
Sony Ericsson USB Cable (Susteen USB Data Cable)
+.It
+Willcom W-SIM DD PHS terminal.(WS002IN)
.El
.Sh SEE ALSO
.Xr tty 4 ,
==== //depot/projects/kmacy_sun4v_stable/src/sys/conf/files.ia64#2 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.ia64,v 1.86 2006/04/24 23:31:50 marcel Exp $
+# $FreeBSD: src/sys/conf/files.ia64,v 1.87 2006/06/29 19:59:16 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -93,6 +93,7 @@
ia64/ia64/dump_machdep.c standard
ia64/ia64/efi.c standard
ia64/ia64/elf_machdep.c standard
+ia64/ia64/emulate.c standard
ia64/ia64/exception.S standard
ia64/ia64/gdb_machdep.c optional gdb
ia64/ia64/in_cksum.c optional inet
==== //depot/projects/kmacy_sun4v_stable/src/sys/conf/kern.mk#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.mk,v 1.48 2006/05/30 19:18:01 ru Exp $
+# $FreeBSD: src/sys/conf/kern.mk,v 1.49 2006/06/29 21:15:25 obrien Exp $
#
# Warning flags for compiling the kernel and components of the kernel.
@@ -12,7 +12,7 @@
.else
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
- ${_wundef} -fformat-extensions -std=c99
+ ${_wundef} -fformat-extensions
.if !defined(NO_UNDEF)
_wundef= -Wundef
.endif
==== //depot/projects/kmacy_sun4v_stable/src/sys/conf/kern.pre.mk#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.74 2005/12/12 01:14:59 rodrigc Exp $
+# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.75 2006/06/29 21:15:25 obrien Exp $
# Part of a unified Makefile for building kernels. This part contains all
# of the definitions that need to be before %BEFORE_DEPEND.
@@ -43,6 +43,7 @@
.if ${CC} == "icc"
NOSTDINC= -X
.else
+C_DIALECT= -std=c99
NOSTDINC= -nostdinc
.endif
@@ -80,7 +81,7 @@
.endif
-CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG}
+CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS}
CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
.if ${CC} != "icc"
CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
==== //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/puc.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/puc/puc.c,v 1.47 2006/04/28 21:21:52 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/puc/puc.c,v 1.48 2006/06/29 16:27:19 obrien Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -42,9 +42,9 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
-#include <dev/puc/puc_bfe.h>
#include <dev/puc/puc_bus.h>
#include <dev/puc/puc_cfg.h>
+#include <dev/puc/puc_bfe.h>
#define PUC_ISRCCNT 5
==== //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/puc_cfg.c#2 (text) ====
@@ -25,16 +25,16 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/puc/puc_cfg.c,v 1.1 2006/04/28 21:21:52 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/puc/puc_cfg.c,v 1.2 2006/06/29 16:27:19 obrien Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/rman.h>
-#include <dev/puc/puc_bfe.h>
#include <dev/puc/puc_bus.h>
#include <dev/puc/puc_cfg.h>
+#include <dev/puc/puc_bfe.h>
int
puc_config(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *r)
==== //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/puc_pccard.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/puc/puc_pccard.c,v 1.10 2006/04/28 21:21:52 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/puc/puc_pccard.c,v 1.11 2006/06/29 16:27:19 obrien Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -41,8 +41,8 @@
#include <dev/pccard/pccardvar.h>
+#include <dev/puc/puc_cfg.h>
#include <dev/puc/puc_bfe.h>
-#include <dev/puc/puc_cfg.h>
/* http://www.argosy.com.tw/product/sp320.htm */
const struct puc_cfg puc_pccard_rscom = {
==== //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/puc_pci.c#2 (text+ko) ====
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/puc/puc_pci.c,v 1.15 2006/04/28 21:21:52 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/puc/puc_pci.c,v 1.16 2006/06/29 16:27:19 obrien Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -75,8 +75,8 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
+#include <dev/puc/puc_cfg.h>
#include <dev/puc/puc_bfe.h>
-#include <dev/puc/puc_cfg.h>
static const struct puc_cfg *
puc_pci_match(device_t dev, const struct puc_cfg *desc)
==== //depot/projects/kmacy_sun4v_stable/src/sys/dev/puc/pucdata.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.56 2006/06/12 19:22:44 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.57 2006/06/29 16:27:19 obrien Exp $");
/*
* PCI "universal" communications card driver configuration data (used to
@@ -43,9 +43,9 @@
#include <dev/pci/pcivar.h>
-#include <dev/puc/puc_bfe.h>
#include <dev/puc/puc_bus.h>
#include <dev/puc/puc_cfg.h>
+#include <dev/puc/puc_bfe.h>
static puc_config_f puc_config_amc;
static puc_config_f puc_config_cronyx;
==== //depot/projects/kmacy_sun4v_stable/src/sys/ia64/ia64/trap.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ia64/ia64/trap.c,v 1.118 2006/05/16 14:32:15 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/ia64/ia64/trap.c,v 1.119 2006/06/29 19:59:17 marcel Exp $");
#include "opt_ddb.h"
#include "opt_ktrace.h"
@@ -608,7 +608,27 @@
break;
}
- case IA64_VEC_GENERAL_EXCEPTION:
+ case IA64_VEC_GENERAL_EXCEPTION: {
+ int code;
+
+ if (!user)
+ trap_panic(vector, tf);
+
+ code = tf->tf_special.isr & (IA64_ISR_CODE & 0xf0ull);
+ switch (code) {
+ case 0x0: /* Illegal Operation Fault. */
+ sig = ia64_emulate(tf, td);
+ break;
+ default:
+ sig = SIGILL;
+ break;
+ }
+ if (sig == 0)
+ goto out;
+ ucode = vector;
+ break;
+ }
+
case IA64_VEC_NAT_CONSUMPTION:
case IA64_VEC_SPECULATION:
case IA64_VEC_UNSUPP_DATA_REFERENCE:
==== //depot/projects/kmacy_sun4v_stable/src/sys/ia64/include/md_var.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/ia64/include/md_var.h,v 1.22 2005/07/05 17:12:18 marcel Exp $
+ * $FreeBSD: src/sys/ia64/include/md_var.h,v 1.23 2006/06/29 19:59:18 marcel Exp $
*/
#ifndef _MACHINE_MD_VAR_H_
@@ -77,6 +77,7 @@
int do_ast(struct trapframe *);
void ia32_trap(int, struct trapframe *);
int ia64_count_cpus(void);
+int ia64_emulate(struct trapframe *, struct thread *);
int ia64_flush_dirty(struct thread *, struct _special *);
uint64_t ia64_get_hcdp(void);
int ia64_highfp_drop(struct thread *);
==== //depot/projects/kmacy_sun4v_stable/src/sys/kern/sched_4bsd.c#3 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.83 2006/06/15 06:37:39 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.84 2006/06/29 19:37:31 obrien Exp $");
#include "opt_hwpmc_hooks.h"
@@ -53,6 +53,7 @@
#include <sys/sysctl.h>
#include <sys/sx.h>
#include <sys/turnstile.h>
+#include <machine/pcb.h>
#include <machine/smp.h>
#ifdef HWPMC_HOOKS
==== //depot/projects/kmacy_sun4v_stable/src/sys/kern/sched_core.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sched_core.c,v 1.7 2006/06/29 05:59:36 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sched_core.c,v 1.9 2006/06/29 12:29:20 davidxu Exp $");
#include "opt_hwpmc_hooks.h"
#include "opt_sched.h"
@@ -566,7 +566,7 @@
{
kseq->ksq_load--;
if ((ke->ke_proc->p_flag & P_NOLOAD) == 0)
- sched_tdcnt++;
+ sched_tdcnt--;
}
/*
@@ -875,11 +875,6 @@
ke->ke_runq = ke->ke_kseq->ksq_curr;
krunq_add(ke->ke_runq, ke);
}
- /*
- * Hold this kse on this cpu so that sched_prio() doesn't
- * cause excessive migration. We only want migration to
- * happen as the result of a wakeup.
- */
adjustrunqueue(td, prio);
} else
td->td_priority = prio;
@@ -962,6 +957,7 @@
mtx_assert(&sched_lock, MA_OWNED);
+ now = sched_timestamp();
ke = td->td_kse;
kg = td->td_ksegrp;
ksq = KSEQ_SELF();
@@ -974,6 +970,7 @@
if (td == PCPU_GET(idlethread)) {
TD_SET_CAN_RUN(td);
} else {
+ sched_update_runtime(ke, now);
/* We are ending our run so make our slot available again */
SLOT_RELEASE(td->td_ksegrp);
kseq_load_rem(ksq, ke);
@@ -1004,16 +1001,14 @@
*/
SLOT_USE(newtd->td_ksegrp);
newtd->td_kse->ke_flags |= KEF_DIDRUN;
+ newtd->td_kse->ke_timestamp = now;
TD_SET_RUNNING(newtd);
kseq_load_add(ksq, newtd->td_kse);
- now = newtd->td_kse->ke_timestamp = sched_timestamp();
} else {
newtd = choosethread();
/* sched_choose sets ke_timestamp, just reuse it */
- now = newtd->td_kse->ke_timestamp;
}
if (td != newtd) {
- sched_update_runtime(ke, now);
ke->ke_lastran = tick;
#ifdef HWPMC_HOOKS
@@ -1079,9 +1074,9 @@
if (ke->ke_flags & KEF_SLEEP) {
ke->ke_flags &= ~KEF_SLEEP;
if (sched_is_timeshare(kg)) {
+ sched_commit_runtime(ke);
+ now = sched_timestamp();
kseq = KSEQ_CPU(td->td_lastcpu);
- now = sched_timestamp();
- sched_commit_runtime(ke);
#ifdef SMP
if (kseq != mykseq)
now = now - mykseq->ksq_last_timestamp +
==== //depot/projects/kmacy_sun4v_stable/src/sys/kern/sysv_sem.c#3 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sysv_sem.c,v 1.80 2006/06/27 18:28:50 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sysv_sem.c,v 1.81 2006/06/29 13:58:36 jhb Exp $");
#include "opt_sysvipc.h"
#include "opt_mac.h"
@@ -591,6 +591,7 @@
struct semid_kernel *semakptr;
struct mtx *sema_mtxp;
u_short usval, count;
+ int semidx;
DPRINTF(("call to semctl(%d, %d, %d, 0x%x)\n",
semid, semnum, cmd, arg));
@@ -601,6 +602,10 @@
switch(cmd) {
case SEM_STAT:
+ /*
+ * For this command we assume semid is an array index
+ * rather than an IPC id.
+ */
if (semid < 0 || semid >= seminfo.semmni)
return (EINVAL);
semakptr = &sema[semid];
@@ -632,12 +637,12 @@
return (error);
}
- semid = IPCID_TO_IX(semid);
- if (semid < 0 || semid >= seminfo.semmni)
+ semidx = IPCID_TO_IX(semid);
+ if (semidx < 0 || semidx >= seminfo.semmni)
return (EINVAL);
- semakptr = &sema[semid];
- sema_mtxp = &sema_mtx[semid];
+ semakptr = &sema[semidx];
+ sema_mtxp = &sema_mtx[semidx];
#ifdef MAC
mtx_lock(sema_mtxp);
error = mac_check_sysv_semctl(cred, semakptr, cmd);
@@ -674,7 +679,7 @@
mac_cleanup_sysv_sem(semakptr);
#endif
SEMUNDO_LOCK();
- semundo_clear(semid, -1);
+ semundo_clear(semidx, -1);
SEMUNDO_UNLOCK();
wakeup(semakptr);
break;
@@ -804,7 +809,7 @@
}
semakptr->u.sem_base[semnum].semval = arg->val;
SEMUNDO_LOCK();
- semundo_clear(semid, semnum);
+ semundo_clear(semidx, semnum);
SEMUNDO_UNLOCK();
wakeup(semakptr);
break;
@@ -847,7 +852,7 @@
semakptr->u.sem_base[i].semval = usval;
}
SEMUNDO_LOCK();
- semundo_clear(semid, -1);
+ semundo_clear(semidx, -1);
SEMUNDO_UNLOCK();
wakeup(semakptr);
break;
==== //depot/projects/kmacy_sun4v_stable/src/sys/net/if.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)if.c 8.5 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/net/if.c,v 1.259 2006/06/21 06:02:35 glebius Exp $
+ * $FreeBSD: src/sys/net/if.c,v 1.260 2006/06/29 19:22:04 yar Exp $
*/
#include "opt_compat.h"
@@ -581,12 +581,11 @@
struct ifaddr *ifa, *next;
TAILQ_FOREACH_SAFE(ifa, &ifp->if_addrhead, ifa_link, next) {
-
- if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_LINK)
+ if (ifa->ifa_addr->sa_family == AF_LINK)
continue;
#ifdef INET
/* XXX: Ugly!! ad hoc just for INET */
- if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) {
+ if (ifa->ifa_addr->sa_family == AF_INET) {
struct ifaliasreq ifr;
bzero(&ifr, sizeof(ifr));
@@ -599,7 +598,7 @@
}
#endif /* INET */
#ifdef INET6
- if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET6) {
+ if (ifa->ifa_addr->sa_family == AF_INET6) {
in6_purgeaddr(ifa);
/* ifp_addrhead is already updated */
continue;
@@ -2404,8 +2403,7 @@
* the address change.
*/
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
- if (ifa->ifa_addr != NULL &&
- ifa->ifa_addr->sa_family == AF_INET)
+ if (ifa->ifa_addr->sa_family == AF_INET)
arp_ifinit(ifp, ifa);
}
#endif
==== //depot/projects/kmacy_sun4v_stable/src/sys/net/if_atmsubr.c#2 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net/if_atmsubr.c,v 1.41 2005/08/11 08:14:52 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/net/if_atmsubr.c,v 1.43 2006/06/29 19:22:04 yar Exp $");
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -383,13 +383,12 @@
#if defined(__NetBSD__) || defined(__OpenBSD__)
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
#elif defined(__FreeBSD__) && (__FreeBSD__ > 2)
- for (ifa = TAILQ_FIRST(&ifp->if_addrhead); ifa;
- ifa = TAILQ_NEXT(ifa, ifa_link))
+ TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
#elif defined(__FreeBSD__) || defined(__bsdi__)
for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
#endif
- if ((sdl = (struct sockaddr_dl *)ifa->ifa_addr) &&
- sdl->sdl_family == AF_LINK) {
+ if (ifa->ifa_addr->sa_family == AF_LINK) {
+ sdl = (struct sockaddr_dl *)ifa->ifa_addr;
sdl->sdl_type = IFT_ATM;
sdl->sdl_alen = ifp->if_addrlen;
#ifdef notyet /* if using ATMARP, store hardware address using the next line */
==== //depot/projects/kmacy_sun4v_stable/src/sys/net/if_gif.c#3 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/net/if_gif.c,v 1.60 2006/06/02 19:59:32 csjp Exp $ */
+/* $FreeBSD: src/sys/net/if_gif.c,v 1.61 2006/06/29 07:23:49 yar Exp $ */
/* $KAME: if_gif.c,v 1.87 2001/10/19 08:50:27 itojun Exp $ */
/*-
@@ -916,13 +916,6 @@
if (odst)
free((caddr_t)odst, M_IFADDR);
- if (sc->gif_psrc && sc->gif_pdst)
- ifp->if_drv_flags |= IFF_DRV_RUNNING;
- else
- ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
-
- return 0;
-
bad:
if (sc->gif_psrc && sc->gif_pdst)
ifp->if_drv_flags |= IFF_DRV_RUNNING;
@@ -953,9 +946,5 @@
#ifdef INET6
(void)in6_gif_detach(sc);
#endif
-
- if (sc->gif_psrc && sc->gif_pdst)
- ifp->if_drv_flags |= IFF_DRV_RUNNING;
- else
- ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
}
==== //depot/projects/kmacy_sun4v_stable/src/sys/net/if_stf.c#3 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/net/if_stf.c,v 1.54 2006/06/02 19:59:32 csjp Exp $ */
+/* $FreeBSD: src/sys/net/if_stf.c,v 1.56 2006/06/29 19:22:04 yar Exp $ */
/* $KAME: if_stf.c,v 1.73 2001/12/03 11:08:30 keiichi Exp $ */
/*-
@@ -367,12 +367,7 @@
struct sockaddr_in6 *sin6;
struct in_addr in;
- for (ia = TAILQ_FIRST(&ifp->if_addrlist);
- ia;
- ia = TAILQ_NEXT(ia, ifa_list))
- {
- if (ia->ifa_addr == NULL)
- continue;
+ TAILQ_FOREACH(ia, &ifp->if_addrlist, ifa_list) {
if (ia->ifa_addr->sa_family != AF_INET6)
continue;
sin6 = (struct sockaddr_in6 *)ia->ifa_addr;
==== //depot/projects/kmacy_sun4v_stable/src/sys/net/if_tun.c#3 (text+ko) ====
@@ -13,7 +13,7 @@
* UCL. This driver is based much more on read/write/poll mode of
* operation though.
*
- * $FreeBSD: src/sys/net/if_tun.c,v 1.155 2006/06/02 19:59:32 csjp Exp $
+ * $FreeBSD: src/sys/net/if_tun.c,v 1.157 2006/06/29 19:22:04 yar Exp $
*/
#include "opt_atalk.h"
@@ -393,29 +393,23 @@
ifp->if_drv_flags |= IFF_DRV_RUNNING;
getmicrotime(&ifp->if_lastchange);
- for (ifa = TAILQ_FIRST(&ifp->if_addrhead); ifa;
- ifa = TAILQ_NEXT(ifa, ifa_link)) {
- if (ifa->ifa_addr == NULL)
- error = EFAULT;
- /* XXX: Should maybe return straight off? */
- else {
#ifdef INET
- if (ifa->ifa_addr->sa_family == AF_INET) {
- struct sockaddr_in *si;
+ TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
+ if (ifa->ifa_addr->sa_family == AF_INET) {
+ struct sockaddr_in *si;
- si = (struct sockaddr_in *)ifa->ifa_addr;
- mtx_lock(&tp->tun_mtx);
- if (si->sin_addr.s_addr)
- tp->tun_flags |= TUN_IASET;
+ si = (struct sockaddr_in *)ifa->ifa_addr;
+ mtx_lock(&tp->tun_mtx);
+ if (si->sin_addr.s_addr)
+ tp->tun_flags |= TUN_IASET;
- si = (struct sockaddr_in *)ifa->ifa_dstaddr;
- if (si && si->sin_addr.s_addr)
- tp->tun_flags |= TUN_DSTADDR;
- mtx_unlock(&tp->tun_mtx);
- }
-#endif
+ si = (struct sockaddr_in *)ifa->ifa_dstaddr;
+ if (si && si->sin_addr.s_addr)
+ tp->tun_flags |= TUN_DSTADDR;
+ mtx_unlock(&tp->tun_mtx);
}
}
+#endif
return (error);
}
==== //depot/projects/kmacy_sun4v_stable/src/sys/net/if_vlan.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/net/if_vlan.c,v 1.103 2006/06/21 13:48:34 yar Exp $
+ * $FreeBSD: src/sys/net/if_vlan.c,v 1.105 2006/06/29 07:52:30 yar Exp $
*/
/*
@@ -105,17 +105,15 @@
#define PARENT(ifv) ((ifv)->ifv_trunk->parent)
int ifv_pflags; /* special flags we have set on parent */
struct ifv_linkmib {
- int ifvm_parent;
int ifvm_encaplen; /* encapsulation length */
int ifvm_mtufudge; /* MTU fudged by this much */
int ifvm_mintu; /* min transmission unit */
- uint16_t ifvm_proto; /* encapsulation ethertype */
uint16_t ifvm_tag; /* tag to apply on packets leaving if */
} ifv_mib;
- SLIST_HEAD(__vlan_mchead, vlan_mc_entry) vlan_mc_listhead;
+ SLIST_HEAD(, vlan_mc_entry) vlan_mc_listhead;
LIST_ENTRY(ifvlan) ifv_list;
};
-#define ifv_tag ifv_mib.ifvm_tag
+#define ifv_tag ifv_mib.ifvm_tag
#define ifv_encaplen ifv_mib.ifvm_encaplen
#define ifv_mtufudge ifv_mib.ifvm_mtufudge
#define ifv_mintu ifv_mib.ifvm_mintu
@@ -177,7 +175,7 @@
static void trunk_destroy(struct ifvlantrunk *trunk);
static void vlan_start(struct ifnet *ifp);
-static void vlan_ifinit(void *foo);
+static void vlan_init(void *foo);
static void vlan_input(struct ifnet *ifp, struct mbuf *m);
static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr);
static int vlan_setflag(struct ifnet *ifp, int flag, int status,
@@ -204,6 +202,7 @@
#ifndef VLAN_ARRAY
#define HASH(n, m) ((((n) >> 8) ^ ((n) >> 4) ^ (n)) & (m))
+
static void
vlan_inithash(struct ifvlantrunk *trunk)
{
@@ -627,7 +626,7 @@
struct ifvlan *ifv;
struct ifnet *ifp;
struct ifnet *p;
- u_char eaddr[6] = {0,0,0,0,0,0};
+ static const u_char eaddr[6]; /* 00:00:00:00:00:00 */
if ((p = vlan_clone_match_ethertag(ifc, name, &tag)) != NULL) {
ethertag = 1;
@@ -685,7 +684,7 @@
ifp->if_linkmiblen = sizeof(ifv->ifv_mib);
/* NB: mtu is not set here */
- ifp->if_init = vlan_ifinit;
+ ifp->if_init = vlan_init;
ifp->if_start = vlan_start;
ifp->if_ioctl = vlan_ioctl;
ifp->if_snd.ifq_maxlen = ifqmaxlen;
@@ -704,8 +703,8 @@
* out all the way, otherwise userland could get
* confused. Thus, we destroy the interface.
*/
+ ether_ifdetach(ifp);
vlan_unconfig(ifp);
- ether_ifdetach(ifp);
if_free_type(ifp, IFT_ETHER);
free(ifv, M_VLAN);
@@ -723,18 +722,13 @@
static int
vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp)
{
- int unit;
struct ifvlan *ifv = ifp->if_softc;
+ int unit = ifp->if_dunit;
- unit = ifp->if_dunit;
-
- vlan_unconfig(ifp);
-
- ether_ifdetach(ifp);
+ ether_ifdetach(ifp); /* first, remove it from system-wide lists */
+ vlan_unconfig(ifp); /* now it can be unconfigured and freed */
if_free_type(ifp, IFT_ETHER);
-
free(ifv, M_VLAN);
-
ifc_free_unit(ifc, unit);
return (0);
@@ -744,9 +738,8 @@
* The ifp->if_init entry point for vlan(4) is a no-op.
*/
static void
-vlan_ifinit(void *foo)
+vlan_init(void *foo __unused)
{
-
}
/*
@@ -1151,9 +1144,6 @@
ifp->if_link_state = LINK_STATE_UNKNOWN;
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
- /* Clear our MAC address. */
- bzero(IF_LLADDR(ifp), ETHER_ADDR_LEN);
-
return (0);
}
==== //depot/projects/kmacy_sun4v_stable/src/sys/netinet/if_ether.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)if_ether.c 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/if_ether.c,v 1.152 2006/06/09 00:33:30 thompsa Exp $
+ * $FreeBSD: src/sys/netinet/if_ether.c,v 1.153 2006/06/29 19:22:04 yar Exp $
*/
/*
@@ -654,7 +654,7 @@
* as a dummy address for the rest of the function.
*/
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
- if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) {
+ if (ifa->ifa_addr->sa_family == AF_INET) {
ia = ifatoia(ifa);
goto match;
}
==== //depot/projects/kmacy_sun4v_stable/src/sys/netinet/in_pcb.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/in_pcb.c,v 1.178 2006/06/27 11:34:44 pjd Exp $
+ * $FreeBSD: src/sys/netinet/in_pcb.c,v 1.179 2006/06/29 10:49:49 bz Exp $
*/
#include "opt_ipsec.h"
@@ -280,7 +280,7 @@
if (nam != NULL && laddr.s_addr != INADDR_ANY)
return (EINVAL);
if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0)
- wild = 1;
+ wild = INPLOOKUP_WILDCARD;
if (nam) {
sin = (struct sockaddr_in *)nam;
if (nam->sa_len != sizeof (*sin))
==== //depot/projects/kmacy_sun4v_stable/src/sys/netinet/ip_divert.c#2 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/netinet/ip_divert.c,v 1.118 2006/04/21 09:25:39 ps Exp $
+ * $FreeBSD: src/sys/netinet/ip_divert.c,v 1.119 2006/06/29 19:22:04 yar Exp $
*/
#if !defined(KLD_MODULE)
@@ -206,8 +206,6 @@
/* Find IP address for receive interface */
TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrhead, ifa_link) {
- if (ifa->ifa_addr == NULL)
- continue;
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
divsrc.sin_addr =
==== //depot/projects/kmacy_sun4v_stable/src/sys/netinet/ip_fw2.c#3 (text+ko) ====
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.136 2006/06/22 13:22:54 ume Exp $
+ * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.140 2006/06/29 19:22:04 yar Exp $
*/
#define DEB(x)
@@ -465,8 +465,6 @@
/* XXX lock? */
TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) {
- if (ia->ifa_addr == NULL)
- continue;
if (ia->ifa_addr->sa_family != AF_INET)
continue;
if (cmd->p.ip.s_addr == ((struct sockaddr_in *)
@@ -574,10 +572,7 @@
struct in6_addr copia;
TAILQ_FOREACH(mdc, &ifnet, if_link)
- for (mdc2 = mdc->if_addrlist.tqh_first; mdc2;
- mdc2 = mdc2->ifa_list.tqe_next) {
- if (!mdc2->ifa_addr)
- continue;
+ TAILQ_FOREACH(mdc2, &mdc->if_addrlist, ifa_list) {
if (mdc2->ifa_addr->sa_family == AF_INET6) {
fdm = (struct in6_ifaddr *)mdc2;
copia = fdm->ia_addr.sin6_addr;
@@ -664,10 +659,9 @@
}
static void
-send_reject6(struct ip_fw_args *args, int code, u_short offset, u_int hlen)
+send_reject6(struct ip_fw_args *args, int code, u_int hlen)
{
- if (code == ICMP6_UNREACH_RST && offset == 0 &&
- args->f_id.proto == IPPROTO_TCP) {
+ if (code == ICMP6_UNREACH_RST && args->f_id.proto == IPPROTO_TCP) {
struct ip6_hdr *ip6;
struct tcphdr *tcp;
tcp_seq ack, seq;
@@ -1620,7 +1614,7 @@
* sends a reject message, consuming the mbuf passed as an argument.
*/
static void
-send_reject(struct ip_fw_args *args, int code, u_short offset, int ip_len)
+send_reject(struct ip_fw_args *args, int code, int ip_len)
{
if (code != ICMP_REJECT_RST) { /* Send an ICMP unreach */
@@ -1631,7 +1625,7 @@
ip->ip_off = ntohs(ip->ip_off);
}
icmp_error(args->m, ICMP_UNREACH, code, 0L, 0);
- } else if (offset == 0 && args->f_id.proto == IPPROTO_TCP) {
+ } else if (args->f_id.proto == IPPROTO_TCP) {
struct tcphdr *const tcp =
L3HDR(struct tcphdr, mtod(args->m, struct ip *));
if ( (tcp->th_flags & TH_RST) == 0) {
@@ -1925,7 +1919,7 @@
wildcard = 0;
pi = &tcbinfo;
} else if (proto == IPPROTO_UDP) {
- wildcard = 1;
+ wildcard = INPLOOKUP_WILDCARD;
pi = &udbinfo;
} else
return 0;
@@ -3126,20 +3120,19 @@
is_icmp_query(ICMP(ulp))) &&
!(m->m_flags & (M_BCAST|M_MCAST)) &&
!IN_MULTICAST(ntohl(dst_ip.s_addr))) {
- send_reject(args, cmd->arg1,
- offset,ip_len);
+ send_reject(args, cmd->arg1, ip_len);
m = args->m;
}
/* FALLTHROUGH */
#ifdef INET6
case O_UNREACH6:
if (hlen > 0 && is_ipv6 &&
+ ((offset & IP6F_OFF_MASK) == 0) &&
(proto != IPPROTO_ICMPV6 ||
(is_icmp6_query(args->f_id.flags) == 1)) &&
!(m->m_flags & (M_BCAST|M_MCAST)) &&
!IN6_IS_ADDR_MULTICAST(&args->f_id.dst_ip6)) {
- send_reject6(args, cmd->arg1,
- offset, hlen);
+ send_reject6(args, cmd->arg1, hlen);
m = args->m;
}
/* FALLTHROUGH */
==== //depot/projects/kmacy_sun4v_stable/src/sys/netinet/ip_output.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $FreeBSD: src/sys/netinet/ip_output.c,v 1.257 2006/05/21 17:52:08 maxim Exp $
+ * $FreeBSD: src/sys/netinet/ip_output.c,v 1.258 2006/06/29 13:38:36 glebius Exp $
*/
#include "opt_ipfw.h"
@@ -148,7 +148,7 @@
* will wrap around in less than 10 seconds at 100 Mbit/s on a
* medium with MTU 1500. See Steven M. Bellovin, "A Technique
* for Counting NATted Hosts", Proc. IMW'02, available at
- * <http://www.research.att.com/~smb/papers/fnat.pdf>.
+ * <http://www.cs.columbia.edu/~smb/papers/fnat.pdf>.
*/
if ((flags & (IP_FORWARDING|IP_RAWOUTPUT)) == 0) {
ip->ip_v = IPVERSION;
==== //depot/projects/kmacy_sun4v_stable/src/sys/netinet/tcp_input.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.302 2006/06/26 16:14:19 andre Exp $
+ * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.303 2006/06/29 10:49:49 bz Exp $
*/
#include "opt_ipfw.h" /* for ipfw_fwd */
@@ -651,7 +651,8 @@
next_hop->sin_port ?
ntohs(next_hop->sin_port) :
th->th_dport,
- 1, m->m_pkthdr.rcvif);
+ INPLOOKUP_WILDCARD,
+ m->m_pkthdr.rcvif);
}
/* Remove the tag from the packet. We don't need it anymore. */
m_tag_delete(m, fwd_tag);
@@ -662,13 +663,15 @@
inp = in6_pcblookup_hash(&tcbinfo,
&ip6->ip6_src, th->th_sport,
&ip6->ip6_dst, th->th_dport,
- 1, m->m_pkthdr.rcvif);
+ INPLOOKUP_WILDCARD,
+ m->m_pkthdr.rcvif);
#endif
} else
inp = in_pcblookup_hash(&tcbinfo,
ip->ip_src, th->th_sport,
ip->ip_dst, th->th_dport,
- 1, m->m_pkthdr.rcvif);
+ INPLOOKUP_WILDCARD,
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list