From owner-p4-projects@FreeBSD.ORG Sun Aug 19 02:45:40 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B698E16A421; Sun, 19 Aug 2007 02:45:39 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 779B316A418 for ; Sun, 19 Aug 2007 02:45:39 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6424013C46B for ; Sun, 19 Aug 2007 02:45:39 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7J2jdZs040556 for ; Sun, 19 Aug 2007 02:45:39 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7J2jdxN040553 for perforce@freebsd.org; Sun, 19 Aug 2007 02:45:39 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 02:45:39 GMT Message-Id: <200708190245.l7J2jdxN040553@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125328 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 02:45:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=125328 Change 125328 by cnst@dale on 2007/08/19 02:45:16 make coretemp_get_temp() more robust in preparation for a patch converting coretemp(4) to sysctl(3) hw.sensors framework. If coretemp_get_temp() is called before smp is started, then it will generate a panic around sched_bind (at least on sched_4bsd). (This is what will happen if we try to load coretemp at boot time, and then shortly thereafter call coretemp_get_temp() from, for example, sensor_task thread.) To account for this, we are now going to check that the number of initialised processors is greater than 1, and return -1 if someone tries to read a temperature from an uninitialised CPU. Special thanks go to rpaulo@ for discussing this issue with me on IRC, and pointing me at smp_cpus. rpaulo suggested that I include , and use #ifdef SMP around smp_cpus, but it turns out that: 1. when we compile coretemp(4) as a module, SMP is not defined 2. in , smp_cpus is only extern'ed if SMP is defined 3. smp_cpus is declared regardless of SMP define in kern/subr_smp.c Thus a better solution is to use `extern int smp_cpus` at this time, although a fix for might be better in the long-term. Discussed with rpaulo@, thanks also go to Nick Barkas of moduli.net for running publicly accessible OpenGrok service for FreeBSD. :) Affected files ... .. //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#3 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#3 (text+ko) ==== @@ -50,6 +50,8 @@ #include #include +extern int smp_cpus; + struct coretemp_softc { device_t sc_dev; int sc_tjmax; @@ -208,9 +210,17 @@ int cpu = device_get_unit(dev); struct coretemp_softc *sc = device_get_softc(dev); - thread_lock(curthread); - sched_bind(curthread, cpu); - thread_unlock(curthread); + /* + * Bind to specific CPU to read the correct temperature. + * If not all CPUs are initialised, then only read from + * cpu0, returning -1 on all other CPUs. + */ + if (smp_cpus > 1) { + thread_lock(curthread); + sched_bind(curthread, cpu); + thread_unlock(curthread); + } else if (cpu != 0) + return (-1); /* * The digital temperature reading is located at bit 16 From owner-p4-projects@FreeBSD.ORG Sun Aug 19 02:50:47 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A80416A420; Sun, 19 Aug 2007 02:50:47 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF50C16A418 for ; Sun, 19 Aug 2007 02:50:46 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DD31713C45D for ; Sun, 19 Aug 2007 02:50:46 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7J2ok0B040781 for ; Sun, 19 Aug 2007 02:50:46 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7J2okiX040778 for perforce@freebsd.org; Sun, 19 Aug 2007 02:50:46 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 02:50:46 GMT Message-Id: <200708190250.l7J2okiX040778@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125329 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 02:50:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=125329 Change 125329 by cnst@dale on 2007/08/19 02:50:29 convert coretemp(4) to sysctl hw.sensors framework. Values can be monitored via sysctl(3) in systat(1) sensors display, sensorsd(8) etc. Affected files ... .. //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#4 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#4 (text+ko) ==== @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include /* for curthread */ #include @@ -53,9 +53,10 @@ extern int smp_cpus; struct coretemp_softc { - device_t sc_dev; - int sc_tjmax; - struct sysctl_oid *sc_oid; + struct ksensordev sc_sensordev; + struct ksensor sc_sensor; + device_t sc_dev; + int sc_tjmax; }; /* @@ -67,7 +68,7 @@ static int coretemp_detach(device_t dev); static int coretemp_get_temp(device_t dev); -static int coretemp_get_temp_sysctl(SYSCTL_HANDLER_ARGS); +static void coretemp_refresh(void *arg); static device_method_t coretemp_methods[] = { /* Device interface */ @@ -180,14 +181,17 @@ sc->sc_tjmax = 100; /* - * Add the "temperature" MIB to dev.cpu.N. + * Add hw.sensors.cpuN.temp0 MIB. */ - sc->sc_oid = SYSCTL_ADD_PROC(device_get_sysctl_ctx(pdev), - SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), - OID_AUTO, "temperature", - CTLTYPE_INT | CTLFLAG_RD, - dev, 0, coretemp_get_temp_sysctl, "I", - "Current temperature in degC"); + strlcpy(sc->sc_sensordev.xname, device_get_nameunit(pdev), + sizeof(sc->sc_sensordev.xname)); + sc->sc_sensor.type = SENSOR_TEMP; + sensor_attach(&sc->sc_sensordev, &sc->sc_sensor); + if (sensor_task_register(sc, coretemp_refresh, 2)) { + device_printf(dev, "unable to register update task\n"); + return (ENXIO); + } + sensordev_install(&sc->sc_sensordev); return (0); } @@ -197,7 +201,8 @@ { struct coretemp_softc *sc = device_get_softc(dev); - sysctl_remove_oid(sc->sc_oid, 1, 0); + sensordev_deinstall(&sc->sc_sensordev); + sensor_task_unregister(sc); return (0); } @@ -268,13 +273,21 @@ return (-1); } -static int -coretemp_get_temp_sysctl(SYSCTL_HANDLER_ARGS) +static void +coretemp_refresh(void *arg) { - device_t dev = (device_t) arg1; + struct coretemp_softc *sc = arg; + device_t dev = sc->sc_dev; + struct ksensor *s = &sc->sc_sensor; int temp; temp = coretemp_get_temp(dev); - return (sysctl_handle_int(oidp, &temp, 0, req)); + if (temp == -1) { + s->flags |= SENSOR_FINVALID; + s->value = 0; + } else { + s->flags &= ~SENSOR_FINVALID; + s->value = temp * 1e6 + 273.15e6; + } } From owner-p4-projects@FreeBSD.ORG Sun Aug 19 03:09:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E140016A41B; Sun, 19 Aug 2007 03:09:10 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B295D16A417 for ; Sun, 19 Aug 2007 03:09:10 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A073F13C494 for ; Sun, 19 Aug 2007 03:09:10 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7J39AO1043095 for ; Sun, 19 Aug 2007 03:09:10 GMT (envelope-from ivoras@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7J39AEh043092 for perforce@freebsd.org; Sun, 19 Aug 2007 03:09:10 GMT (envelope-from ivoras@FreeBSD.org) Date: Sun, 19 Aug 2007 03:09:10 GMT Message-Id: <200708190309.l7J39AEh043092@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ivoras@FreeBSD.org using -f From: Ivan Voras To: Perforce Change Reviews Cc: Subject: PERFORCE change 125330 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 03:09:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=125330 Change 125330 by ivoras@ivoras_finstall on 2007/08/19 03:08:11 Finished framework for asynchronous backend jobs Finished backend partitioning and file system creation primitives Affected files ... .. //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#11 edit .. //depot/projects/soc2007/ivoras_finstall/installer/glade/installprogress.glade#2 edit .. //depot/projects/soc2007/ivoras_finstall/installer/text/ninstall.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/pybackend/freebsd.py#6 edit .. //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#9 edit Differences ... ==== //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#11 (text+ko) ==== @@ -26,7 +26,7 @@ import logging from types import MethodType from xmlrpclib import ServerProxy -import gtk, gtk.gdk, gtk.glade +import gobject, gtk, gtk.gdk, gtk.glade from basewin import BaseWin from helpdialog import HelpDialog @@ -45,7 +45,7 @@ { "tile" : "nparts" }, { "tile" : "ndefaultfs" }, { "tile" : "nverify" }, - { "tile" : "ninstall" } + { "tile" : "ninstall", "glade" : "installprogress.glade" } ] @@ -79,8 +79,12 @@ def _load_tile(self, tile_name): """Loads a tile by it's name and integrates it in the wizard window""" + glade_name = "glade/%s.glade" % tile_name + for t in self.step_track: + if t["tile"] == tile_name and "glade" in t: + glade_name = "glade/%s" % t["glade"] self._clear_container(self.xml.get_widget("vbox_container")) - self.tile_xml = gtk.glade.XML("glade/%s.glade" % tile_name) + self.tile_xml = gtk.glade.XML(glade_name) self.tile_handlers = self._get_event_handlers(tile_name) self.tile_xml.signal_autoconnect(self.tile_handlers) w = self.tile_xml.get_widget("vbox_container").get_children()[0] @@ -284,7 +288,11 @@ part_list = parts.keys() part_list.sort() for part in part_list: - list.append([part, parts[part]["fs_type"], "%d MB" % parts[part]["mediasize"]]) + if parts[part]["mediasize"] < 2048: + valid_target = "NO" + else: + valid_target = "Yes" + list.append([part, parts[part]["fs_type"], "%d MB" % parts[part]["mediasize"], valid_target]) self["parttree"].set_model(list) self["parttree"].append_column(self._make_column("Partition", 0, True)) self["parttree"].append_column(self._make_column("File system", 1)) @@ -371,7 +379,8 @@ "size" : 512, "name" : "%ss1" % self.trackdata["drive"], "mount" : "/", - "fs" : "UFS+SU" + "fs" : "UFS+SU", + "flags" : "init,active,boot" }) parts.append({ "base" : self.trackdata["drive"], @@ -395,7 +404,8 @@ "size" : var_size, "name" : "%sa" % parts[2]["name"], "mount" : "/var", - "fs" : var_fs + "fs" : var_fs, + "flags" : "init" }) parts.append({ "base" : parts[2]["name"], @@ -408,7 +418,7 @@ parts.append({ "base" : parts[2]["name"], "type" : "bsdlabel", - "size" : parts[2]["size"] - parts[3]["size"] - parts[4]["size"], + "size" : parts[2]["size"] - parts[3]["size"] - parts[4]["size"] -2, # TODO: why is the bsdlabel 2679 sectors smaller than it should be? "name" : "%sd" % parts[2]["name"], "mount" : "/home", "fs" : fs @@ -425,7 +435,8 @@ "size" : 512, "name" : "%ss1" % self.trackdata["drive"], "mount" : "/", - "fs" : "UFS+SU" + "fs" : "UFS+SU", + "flags" : "init,active,boot" }) parts.append({ "base" : self.trackdata["drive"], @@ -495,6 +506,37 @@ return True + def nverify_on_next(self): + self["button_cancel"].set_sensitive(False) + self["button_previous"].set_sensitive(False) + self["button_next"].set_sensitive(False) + return True + + + def ninstall_on_load(self): + self._load_label(self["label2"], "ninstall.txt") + self.trackdata["install_list"] = "Creating file systems...\n" + self._set_label(self["label3"], self.trackdata["install_list"]) + self.trackdata["part_job"] = self.server.StartPartitionJob(self.trackdata["new_parts"]) + gobject.timeout_add(500, self.part_progress) + + + def part_progress(self): + try: + pcnt = self.server.QueryJobProgress(self.trackdata["part_job"]) + except Exception, e: + print "Exception ===================================================================" + print e + code, result = self.server.QueryJobError(self.trackdata["part_job"]) + print code, result + return False + self["progressbar"].set_fraction(float(pcnt) / 100) + if pcnt == 100: + result = self.server.QueryJobResult(self.trackdata["part_job"]) + print result + return False + return True + my_dir = os.path.split(sys.argv[0])[0] ==== //depot/projects/soc2007/ivoras_finstall/installer/glade/installprogress.glade#2 (text+ko) ==== @@ -1,6 +1,6 @@ - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -36,8 +36,12 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 label + + False + @@ -47,11 +51,14 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 label + True + True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK ==== //depot/projects/soc2007/ivoras_finstall/pybackend/freebsd.py#6 (text+ko) ==== @@ -21,19 +21,33 @@ # Interface to (most) FreeBSD's low-level utilities -import os, sys +import os, sys, popen2 +import logging import re import xmldict cmd_sysctl = "/sbin/sysctl" cmd_geom = "/sbin/geom" cmd_mount = "/sbin/mount" +cmd_fdisk = "/sbin/fdisk" +cmd_bsdlabel = "/sbin/bsdlabel" cmd_file = "/usr/bin/file -s" +cmd_newfs = "/sbin/newfs" +cmd_gjournal = "/sbin/gjournal" +cmd_kldstat = "/sbin/kldstat" +cmd_kldload = "/sbin/kldload" +cmd_mke2fs = "/usr/local/sbin/mke2fs" file_dmesg = "/var/run/dmesg.boot" +bsdlabel_map = ('a', 'b', 'd', 'e', 'f', 'g', 'h') # maps bsdlabel # to a letter + def get_sysctl(name, b_flag = False): + """ + Returns a sysctl value. If second parameter is True, the sysctl is treated + as binary buffer (or a string) + """ global cmd_sysctl if b_flag: str = os.popen("%s -b %s" % (cmd_sysctl, name)).read().strip() @@ -98,10 +112,181 @@ return m.group(1) +def make_temp_script(): + """Creates a temporary file to hold scripts for various utilities""" + fname = os.tempnam() + f = file(fname, "w+") + return (fname, f) + + +def tolist(e): + if type(e) == type([]): + return e + else: + return [e] + + +def geom_sector_size(dev): + xml = get_geom_xml() + for cls in xml["mesh"]["class"]: + if "geom" in cls: + for geom in tolist(cls["geom"]): + if "provider" in geom: + for provider in tolist(geom["provider"]): + if provider["name"].data == dev and "sectorsize" in provider: + return int(provider["sectorsize"].data) + return None + + +def exec_cmd(cmd, input = None): + """ + Convenience function that executes the command specified by + the cmd argument and returns its exit status and its output from both stdout + and stderr. Optionally, a simple string can be send to the process' + stdin. + """ + logging.info("Executing %s" %cmd) + p = popen2.Popen4(cmd) + if input != None: + p.tochild.write(input) + p.tochild.flush() + buf = "" + while p.poll() == -1: + buf += p.fromchild.read(4096) + buf += p.fromchild.read() + p.fromchild.close() + p.tochild.close() + w = p.wait() + return (os.WEXITSTATUS(w), buf) + + +def create_fdisk_partition(dev, index, offset_sectors, size_sectors, flags=[]): + global cmd_fdisk + temp_fname, f = make_temp_script() + # Create the script + f.write("p %d 165 %d %d\n" % (index, offset_sectors, size_sectors)) + if "active" in flags: + f.write("a %d\n" % index) + f.close() + # Execute the script + if "init" in flags: + cmd = "%s -i -f %s %s" % (cmd_fdisk, temp_fname, dev) + else: + cmd = "%s -f %s %s" % (cmd_fdisk, temp_fname, dev) + code, output = exec_cmd(cmd) + os.unlink(temp_fname) + if code != 0: + return (code, output, None) + if 'boot' in flags: + # Make the device bootable + code, o = exec_cmd("%s -B %s" % (cmd_fdisk, dev), "y\ny\n") + output += o + if code != 0: + return (code, o, None) + # Make fdisk report what it has done + cmd = "%s -p %s" % (cmd_fdisk, dev) + code, dump = exec_cmd(cmd) + if code != 0: + return (code, None, None) + m = re.search(r"p %d .+ (\d+) (\d+)" % index, dump) + if m == None: + return (1, None, None) + p_start = int(m.group(1)) + p_length = int(m.group(2)) + return (0, output, p_start+p_length) + + +def create_bsdlabel_partition(dev, index, offset_sectors, size_sectors, flags=[], fs_type="4.2BSD"): + global cmd_bsdlabel, bsdlabel_map + output = "" + if "init" in flags: + # Initialize the bsdlabel table + code, o = exec_cmd("%s -w %s" % (cmd_bsdlabel, dev)) + output += o + if code != 0: + return (code, output, None) + if "boot" in flags: + # Install boot loader + code, o = exec_cmd("%s -B %s" % (cmd_bsdlabel, dev)) + output += o + if code != 0: + return (code, output, None) + # Read the current label + code, label = exec_cmd("%s %s" % (cmd_bsdlabel, dev)) + if code != 0: + return (code, label, None) + label = label.replace("\t", " ") # get rid of multiple whitespace + while label.find(" ") != -1: + label = label.replace(" ", " ") + label_found = False + lines = [x.strip() for x in label.split("\n")] + for i, line in enumerate(lines): + if line.find(":") == -1: + continue + letter, rest = [x.strip() for x in line.split(":", 1)] + rest = [x.strip() for x in rest.split(" ")] + if bsdlabel_map[index] == letter: # modify the label "in place" + label_found = True + lines[i] = "%s: %d %d %s" % (letter, size_sectors, offset_sectors, fs_type) + if not label_found: + lines.append("%s: %d %d %s" % (bsdlabel_map[index], size_sectors, offset_sectors, fs_type)) + # Create the bsdlabel script and run it through bsdlabel + script_fname, f = make_temp_script() + f.write("\n".join(lines)) + f.write("\n") + f.close() + code, output = exec_cmd("%s -R %s %s" % (cmd_bsdlabel, dev, script_fname)) + #os.unlink(script_fname) + if code != 0: + return (code, output, None) + # Verify the result & fetch the last_offset + code, label = exec_cmd("%s %s" % (cmd_bsdlabel, dev)) + if code != 0: + return (code, label, None) + m = re.search(r"\s+%s:\s+(\d+)\s+(\d+)" % bsdlabel_map[index], label) + if m == None: + return (1, "Cannot parse the label:\n"+label, None) + p_length = int(m.group(1)) + p_offset = int(m.group(2)) + return (0, output, p_offset+p_length) + + +def newfs_simple(dev, fs_type): + """Creates a "simple" file system on the given device""" + global cmd_newfs, cmd_mke2fs + if not dev.startswith("/dev/"): + dev = "/dev/"+dev + if fs_type == "UFS": + cmd = "%s %s" % (cmd_newfs, dev) + elif fs_type == "UFS+SU": + cmd = "%s -U %s" % (cmd_newfs, dev) + elif fs_type == "Ext2": + cmd = "%s %s" % (cmd_mke2fs, dev) + else: + return (1, "Unknown file system type "+fs_type) + return exec_cmd(cmd) + + +def newfs_ufsgj(dev): + """Create a gjournaled UFS on the given device""" + global cmd_newfs, cmd_gjournal, cmd_kldstat, cmd_kldload + if not dev.startswith("/dev/"): + dev = "/dev/"+dev + code, kldlist = exec_cmd(cmd_kldstat) + if kldlist.find("geom_journal") == -1: + code, output = exec_cmd("%s geom_journal" % cmd_kldload) + if code != 0: + return (code, "Cannot kldload geom_journal: "+output) + code, output = exec_cmd("%s label -f %s" % (cmd_gjournal, dev)) + if code != 0: + return (code, "Canno label gjournal: "+output) + return exec_cmd("%s -J %s.journal" % (cmd_newfs, dev)) + + if __name__ == "__main__": xml = get_geom_xml() for cls in xml["mesh"]["class"]: if cls["name"].data == "DISK": for geom in cls["geom"]: - print geom["name"].data, geom["provider"]["mediasize"].data + print geom["name"].data, geom["provider"]["mediasize"].data, geom_sector_size(geom["name"].data) ==== //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#9 (text+ko) ==== @@ -23,8 +23,9 @@ import os, sys import re -import logging +import logging, warnings from threading import Thread, Lock +from StringIO import StringIO import globals import freebsd @@ -52,6 +53,10 @@ return [e] +class SysToolJobException(Exception): + pass + + class SysToolJob(Thread): """A generic asynchronous SysTool job""" @@ -68,16 +73,98 @@ class PartitionJob(SysToolJob): """A partitioning SysTool job. This one accept a list of partitions - to create and creates them one by one.""" + to create and creates them one by one. The list cannot be arbitrary, + it is evaluated sequentially. After creation, the partitions are also + formatted with the file system specified (if any). + Elements of part_spec list are dictionaries which contain keys: + base - base device on which to create the part. + type - partition type + size - size in MB + name - expected name of the created part. + fs - file system to create on the part. + type can be: fdisk | bsdlabel | zvol | zfs, + and fs can be: UFS+SU | UFS+GJ | Ext2 | ZFS + If error is encountered during any of the operations, the job is + terminated, self.finished, self.error and self.result are set. + """ def __init__(self, part_spec): SysToolJob.__init__(self) self.part_spec = part_spec + def run(self): + # A thread + buf = StringIO() + fdisk_part_nr = 1 # fdisk partitions start from 1 + fdisk_last_offset = 1 # in sectors + bsdlabel_nr = 0 # bsdlabels start from 0 + bsdlabel_last_offset = 1 for i, part in enumerate(self.part_spec): self.percent_complete = self._calc_percent(i, len(self.part_spec)) + if "flags" in part: + flags = [x.strip() for x in part["flags"].split(",")] + else: + flags = [] + if part["type"] == "fdisk": + # Create a fdisk partition + if "init" in flags: + fdisk_part_nr = 1 + fdisk_last_offset = 1 + if fdisk_part_nr > 4: + self.error = 2 + self.result = "Too many fdisk partitions" + break + sector_size = freebsd.geom_sector_size(part["base"]) + sectors_per_mb = (1024*1024) / sector_size + part_size_sectors = sectors_per_mb * part["size"] + code, result, last_offset = freebsd.create_fdisk_partition(part["base"], fdisk_part_nr, fdisk_last_offset, part_size_sectors, flags) + buf.write(result) + if code != 0: # error + self.error = code + self.result = buf.getvalue() + break # Bail out on first error + fdisk_last_offset = last_offset + fdisk_part_nr += 1 + elif part["type"] == "bsdlabel": + # Create a bsdlabel partition + if "init" in flags: + bsdlabel_nr = 0 + bsdlabel_last_offset = 1 + if bsdlabel_nr > 7: + self.error = 2 + self.result = "Too many bsdlabel partitions" + break + sector_size = freebsd.geom_sector_size(part["base"]) + sectors_per_mb = (1024*1024) / sector_size + part_size_sector = sectors_per_mb * part["size"] + code, result, last_offset = freebsd.create_bsdlabel_partition(part["base"], bsdlabel_nr, bsdlabel_last_offset, part_size_sector, flags) + buf.write(result) + if code != 0: + self.error = code + self.result = buf.getvalue() + break + bsdlabel_last_offset = last_offset + bsdlabel_nr += 1 + elif part["type"] == "zpool": + pass + if part["fs"] in ("UFS", "UFS+SU", "Ext2"): + code, result = freebsd.newfs_simple(part["name"], part["fs"]) + buf.write(result) + if code != 0: + self.error = code + break + elif part["fs"] == "UFS+GJ": + code, result = freebsd.newfs_ufsgj(part["name"]) + buf.write(result) + if code != 0: + self.error = code + break + if self.result == None: + self.result = buf.getvalue() + self.finished = True + class SysToolEngine: def __init__(self): @@ -85,6 +172,7 @@ self.root_live = "" # Live file system root (for binaries!) self.job_list = [] self.job_list_lock = Lock() + warnings.simplefilter('ignore', RuntimeWarning) def GetId(self): @@ -281,8 +369,10 @@ @logexception def StartPartitionJob(self, part_spec): - """Starts a job that executes a partition spec list. Returns - an integer job_id""" + """ + Starts a job that executes a partition spec list. Returns + an integer job_id + """ self.job_list_lock.acquire() job = PartitionJob(part_spec) self.job_list.append(job) @@ -294,21 +384,28 @@ @logexception def QueryJobProgress(self, job_id): - """Queries the progress of a job, returns percent complete or None - if the job is in error""" + """ + Queries the progress of a job, returns percent complete or None + if the job is in error + """ self.job_list_lock.acquire() job = self.job_list[job_id-1] self.job_list_lock.release() if job.error != None: - return None - return job.percent_complete + raise SysToolJobException, "Error %d, %s" % (job.error, job.result) + if not job.finished: + return job.percent_complete + else: + return 100 @logexception def QueryJobResult(self, job_id): - """Queries the result of a job, if the job is finished. Returns + """ + Queries the result of a job, if the job is finished. Returns a string with the job's status report or None if the job is not - yet finished.""" + yet finished. + """ self.job_list_lock.acquire() job = self.job_list[job_id-1] self.job_list_lock.release() @@ -316,3 +413,14 @@ return None return job.result + + @logexception + def QueryJobError(self, job_id): + """Queries job error status.""" + self.job_list_lock.acquire() + job = self.job_list[job_id-1] + self.job_list_lock.release() + if job.error == None: + return None + return (job.error, job.result) + From owner-p4-projects@FreeBSD.ORG Sun Aug 19 04:13:31 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8560F16A419; Sun, 19 Aug 2007 04:13:30 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1929416A468 for ; Sun, 19 Aug 2007 04:13:30 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 07EB113C467 for ; Sun, 19 Aug 2007 04:13:30 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7J4DTEt057741 for ; Sun, 19 Aug 2007 04:13:29 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7J4DTiW057738 for perforce@freebsd.org; Sun, 19 Aug 2007 04:13:29 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 04:13:29 GMT Message-Id: <200708190413.l7J4DTiW057738@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125331 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 04:13:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=125331 Change 125331 by cnst@dale on 2007/08/19 04:13:25 don't try to link files under CVS directories. This allows us to copy CVS/ directories into our tree locally, so that we can generate sane diffs for local changes of files that are branched from FreeBSD's CVS. Affected files ... .. //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#5 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#5 (text+ko) ==== @@ -1,5 +1,5 @@ #!/bin/sh -# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#4 $ +# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#5 $ # Author: Constantine A. Murenin, 2007-07 # This file creates symbolic links for GSoC2007 cnst_sensors project @@ -25,7 +25,7 @@ SDIR=`echo $i | sed "s#[.]/##g"` #source directory TDIR=`echo $SDIR | sed "s#[.]#/#g" | sed "s#^usr/#usr.#g"` #target directory # echo "Source directory: $SDIR; Target directory: $TDIR" - for j in `find $SDIR -type f` + for j in `find $SDIR -type f -and -not -path "*/CVS/*"` do FILEINDIR=`echo $j | sed "s#$SDIR/##g"` # echo "File $FILEINDIR in $SDIR" From owner-p4-projects@FreeBSD.ORG Sun Aug 19 09:23:55 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 52EAB16A41B; Sun, 19 Aug 2007 09:23:55 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1629616A418 for ; Sun, 19 Aug 2007 09:23:55 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0497413C442 for ; Sun, 19 Aug 2007 09:23:55 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7J9Nsnt000321 for ; Sun, 19 Aug 2007 09:23:54 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7J9Ns0K000318 for perforce@freebsd.org; Sun, 19 Aug 2007 09:23:54 GMT (envelope-from mharvan@FreeBSD.org) Date: Sun, 19 Aug 2007 09:23:54 GMT Message-Id: <200708190923.l7J9Ns0K000318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125337 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 09:23:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=125337 Change 125337 by mharvan@mharvan_bike-planet on 2007/08/19 09:23:27 UDP catchall plugin Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/Makefile#10 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#6 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#14 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp_catchall.c#1 add Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/Makefile#10 (text+ko) ==== @@ -8,7 +8,7 @@ CFLAGS+=-g CFLAGS+=-I/usr/local/include -all: mtund plugin_tcp.so plugin_udp.so plugin_icmp.so +all: mtund plugin_tcp.so plugin_udp.so plugin_udp_catchall.so plugin_icmp.so mtund: mtund.h mtund.c tun_dev.c gcc $(CFLAGS) $(LIBS) -o mtund mtund.c tun_dev.c @@ -19,11 +19,14 @@ plugin_udp.so: mtund.h plugin.h plugin_udp.c gcc $(CFLAGS) -shared -o plugin_udp.so plugin_udp.c +plugin_udp_catchall.so: mtund.h plugin.h plugin_udp_catchall.c + gcc $(CFLAGS) -shared -o plugin_udp_catchall.so plugin_udp_catchall.c + plugin_icmp.so: mtund.h plugin.h plugin_icmp.c gcc $(CFLAGS) -shared -o plugin_icmp.so plugin_icmp.c clean: - rm -f mtund plugin_tcp.so plugin_udp.so plugin_icmp.so *.core + rm -f mtund *.so *.core backup: rsync -a `pwd` meat:backup/ ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#6 (text+ko) ==== @@ -1185,15 +1185,18 @@ signal(SIGINT, sigcb); signal(SIGTERM, sigcb); - /* load the plugins */ - pl = load_plugin("./plugin_udp.so"); - pl->name = "udp_53"; -/* pl = load_plugin("./plugin_udp.so"); */ -/* pl->name = "udp_catchall_1234"; */ - pl = load_plugin("./plugin_tcp.so"); - pl->name = "tcp_1234"; - pl = load_plugin("./plugin_icmp.so"); - pl->name = "icmp"; + /* load the plugins */ + if (server) { + pl = load_plugin("./plugin_udp_catchall.so"); + pl->name = "udp_catchall"; + } else { /* client */ + pl = load_plugin("./plugin_udp.so"); + pl->name = "udp_53"; + } +/* pl = load_plugin("./plugin_tcp.so"); */ +/* pl->name = "tcp_1234"; */ +/* pl = load_plugin("./plugin_icmp.so"); */ +/* pl->name = "icmp"; */ if (server) { /* initialize all plugins */ ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#14 (text+ko) ==== @@ -285,6 +285,7 @@ data->tmpconns[i].status = CONN_STATUS_FREE; data->tmpconns[i].fd = -1; data->tmpconns[i].data = data; + data->tmpconns[i].clid = 0; } data->conn = NULL; @@ -496,7 +497,7 @@ recv_error: /* connection broke down or client disconnected */ conn_discard(conn); - plugin_report(data->pl, clid, REPORT_ERROR_RECEIVE); + //plugin_report(data->pl, conn->clid, REPORT_ERROR_RECEIVE); } int From owner-p4-projects@FreeBSD.ORG Sun Aug 19 11:09:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 35BEC16A41A; Sun, 19 Aug 2007 11:09:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF2A316A417 for ; Sun, 19 Aug 2007 11:09:06 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DE8D613C428 for ; Sun, 19 Aug 2007 11:09:06 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JB96CH010350 for ; Sun, 19 Aug 2007 11:09:06 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JB964L010347 for perforce@freebsd.org; Sun, 19 Aug 2007 11:09:06 GMT (envelope-from andrew@freebsd.org) Date: Sun, 19 Aug 2007 11:09:06 GMT Message-Id: <200708191109.l7JB964L010347@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125341 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 11:09:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=125341 Change 125341 by andrew@andrew_hermies on 2007/08/19 11:08:43 Make the db_next_patch and db_rollback_count values volatile as they could be changed at any time by the thread watching freebsd-update When there were updated avaliable but they were installed the value was not reset. Fix this. Clear the kqueue when it fires. This stops the backend using all avaliable CPU clearing out the events on an update. Fix the number given to installed patches Run freebsd-update. This has been tested on a jail donated by marcus@ Check the return value of property_find before attempting to strdup it Make /tmp/facund 0777 so everyone will be able to access it. Let the UNAME_r environment override the release value from uname(3) Affected files ... .. //depot/projects/soc2007/andrew-update/backend/facund-be.c#24 edit Differences ... ==== //depot/projects/soc2007/andrew-update/backend/facund-be.c#24 (text+ko) ==== @@ -110,8 +110,8 @@ char *db_dir; int db_fd; - unsigned int db_next_patch; - unsigned int db_rollback_count; + volatile unsigned int db_next_patch; + volatile unsigned int db_rollback_count; char *db_tag_file; struct fbsd_tag_line *db_tag_line; @@ -262,6 +262,8 @@ lstat(install_link, &sb) == 0 && S_ISLNK(sb.st_mode)) { watched_db[pos].db_next_patch = watched_db[pos].db_tag_line->tag_patch; + } else { + watched_db[pos].db_next_patch = 0; } /* Look for the rollback link and check if it is a symlink */ @@ -321,8 +323,9 @@ watched_db[pos].db_fd = open(watched_db[pos].db_dir, O_RDONLY); /* Create an event to look for files being added to the dir */ - EV_SET(&event, watched_db[pos].db_fd, EVFILT_VNODE, EV_ADD, - NOTE_WRITE | NOTE_DELETE | NOTE_EXTEND, 0, (void *)pos); + EV_SET(&event, watched_db[pos].db_fd, EVFILT_VNODE, + EV_ADD | EV_CLEAR, NOTE_WRITE | NOTE_DELETE | NOTE_EXTEND, + 0, (void *)pos); kevent(kq, &event, 1, NULL, 0, NULL); } @@ -385,14 +388,6 @@ break; } - /* - * Wait for any disk activity to - * quieten down before waiting again - */ - if (use_kqueue) { - sleep(10); - } - /* Wait for posible updates */ if (use_kqueue == 1) { /* Wait for posible updates ready to be installed */ @@ -503,6 +498,7 @@ if (ptr[0] == '\0') { return 0; } + pos++; } return -1; @@ -898,7 +894,7 @@ /* Calculate the patch level */ level = watched_db[i].db_tag_line->tag_patch; - level -= rollback_pos + 1; + level -= rollback_pos - 1; if (watched_db[i].db_next_patch > 0) level--; @@ -989,9 +985,8 @@ if (arg == NULL) return -1; } - asprintf(&cmd, "echo " FREEBSD_COMMAND " %s %s", - (arg == NULL ? "" : arg), command); - //asprintf(&command, FREEBSD_COMMAND " install"); + asprintf(&cmd, FREEBSD_COMMAND " %s %s", (arg == NULL ? "" : arg), + command); free(arg); if (cmd == NULL) { @@ -1118,7 +1113,7 @@ pthread_t update_thread, comms_thread; struct facund_conn *conn; const char *config_file; - char *basedirs_string; + char *basedirs_string, *uname_r; unsigned int pos; int config_fd; properties config_data; @@ -1166,8 +1161,11 @@ errx(1, "Could not read the config file"); } - basedirs_string = strdup(property_find(config_data, - "base_dirs")); + basedirs_string = property_find(config_data, "base_dirs"); + if (basedirs_string == NULL) { + errx(1, "Incorrect config file"); + } + basedirs_string = strdup(basedirs_string); if (basedirs_string == NULL) { errx(1, "Malloc failed"); } @@ -1186,11 +1184,17 @@ if (conn == NULL) { errx(1, "Could not open a socket: %s\n", strerror(errno)); } + chmod("/tmp/facund", 0777); /* Get the uname data */ if (uname(&facund_uname) != 0) { errx(1, "Could not get the Operating System version\n"); } + uname_r = getenv("UNAME_r"); + if (uname_r != NULL) { + strlcpy(facund_uname.release, uname_r, + sizeof facund_uname.release); + } /* Add the callbacks for each call */ facund_server_add_call("ping", facund_call_ping); From owner-p4-projects@FreeBSD.ORG Sun Aug 19 11:18:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5090116A41B; Sun, 19 Aug 2007 11:18:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1696F16A418 for ; Sun, 19 Aug 2007 11:18:19 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E191C13C442 for ; Sun, 19 Aug 2007 11:18:18 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JBIIPm010916 for ; Sun, 19 Aug 2007 11:18:18 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JBIIf4010913 for perforce@freebsd.org; Sun, 19 Aug 2007 11:18:18 GMT (envelope-from andrew@freebsd.org) Date: Sun, 19 Aug 2007 11:18:18 GMT Message-Id: <200708191118.l7JBIIf4010913@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125342 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 11:18:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=125342 Change 125342 by andrew@andrew_hermies on 2007/08/19 11:17:39 Add isOpen to a connection to check if the conenction is live and use if when connecting Affected files ... .. //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#13 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#13 edit Differences ... ==== //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#13 (text+ko) ==== @@ -64,7 +64,8 @@ def getConnectionStatus(self): '''Returns the connection state''' - return self.__connection is not None + return self.__connection is not None and \ + self.__connection.isOpen() def getDirs(self): '''Returns the computer's directories to update''' @@ -160,7 +161,12 @@ try: self.__connection = \ - facund.network.Connection(self.__host, self.__socket) + facund.network.Connection(self.__host,self.__socket) + if not self.__connection.isOpen(): + print "Couldn't connect to %s " % (self.__host or self.__socket) + del self.__connection + self.__connection = None + return # Start the communication thread self.start() ==== //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#13 (text+ko) ==== @@ -36,12 +36,16 @@ def __init__(self, server, socket): self.popen = subprocess.Popen(["/usr/bin/ssh", server, "/usr/bin/nc -oU %s" % socket], stdin=subprocess.PIPE, stdout=subprocess.PIPE) self.stdout = self.popen.stdout.fileno() - print poll() + + def isOpen(self): + return self.popen.poll() is None def read(self, len): + assert self.isOpen() return os.read(self.stdout, len) def write(self, buf): + assert self.isOpen() self.popen.stdin.write(buf) class SocketComms: @@ -49,6 +53,9 @@ self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self.socket.connect(server) + def isOpen(self): + return true + def read(self, len): return self.socket.recv(len) @@ -83,6 +90,9 @@ # Mark the class as ready and able to disconnect self.isReady = True + def isOpen(self): + return self.__connection.isOpen() + def disconnect(self): if self.isReady: self.isReady = False From owner-p4-projects@FreeBSD.ORG Sun Aug 19 12:12:26 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A535716A46B; Sun, 19 Aug 2007 12:12:26 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F8EF16A419 for ; Sun, 19 Aug 2007 12:12:26 +0000 (UTC) (envelope-from smilicic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4387713C478 for ; Sun, 19 Aug 2007 12:12:26 +0000 (UTC) (envelope-from smilicic@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JCCQq4015830 for ; Sun, 19 Aug 2007 12:12:26 GMT (envelope-from smilicic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JCCPfa015827 for perforce@freebsd.org; Sun, 19 Aug 2007 12:12:25 GMT (envelope-from smilicic@FreeBSD.org) Date: Sun, 19 Aug 2007 12:12:25 GMT Message-Id: <200708191212.l7JCCPfa015827@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to smilicic@FreeBSD.org using -f From: Sonja Milicic To: Perforce Change Reviews Cc: Subject: PERFORCE change 125344 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 12:12:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=125344 Change 125344 by smilicic@tanarri_marilith on 2007/08/19 12:12:06 userland dumper utility cleaned up unnecessary debug messages fixed a bug with snapshot files not being truncated Affected files ... .. //depot/projects/soc2007/smilicic_glog/sbin/geom/log/glog_dump.c#1 add .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.c#10 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_alloctable.c#3 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.c#5 edit Differences ... ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.c#10 (text+ko) ==== @@ -255,7 +255,7 @@ } /*warn if the log file was made with different version of glog*/ if (head.version != G_LOG_VERSION) - G_LOG_DEBUG(0, "Header version: %d\nCurrent version: %d" + G_LOG_DEBUG(0, "Header version: %d Current version: %d" , head.version, G_LOG_VERSION); /*restore alloc table from file*/ sc->sc_curr_offset = sizeof(head); @@ -364,7 +364,6 @@ if (*num_arg == 2) { prov = gctl_get_asciiparam(req, "arg0"); file = gctl_get_asciiparam(req, "arg1"); - G_LOG_DEBUG(0, "Start"); gp = g_log_create_geom(prov, file, mp, &err); sc = gp->softc; KASSERT(sc != NULL, ("%s: sc is null", __func__)); @@ -480,12 +479,10 @@ switch(bp->bio_cmd) { case BIO_WRITE: - G_LOG_DEBUG(0, "Write request received."); g_log_post_event(&sc->sc_events, GLOG_EVWRITE, GLOG_FLAG_WAKEUP_SC, bp, 0); break; case BIO_READ: - G_LOG_DEBUG(0, "Read request received."); g_log_post_event(&sc->sc_events, GLOG_EVREAD, GLOG_FLAG_WAKEUP_SC, bp, 0); break; @@ -657,8 +654,6 @@ free(ev,M_GLOG); sleep: tsleep(es, PRIBIO, "glogidle", hz); } - G_LOG_DEBUG(0, "Worker died."); - } /* adds event to event queue */ static int @@ -772,8 +767,6 @@ /*reset buffer offset*/ offset_buf = 0; - G_LOG_DEBUG(0, "Requested %jd, %jd", bp->bio_offset, bp->bio_length); - /*retrieve request sublist*/ g_log_alloctable_get(sc, bp->bio_offset, (ssize_t)bp->bio_length); @@ -799,13 +792,8 @@ M_GLOG); } - /*dumping bio_data*/ - G_LOG_DEBUG(0, "Dumping bio data"); - for (i = 0; i < bp->bio_length; i++) - printf("%c", (char)(bp->bio_data[i])); bp->bio_completed = bp->bio_length; g_io_deliver(bp, 0); - printf("\nDone."); } /*commits the log file*/ @@ -874,11 +862,14 @@ char *data; size_t offset, filesize; - ss_vn = g_log_open_file(sc->sc_snapshot, FWRITE | O_CREAT | O_TRUNC, S_IWUSR); + ss_vn = g_log_open_file(sc->sc_snapshot, FWRITE | O_CREAT | O_TRUNC, + S_IWUSR); head = malloc(sizeof(*head), M_GLOG, M_WAITOK | M_ZERO); gd = malloc(sizeof(*gd), M_GLOG, M_WAITOK | M_ZERO); offset = 0; filesize = g_log_get_size(sc->sc_vn); + /*truncate snapshot file*/ + ss_vn = g_log_empty_file(ss_vn, sc->sc_snapshot); /*copy the contents of current log file to snapshot file*/ /*first, the header*/ g_log_read_data(sc->sc_vn, head, sizeof(*head), 0); ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_alloctable.c#3 (text+ko) ==== @@ -80,7 +80,6 @@ ae->data_size = OFFSET_RANGE; g_log_alloctable_add(ae, sc->sc_alloctable, type); } - G_LOG_DEBUG(0, "Done adding"); } /*restore an alloc table from a log file*/ @@ -100,20 +99,15 @@ /*read entries from the log file one by one and convert them to entries in alloc list*/ filesize = g_log_get_size(sc->sc_vn); - G_LOG_DEBUG(0, "filesize = %d", filesize); while (sc->sc_curr_offset < filesize){ err = g_log_read_data(vp, gd, sizeof(*gd), sc->sc_curr_offset); ae->offset_disk = gd->offset_disk; ae->offset_log = gd->offset_log; ae->data_size = gd->data_size; sc->sc_curr_offset += gd->offset_log + gd->data_size; - G_LOG_DEBUG(0, "Found element %jd %jd %d, adding, curr offset " - "%jd", ae->offset_disk, ae->offset_log, ae->data_size, - sc->sc_curr_offset); g_log_alloctable_add(ae, sc->sc_alloctable, type); } - G_LOG_DEBUG(0, "Done adding"); free(gd, type); free(ae, type); } @@ -285,8 +279,6 @@ g_log_alloctable_get_rec(sc, 0, size, key+1, pos); } else { - G_LOG_DEBUG(0, "Adding %jd %d", ae->offset_disk, - ae->data_size); size -= ae->data_size; gd.offset_disk = ae->offset_disk; gd.offset_log = ae->offset_log; ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.c#5 (text+ko) ==== @@ -82,7 +82,6 @@ strcpy(head.text, "GEOM_LOG"); head.version = G_LOG_VERSION; - G_LOG_DEBUG(0, "Writing %s %d", head.text, head.version); g_log_write_file(vp, &head, sizeof(head),0); } int @@ -182,8 +181,6 @@ int err, i; KASSERT(sc != 0, ("%s: sc is null", __func__)); - G_LOG_DEBUG(0, "Reading element %jd, %jd, %d", gd->offset_disk, - gd->offset_log, gd->data_size); if (gd->offset_log == -1) {/*read from disk*/ tmp_buf = g_read_data(sc->sc_cons_disk, gd->offset_disk, gd->data_size, &err); From owner-p4-projects@FreeBSD.ORG Sun Aug 19 12:30:50 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7854516A46B; Sun, 19 Aug 2007 12:30:50 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D37716A41B for ; Sun, 19 Aug 2007 12:30:50 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3CDDE13C480 for ; Sun, 19 Aug 2007 12:30:50 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JCUoOe016718 for ; Sun, 19 Aug 2007 12:30:50 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JCUnhR016715 for perforce@freebsd.org; Sun, 19 Aug 2007 12:30:49 GMT (envelope-from mharvan@FreeBSD.org) Date: Sun, 19 Aug 2007 12:30:49 GMT Message-Id: <200708191230.l7JCUnhR016715@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125345 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 12:30:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=125345 Change 125345 by mharvan@mharvan_bike-planet on 2007/08/19 12:30:34 udp catchall plugin should set up a socket only after the daemon determines that payload was not garbage Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#7 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp_catchall.c#2 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#7 (text+ko) ==== @@ -1074,6 +1074,7 @@ "plugin %s\n", pl->name); set_client_pl(cl, pl); cl->ping_counter = 0; + send_echo_request(cl); return; } else { fprintf(stderr, "plugin %s failed to " ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp_catchall.c#2 (text+ko) ==== @@ -53,6 +53,9 @@ /* previous value of net.inet.raw.udp_catchall sysctl variable */ int old_sysctl; size_t old_sysctl_size; + /* last connection - addresses */ + struct sockaddr_in sa1; + struct sockaddr_in sa2; }; void plugin_accept_new_conn(int fd, short ev_type, void *arg); @@ -207,8 +210,11 @@ { struct conn *conn = &data->conns[clid]; - if (conn->clid == clid && conn->fd == fd) + printf("conn_update_to_perm()\n"); + if (conn->clid == clid && conn->fd == fd){ + printf("nothing to do...\n"); return; /* nothing to do */ + } /* discard previous connection */ if (conn->status == CONN_STATUS_PERM) @@ -217,10 +223,13 @@ /* set up the new connection */ conn->fd = fd; conn->clid = clid; + conn->status = CONN_STATUS_PERM; event_set(&conn->ev, conn->fd, EV_PERSIST | EV_READ, plugin_receive, conn); event_add(&conn->ev, NULL); evtimer_set(&conn->timer_ev, plugin_conn_timeout, conn); + + data->conn = conn; } @@ -230,27 +239,97 @@ struct plugin_udpall_data *data = pl->data; struct conn *conn = data->conn; int fd; + int new_fd; + struct timeval tv; - /* update the connection status */ - switch (conn_flag) { - case CONN_DISCARD: - conn_discard(conn); + printf("plugin_conn_map()\n"); + + if (conn->status == CONN_STATUS_FREE) { /* new connection */ + printf("setting up a new connection\n"); + switch (conn_flag) { + case CONN_DISCARD: return; - case CONN_TEMP: - break; + case CONN_TEMP: + break; + + case CONN_PERM: + conn = &data->conns[clid]; + break; + + default: + warnx("plugin_udp_catchall: invalid conn_flag 0x%x\n", + conn_flag); + return; + } - case CONN_PERM: - /* migrate a temporary connection to a permanent one */ - fd = conn->fd; - if (conn->status == CONN_STATUS_TEMP) { - conn->status = CONN_STATUS_FREE; - evtimer_del(&conn->timer_ev); - event_del(&conn->ev); - conn->fd = -1; + /* set up the socket */ + new_fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); + if (new_fd == -1) { + warn("socket() failed"); + return; + } + /* set the source port */ + if (0 != bind(new_fd, (struct sockaddr *)&data->sa1, + sizeof(struct sockaddr))) { + warn("bind() failed"); + close(new_fd); + return; + } + /* set the destination address and port */ + if (0 != connect(new_fd, (struct sockaddr *)&data->sa2, + sizeof(struct sockaddr))) { + warn("connect() failed"); + close(new_fd); + return; + } + printf("new client connection accepted\n"); + + conn->fd = new_fd; + event_set(&conn->ev, conn->fd, EV_PERSIST | EV_READ, + plugin_receive, conn); + event_add(&conn->ev, NULL); + evtimer_set(&conn->timer_ev, plugin_conn_timeout, conn); + if (conn_flag == CONN_TEMP) { + conn->clid = 0; + conn->status = CONN_STATUS_TEMP; + + tv.tv_sec = TEMP_CONN_TIMEOUT; + tv.tv_usec = 0; + evtimer_add(&conn->timer_ev, &tv); + } else { /* CONN_PERM */ + conn->clid = clid; + conn->status = CONN_STATUS_PERM; + data->conn = conn; + } + + } else { /* existing connection - update the connection status */ + printf("updating an existing connection\n"); + switch (conn_flag) { + case CONN_DISCARD: + conn_discard(conn); + return; + + case CONN_TEMP: + break; + + case CONN_PERM: + /* migrate a temporary connection to a permanent one */ + fd = conn->fd; + if (conn->status == CONN_STATUS_TEMP) { + conn->status = CONN_STATUS_FREE; + evtimer_del(&conn->timer_ev); + event_del(&conn->ev); + conn->fd = -1; + } + conn_update_to_perm(data, clid, fd); + break; + + default: + warnx("plugin_udp_catchall: invalid conn_flag 0x%x\n", + conn_flag); + return; } - conn_update_to_perm(data, clid, fd); - break; } } @@ -260,23 +339,20 @@ struct plugin_udpall_data *data = ((struct conn *)arg)->data; struct conn *conn = NULL; int i; - struct timeval tv; struct ip *iphdr; struct udphdr *uhdr; struct sockaddr_storage from; socklen_t fromlen = sizeof(from); - struct sockaddr_in sa1; - struct sockaddr_in sa2; char buf[BUFLEN]; int buflen = 0; char *bufp = buf; char *payload; int payloadlen; int nread; - int new_fd; uint8_t clid; int conn_flag; + printf("plugin_accept_new_conn()\n"); /* find a free tmpconn to store the connection metadata */ for (i = 0; i < MAXTMPCONNS; i++) if (data->tmpconns[i].status == CONN_STATUS_FREE) { @@ -287,6 +363,7 @@ printf("plugin_udp_catchall: too many new connections\n"); return; } + data->conn = conn; /* read the packet */ nread = recvfrom(data->conns->fd, buf, BUFLEN, 0, @@ -311,10 +388,10 @@ bufp += sizeof(*uhdr); buflen -= sizeof(*uhdr); - memset(&sa1,0,sizeof(sa1)); - sa1.sin_port = uhdr->uh_dport; - memcpy(&sa2, &from, sizeof(sa2)); - sa2.sin_port = uhdr->uh_sport; + memset(&data->sa1,0,sizeof(data->sa1)); + data->sa1.sin_port = uhdr->uh_dport; + memcpy(&data->sa2, &from, sizeof(data->sa2)); + data->sa2.sin_port = uhdr->uh_sport; if (buflen <= 0) return; @@ -323,43 +400,9 @@ payload = bufp; payloadlen = buflen; -/* process_data_from_plugin(data->pl, payload, payloadlen, */ -/* &clid, &conn_flag); */ - //TODO discard if CONN_DISCARD - - new_fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (new_fd == -1) - err(EX_UNAVAILABLE, "socket() failed"); - - int nbind = - bind(new_fd, (struct sockaddr *)&sa1, sizeof(struct sockaddr)); - if (nbind != 0) - err(EX_NOHOST, "bind()failed"); - - int nconnect = - connect(new_fd, (struct sockaddr *)&sa2, - sizeof(struct sockaddr)); - if (nconnect != 0) - err(EX_NOHOST, "connect() failed"); - - printf("new client connection accepted\n"); - conn->fd = new_fd; - conn->clid = 0; - conn->status = CONN_STATUS_TEMP; - event_set(&conn->ev, conn->fd, EV_PERSIST | EV_READ, - plugin_receive, conn); - event_add(&conn->ev, NULL); - - tv.tv_sec = TEMP_CONN_TIMEOUT; - tv.tv_usec = 0; - evtimer_set(&conn->timer_ev, plugin_conn_timeout, conn); - evtimer_add(&conn->timer_ev, &tv); - - data->conn = conn; - - process_data_from_plugin(data->pl, payload, payloadlen, &clid, &conn_flag); + /* conn_map() will se up the connection */ } @@ -371,6 +414,8 @@ int conn_flag; uint8_t clid = 0; + printf("plugin_receive()\n"); + n = recv(fd, packet, sizeof(packet), 0); if (n == -1) { @@ -414,6 +459,7 @@ return (SEND_PKT_SENT); else { warn("plugin_send: send returned %d", nwrite); + plugin_report(pl, clid, REPORT_ERROR_SEND); return (SEND_ERROR); } } From owner-p4-projects@FreeBSD.ORG Sun Aug 19 14:00:41 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9F4C16A420; Sun, 19 Aug 2007 14:00:41 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8951E16A41A for ; Sun, 19 Aug 2007 14:00:41 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7A23A13C465 for ; Sun, 19 Aug 2007 14:00:41 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JE0fD0036814 for ; Sun, 19 Aug 2007 14:00:41 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JE0f9i036811 for perforce@freebsd.org; Sun, 19 Aug 2007 14:00:41 GMT (envelope-from mharvan@FreeBSD.org) Date: Sun, 19 Aug 2007 14:00:41 GMT Message-Id: <200708191400.l7JE0f9i036811@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125347 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 14:00:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=125347 Change 125347 by mharvan@mharvan_bike-planet on 2007/08/19 14:00:31 use SO_REUSEPORT in the udp catchall plugin Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp_catchall.c#3 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp_catchall.c#3 (text+ko) ==== @@ -241,6 +241,7 @@ int fd; int new_fd; struct timeval tv; + int on; printf("plugin_conn_map()\n"); @@ -269,6 +270,9 @@ warn("socket() failed"); return; } + if (0 != setsockopt(new_fd, SOL_SOCKET, SO_REUSEPORT, + &on, sizeof(on))) + warn("setsockopt(SO_REUSEPORT) failed"); /* set the source port */ if (0 != bind(new_fd, (struct sockaddr *)&data->sa1, sizeof(struct sockaddr))) { From owner-p4-projects@FreeBSD.ORG Sun Aug 19 14:06:49 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9E76F16A41B; Sun, 19 Aug 2007 14:06:49 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74F7116A418 for ; Sun, 19 Aug 2007 14:06:49 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 63E2C13C468 for ; Sun, 19 Aug 2007 14:06:49 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JE6nYQ038583 for ; Sun, 19 Aug 2007 14:06:49 GMT (envelope-from karma@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JE6nSV038580 for perforce@freebsd.org; Sun, 19 Aug 2007 14:06:49 GMT (envelope-from karma@FreeBSD.org) Date: Sun, 19 Aug 2007 14:06:49 GMT Message-Id: <200708191406.l7JE6nSV038580@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to karma@FreeBSD.org using -f From: Alexey Mikhailov To: Perforce Change Reviews Cc: Subject: PERFORCE change 125348 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 14:06:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=125348 Change 125348 by karma@karma_ez on 2007/08/19 14:06:25 - Spooling - Network protocol - Minor fixes Affected files ... .. //depot/projects/soc2007/karma_audit/dlog/daemon/client.c#6 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config.c#6 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config.h#6 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/server.c#6 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/util.c#4 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/util.h#4 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/worker.c#3 edit Differences ... ==== //depot/projects/soc2007/karma_audit/dlog/daemon/client.c#6 (text+ko) ==== @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include #include #include @@ -15,16 +17,17 @@ extern int errno; -void * -client_main() +static void +client_serve(int cs) { - int s, cs, opt = 1; size_t nr = 0; - struct sockaddr_un n; - char buf[KEYWORD_MAX+PATH_MAX+1]; - char keyword[KEYWORD_MAX]; - char pathname[PATH_MAX]; - char pathbuf[PATH_MAX]; + char buf[KEYWORD_MAX+PATH_MAX+1]; + char keyword[KEYWORD_MAX]; + char pathname[PATH_MAX]; + char pathbuf[PATH_MAX]; + char filebuf[PATH_MAX]; + char jobbuf[PATH_MAX]; + long ts; struct msghdr msg; struct iovec iov[2]; union { @@ -37,6 +40,9 @@ struct sockcred uc; char b[sizeof (struct sockcred) + NGROUPS * sizeof (int)]; } cr; + int ans, r,fd; + pjob j; + cl_kw_hosts *hl; cm = &c.cm; @@ -56,6 +62,78 @@ msg.msg_iov = iov; msg.msg_iovlen = 1; + nr = recvmsg (cs, &msg, 0); + + /* TODO: could go bad here.. fix later.. */ + if ((sscanf(buf, "%s\n%s", pathname, keyword)) < 2) { + + /* TODO: wrong query */ + } + +#ifdef DEBUG + printf("RECEIVED: %s %s\n", pathname, keyword); +#endif + + if (cm -> cmsg_type == SCM_CREDS) { + memcpy(&cr, ((struct sockcred *) CMSG_DATA(cm)), + cm -> cmsg_len - sizeof(struct cmsghdr)); +#ifdef DEBUG + printf("UID %d, GID %d\n", cr.uc.sc_uid, cr.uc.sc_gid); +#endif + if ((verify_client_access(keyword, cr.uc.sc_uid, cr.uc.sc_gid)) == 0) { + /* umask! */ + snprintf(pathbuf, PATH_MAX, "%s", SPOOL_DIR); + if (mkdir(pathbuf, 0700) == -1 && errno != EEXIST) { + err_fatal("client: can't create spool dir for keyword"); + } + else + { + ts = get_timestamp(); + snprintf(filebuf, PATH_MAX, "%s/%ld.%s",pathbuf, ts,basename(pathname)); + r = link(pathname, filebuf); + /* errno == EEXIST ? modify timestamp */ + if (r < 0) { + /* Can't link to spool */ + ans = 2; + write(cs, &ans, sizeof(ans)); + return; + } + + /* populate .hds file */ + snprintf(jobbuf, PATH_MAX, "%s/.%ld.%s.hds", pathbuf,ts,basename(pathname)); + fd = open(jobbuf, O_CREAT | O_TRUNC, S_IRUSR | S_IRGRP); + hl = client_get_hosts(keyword); + while (hl == NULL) { + bzero(&j, sizeof(j)); + memcpy(&(j.sa), &(hl->hs->s), sizeof(struct sockaddr)); + j.done = 0; + write(fd, &j, sizeof(j)); + } + close(fd); + /* we re done */ + ans = 0; + write(cs, &ans, sizeof(ans)); + } + } + else + { + /* Permission denied */ + ans = 1; + write(cs, &ans, sizeof(ans)); + return ; + } + } else { + /* TODO: can't check permissions. wrong query */ + fprintf(stderr,"client: can't check permissions"); + } +} + +void * +client_main() +{ + int s, cs, opt = 1; + struct sockaddr_un n; + s = socket(PF_LOCAL, SOCK_STREAM, 0); if (s < 0) { @@ -81,44 +159,7 @@ } while ((cs = accept(s, (struct sockaddr *) NULL, NULL)) >= 0) { - - nr = recvmsg (cs, &msg, 0); - - /* TODO: could go bad here.. fix later.. */ - if ((sscanf(buf, "%s\n%s", pathname, keyword)) < 2) { - - /* TODO: wrong query */ - } - -#ifdef DEBUG - printf("RECEIVED: %s %s\n", pathname, keyword); -#endif - - if (cm -> cmsg_type == SCM_CREDS) { - memcpy(&cr, ((struct sockcred *) CMSG_DATA(cm)), - cm -> cmsg_len - sizeof(struct cmsghdr)); -#ifdef DEBUG - printf("UID %d, GID %d\n", cr.uc.sc_uid, cr.uc.sc_gid); -#endif - if ((verify_client_access(keyword, cr.uc.sc_uid, cr.uc.sc_gid)) == 0) { - /* TODO: add logfile to spool here */ - /* TODO: umask? */ - snprintf(pathbuf, PATH_MAX, "%s/%s", SPOOL_DIR, keyword); - if (mkdir(pathbuf, 0700) == -1 && errno != EEXIST) { - err_fatal("client: can't create spool dir for keyword"); - } - else - { -#if 0 - snprintf(pathbuf, PATH_MAX, "%s/%ld.%s"); -#endif - } - } - - } else { - /* TODO: can't check permissions. wrong query */ - fprintf(stderr,"client: can't check permissions"); - } + client_serve(cs); close(cs); } return 0; ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config.c#6 (text+ko) ==== @@ -21,17 +21,6 @@ struct client_kw_access * next; } cl_kw_access; -typedef struct host_ll { - struct sockaddr s; - struct host_ll *next; -} host_ll; - -typedef struct client_kw_host { - char *host; - host_ll *hs; - struct client_kw_host * next; -} cl_kw_hosts; - typedef struct server_kw_host { char *host; host_ll *hs; ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config.h#6 (text+ko) ==== @@ -4,6 +4,22 @@ #include #include +typedef struct pjob { + struct sockaddr sa; + int done; +} pjob; + +typedef struct host_ll { + struct sockaddr s; + struct host_ll *next; +} host_ll; + +typedef struct client_kw_host { + char *host; + host_ll *hs; + struct client_kw_host * next; +} cl_kw_hosts; + TTree * client_kw_tree; TTree * server_kw_tree; TTree * client_host_tree; @@ -24,4 +40,7 @@ int verify_client_access (const char * keyword, uid_t uid, gid_t gid); char * verify_server_access (struct sockaddr * sa, const char * keyword); + +cl_kw_hosts * client_get_hosts (const char * keyword); + #endif ==== //depot/projects/soc2007/karma_audit/dlog/daemon/server.c#6 (text+ko) ==== @@ -5,10 +5,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -143,10 +145,14 @@ serve_conn (int clifd, struct sockaddr *sacli) { SSL *ssl; + int ans,fd; size_t e; char buf[KEYWORD_MAX+FILENAME_MAX+2]; + char recvbuf[BUFSIZ]; char filename[FILENAME_MAX+1]; char keyword[KEYWORD_MAX+1]; + char *path; + char spoolfile[PATH_MAX]; if (myssl_accept(clifd, ssl) != 0) { fprintf(stderr, "Failed SSL negotitation\n"); @@ -160,25 +166,82 @@ if (search_bad_chars(buf) != 0) { - SSL_write(ssl, "Malformed request", strlen("Malformed request")); + ans = 1; + SSL_write(ssl, &ans, sizeof(ans)); SSL_shutdown(ssl); close(clifd); SSL_free(ssl); return; } - /* TODO: Could go bad here? */ - e = sscanf(buf, "%s\n%s", keyword, filename); + sscanf(buf, "%s\n%s", keyword, filename); - /* TODO: Verify access + receive file */ - if (verify_server_access(sacli, keyword)) + if ((path = verify_server_access(sacli, keyword)) != NULL) + { + /* OK, permission granted */ + snprintf(spoolfile, sizeof(spoolfile), "%s/%s", path, filename); + /* umask! */ + fd = open(spoolfile, O_CREAT | O_TRUNC, S_IRUSR | S_IRGRP); + if (fd == -1) { + /* Can't create job file */ + fprintf(stderr, "server: open() for %s\n", spoolfile); + ans = 2; + SSL_write(ssl, &ans, sizeof(ans)); + SSL_shutdown(ssl); + close(clifd); + SSL_free(ssl); + return; + } + while ((e = SSL_read(ssl, recvbuf, sizeof(recvbuf))) > 0) + { + write(fd, recvbuf, sizeof(recvbuf)); + } + if (e == 0) + { + /* EOF */ + ans = 0; + SSL_write(ssl, &ans, sizeof(int)); + SSL_read(ssl, &ans, sizeof(int)); + if (ans == 0) { + /* ACK */ + SSL_shutdown(ssl); + close(fd); + close(clifd); + SSL_free(ssl); + return; + } else { + /* No ACK */ + ans = 5; + SSL_write(ssl, &ans, sizeof(int)); + SSL_shutdown(ssl); + close(fd); + unlink(spoolfile); + close(clifd); + SSL_free(ssl); + return; + } + } else { + /* SSL_read */ + fprintf(stderr, "server: SSL_read()\n"); + close(fd); + unlink(spoolfile); + ans = 4; + SSL_write(ssl, &ans, sizeof(ans)); + SSL_shutdown(ssl); + close(clifd); + SSL_free(ssl); + } + } + else { - + /* Permission denied */ + ans = 3; + SSL_write(ssl, &ans, sizeof(ans)); + SSL_shutdown(ssl); + close(clifd); + SSL_free(ssl); + return; } - -#ifdef DEBUG - printf("received keyword %s with filename %s", keyword, filename); -#endif } /* Try to perform SSL handshake at clifd */ ==== //depot/projects/soc2007/karma_audit/dlog/daemon/util.c#4 (text+ko) ==== @@ -1,6 +1,7 @@ #include #include #include +#include #include "util.h" @@ -38,3 +39,11 @@ if (nl == 0) return 1; return 0; } + +long +get_timestamp () +{ + struct timeval tp; + gettimeofday(&tp, NULL); + return tp.tv_sec; +} ==== //depot/projects/soc2007/karma_audit/dlog/daemon/util.h#4 (text+ko) ==== @@ -7,5 +7,6 @@ void err_fatal (const char * msg); int search_bad_chars (const char * msg); +long get_timestamp(); #endif ==== //depot/projects/soc2007/karma_audit/dlog/daemon/worker.c#3 (text+ko) ==== @@ -1,11 +1,17 @@ #include "../config.h" +#include "config.h" #include "util.h" #include #include #include #include #include +#include +#include #include +#include +#include +#include #include #include #include @@ -14,20 +20,85 @@ static sigset_t mask; static SSL_CTX *sslContext=NULL; +static int ssl_sendfile (const char *, const char *, struct sockaddr *); + +static int +check_job (struct dirent * d) +{ + char *name, pathbuf[PATH_MAX]; + int r; + + name = d -> d_name; + + if (name[0] == '.') + return 0; + + snprintf(pathbuf, PATH_MAX, "%s/.%s.hds",SPOOL_DIR, name); + if ((r = open(pathbuf, O_RDONLY)) < 0) { + fprintf(stderr, "worker: weird spool entry %s\n", pathbuf); + return 0; + } else { + close(r); + return 1; + } +} + /* Go through spool and perform pending tasks */ static void go_queue() { - + struct dirent **namelist; + int n, i, j,isdone; + char file[PATH_MAX]; + char jobfile[PATH_MAX]; + struct stat st; + int ffd, jfd,njobs,r; + off_t filesize; + pjob *win; + char keyword[KEYWORD_MAX]; + + n = scandir(SPOOL_DIR, &namelist, check_job, alphasort); + + for (i = 0; i < n; i++) + { + isdone = 1; + snprintf(file, PATH_MAX, "%s/%s",SPOOL_DIR, namelist[i] -> d_name); + snprintf(jobfile, PATH_MAX, "%s/.%s.hds",SPOOL_DIR, namelist[i] -> d_name); + jfd = open(jobfile, O_RDWR); + stat(file, &st); + filesize = st.st_size; + win = mmap(NULL, filesize, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, ffd, 0); + if (win == MAP_FAILED) { + err_fatal("worker: mmap()"); + } + njobs = filesize / sizeof(pjob); + for (j = 0; j < njobs; j++) + { + if (win[j].done == 0) { + r = ssl_sendfile(file, keyword, &(win[j].sa)); + if (r == 0) + win[j].done = 1; + else + isdone = 0; + } + } + close(jfd); + if (isdone == 1) { + /* we're done with this entry */ + unlink(file); + unlink(jobfile); + } + } } /* Perform sending log file out */ static int ssl_sendfile (const char * pathname, const char * keyword, struct sockaddr * to) { - int sock, r, ans; + int sock, r, ans, fd; SSL* ssl; X509* cert; + char sndbuf[BUFSIZ]; char buf[FILENAME_MAX + KEYWORD_MAX + 2]; sock = socket (AF_INET, SOCK_STREAM, 0); @@ -91,7 +162,24 @@ return 1; } - /* TODO: OK, sending flle goes here */ + fd = open(pathname, O_RDONLY); + + while ((r = read(fd, sndbuf, sizeof(sndbuf))) > 0) { + SSL_write(ssl, sndbuf, sizeof(sndbuf)); + } + + SSL_read(ssl, &r, sizeof(r)); + + if (r != 0) { + fprintf(stderr, "worker: proto error\n"); + SSL_shutdown(ssl); + close(sock); + return 1; + } + + SSL_shutdown(ssl); + close(sock); + return 0; } From owner-p4-projects@FreeBSD.ORG Sun Aug 19 16:41:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B66516A420; Sun, 19 Aug 2007 16:41:59 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26A3616A41A for ; Sun, 19 Aug 2007 16:41:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 185B513C45A for ; Sun, 19 Aug 2007 16:41:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JGfw9r055792 for ; Sun, 19 Aug 2007 16:41:58 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JGfwGK055789 for perforce@freebsd.org; Sun, 19 Aug 2007 16:41:58 GMT (envelope-from gonzo@FreeBSD.org) Date: Sun, 19 Aug 2007 16:41:58 GMT Message-Id: <200708191641.l7JGfwGK055789@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 125350 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 16:41:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=125350 Change 125350 by gonzo@gonzo_jeeves on 2007/08/19 16:41:07 o -O2 generates definitly broken code: accessing constant string by address out of .rodata section range, -O1 breaks ld as well, though I haven't spent much time investingating this issue. PR/bugreports will follow. Affected files ... .. //depot/projects/mips2/src/share/mk/sys.mk#5 edit Differences ... ==== //depot/projects/mips2/src/share/mk/sys.mk#5 (text+ko) ==== @@ -35,7 +35,7 @@ CFLAGS ?= -O .else CC ?= cc -CFLAGS ?= -O2 -fno-strict-aliasing -pipe +CFLAGS ?= -fno-strict-aliasing -pipe .endif CXX ?= c++ From owner-p4-projects@FreeBSD.ORG Sun Aug 19 16:48:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9BC9616A41A; Sun, 19 Aug 2007 16:48:07 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5868116A418 for ; Sun, 19 Aug 2007 16:48:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 31E9B13C465 for ; Sun, 19 Aug 2007 16:48:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JGm7VM064577 for ; Sun, 19 Aug 2007 16:48:07 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JGm6F6064574 for perforce@freebsd.org; Sun, 19 Aug 2007 16:48:06 GMT (envelope-from gonzo@FreeBSD.org) Date: Sun, 19 Aug 2007 16:48:06 GMT Message-Id: <200708191648.l7JGm6F6064574@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 125351 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 16:48:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=125351 Change 125351 by gonzo@gonzo_jeeves on 2007/08/19 16:47:26 o Add initial support for IDT 79RC32434 device (actually, only console). Affected files ... .. //depot/projects/mips2/src/sys/mips/conf/IDT#1 add .. //depot/projects/mips2/src/sys/mips/conf/IDT.hints#1 add .. //depot/projects/mips2/src/sys/mips/mips32/idt/console.c#1 add .. //depot/projects/mips2/src/sys/mips/mips32/idt/files.idt#1 add .. //depot/projects/mips2/src/sys/mips/mips32/idt/idt_machdep.c#1 add .. //depot/projects/mips2/src/sys/mips/mips32/idt/std.idt#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sun Aug 19 16:53:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3787316A421; Sun, 19 Aug 2007 16:53:14 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EFD916A41B for ; Sun, 19 Aug 2007 16:53:14 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DB1C913C45D for ; Sun, 19 Aug 2007 16:53:13 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JGrDqd065039 for ; Sun, 19 Aug 2007 16:53:13 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JGrDdn065036 for perforce@freebsd.org; Sun, 19 Aug 2007 16:53:13 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 16:53:13 GMT Message-Id: <200708191653.l7JGrDdn065036@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125352 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 16:53:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=125352 Change 125352 by cnst@dale on 2007/08/19 16:52:27 branch sysctl.3 Affected files ... .. //depot/projects/soc2007/cnst-sensors/lib.libc.gen/sysctl.3#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Sun Aug 19 17:07:32 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1144716A41A; Sun, 19 Aug 2007 17:07:32 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB35A16A418 for ; Sun, 19 Aug 2007 17:07:31 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CD18F13C46E for ; Sun, 19 Aug 2007 17:07:31 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JH7VvB067001 for ; Sun, 19 Aug 2007 17:07:31 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JH7VSR066998 for perforce@freebsd.org; Sun, 19 Aug 2007 17:07:31 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 17:07:31 GMT Message-Id: <200708191707.l7JH7VSR066998@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125353 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 17:07:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=125353 Change 125353 by cnst@dale on 2007/08/19 17:06:36 remove useless comments: first of all, these MIBs are not available since long ago second, this description for these MIBs is awfully wrong Sponsored by: Google Summer of Code 2007 Affected files ... .. //depot/projects/soc2007/cnst-sensors/lib.libc.gen/sysctl.3#2 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/lib.libc.gen/sysctl.3#2 (text+ko) ==== @@ -282,8 +282,6 @@ .It "HW_PAGESIZE integer no" .It "HW_FLOATINGPOINT integer no" .It "HW_MACHINE_ARCH string no" -.\".It "HW_DISKNAMES integer no" -.\".It "HW_DISKSTATS integer no" .El .Pp .Bl -tag -width 6n @@ -305,8 +303,6 @@ Nonzero if the floating point support is in hardware. .It Li HW_MACHINE_ARCH The machine dependent architecture type. -.\".It Fa HW_DISKNAMES -.\".It Fa HW_DISKSTATS .El .Ss CTL_KERN The string and integer information available for the CTL_KERN level From owner-p4-projects@FreeBSD.ORG Sun Aug 19 17:16:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AA47116A47E; Sun, 19 Aug 2007 17:16:43 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DC4C16A421 for ; Sun, 19 Aug 2007 17:16:43 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6E61013C483 for ; Sun, 19 Aug 2007 17:16:43 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JHGhfC067546 for ; Sun, 19 Aug 2007 17:16:43 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JHGhdV067543 for perforce@freebsd.org; Sun, 19 Aug 2007 17:16:43 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 17:16:43 GMT Message-Id: <200708191716.l7JHGhdV067543@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125354 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 17:16:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=125354 Change 125354 by cnst@dale on 2007/08/19 17:16:25 someone made up a non-existent constant for hw.floatingpoint, now let's document the correct define Sponsored by: Google Summer of Code 2007 Affected files ... .. //depot/projects/soc2007/cnst-sensors/lib.libc.gen/sysctl.3#3 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/lib.libc.gen/sysctl.3#3 (text+ko) ==== @@ -280,7 +280,7 @@ .It "HW_PHYSMEM integer no" .It "HW_USERMEM integer no" .It "HW_PAGESIZE integer no" -.It "HW_FLOATINGPOINT integer no" +.It "HW_FLOATINGPT integer no" .It "HW_MACHINE_ARCH string no" .El .Pp @@ -299,7 +299,7 @@ The bytes of non-kernel memory. .It Li HW_PAGESIZE The software page size. -.It Li HW_FLOATINGPOINT +.It Li HW_FLOATINGPT Nonzero if the floating point support is in hardware. .It Li HW_MACHINE_ARCH The machine dependent architecture type. From owner-p4-projects@FreeBSD.ORG Sun Aug 19 17:19:48 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4608B16A41A; Sun, 19 Aug 2007 17:19:48 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1D7D16A417 for ; Sun, 19 Aug 2007 17:19:47 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E3B4913C459 for ; Sun, 19 Aug 2007 17:19:47 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JHJlWc067667 for ; Sun, 19 Aug 2007 17:19:47 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JHJlv3067664 for perforce@freebsd.org; Sun, 19 Aug 2007 17:19:47 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 17:19:47 GMT Message-Id: <200708191719.l7JHJlv3067664@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125355 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 17:19:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=125355 Change 125355 by cnst@dale on 2007/08/19 17:19:47 document hw.realmem Sponsored by: Google Summer of Code 2007 Affected files ... .. //depot/projects/soc2007/cnst-sensors/lib.libc.gen/sysctl.3#4 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/lib.libc.gen/sysctl.3#4 (text+ko) ==== @@ -282,6 +282,7 @@ .It "HW_PAGESIZE integer no" .It "HW_FLOATINGPT integer no" .It "HW_MACHINE_ARCH string no" +.It "HW_REALMEM integer no" .El .Pp .Bl -tag -width 6n @@ -303,6 +304,8 @@ Nonzero if the floating point support is in hardware. .It Li HW_MACHINE_ARCH The machine dependent architecture type. +.It Li HW_REALMEM +The bytes of real memory. .El .Ss CTL_KERN The string and integer information available for the CTL_KERN level From owner-p4-projects@FreeBSD.ORG Sun Aug 19 19:03:55 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 78E1816A41B; Sun, 19 Aug 2007 19:03:55 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C17B16A419 for ; Sun, 19 Aug 2007 19:03:55 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3D86313C46A for ; Sun, 19 Aug 2007 19:03:55 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JJ3tVM077039 for ; Sun, 19 Aug 2007 19:03:55 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JJ3sZo077036 for perforce@freebsd.org; Sun, 19 Aug 2007 19:03:54 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 19:03:54 GMT Message-Id: <200708191903.l7JJ3sZo077036@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125356 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 19:03:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=125356 Change 125356 by cnst@dale on 2007/08/19 19:03:35 document HW_SENSORS Obtained from: OpenBSD Affected files ... .. //depot/projects/soc2007/cnst-sensors/lib.libc.gen/sysctl.3#5 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/lib.libc.gen/sysctl.3#5 (text+ko) ==== @@ -283,6 +283,7 @@ .It "HW_FLOATINGPT integer no" .It "HW_MACHINE_ARCH string no" .It "HW_REALMEM integer no" +.It "HW_SENSORS node not applicable" .El .Pp .Bl -tag -width 6n @@ -306,6 +307,34 @@ The machine dependent architecture type. .It Li HW_REALMEM The bytes of real memory. +.It Li HW_SENSORS +Third level comprises an array of +.Li struct sensordev +structures containing information about devices +that may attach hardware monitoring sensors. +.Pp +Third, fourth and fifth levels together comprise an array of +.Li struct sensor +structures containing snapshot readings of hardware monitoring sensors. +In such usage, third level indicates the numerical representation +of the sensor device name to which the sensor is attached +(device's xname and number shall be matched with the help of +.Li struct sensordev +structure above), +fourth level indicates sensor type and +fifth level is an ordinal sensor number (unique to +the specified sensor type on the specified sensor device). +.Pp +The +.Sy sensordev +and +.Sy sensor +structures +and +.Sy sensor_type +enumeration +are defined in +.Aq Pa sys/sensors.h . .El .Ss CTL_KERN The string and integer information available for the CTL_KERN level From owner-p4-projects@FreeBSD.ORG Sun Aug 19 19:08:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8C77516A46C; Sun, 19 Aug 2007 19:08:01 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67E3E16A41B for ; Sun, 19 Aug 2007 19:08:01 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 40F6613C457 for ; Sun, 19 Aug 2007 19:08:01 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JJ81Te077255 for ; Sun, 19 Aug 2007 19:08:01 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JJ80Ej077249 for perforce@freebsd.org; Sun, 19 Aug 2007 19:08:00 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 19:08:00 GMT Message-Id: <200708191908.l7JJ80Ej077249@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125358 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 19:08:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=125358 Change 125358 by cnst@dale on 2007/08/19 19:07:42 document hw.realmem Affected files ... .. //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.8#2 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.8#2 (text+ko) ==== @@ -214,6 +214,7 @@ .It "hw.pagesize integer no .It "hw.floatingpoint integer no .It "hw.machine_arch string no +.It "hw.realmem integer no .It "machdep.console_device dev_t no .It "machdep.adjkerntz integer yes .It "machdep.disable_rtc_set integer yes From owner-p4-projects@FreeBSD.ORG Sun Aug 19 19:21:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D87AB16A41B; Sun, 19 Aug 2007 19:21:18 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90CDB16A419 for ; Sun, 19 Aug 2007 19:21:18 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8241613C494 for ; Sun, 19 Aug 2007 19:21:18 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JJLIgS078064 for ; Sun, 19 Aug 2007 19:21:18 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JJLIlj078061 for perforce@freebsd.org; Sun, 19 Aug 2007 19:21:18 GMT (envelope-from cnst@FreeBSD.org) Date: Sun, 19 Aug 2007 19:21:18 GMT Message-Id: <200708191921.l7JJLIlj078061@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125359 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 19:21:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=125359 Change 125359 by cnst@dale on 2007/08/19 19:21:08 my professor once told me that documentation should be written before the actual code... Affected files ... .. //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.8#3 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.8#3 (text+ko) ==== @@ -215,6 +215,7 @@ .It "hw.floatingpoint integer no .It "hw.machine_arch string no .It "hw.realmem integer no +.It "hw.sensors.. struct no .It "machdep.console_device dev_t no .It "machdep.adjkerntz integer yes .It "machdep.disable_rtc_set integer yes From owner-p4-projects@FreeBSD.ORG Sun Aug 19 20:29:44 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1115816A41B; Sun, 19 Aug 2007 20:29:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEEDA16A417 for ; Sun, 19 Aug 2007 20:29:43 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B82D113C47E for ; Sun, 19 Aug 2007 20:29:43 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JKThvq089643 for ; Sun, 19 Aug 2007 20:29:43 GMT (envelope-from phk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JKThCl089628 for perforce@freebsd.org; Sun, 19 Aug 2007 20:29:43 GMT (envelope-from phk@freebsd.org) Date: Sun, 19 Aug 2007 20:29:43 GMT Message-Id: <200708192029.l7JKThCl089628@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to phk@freebsd.org using -f From: Poul-Henning Kamp To: Perforce Change Reviews Cc: Subject: PERFORCE change 125362 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 20:29:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=125362 Change 125362 by phk@phk_critter on 2007/08/19 20:29:15 Note issue with setproctitle Affected files ... .. //depot/projects/valgrind/README_FREEBSD#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sun Aug 19 20:34:50 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 93F8C16A41B; Sun, 19 Aug 2007 20:34:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6722216A419 for ; Sun, 19 Aug 2007 20:34:50 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 587F113C461 for ; Sun, 19 Aug 2007 20:34:50 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JKYoAr091344 for ; Sun, 19 Aug 2007 20:34:50 GMT (envelope-from phk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JKYo1A091341 for perforce@freebsd.org; Sun, 19 Aug 2007 20:34:50 GMT (envelope-from phk@freebsd.org) Date: Sun, 19 Aug 2007 20:34:50 GMT Message-Id: <200708192034.l7JKYo1A091341@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to phk@freebsd.org using -f From: Poul-Henning Kamp To: Perforce Change Reviews Cc: Subject: PERFORCE change 125363 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 20:34:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=125363 Change 125363 by phk@phk_critter on 2007/08/19 20:34:03 More fallout from ps_strings issue Affected files ... .. //depot/projects/valgrind/README_FREEBSD#2 edit Differences ... ==== //depot/projects/valgrind/README_FREEBSD#2 (text+ko) ==== @@ -1,4 +1,8 @@ -Sun Aug 19 20:26:48 UTC 2007 +Sun Aug 19 20:26:48 UTC 2007 PS_STRINGS Valgrind barfs all over the place on setproctitle. + + This also manifests itself in a corrupted environment in + children of child processes when --trace-children=yes is used. + To cope correctly Valgrind must install the modified argv/envp pointers in the ps-strings area, and mark it as accessible. From owner-p4-projects@FreeBSD.ORG Sun Aug 19 21:04:28 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6558D16A41B; Sun, 19 Aug 2007 21:04:28 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3206116A417 for ; Sun, 19 Aug 2007 21:04:28 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 22DB213C461 for ; Sun, 19 Aug 2007 21:04:28 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JL4S0H003017 for ; Sun, 19 Aug 2007 21:04:28 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JL4RXr003014 for perforce@freebsd.org; Sun, 19 Aug 2007 21:04:27 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 19 Aug 2007 21:04:27 GMT Message-Id: <200708192104.l7JL4RXr003014@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125365 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 21:04:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=125365 Change 125365 by kmacy@kip-macys-computer:opentoe_mbpro on 2007/08/19 21:03:32 synchronize missed changes between vendor updates - most notably servicing of receives for ports 3 and 4 when line interrupts are in use Affected files ... .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_main.c#16 edit .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_offload.c#14 edit .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_sge.c#27 edit Differences ... ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_main.c#16 (text+ko) ==== @@ -441,7 +441,8 @@ sc->bt = rman_get_bustag(sc->regs_res); sc->bh = rman_get_bushandle(sc->regs_res); sc->mmio_len = rman_get_size(sc->regs_res); - + memset(adapter->rrss_map, 0xff, sizeof(adapter->rrss_map)); + if (t3_prep_adapter(sc, ai, 1) < 0) { printf("prep adapter failed\n"); error = ENODEV; ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_offload.c#14 (text+ko) ==== @@ -81,7 +81,7 @@ static const unsigned int MAX_ATIDS = 64 * 1024; -static const unsigned int ATID_BASE = 0x100000; +static const unsigned int ATID_BASE = 0x10000; static int inited = 0; static inline int @@ -372,6 +372,8 @@ struct iff_mac *iffmacp; struct ddp_params *ddpp; struct adap_ports *ports; + struct ofld_page_info *rx_page_info; + struct tp_params *tp = &adapter->params.tp; int port; switch (req) { @@ -402,6 +404,15 @@ case GET_L2T_CAPACITY: *(unsigned int *)data = 2048; break; + case GET_CPUIDX_OF_QSET: { + unsigned int qset = *(unsigned int *)data; + + if (qset >= SGE_QSETS || + adapter->rrss_map[qset] >= RSS_TABLE_SIZE) + return -EINVAL; + *(unsigned int *)data = adapter->rrss_map[qset]; + break; + } case GET_MTUS: mtup = data; mtup->size = NMTUS; @@ -436,6 +447,11 @@ case FAILOVER_CLEAR: t3_failover_clear(adapter); break; + case GET_RX_PAGE_INFO: + rx_page_info = data; + rx_page_info->page_size = tp->rx_pg_size; + rx_page_info->num = tp->rx_num_pgs; + break; case ULP_ISCSI_GET_PARAMS: case ULP_ISCSI_SET_PARAMS: if (!offload_running(adapter)) @@ -704,8 +720,16 @@ union opcode_tid *p = cplhdr(m); unsigned int stid = G_TID(ntohl(p->opcode_tid)); struct toe_tid_entry *toe_tid; + const struct tid_info *t = &(TOE_DATA(dev))->tid_maps; - toe_tid = lookup_stid(&(TOE_DATA(dev))->tid_maps, stid); + /* + * We get these messages also when setting up HW filters. Throw + * those away silently. + */ + if (stid >= t->stid_base + t->nstids) + return CPL_RET_BUF_DONE; + + toe_tid = lookup_stid(t, stid); if (toe_tid->ctx && toe_tid->client->handlers && toe_tid->client->handlers[p->opcode]) { return toe_tid->client->handlers[p->opcode] (dev, m, toe_tid->ctx); @@ -746,16 +770,26 @@ { struct cpl_pass_accept_req *req = cplhdr(m); unsigned int stid = G_PASS_OPEN_TID(ntohl(req->tos_tid)); + struct tid_info *t = &(T3C_DATA(dev))->tid_maps; struct toe_tid_entry *toe_tid; + unsigned int tid = GET_TID(req); + + if (unlikely(tid >= t->ntids)) { + CH_MSG("%s: passive open TID %u too large\n", + dev->name, tid); + t3_fatal_err(tdev2adap(dev)); + return CPL_RET_BUF_DONE; + } - toe_tid = lookup_stid(&(TOE_DATA(dev))->tid_maps, stid); - if (toe_tid->ctx && toe_tid->client->handlers && + toe_tid = lookup_stid(t, stid); + if (toe_tid && toe_tid->ctx && toe_tid->client->handlers && toe_tid->client->handlers[CPL_PASS_ACCEPT_REQ]) { return toe_tid->client->handlers[CPL_PASS_ACCEPT_REQ] (dev, m, toe_tid->ctx); } else { - log(LOG_ERR, "%s: received clientless CPL command 0x%x\n", - dev->name, CPL_PASS_ACCEPT_REQ); + CH_MSG(tdev2adap(dev), DEBUG, OFLD, + "%s: received clientless CPL command 0x%x\n", + dev->name, CPL_PASS_ACCEPT_REQ); return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; } } @@ -804,8 +838,17 @@ { struct cpl_act_establish *req = cplhdr(m); unsigned int atid = G_PASS_OPEN_TID(ntohl(req->tos_tid)); + struct tid_info *t = &(TOE_DATA(dev))->tid_maps; struct toe_tid_entry *toe_tid; + unsigned int tid = GET_TID(req); + if (unlikely(tid >= t->ntids)) { + CH_MSG("%s: active establish TID %u too large\n", + dev->name, tid); + t3_fatal_err(tdev2adap(dev)); + return CPL_RET_BUF_DONE; + } + toe_tid = lookup_atid(&(TOE_DATA(dev))->tid_maps, atid); if (toe_tid->ctx && toe_tid->client->handlers && toe_tid->client->handlers[CPL_ACT_ESTABLISH]) { @@ -813,7 +856,7 @@ (dev, m, toe_tid->ctx); } else { log(LOG_ERR, "%s: received clientless CPL command 0x%x\n", - dev->name, CPL_PASS_ACCEPT_REQ); + dev->name, CPL_ACT_ESTABLISH); return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; } } ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_sge.c#27 (text+ko) ==== @@ -353,6 +353,10 @@ (v >> S_RSPQ0DISABLED) & 0xff); } + if (status & (F_HIPIODRBDROPERR | F_LOPIODRBDROPERR)) + CH_ALERT(adapter, "SGE dropped %s priority doorbell\n", + status & F_HIPIODRBDROPERR ? "high" : "lo"); + t3_write_reg(adapter, A_SG_INT_CAUSE, status); if (status & (F_RSPQCREDITOVERFOW | F_RSPQDISABLED)) t3_fatal_err(adapter); @@ -2535,6 +2539,7 @@ adapter_t *adap = data; struct sge_rspq *q0 = &adap->sge.qs[0].rspq; struct sge_rspq *q1 = &adap->sge.qs[1].rspq; + int i; t3_write_reg(adap, A_PL_CLI, 0); map = t3_read_reg(adap, A_SG_DATA_INTR); @@ -2546,13 +2551,10 @@ taskqueue_enqueue(adap->tq, &adap->slow_intr_task); mtx_lock(&q0->lock); - - if (__predict_true(map & 1)) - process_responses_gts(adap, q0); - - if (map & 2) - process_responses_gts(adap, q1); + for_each_port(adap, i) + if (map & (1 << i)) + process_responses_gts(adap, &adap->sge.qs[i].rspq); mtx_unlock(&q0->lock); } From owner-p4-projects@FreeBSD.ORG Sun Aug 19 22:38:24 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8447416A41B; Sun, 19 Aug 2007 22:38:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 534D216A417 for ; Sun, 19 Aug 2007 22:38:24 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 43E1313C458 for ; Sun, 19 Aug 2007 22:38:24 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7JMcOlQ009469 for ; Sun, 19 Aug 2007 22:38:24 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7JMcNTJ009466 for perforce@freebsd.org; Sun, 19 Aug 2007 22:38:23 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 19 Aug 2007 22:38:23 GMT Message-Id: <200708192238.l7JMcNTJ009466@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125367 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 22:38:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=125367 Change 125367 by kmacy@kip-macys-computer:opentoe_mbpro on 2007/08/19 22:37:32 sync changes to vendor linux tom Affected files ... .. //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_cpl_io.c#7 edit .. //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_cpl_socket.c#5 edit .. //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_listen.c#4 edit .. //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_tom.c#5 edit Differences ... ==== //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_cpl_io.c#7 (text+ko) ==== @@ -360,12 +360,15 @@ } static inline unsigned int -calc_opt0l(const struct socket *so) +calc_opt0l(struct socket *so) { struct tcpcb *tp = sototcpcb(so); - + struct tom_data *d = TOM_DATA(TOE_DEV(sk)); + /* PR 5138 */ + uint32_t rcv_wnd = min(tp->rcv_wnd, (u32)d->rx_page_size * 34); + return V_TOS(SO_TOS(so)) | V_ULP_MODE(ULP_MODE(so)) | - V_RCV_BUFSIZ(min(tp->rcv_wnd >> 10, (uint32_t)M_RCV_BUFSIZ)); + V_RCV_BUFSIZ(min(rcv_wnd >> 10, (uint32_t)M_RCV_BUFSIZ)); } static inline unsigned int @@ -461,9 +464,6 @@ free_wr_skb(m); } -#define wr_queue_walk(tp, skb) \ - for (skb = peek_wr(tp); skb; skb = (struct mbuf *)skb->input_dev) - /* * Returns true if an mbuf carries urgent data. */ @@ -502,7 +502,9 @@ (so->so_snd.sb_mb != NULL)); if (GET_TOE_FLAG(so, TX_DATA_SENT) == 0) { - req->flags |= htonl(F_TX_INIT | V_TX_CPU_IDX(qset(so))); + req->flags |= htonl(V_TX_ACK_PAGES(2) | F_TX_INIT | + V_TX_CPU_IDX(qset(tp))); + req->param |= htonl((so->so_snd.sb_flags & SB_AUTOSIZE) ? V_TX_SNDBUF(tcp_autosndbuf_max) : V_TX_SNDBUF(so->so_cred->cr_uidinfo->ui_sbsize)); ==== //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_cpl_socket.c#5 (text+ko) ==== @@ -95,7 +95,7 @@ * Returns true if a connection should send more data to the TOE ASAP. */ static inline int -should_push(const struct socket *so) +should_push(struct socket *so) { struct tcpcb *tp = sototcpcb(so); struct toedev *dev = TOE_DEV(so); ==== //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_listen.c#4 (text+ko) ==== @@ -174,7 +174,8 @@ req->peer_netmask = 0; req->opt0h = htonl(F_DELACK | F_TCAM_BYPASS); req->opt0l = htonl(V_RCV_BUFSIZ(16)); - req->opt1 = htonl(V_CONN_POLICY(CPL_CONN_POLICY_ASK)); + req->opt1 = htonl(V_CONN_POLICY(CPL_CONN_POLICY_ASK)| + V_OPT1_VLAN(0xfff)); m->m_priority = CPL_PRIORITY_LISTEN; cxgb_ofld_send(cdev, m); ==== //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_tom.c#5 (text+ko) ==== @@ -342,6 +342,7 @@ struct tom_data *t = TOM_DATA(dev); struct toedev *cdev = t->cdev; struct ddp_params ddp; + struct ofld_page_info rx_page_info; int err; mbufq_init(&t->deferq); @@ -365,9 +366,14 @@ if (err) return err; + err = cdev->ctl(cdev, GET_RX_PAGE_INFO, &rx_page_info); + if (err) + return err; + t->ddp_llimit = ddp.llimit; t->ddp_ulimit = ddp.ulimit; t->pdev = ddp.pdev; + t->rx_page_size = rx_page_info.page_size; /* OK if this fails, we just can't do DDP */ t->nppods = (ddp.ulimit + 1 - ddp.llimit) / PPOD_SIZE; From owner-p4-projects@FreeBSD.ORG Mon Aug 20 00:57:15 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A95F316A469; Mon, 20 Aug 2007 00:57:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25AFC16A417 for ; Mon, 20 Aug 2007 00:57:15 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 14BEC13C48D for ; Mon, 20 Aug 2007 00:57:15 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K0vFOv028700 for ; Mon, 20 Aug 2007 00:57:15 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K0vEVP028697 for perforce@freebsd.org; Mon, 20 Aug 2007 00:57:14 GMT (envelope-from andrew@freebsd.org) Date: Mon, 20 Aug 2007 00:57:14 GMT Message-Id: <200708200057.l7K0vEVP028697@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125368 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 00:57:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=125368 Change 125368 by andrew@andrew_hermies on 2007/08/20 00:56:57 Add the get_services call to list the services avaliable to restart Impement the restart_services call to restart services Add a button to send the restart_services call to the backend Add a services item to the computer view. When selected it will send a get_services and display the services returned on the ypdates area Add the getType() method to facund objects Spell True correctly for Python Affected files ... .. //depot/projects/soc2007/andrew-update/backend/facund-be.c#25 edit .. //depot/projects/soc2007/andrew-update/frontend/facund-fe.glade#6 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#14 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/controller.py#7 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/data.py#4 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#12 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/update_model.py#3 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#14 edit Differences ... ==== //depot/projects/soc2007/andrew-update/backend/facund-be.c#25 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -85,6 +86,8 @@ struct facund_object *); static struct facund_response *facund_call_rollback_patches(const char *, struct facund_object *); +static struct facund_response *facund_call_get_services(const char *, + struct facund_object *obj); static struct facund_response *facund_call_restart_services(const char *, struct facund_object *); @@ -1093,10 +1096,158 @@ } static struct facund_response * -facund_call_restart_services(const char *id __unused, struct facund_object *obj __unused) +facund_call_get_services(const char *id __unused, struct facund_object *obj __unused) +{ + struct facund_object *dirs, *cur_dir; + const char *base_dir; + struct dirent *de; + unsigned int pos; + DIR *d; + + if (obj == NULL) { + /* TODO: Don't use magic numbers */ + return facund_response_new(id, 1, "No data sent", NULL); + } + + /* Read in the base dir to get the services for */ + base_dir = NULL; + if (facund_object_get_type(obj) != FACUND_STRING) { + return facund_response_new(id, 1, "Incorrect data", NULL); + } + base_dir = facund_object_get_string(obj); + if (base_dir == NULL) { + return facund_response_new(id, 1, "Malloc failed", NULL); + } + if (strcmp(base_dir, "/") != 0) { + return facund_response_new(id, 1, + "Can only restart services in /", NULL); + } + for (pos = 0; pos < watched_db_count; pos++) { + if (strcmp(watched_db[pos].db_base, base_dir) == 0) { + break; + } + } + if (pos == watched_db_count) { + return facund_response_new(id, 1, "Unknown base dir", NULL); + } + + d = opendir("/etc/rc.d/"); + if (d == NULL) { + return facund_response_new(id, 1, "Could not open /etc/rc.d/", + NULL); + } + + dirs = facund_object_new_array(); + while ((de = readdir(d)) != NULL) { + /* Don't look at hidden files */ + if (de->d_name[0] == '.') + continue; + + cur_dir = facund_object_new_string(); + facund_object_set_string(cur_dir, de->d_name); + facund_object_array_append(dirs, cur_dir); + } + if (facund_object_array_size(dirs) == 0) { + facund_object_free(dirs); + return facund_response_new(id, 1, "No services found", NULL); + } + + return facund_response_new(id, 0, "Services found", dirs); +} + +static struct facund_response * +facund_call_restart_services(const char *id, struct facund_object *obj) { - fprintf(stderr, "STUB: %s\n", __func__); - return NULL; + const char *base_dir, *service; + const struct facund_object *cur; + char service_script[PATH_MAX], *cmd; + unsigned int pos; + struct stat sb; + + if (obj == NULL) { + /* TODO: Don't use magic numbers */ + return facund_response_new(id, 1, "No data sent", NULL); + } + + base_dir = NULL; + service = NULL; + + if (facund_object_get_type(obj) != FACUND_ARRAY) { + return facund_response_new(id, 1, "Incorrect data", NULL); + } + if (facund_object_array_size(obj) != 2) { + return facund_response_new(id, 1, "Incorrect data", NULL); + } + + /* Find the base dir */ + cur = facund_object_get_array_item(obj, 0); + if (facund_object_get_type(cur) != FACUND_STRING) { + return facund_response_new(id, 1, "Incorrect data", NULL); + } + base_dir = facund_object_get_string(cur); + if (base_dir == NULL) { + return facund_response_new(id, 1, "Malloc failed", NULL); + } + /* + * We can only restart a service if the base dir + * is / as we don't know how to signal any other's. + * eg. if it is in a jail we will have to use jexec + * but we don't know if this base is in a jail + */ + if (strcmp(base_dir, "/") != 0) { + return facund_response_new(id, 1, + "Can only restart services in /", NULL); + } + for (pos = 0; pos < watched_db_count; pos++) { + if (strcmp(watched_db[pos].db_base, base_dir) == 0) { + break; + } + } + if (pos == watched_db_count) { + return facund_response_new(id, 1, "Unknown base dir", NULL); + } + + /* Find the service to restart */ + cur = facund_object_get_array_item(obj, 1); + if (facund_object_get_type(cur) != FACUND_STRING) { + return facund_response_new(id, 1, "Incorrect data", NULL); + } + service = facund_object_get_string(cur); + if (service == NULL) { + return facund_response_new(id, 1, "Malloc failed", NULL); + } + do { + /* Try services in /etc/rc.d */ + snprintf(service_script, PATH_MAX, "/etc/rc.d/%s", service); + if (stat(service_script, &sb) == 0) { + break; + } + + /* Try services in /usr/local/etc/rc.d */ + snprintf(service_script, PATH_MAX, "/usr/local/etc/rc.d/%s", + service); + if (stat(service_script, &sb) == 0) { + break; + } + + return facund_response_new(id, 1, "Unknown service", NULL); + } while (0); + + /* Attempt to restart the service */ + asprintf(&cmd, "%s restart", service_script); + if (cmd == NULL) { + return facund_response_new(id, 1, "Malloc failed", NULL); + } + seteuid(0); + if (system(cmd) != 0) { + free(cmd); + seteuid(getuid()); + return facund_response_new(id, 1, "Service restart failed", + NULL); + } + free(cmd); + seteuid(getuid()); + return facund_response_new(id, 0, "Service restart successful", NULL); } static void @@ -1203,6 +1354,7 @@ facund_server_add_call("list_installed", facund_call_list_installed); facund_server_add_call("install_patches", facund_call_install_patches); facund_server_add_call("rollback_patches",facund_call_rollback_patches); + facund_server_add_call("get_services", facund_call_get_services); facund_server_add_call("restart_services",facund_call_restart_services); pthread_create(&update_thread, NULL, look_for_updates, NULL); ==== //depot/projects/soc2007/andrew-update/frontend/facund-fe.glade#6 (text+ko) ==== @@ -1,6 +1,6 @@ - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -105,32 +105,39 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 + 3 2 5 5 - + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Connect + Restart 0 + + 2 + 2 + 3 + - + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Disconnect + Remove 0 1 2 + 1 + 2 @@ -148,21 +155,29 @@ - + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Remove + Disconnect 0 1 2 - 1 - 2 + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Connect + 0 + + False @@ -261,34 +276,27 @@ 3 10 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Computer's description -This is a Human redable -name for the computer + Socket location +Leave blank for +the default socket - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - 1 - 2 + 2 + 3 - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Computer's name +leave blank for the +local computer - 1 - 2 1 2 @@ -307,31 +315,38 @@ - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Computer's name -leave blank for the -local computer + 1 + 2 1 2 - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Socket location -Leave blank for -the default socket - 2 - 3 + 1 + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Computer's description +This is a Human redable +name for the computer + + 1 ==== //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#14 (text+ko) ==== @@ -53,7 +53,7 @@ self.__dirs = [] self.__connected = False self.__connection = None - self.__commands = ['Avaliable', 'Installed'] + self.__commands = ['Avaliable', 'Installed', 'Services'] def __str__(self): return self.__name + ": " + (self.__host or self.__socket) @@ -91,6 +91,8 @@ return self.getUpdateList(dir) elif self.__commands[command] == 'Installed': return self.getInstalledList(dir) + elif self.__commands[command] == 'Services': + return self.getServicesList(dir) else: print 'TODO: Handle this command (%d)' % (command,); @@ -119,8 +121,16 @@ # Wait for the response call.acquireLock() call.releaseLock() - print call.getResponse() - + return call.getResponse() + + def restartService(self, dir, service): + args = self.buildInstallArg(dir, service) + call = facund.Call("restart_services", args) + self.__connection.doCall(call) + # Wait for the response + call.acquireLock() + call.releaseLock() + return call.getResponse() def getUpdateList(self, dir = None): if dir is None: @@ -154,6 +164,16 @@ call.releaseLock() return call.getResponse() + def getServicesList(self, dir): + arg = facund.String(dir) + call = facund.Call("get_services", arg) + self.__connection.doCall(call) + # Wait for the response + call.acquireLock() + call.releaseLock() + return call.getResponse() + + def connect(self): '''Connects to the remote computer''' if self.__connection is not None: ==== //depot/projects/soc2007/andrew-update/frontend/facund/controller.py#7 (text+ko) ==== @@ -34,6 +34,8 @@ self.__currentDirectory = None self.__updateModel = updateModel self.__view.setUpdateViewModel(self.__updateModel) + self.__inServices = False + self.__selectedUpdate = None def run(self): self.__view.run() @@ -41,12 +43,18 @@ def onComputerTreeSelect(self, position): self.__currentDirectory = None self.__updateModel.empty() + self.__inServices = False + self.__selectedUpdate = None computer = self.__computersModel.getComputer(position[0]) self.__view.setConnected(computer.getConnectionStatus()) if computer.getConnectionStatus() is not True: self.__view.setInstallable(False, False) + # We can disable the restart button as it will be + # enabled only when we select a service to start + self.__view.setRestartable(False) + self.__currentComputer = computer if len(position) == 1: @@ -65,21 +73,33 @@ # We can't to an install or remove when we have nothing self.__view.setInstallable(False, False) return - item = data.getData()[0] - # Each item will be a pair of - pair = item.getData() - theDir = pair[0].getData() + + if command is 'Services': + self.__inServices = True + for service in data.getData(): + self.__updateModel.addUpdate(service) + else: + item = data.getData()[0] + # Each item will be a pair of + pair = item.getData() + theDir = pair[0].getData() + + for update in pair[1].getData(): + self.__updateModel.addUpdate(update) - for update in pair[1].getData(): - self.__updateModel.addUpdate(update) + if self.__updateModel.getSize() > 0: + if command == "Avaliable": + self.__view.setInstallable(True, False) + elif command == "Installed": + self.__view.setInstallable(False, True) + else: + self.__view.setInstallable(False, False) - if self.__updateModel.getSize() > 0: - if command == "Avaliable": - self.__view.setInstallable(True, False) - elif command == "Installed": - self.__view.setInstallable(False, True) - else: - self.__view.setInstallable(False, False) + def onSelectUpdate(self, item): + if not self.__inServices: + return + self.__selectedUpdate = self.__updateModel.getUpdate(item) + self.__view.setRestartable(True) def getCurrentComputer(self): return self.__currentComputer @@ -87,6 +107,9 @@ def getCurrentDirectory(self): return self.__currentDirectory + def getCurrentService(self): + return self.__selectedUpdate + def installUpdates(self, updates): computer = self.getCurrentComputer() computer.installUpdates(True, updates) @@ -94,3 +117,7 @@ def removeUpdates(self, updates): computer = self.getCurrentComputer() computer.installUpdates(False, updates) + + def restartService(self, dir, service): + computer = self.getCurrentComputer() + computer.restartService(dir, service) ==== //depot/projects/soc2007/andrew-update/frontend/facund/data.py#4 (text+ko) ==== @@ -26,8 +26,6 @@ import struct -#TODO: Create an exception class(es) for bad data, etc - class Object: def __init__(self, type): self.__parent = None @@ -53,6 +51,9 @@ def getData(self): return self.__data + def getType(self): + return self.__type + class Bool(Object): def __init__(self, data = None): Object.__init__(self, "bool") ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#12 (text+ko) ==== @@ -119,12 +119,16 @@ installButton.connect('clicked', self.onInstallClick) removeButton = self.__xml.get_widget('deinstallButton') removeButton.connect('clicked', self.onRemoveClick) + restartButton = self.__xml.get_widget('restartButton') + restartButton.connect('clicked', self.onRestartClick) def setUpdateViewModel(self, model): '''Sets the model to use to for the computer tree''' self.__updateViewModel = model treeView = self.__xml.get_widget('updateView') treeView.set_model(model) + treeView.connect('cursor-changed', self.onSelectUpdate) + cell = gtk.CellRendererText() column = gtk.TreeViewColumn("Update", cell, text=0) treeView.append_column(column) @@ -160,6 +164,9 @@ deinstallButton = self.__xml.get_widget('deinstallButton') deinstallButton.set_sensitive(uninstallable) + def setRestartable(self, restartable): + restartButton = self.__xml.get_widget('restartButton') + restartButton.set_sensitive(restartable) def onConnectClick(self, widget): '''Signal handler for the connect button''' @@ -190,11 +197,20 @@ dir = self.__controller.getCurrentDirectory() self.__controller.removeUpdates((dir.getName(), 'base')) + def onRestartClick(self, widget): + dir = self.__controller.getCurrentDirectory() + service = self.__controller.getCurrentService() + self.__controller.restartService(dir.getName(), service) + def onSelectComputer(self, widget): '''Signal handler for when the selected item is changed''' cursor = widget.get_cursor() self.__controller.onComputerTreeSelect(cursor[0]) + def onSelectUpdate(self, widget): + cursor = widget.get_cursor() + self.__controller.onSelectUpdate(cursor[0][0]) + def run(self): '''Displays the main window. Does't return''' self.__widget.show() ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/update_model.py#3 (text+ko) ==== @@ -39,6 +39,10 @@ self.set(iter, 0, name) self.__size += 1 + def getUpdate(self, item): + iter = self.get_iter((item,)) + return self.get_value(iter, 0); + def empty(self): self.__size = 0 self.clear() ==== //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#14 (text+ko) ==== @@ -54,7 +54,7 @@ self.socket.connect(server) def isOpen(self): - return true + return True def read(self, len): return self.socket.recv(len) From owner-p4-projects@FreeBSD.ORG Mon Aug 20 01:11:33 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C4CBE16A46B; Mon, 20 Aug 2007 01:11:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9897016A468 for ; Mon, 20 Aug 2007 01:11:33 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 87D7F13C4E9 for ; Mon, 20 Aug 2007 01:11:33 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K1BXxw031619 for ; Mon, 20 Aug 2007 01:11:33 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K1BWWd031616 for perforce@freebsd.org; Mon, 20 Aug 2007 01:11:32 GMT (envelope-from andrew@freebsd.org) Date: Mon, 20 Aug 2007 01:11:32 GMT Message-Id: <200708200111.l7K1BWWd031616@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125369 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 01:11:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=125369 Change 125369 by andrew@andrew_hermies on 2007/08/20 01:10:47 Disconnect from all the servers on close Affected files ... .. //depot/projects/soc2007/andrew-update/frontend/facund/controller.py#8 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/computer_model.py#8 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#13 edit Differences ... ==== //depot/projects/soc2007/andrew-update/frontend/facund/controller.py#8 (text+ko) ==== @@ -40,6 +40,12 @@ def run(self): self.__view.run() + def shutdown(self): + '''Disconnect's from all computers''' + computers = self.__computersModel.getComputers() + for c in computers: + computers[c].disconnect() + def onComputerTreeSelect(self, position): self.__currentDirectory = None self.__updateModel.empty() ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/computer_model.py#8 (text+ko) ==== @@ -74,6 +74,9 @@ name = self[position][0] return self.__computers[name] + def getComputers(self): + return self.__computers + def removeComputer(self, computer): '''Removes a computer from the computer tree''' computer_name = computer.getName() ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#13 (text+ko) ==== @@ -62,6 +62,7 @@ button.connect('clicked', self.connectionSave) def onQuit(self, data): + self.__controller.shutdown() gtk.main_quit() def newConnection(self, data): From owner-p4-projects@FreeBSD.ORG Mon Aug 20 01:15:40 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9405B16A420; Mon, 20 Aug 2007 01:15:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 656D216A418 for ; Mon, 20 Aug 2007 01:15:40 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3D69613C467 for ; Mon, 20 Aug 2007 01:15:40 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K1FdBV031803 for ; Mon, 20 Aug 2007 01:15:40 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K1Fd5E031800 for perforce@freebsd.org; Mon, 20 Aug 2007 01:15:39 GMT (envelope-from andrew@freebsd.org) Date: Mon, 20 Aug 2007 01:15:39 GMT Message-Id: <200708200115.l7K1Fd5E031800@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125370 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 01:15:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=125370 Change 125370 by andrew@andrew_hermies on 2007/08/20 01:14:49 Add a missing file that gets a list of computers and adds them to the gui Affected files ... .. //depot/projects/soc2007/andrew-update/frontend/facund/computer_list.py#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Mon Aug 20 01:38:08 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 74A4616A41A; Mon, 20 Aug 2007 01:38:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A91E16A417 for ; Mon, 20 Aug 2007 01:38:08 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3AAAE13C468 for ; Mon, 20 Aug 2007 01:38:08 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K1c8cB033087 for ; Mon, 20 Aug 2007 01:38:08 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K1c7p3033084 for perforce@freebsd.org; Mon, 20 Aug 2007 01:38:07 GMT (envelope-from andrew@freebsd.org) Date: Mon, 20 Aug 2007 01:38:07 GMT Message-Id: <200708200138.l7K1c7p3033084@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125371 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 01:38:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=125371 Change 125371 by andrew@andrew_hermies on 2007/08/20 01:37:08 Save the width/height of the window on close and use it to set the initial size Affected files ... .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#14 edit Differences ... ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#14 (text+ko) ==== @@ -25,6 +25,7 @@ # import facund +import gconf import gtk import gtk.gdk import gtk.glade @@ -40,6 +41,12 @@ self.__widget = self.__xml.get_widget('facundWindow') self.__widget.connect('destroy', self.onQuit) + self.__client = gconf.client_get_default() + self.__width = self.__client.get_int('/facund/gui/width') or 400 + self.__height = self.__client.get_int('/facund/gui/height') or 300 + self.__widget.set_default_size(self.__width, self.__height) + self.__widget.connect('configure-event', self.onConfigure) + # Open the new computer window on File > New menuItem = self.__xml.get_widget('newConnection') menuItem.connect('activate', self.newConnection) @@ -63,8 +70,16 @@ def onQuit(self, data): self.__controller.shutdown() + + # Save the width/height + self.__client.set_int('/facund/gui/width', self.__width) + self.__client.set_int('/facund/gui/height', self.__height) gtk.main_quit() + def onConfigure(self, widget, event): + self.__width = event.width + self.__height = event.height + def newConnection(self, data): widget = self.__xml.get_widget('newConnectionDialog') self.__newConnectionDialog = widget From owner-p4-projects@FreeBSD.ORG Mon Aug 20 02:01:39 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 48E6116A46D; Mon, 20 Aug 2007 02:01:39 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEB5816A46B for ; Mon, 20 Aug 2007 02:01:38 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DDBE213C48E for ; Mon, 20 Aug 2007 02:01:38 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K21cPr034589 for ; Mon, 20 Aug 2007 02:01:38 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K21c3v034586 for perforce@freebsd.org; Mon, 20 Aug 2007 02:01:38 GMT (envelope-from jbr@FreeBSD.org) Date: Mon, 20 Aug 2007 02:01:38 GMT Message-Id: <200708200201.l7K21c3v034586@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125372 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 02:01:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=125372 Change 125372 by jbr@jbr_bob on 2007/08/20 02:01:34 backup Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#17 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#2 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#3 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#11 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#7 edit .. //depot/projects/soc2007/jbr-syscall/tests/fork.c#2 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#17 (text+ko) ==== @@ -445,8 +445,7 @@ goto exec_fail_dealloc; } - if (exec_map_sysshm(imgp)) - goto exec_fail_dealloc; + exec_map_sysshm(imgp); /* * Special interpreter operation, cleanup and loop up to try to @@ -909,18 +908,21 @@ exec_map_sysshm(imgp) struct image_params *imgp; { - int error; + int error = 0; struct proc *p = imgp->proc; - vm_map_t map = &imgp->proc->p_vmspace->vm_map; - vm_offset_t *addr = &imgp->proc->p_usrsysshm; + //vm_offset_t *addr = &imgp->proc->p_usrsysshm; struct sysshm outsysshm; - error = vm_map_sysshm(map, addr, 42); - + //if (addr) { + //vm_unmap_sysshm(p); + error = vm_map_sysshm(p); + //} + + PROC_LOCK(p); outsysshm.pid = p->p_pid; - strncpy(outsysshm.progtitle, p->p_comm, MAXCOMLEN); - strncpy(outsysshm.proctitle, "\0", 1); - copyout((caddr_t) &outsysshm, (caddr_t) *addr, sizeof(struct sysshm)); + copyout(&outsysshm, (vm_offset_t *) p->p_usrsysshm, + sizeof(struct sysshm)); + PROC_UNLOCK(p); return(error); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#2 (text+ko) ==== @@ -96,6 +96,18 @@ td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; } + + vm_map_sysshm(p2); + + struct sysshm outsysshm; + + PROC_LOCK(p2); + outsysshm.pid = p2->p_pid; + printf("%d\n", outsysshm.pid); + copyout(&outsysshm, (vm_offset_t *) p2->p_usrsysshm, + sizeof(struct sysshm)); + PROC_UNLOCK(p2); + return (error); } @@ -217,7 +229,7 @@ } PROC_UNLOCK(p1); } - + vm_forkproc(td, NULL, NULL, flags); /* @@ -405,6 +417,7 @@ td2 = FIRST_THREAD_IN_PROC(newproc); p2->p_state = PRS_NEW; /* protect against others */ p2->p_pid = trypid; + /* * Allow the scheduler to initialize the child. */ @@ -735,6 +748,7 @@ * Return child proc pointer to parent. */ *procp = p2; + return (0); fail: sx_sunlock(&proctree_lock); ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#3 (text+ko) ==== @@ -511,7 +511,6 @@ int flags; { struct proc *p1 = td->td_proc; - struct sysshm sysshm; if ((flags & RFPROC) == 0) { /* @@ -543,16 +542,9 @@ shmfork(p1, p2); } - - p2->p_usrsysshm = p1->p_usrsysshm - - (vm_offset_t) p1->p_vmspace->vm_daddr + - (vm_offset_t) p2->p_vmspace->vm_daddr; + p2->p_usrsysshm = (vm_offset_t) p1->p_vmspace->vm_taddr - + p1->p_usrsysshm + (vm_offset_t) p2->p_vmspace->vm_taddr; - copyin((caddr_t) p1->p_usrsysshm, (caddr_t) &sysshm, - sizeof(struct sysshm)); - sysshm.pid = p2->p_pid; - copyout((caddr_t) &sysshm, (caddr_t) p2->p_usrsysshm, - sizeof(struct sysshm)); /* * cpu_fork will copy and update the pcb, set up the kernel stack, * and make the child ready to run. ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#11 (text+ko) ==== @@ -2988,21 +2988,64 @@ * process. */ int -vm_map_sysshm(vm_map_t map, vm_offset_t *usr_addr, vm_size_t size) +vm_map_sysshm(struct proc *p) { - size = round_page(size); + vm_offset_t *addr = &p->p_usrsysshm; + vm_map_t map = &p->p_vmspace->vm_map; + size_t size = round_page(sizeof(struct sysshm)); - PROC_LOCK(curthread->td_proc); - - *usr_addr = round_page((vm_offset_t) - curthread->td_proc->p_vmspace->vm_daddr) + - lim_cur(curthread->td_proc, RLIMIT_DATA); - PROC_UNLOCK(curthread->td_proc); + PROC_LOCK(p); + *addr = round_page((vm_offset_t) p->p_vmspace->vm_daddr) + + lim_cur(p, RLIMIT_DATA); + PROC_UNLOCK(p); - if (vm_map_find(map, NULL, *usr_addr, usr_addr, size, TRUE, VM_PROT_RW, + if (vm_map_find(map, NULL, *addr, addr, size, TRUE, VM_PROT_RW, VM_PROT_RW, 0)) panic("vm_map_sysshm: cannot allocated sysshm."); + if (vm_map_wire(map, *addr, *addr + size, VM_MAP_WIRE_USER) + != KERN_SUCCESS) + panic("vm_map_sysshm: cannot wire page."); + + vm_map_t *tmap = ↦ + vm_map_entry_t entry; + vm_object_t object; + vm_pindex_t pindex; + vm_prot_t prot; + boolean_t wired; + vm_page_t page; + + if (vm_map_lookup(tmap, *addr, VM_PROT_READ|VM_PROT_WRITE, &entry, + &object, &pindex, &prot, &wired)) + panic("vm_map_sysshm: cannot lookup vm_object."); + + VM_OBJECT_LOCK(object); + page = vm_page_lookup(object, pindex); + vm_page_lock_queues(); + vm_page_wire(page); + vm_page_unlock_queues(); + VM_OBJECT_UNLOCK(object); + vm_map_lookup_done(*tmap, entry); + + return (0); +} + +/* + * Deallocate a page which holds data shared between the kernel and user + * process. + */ +int +vm_unmap_sysshm(struct proc *p) +{ + size_t size = round_page(sizeof(struct sysshm)); + vm_offset_t *addr = &p->p_usrsysshm; + vm_map_t map = &p->p_vmspace->vm_map; + + if (vm_map_remove(map, *addr, *addr + size)) + panic("vm_map_sysshm: cannot deallocated sysshm."); + + addr = NULL; + return (0); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#7 (text+ko) ==== @@ -354,7 +354,8 @@ void vm_map_simplify_entry (vm_map_t, vm_map_entry_t); void vm_init2 (void); int vm_map_stack (vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int); -int vm_map_sysshm(vm_map_t, vm_offset_t *, vm_size_t); +int vm_map_sysshm(struct proc *); +int vm_unmap_sysshm(struct proc *); int vm_map_growstack (struct proc *p, vm_offset_t addr); int vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offset_t end, int flags); ==== //depot/projects/soc2007/jbr-syscall/tests/fork.c#2 (text+ko) ==== @@ -1,12 +1,22 @@ #include #include #include +#include #include "mlibc/mlibc.h" int main(void) { - fork(); - printf("pid: %d\n", getpid2()); + pid_t child; + + printf("Parent -- getpid(): %d\tgetpid2(): %d\n", getpid(), getpid2()); + if(!(child = fork())) { + printf("Child -- getpid(): %d\tgetpid2(): %d\n", + getpid(), getpid2()); + } else { + waitpid(child, NULL, 0); + printf("Parent-- getpid(): %d\tgetpid2(): %d\n", getpid(), + getpid2()); + } return(0); } From owner-p4-projects@FreeBSD.ORG Mon Aug 20 02:06:48 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E138116A41B; Mon, 20 Aug 2007 02:06:47 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9615216A419 for ; Mon, 20 Aug 2007 02:06:47 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8197413C45E for ; Mon, 20 Aug 2007 02:06:47 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K26l7q035994 for ; Mon, 20 Aug 2007 02:06:47 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K26jhj035991 for perforce@freebsd.org; Mon, 20 Aug 2007 02:06:45 GMT (envelope-from jbr@FreeBSD.org) Date: Mon, 20 Aug 2007 02:06:45 GMT Message-Id: <200708200206.l7K26jhj035991@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125373 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 02:06:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=125373 Change 125373 by jbr@jbr_bob on 2007/08/20 02:06:35 sync with current Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/amd64/conf/NOTES#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/amd64/include/specialreg.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/arm/arm/busdma_machdep.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/boot/arm/at91/boot2/boot2.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/freebsd32_proto.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/freebsd32_syscall.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/freebsd32_syscalls.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/freebsd32_sysent.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/syscalls.master#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/conf/NOTES#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/conf/files.amd64#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/conf/files.i386#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/ata/ata-raid.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/common/cxgb_t3_hw.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_adapter.h#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_ioctl.h#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_main.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_offload.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_offload.h#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_sge.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/dcons/dcons_os.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/ichwd/ichwd.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/mfi/mfi.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/mfi/mfi_disk.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/mfi/mfi_pci.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/mfi/mfireg.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/mfi/mfivar.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/mpt/mpt.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/mpt/mpt.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/mpt/mpt_cam.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/re/if_re.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/usb/ehci.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/wi/if_wi.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/fs/msdosfs/msdosfs_vfsops.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/fs/tmpfs/tmpfs.h#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/fs/tmpfs/tmpfs_subr.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/fs/tmpfs/tmpfs_vfsops.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/fs/tmpfs/tmpfs_vnops.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/i386/conf/NOTES#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/i386/i386/machdep.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/i386/include/cpufunc.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/i386/include/specialreg.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/init_sysent.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_cpu.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_thr.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/syscalls.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/syscalls.master#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/systrace_args.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/vfs_mount.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/vfs_subr.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/modules/Makefile#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/soc2007/jbr-syscall/src/sys/modules/netgraph/bluetooth/Makefile#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/net/bridgestp.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netgraph/ng_base.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netinet/sctp_asconf.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netinet/sctp_input.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netinet/sctp_output.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netinet/sctp_pcb.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netinet/sctp_timer.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netinet/sctp_usrreq.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netinet/sctputil.c#4 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/netinet/tcp_subr.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/include/intr_machdep.h#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/include/md_var.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/powerpc/interrupt.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/powerpc/nexus.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/ata.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/syscall.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/syscall.mk#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/sysproto.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/thr.h#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/device_pager.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/phys_pager.c#3 integrate Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/amd64/conf/NOTES#2 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.68 2007/07/04 00:18:38 bz Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.69 2007/08/15 19:26:02 des Exp $ # # @@ -446,6 +446,13 @@ # device ichwd +# +# Temperature sensors: +# +# coretemp: on-die sensor on Intel Core and newer CPUs +# +device coretemp + #--------------------------------------------------------------------------- # ISDN4BSD # ==== //depot/projects/soc2007/jbr-syscall/src/sys/amd64/include/specialreg.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.39 2007/05/31 11:26:44 des Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.40 2007/08/15 19:26:01 des Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -179,6 +179,7 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 ==== //depot/projects/soc2007/jbr-syscall/src/sys/arm/arm/busdma_machdep.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.34 2007/07/27 14:46:43 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.35 2007/08/18 16:47:28 cognet Exp $"); /* * ARM bus dma support routines @@ -1091,13 +1091,19 @@ { char _tmp_cl[arm_dcache_align], _tmp_clend[arm_dcache_align]; - if (op & BUS_DMASYNC_PREWRITE) { + if ((op & BUS_DMASYNC_PREWRITE) && !(op & BUS_DMASYNC_PREREAD)) { cpu_dcache_wb_range((vm_offset_t)buf, len); cpu_l2cache_wb_range((vm_offset_t)buf, len); } if (op & BUS_DMASYNC_PREREAD) { - cpu_idcache_wbinv_range((vm_offset_t)buf, len); - cpu_l2cache_wbinv_range((vm_offset_t)buf, len); + if ((op & BUS_DMASYNC_PREWRITE) || + ((((vm_offset_t)(buf) | len) & arm_dcache_align_mask) == 0)) { + cpu_dcache_inv_range((vm_offset_t)buf, len); + cpu_l2cache_inv_range((vm_offset_t)buf, len); + } else { + cpu_dcache_wbinv_range((vm_offset_t)buf, len); + cpu_l2cache_wbinv_range((vm_offset_t)buf, len); + } } if (op & BUS_DMASYNC_POSTREAD) { if ((vm_offset_t)buf & arm_dcache_align_mask) { ==== //depot/projects/soc2007/jbr-syscall/src/sys/boot/arm/at91/boot2/boot2.c#3 (text+ko) ==== @@ -14,7 +14,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.6 2007/07/13 14:27:04 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.7 2007/08/17 18:22:31 imp Exp $"); #include #include @@ -216,7 +216,7 @@ return; } addr = eh.e_entry; - ((void(*)(int))addr)(RB_BOOTINFO | (opts & RBX_MASK)); + ((void(*)(int))addr)(opts & RBX_MASK); } static int ==== //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/freebsd32_proto.h#2 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.77 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.78 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ ==== //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/freebsd32_syscall.h#2 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.75 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.76 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -337,4 +337,5 @@ #define FREEBSD32_SYS_freebsd32_lseek 478 #define FREEBSD32_SYS_freebsd32_truncate 479 #define FREEBSD32_SYS_freebsd32_ftruncate 480 -#define FREEBSD32_SYS_MAXSYSCALL 481 +#define FREEBSD32_SYS_thr_kill2 481 +#define FREEBSD32_SYS_MAXSYSCALL 482 ==== //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/freebsd32_syscalls.c#2 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.66 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.67 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -488,4 +488,5 @@ "freebsd32_lseek", /* 478 = freebsd32_lseek */ "freebsd32_truncate", /* 479 = freebsd32_truncate */ "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */ + "thr_kill2", /* 481 = thr_kill2 */ }; ==== //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/freebsd32_sysent.c#2 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.76 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.77 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -519,4 +519,5 @@ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0 }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0 }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0 }, /* 480 = freebsd32_ftruncate */ + { AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 }, /* 481 = thr_kill2 */ }; ==== //depot/projects/soc2007/jbr-syscall/src/sys/compat/freebsd32/syscalls.master#2 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.91 2007/08/16 05:30:04 davidxu Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; @@ -794,3 +794,4 @@ u_int32_t lengthlo, u_int32_t lengthhi); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ u_int32_t lengthlo, u_int32_t lengthhi); } +481 AUE_KILL NOPROTO { int thr_kill2(pid_t pid, long id, int sig); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/compat/opensolaris/sys/proc.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/compat/opensolaris/sys/proc.h,v 1.1 2007/04/06 01:09:06 pjd Exp $ + * $FreeBSD: src/sys/compat/opensolaris/sys/proc.h,v 1.2 2007/08/16 20:33:20 pjd Exp $ */ #ifndef _OPENSOLARIS_SYS_PROC_H_ @@ -56,6 +56,12 @@ typedef struct thread *kthread_id_t; typedef struct proc proc_t; +#if (KSTACK_PAGES * PAGE_SIZE) < 16384 +#define ZFS_KSTACK_PAGES (16384 / PAGE_SIZE) +#else +#define ZFS_KSTACK_PAGES 0 +#endif + static __inline kthread_t * thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), void *arg, size_t len, proc_t *pp, int state, pri_t pri) @@ -71,7 +77,8 @@ ASSERT(len == 0); ASSERT(state == TS_RUN); - error = kthread_create(proc, arg, &p, 0, 0, "solthread %p", proc); + error = kthread_create(proc, arg, &p, 0, ZFS_KSTACK_PAGES, + "solthread %p", proc); return (error == 0 ? FIRST_THREAD_IN_PROC(p) : NULL); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/conf/NOTES#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1448 2007/08/05 16:16:15 bz Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1449 2007/08/13 17:19:27 emax Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -627,7 +627,7 @@ options NETGRAPH_ATM_ATMPIF options NETGRAPH_BLUETOOTH # ng_bluetooth(4) options NETGRAPH_BLUETOOTH_BT3C # ng_bt3c(4) -# options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) - not MPSAFE +options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) options NETGRAPH_BLUETOOTH_HCI # ng_hci(4) options NETGRAPH_BLUETOOTH_L2CAP # ng_l2cap(4) options NETGRAPH_BLUETOOTH_SOCKET # ng_btsocket(4) ==== //depot/projects/soc2007/jbr-syscall/src/sys/conf/files.amd64#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.amd64,v 1.106 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.107 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -145,6 +145,7 @@ dev/atkbdc/atkbdc_isa.c optional atkbdc isa dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc +dev/coretemp/coretemp.c optional coretemp # There are no systems with isa slots, so all ed isa entries should go.. dev/ed/if_ed_3c503.c optional ed isa ed_3c503 dev/ed/if_ed_isa.c optional ed isa ==== //depot/projects/soc2007/jbr-syscall/src/sys/conf/files.i386#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.i386,v 1.579 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.580 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -158,6 +158,7 @@ dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce dev/cm/if_cm_isa.c optional cm isa +dev/coretemp/coretemp.c optional coretemp dev/cp/cpddk.c optional cp dev/cp/if_cp.c optional cp dev/ctau/ctau.c optional ctau ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/ata/ata-raid.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.123 2007/02/21 19:07:18 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.124 2007/08/13 18:46:31 jhb Exp $"); #include "opt_ata.h" #include @@ -56,7 +56,7 @@ /* prototypes */ static void ata_raid_done(struct ata_request *request); static void ata_raid_config_changed(struct ar_softc *rdp, int writeback); -static int ata_raid_status(struct ata_ioc_raid_config *config); +static int ata_raid_status(struct ata_ioc_raid_status *status); static int ata_raid_create(struct ata_ioc_raid_config *config); static int ata_raid_delete(int array); static int ata_raid_addspare(struct ata_ioc_raid_config *config); @@ -216,13 +216,14 @@ static int ata_raid_ioctl(u_long cmd, caddr_t data) { + struct ata_ioc_raid_status *status = (struct ata_ioc_raid_status *)data; struct ata_ioc_raid_config *config = (struct ata_ioc_raid_config *)data; int *lun = (int *)data; int error = EOPNOTSUPP; switch (cmd) { case IOCATARAIDSTATUS: - error = ata_raid_status(config); + error = ata_raid_status(status); break; case IOCATARAIDCREATE: @@ -929,25 +930,32 @@ } static int -ata_raid_status(struct ata_ioc_raid_config *config) +ata_raid_status(struct ata_ioc_raid_status *status) { struct ar_softc *rdp; int i; - if (!(rdp = ata_raid_arrays[config->lun])) + if (!(rdp = ata_raid_arrays[status->lun])) return ENXIO; - config->type = rdp->type; - config->total_disks = rdp->total_disks; + status->type = rdp->type; + status->total_disks = rdp->total_disks; for (i = 0; i < rdp->total_disks; i++ ) { - if ((rdp->disks[i].flags & AR_DF_PRESENT) && rdp->disks[i].dev) - config->disks[i] = device_get_unit(rdp->disks[i].dev); - else - config->disks[i] = -1; + status->disks[i].state = 0; + if ((rdp->disks[i].flags & AR_DF_PRESENT) && rdp->disks[i].dev) { + status->disks[i].lun = device_get_unit(rdp->disks[i].dev); + if (rdp->disks[i].flags & AR_DF_PRESENT) + status->disks[i].state |= AR_DISK_PRESENT; + if (rdp->disks[i].flags & AR_DF_ONLINE) + status->disks[i].state |= AR_DISK_ONLINE; + if (rdp->disks[i].flags & AR_DF_SPARE) + status->disks[i].state |= AR_DISK_SPARE; + } else + status->disks[i].lun = -1; } - config->interleave = rdp->interleave; - config->status = rdp->status; - config->progress = 100 * rdp->rebuild_lba / rdp->total_sectors; + status->interleave = rdp->interleave; + status->status = rdp->status; + status->progress = 100 * rdp->rebuild_lba / rdp->total_sectors; return 0; } ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/common/cxgb_t3_hw.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_hw.c,v 1.6 2007/07/17 06:50:34 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_hw.c,v 1.7 2007/08/17 05:57:04 kmacy Exp $"); #ifdef CONFIG_DEFINED @@ -501,7 +501,7 @@ #undef CAPS_10G #define VPD_ENTRY(name, len) \ - u8 name##_kword[2]; u8 name##_len; u8 name##_data[len] + u8 name##_kword[2]; u8 name##_len; char name##_data[len] /* * Partial EEPROM Vital Product Data structure. Includes only the ID and ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_adapter.h#4 (text+ko) ==== @@ -26,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.14 2007/07/17 06:50:33 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.16 2007/08/17 05:57:03 kmacy Exp $ ***************************************************************************/ @@ -36,7 +36,7 @@ #define _CXGB_ADAPTER_H_ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.14 2007/07/17 06:50:33 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.16 2007/08/17 05:57:03 kmacy Exp $"); #include #include @@ -117,7 +117,7 @@ #else struct mtx lock; #endif - int port; + int port_id; uint8_t hw_addr[ETHER_ADDR_LEN]; uint8_t nqsets; uint8_t first_qset; @@ -310,7 +310,7 @@ TAILQ_ENTRY(adapter) adapter_entry; /* PCI register resources */ - uint32_t regs_rid; + int regs_rid; struct resource *regs_res; bus_space_handle_t bh; bus_space_tag_t bt; ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_ioctl.h#3 (text+ko) ==== @@ -25,7 +25,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_ioctl.h,v 1.4 2007/07/17 06:50:33 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_ioctl.h,v 1.5 2007/08/17 05:57:03 kmacy Exp $ ***************************************************************************/ #ifndef __CHIOCTL_H__ @@ -128,7 +128,7 @@ int8_t channel; int32_t kbps; /* rate in Kbps */ int32_t class_ipg; /* tenths of nanoseconds */ - int32_t flow_ipg; /* usec */ + uint32_t flow_ipg; /* usec */ }; struct ch_filter_tuple { ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_l2t.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.c,v 1.2 2007/05/28 22:57:26 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.c,v 1.3 2007/08/17 05:57:03 kmacy Exp $"); #include #include @@ -37,9 +37,10 @@ #include #include #include +#if __FreeBSD_version > 700000 #include +#endif - #include #include #include @@ -58,7 +59,7 @@ #define VLAN_NONE 0xfff #define SDL(s) ((struct sockaddr_dl *)s) -#define RT_ENADDR(rt) ((char *)LLADDR(SDL((rt)))) +#define RT_ENADDR(rt) ((u_char *)LLADDR(SDL((rt)))) #define rt_expire rt_rmx.rmx_expire struct llinfo_arp { ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_l2t.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.h,v 1.1 2007/05/25 09:48:19 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.h,v 1.2 2007/08/17 05:57:03 kmacy Exp $ ***************************************************************************/ #ifndef _CHELSIO_L2T_H @@ -33,7 +33,18 @@ #include #include + +#if __FreeBSD_version > 700000 #include +#else +#define rwlock mtx +#define rw_wlock(x) mtx_lock((x)) +#define rw_wunlock(x) mtx_unlock((x)) +#define rw_rlock(x) mtx_lock((x)) +#define rw_runlock(x) mtx_unlock((x)) +#define rw_init(x, str) mtx_init((x), (str), NULL, MTX_DEF) +#define rw_destroy(x) mtx_destroy((x)) +#endif enum { L2T_STATE_VALID, /* entry is up to date */ ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_main.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.28 2007/07/17 06:50:33 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.31 2007/08/17 05:57:04 kmacy Exp $"); #include #include @@ -384,10 +384,12 @@ device_t child; const struct adapter_info *ai; struct adapter *sc; - int i, reg, msi_needed, error = 0; + int i, reg, error = 0; uint32_t vers; int port_qsets = 1; - +#ifdef MSI_SUPPORTED + int msi_needed; +#endif sc = device_get_softc(dev); sc->dev = dev; sc->msi_count = 0; @@ -509,7 +511,7 @@ device_printf(dev, "failed to allocate controller task queue\n"); goto out; } - + taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", device_get_nameunit(dev)); TASK_INIT(&sc->ext_intr_task, 0, cxgb_ext_intr_handler, sc); @@ -557,7 +559,7 @@ sc->port[i].adapter = sc; sc->port[i].nqsets = port_qsets; sc->port[i].first_qset = i*port_qsets; - sc->port[i].port = i; + sc->port[i].port_id = i; sc->portdev[i] = child; device_set_softc(child, &sc->port[i]); } @@ -653,7 +655,8 @@ if (isset(&sc->open_device_map, OFFLOAD_DEVMAP_BIT)) offload_close(&sc->tdev); } -#endif +#endif + t3_free_sge_resources(sc); free(sc->filters, M_DEVBUF); t3_sge_free(sc); @@ -672,8 +675,6 @@ return; } - - static int alloc_filters(struct adapter *adap) { @@ -868,7 +869,7 @@ nqsets = sc->port[i].nqsets; for (j = 0; j < nqsets; j++, k++) { struct sge_qset *qs = &sc->sge.qs[k]; - + rid = k + 2; if (cxgb_debug) printf("rid=%d ", rid); @@ -905,7 +906,7 @@ p = device_get_softc(dev); - snprintf(buf, sizeof(buf), "Port %d %s", p->port, p->port_type->desc); + snprintf(buf, sizeof(buf), "Port %d %s", p->port_id, p->port_type->desc); device_set_desc_copy(dev, buf); return (0); } @@ -936,6 +937,7 @@ /* Don't enable TSO6 yet */ #define CXGB_CAP_ENABLE (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_JUMBO_MTU) #define IFCAP_TSO4 0x0 +#define IFCAP_TSO6 0x0 #define CSUM_TSO 0x0 #endif @@ -950,7 +952,7 @@ p = device_get_softc(dev); snprintf(p->lockbuf, PORT_NAME_LEN, "cxgb port lock %d:%d", - device_get_unit(device_get_parent(dev)), p->port); + device_get_unit(device_get_parent(dev)), p->port_id); PORT_LOCK_INIT(p, p->lockbuf); /* Allocate an ifnet object and set it up */ @@ -1032,14 +1034,14 @@ } - snprintf(p->taskqbuf, TASKQ_NAME_LEN, "cxgb_port_taskq%d", p->port); + snprintf(p->taskqbuf, TASKQ_NAME_LEN, "cxgb_port_taskq%d", p->port_id); #ifdef TASKQUEUE_CURRENT /* Create a port for handling TX without starvation */ p->tq = taskqueue_create(p->taskqbuf, M_NOWAIT, taskqueue_thread_enqueue, &p->tq); #else /* Create a port for handling TX without starvation */ - p->tq = taskqueue_create_fast(buf, M_NOWAIT, + p->tq = taskqueue_create_fast(p->taskqbuf, M_NOWAIT, taskqueue_thread_enqueue, &p->tq); #endif @@ -1049,6 +1051,7 @@ } taskqueue_start_threads(&p->tq, 1, PI_NET, "%s taskq", device_get_nameunit(dev)); + TASK_INIT(&p->start_task, 0, cxgb_start_proc, ifp); t3_sge_init_port(p); @@ -1195,7 +1198,6 @@ } } - /* * Interrupt-context handler for external (PHY) interrupts. */ @@ -1704,7 +1706,7 @@ t3_intr_clear(sc); t3_sge_init_adapter(sc); } - setbit(&p->adapter->open_device_map, p->port); + setbit(&p->adapter->open_device_map, p->port_id); ADAPTER_UNLOCK(p->adapter); if (is_offload(sc) && !ofld_disable) { @@ -1714,10 +1716,10 @@ "Could not initialize offload capabilities\n"); } cxgb_link_start(p); - t3_link_changed(sc, p->port); + t3_link_changed(sc, p->port_id); ifp->if_baudrate = p->link_config.speed * 1000000; - t3_port_intr_enable(sc, p->port); + t3_port_intr_enable(sc, p->port_id); callout_reset(&sc->cxgb_tick_ch, sc->params.stats_update_period * hz, cxgb_tick, sc); @@ -1748,13 +1750,13 @@ ifp = p->ifp; - t3_port_intr_disable(p->adapter, p->port); + t3_port_intr_disable(p->adapter, p->port_id); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); p->phy.ops->power_down(&p->phy, 1); t3_mac_disable(&p->mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX); ADAPTER_LOCK(p->adapter); - clrbit(&p->adapter->open_device_map, p->port); + clrbit(&p->adapter->open_device_map, p->port_id); if (p->adapter->open_device_map == 0) { @@ -1936,7 +1938,7 @@ m = m0; m_collapse(m, TX_MAX_SEGS, &m0); } else - break; + break; } m = m0; if ((err = t3_encap(p, &m)) != 0) @@ -2119,7 +2121,7 @@ cxgb_set_rxmode(p); t3_link_start(&p->phy, mac, &p->link_config); t3_mac_enable(mac, MAC_DIRECTION_RX | MAC_DIRECTION_TX); - t3_port_intr_enable(adapter, p->port); + t3_port_intr_enable(adapter, p->port_id); p->mac.stats.num_resets++; } PORT_UNLOCK(p); @@ -2527,7 +2529,7 @@ } case CHELSIO_SET_QSET_NUM: { struct ch_reg *edata = (struct ch_reg *)data; - unsigned int port_idx = pi->port; + unsigned int port_idx = pi->port_id; if (sc->flags & FULL_INIT_DONE) return (EBUSY); ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_offload.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_offload.c,v 1.6 2007/07/17 06:50:33 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_offload.c,v 1.8 2007/08/17 05:57:04 kmacy Exp $"); #include #include @@ -596,7 +596,7 @@ BUG_ON(tid >= t->ntids); if (tdev->type == T3A) - atomic_cmpset_ptr((long *)&t->tid_tab[tid].ctx, (long)NULL, (long)ctx); + atomic_cmpset_ptr((uintptr_t *)&t->tid_tab[tid].ctx, (long)NULL, (long)ctx); else { struct mbuf *m; @@ -1250,7 +1250,7 @@ } /* Add new L2T entry */ - e = t3_l2t_get(tdev, new, ((struct port_info *)new->rt_ifp->if_softc)->port); + e = t3_l2t_get(tdev, new, ((struct port_info *)new->rt_ifp->if_softc)->port_id); if (!e) { log(LOG_ERR, "%s: couldn't allocate new l2t entry!\n", __FUNCTION__); ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_offload.h#3 (text+ko) ==== @@ -26,7 +26,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_offload.h,v 1.3 2007/07/17 06:50:33 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_offload.h,v 1.4 2007/08/17 05:57:04 kmacy Exp $ ***************************************************************************/ @@ -149,7 +149,7 @@ struct tid_info { struct toe_tid_entry *tid_tab; unsigned int ntids; - volatile int tids_in_use; + volatile unsigned int tids_in_use; union listen_entry *stid_tab; unsigned int nstids; ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/cxgb/cxgb_sge.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.24 2007/07/17 06:50:33 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.27 2007/08/17 05:57:04 kmacy Exp $"); #include #include @@ -1168,8 +1168,8 @@ struct sge_txq *txq; struct tx_sw_desc *stx; struct txq_state txqs; - unsigned int nsegs, ndesc, flits, cntrl, mlen; - int err, tso_info = 0; + unsigned int ndesc, flits, cntrl, mlen; + int err, nsegs, tso_info = 0; struct work_request_hdr *wrp; struct tx_sw_desc *txsd; @@ -1196,7 +1196,7 @@ * XXX handle checksum, TSO, and VLAN here * */ - cntrl = V_TXPKT_INTF(p->port); + cntrl = V_TXPKT_INTF(p->port_id); /* * XXX need to add VLAN support for 6.x @@ -1212,7 +1212,7 @@ struct cpl_tx_pkt_lso *hdr = (struct cpl_tx_pkt_lso *) cpl; struct ip *ip; struct tcphdr *tcp; - uint8_t *pkthdr, tmp[TCPPKTHDRSIZE]; /* is this too large for the stack? */ + char *pkthdr, tmp[TCPPKTHDRSIZE]; /* is this too large for the stack? */ txd->flit[2] = 0; cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT_LSO); @@ -1222,7 +1222,7 @@ pkthdr = &tmp[0]; m_copydata(m0, 0, TCPPKTHDRSIZE, pkthdr); } else { - pkthdr = mtod(m0, uint8_t *); + pkthdr = mtod(m0, char *); } if (__predict_false(m0->m_flags & M_VLANTAG)) { @@ -1792,12 +1792,10 @@ static int ofld_xmit(adapter_t *adap, struct sge_txq *q, struct mbuf *m) { - int ret; - unsigned int pidx, gen, nsegs; - unsigned int ndesc; + unsigned int pidx, gen, ndesc; struct mbuf *m_vec[TX_CLEAN_MAX_DESC]; bus_dma_segment_t segs[TX_MAX_SEGS]; - int i, cleaned; + int i, cleaned, ret, nsegs; struct tx_sw_desc *stx = &q->sdesc[q->pidx]; mtx_lock(&q->lock); @@ -2094,9 +2092,6 @@ TASK_INIT(&q->txq[TXQ_ETH].qreclaim_task, 0, sge_txq_reclaim_handler, &q->txq[TXQ_ETH]); TASK_INIT(&q->txq[TXQ_OFLD].qreclaim_task, 0, sge_txq_reclaim_handler, &q->txq[TXQ_OFLD]); - - - q->fl[0].gen = q->fl[1].gen = 1; q->fl[0].size = p->fl_size; q->fl[1].size = p->jumbo_size; ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/dcons/dcons_os.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.18 2007/06/11 04:08:50 simokawa Exp $ + * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.19 2007/08/17 05:32:39 simokawa Exp $ */ #include @@ -241,11 +241,10 @@ #endif static int -dcons_os_checkc(struct dcons_softc *dc) +dcons_os_checkc_nopoll(struct dcons_softc *dc) { int c; - EVENTHANDLER_INVOKE(dcons_poll, 0); if (dg.dma_tag != NULL) bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_POSTREAD); @@ -257,6 +256,13 @@ return (c); } +static int +dcons_os_checkc(struct dcons_softc *dc) +{ + EVENTHANDLER_INVOKE(dcons_poll, 0); + return (dcons_os_checkc_nopoll(dc)); +} + #if defined(GDB) || !defined(CONS_NODEV) static int dcons_os_getc(struct dcons_softc *dc) @@ -408,7 +414,7 @@ for (i = 0; i < DCONS_NPORT; i ++) { dc = &sc[i]; tp = ((DEV)dc->dev)->si_tty; - while ((c = dcons_os_checkc(dc)) != -1) + while ((c = dcons_os_checkc_nopoll(dc)) != -1) if (tp->t_state & TS_ISOPEN) #if __FreeBSD_version < 502113 (*linesw[tp->t_line].l_rint)(c, tp); ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/ichwd/ichwd.c#2 (text+ko) ==== @@ -51,10 +51,12 @@ * (document no. 292273-001). The WDT is also described in the individual * chipset datasheets, e.g. Intel82801EB ICH5 / 82801ER ICH5R Datasheet * (document no. 252516-001) sections 9.10 and 9.11. + * + * ICH6/7/8 support by Takeharu KATO */ #include -__FBSDID("$FreeBSD: src/sys/dev/ichwd/ichwd.c,v 1.9 2007/03/27 21:03:36 n_hibma Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ichwd/ichwd.c,v 1.10 2007/08/13 18:52:37 des Exp $"); #include #include @@ -71,20 +73,27 @@ #include static struct ichwd_device ichwd_devices[] = { - { VENDORID_INTEL, DEVICEID_82801AA, "Intel 82801AA watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801AB, "Intel 82801AB watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801BA, "Intel 82801BA watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801BAM, "Intel 82801BAM watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801CA, "Intel 82801CA watchdog timer" }, >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 20 02:14:03 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3BB1316A41A; Mon, 20 Aug 2007 02:14:03 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D30EE16A418 for ; Mon, 20 Aug 2007 02:14:02 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C308713C46B for ; Mon, 20 Aug 2007 02:14:02 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K2Dvxe036459 for ; Mon, 20 Aug 2007 02:13:57 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K2DvxD036456 for perforce@freebsd.org; Mon, 20 Aug 2007 02:13:57 GMT (envelope-from jbr@FreeBSD.org) Date: Mon, 20 Aug 2007 02:13:57 GMT Message-Id: <200708200213.l7K2DvxD036456@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125374 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 02:14:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=125374 Change 125374 by jbr@jbr_bob on 2007/08/20 02:13:42 cleanup Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#3 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/exec.h#5 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#3 (text+ko) ==== @@ -229,7 +229,6 @@ } PROC_UNLOCK(p1); } - vm_forkproc(td, NULL, NULL, flags); /* @@ -417,7 +416,6 @@ td2 = FIRST_THREAD_IN_PROC(newproc); p2->p_state = PRS_NEW; /* protect against others */ p2->p_pid = trypid; - /* * Allow the scheduler to initialize the child. */ @@ -748,7 +746,6 @@ * Return child proc pointer to parent. */ *procp = p2; - return (0); fail: sx_sunlock(&proctree_lock); ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/exec.h#5 (text+ko) ==== @@ -73,9 +73,7 @@ int exec_map_first_page(struct image_params *); void exec_unmap_first_page(struct image_params *); - int exec_map_sysshm(struct image_params *); - int exec_register(const struct execsw *); int exec_unregister(const struct execsw *); From owner-p4-projects@FreeBSD.ORG Mon Aug 20 02:16:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 69CD116A41A; Mon, 20 Aug 2007 02:16:01 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FC2316A419 for ; Mon, 20 Aug 2007 02:16:01 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1704913C45E for ; Mon, 20 Aug 2007 02:16:01 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K2G0kP036625 for ; Mon, 20 Aug 2007 02:16:00 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K2G0wC036622 for perforce@freebsd.org; Mon, 20 Aug 2007 02:16:00 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 02:16:00 GMT Message-Id: <200708200216.l7K2G0wC036622@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125375 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 02:16:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=125375 Change 125375 by cnst@dale on 2007/08/20 02:15:52 branch man9 makefile Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man9/Makefile#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Mon Aug 20 02:16:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C63A716A523; Mon, 20 Aug 2007 02:16:01 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8834F16A4CD for ; Mon, 20 Aug 2007 02:16:01 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6B013C442 for ; Mon, 20 Aug 2007 02:16:01 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K2G1bS036632 for ; Mon, 20 Aug 2007 02:16:01 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K2G1UC036628 for perforce@freebsd.org; Mon, 20 Aug 2007 02:16:01 GMT (envelope-from jbr@FreeBSD.org) Date: Mon, 20 Aug 2007 02:16:01 GMT Message-Id: <200708200216.l7K2G1UC036628@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125376 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 02:16:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=125376 Change 125376 by jbr@jbr_bob on 2007/08/20 02:16:00 clean up redux Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#4 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/exec.h#6 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#4 (text+ko) ==== @@ -229,6 +229,7 @@ } PROC_UNLOCK(p1); } + vm_forkproc(td, NULL, NULL, flags); /* ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/exec.h#6 (text+ko) ==== @@ -73,7 +73,9 @@ int exec_map_first_page(struct image_params *); void exec_unmap_first_page(struct image_params *); + int exec_map_sysshm(struct image_params *); + int exec_register(const struct execsw *); int exec_unregister(const struct execsw *); From owner-p4-projects@FreeBSD.ORG Mon Aug 20 02:23:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 32C1F16A420; Mon, 20 Aug 2007 02:23:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0916D16A418 for ; Mon, 20 Aug 2007 02:23:17 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EAF4E13C45A for ; Mon, 20 Aug 2007 02:23:16 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K2NGXn037090 for ; Mon, 20 Aug 2007 02:23:16 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K2NAJp037086 for perforce@freebsd.org; Mon, 20 Aug 2007 02:23:10 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 20 Aug 2007 02:23:10 GMT Message-Id: <200708200223.l7K2NAJp037086@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125377 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 02:23:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=125377 Change 125377 by kmacy@kmacy_home:ethng on 2007/08/20 02:23:03 IFC Affected files ... .. //depot/projects/ethng/src/contrib/gcc/BASE-VER#2 integrate .. //depot/projects/ethng/src/contrib/gcc/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/gcc/DATESTAMP#2 integrate .. //depot/projects/ethng/src/contrib/gcc/Makefile.in#2 integrate .. //depot/projects/ethng/src/contrib/gcc/calls.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/combine.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/arm/arm.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/arm/cirrus.md#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/i386/i386.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/i386/i386.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/i386/i386.md#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/i386/sse.md#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/mips/iris6.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/rs6000/predicates.md#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/rs6000/rs6000.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/double.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/extended.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/floatundidf.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/floatundisf.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/floatunsidf.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/floatunsisf.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/op-2.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/op-4.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/op-common.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/soft-fp/quad.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/config/sparc/sparc.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/call.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/class.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/cp-tree.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/decl.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/decl2.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/init.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/parser.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/pt.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/semantics.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/typeck.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/cp/typeck2.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/doc/cpp.1#2 integrate .. //depot/projects/ethng/src/contrib/gcc/doc/gcc.1#2 integrate .. //depot/projects/ethng/src/contrib/gcc/doc/gcov.1#2 integrate .. //depot/projects/ethng/src/contrib/gcc/dwarf2out.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/except.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/fold-const.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/function.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/gimplify.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/gthr-posix.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/gthr-posix.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/loop-iv.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/objc/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/gcc/omp-low.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/pointer-set.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/pointer-set.h#2 integrate .. //depot/projects/ethng/src/contrib/gcc/reload.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/tree-if-conv.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/tree-ssa-loop-niter.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/tree-ssa-operands.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/tree-ssa-structalias.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/tree-vrp.c#2 integrate .. //depot/projects/ethng/src/contrib/gcc/version.c#2 integrate .. //depot/projects/ethng/src/contrib/gcclibs/include/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/gcclibs/libcpp/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/gcclibs/libdecnumber/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/gcclibs/libgomp/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/gcclibs/libgomp/config/posix/lock.c#2 integrate .. //depot/projects/ethng/src/contrib/gcclibs/libgomp/sections.c#2 integrate .. //depot/projects/ethng/src/contrib/gcclibs/libiberty/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/gcclibs/libmudflap/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/gcclibs/libssp/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/less/main.c#2 integrate .. //depot/projects/ethng/src/contrib/libobjc/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/ChangeLog#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/acinclude.m4#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/config.h.in#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/configure#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/include/Makefile.am#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/include/Makefile.in#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/include/bits/ostream.tcc#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/include/bits/ostream_insert.h#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/include/ext/throw_allocator.h#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/include/std/std_fstream.h#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/libsupc++/exception#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/libsupc++/new#2 integrate .. //depot/projects/ethng/src/contrib/libstdc++/libsupc++/typeinfo#2 integrate .. //depot/projects/ethng/src/etc/etc.arm/ttys#2 integrate .. //depot/projects/ethng/src/etc/namedb/named.conf#2 integrate .. //depot/projects/ethng/src/etc/rc.d/Makefile#2 integrate .. //depot/projects/ethng/src/etc/rc.d/lockd#2 integrate .. //depot/projects/ethng/src/etc/rc.d/nfslocking#2 integrate .. //depot/projects/ethng/src/etc/rc.d/statd#2 integrate .. //depot/projects/ethng/src/gnu/lib/libgcc/Makefile#2 integrate .. //depot/projects/ethng/src/gnu/lib/libstdc++/Makefile#2 integrate .. //depot/projects/ethng/src/lib/libarchive/archive_read_support_format_tar.c#2 integrate .. //depot/projects/ethng/src/lib/libarchive/archive_write_disk.c#2 integrate .. //depot/projects/ethng/src/lib/libarchive/test/test_read_format_gtar_sparse.c#2 integrate .. //depot/projects/ethng/src/lib/libarchive/test/test_write_disk_perms.c#2 integrate .. //depot/projects/ethng/src/release/Makefile#2 integrate .. //depot/projects/ethng/src/release/doc/Makefile#2 integrate .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/Makefile#2 integrate .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#2 integrate .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/hardware/common/hw.ent#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/hardware/common/intro.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/Makefile#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/Makefile.inc#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/amd64/Makefile#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/amd64/article.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/common/abstract.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/common/install.ent#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/common/install.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/common/layout.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/common/upgrade.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/i386/Makefile#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/i386/article.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/ia64/Makefile#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/ia64/article.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/pc98/Makefile#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/pc98/article.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/powerpc/Makefile#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/powerpc/article.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/sparc64/Makefile#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/sparc64/article.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/installation/sparc64/install.sgml#2 delete .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/readme/article.sgml#2 integrate .. //depot/projects/ethng/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#2 integrate .. //depot/projects/ethng/src/release/doc/share/examples/Makefile.relnotesng#2 integrate .. //depot/projects/ethng/src/release/doc/share/misc/dev.archlist.txt#2 integrate .. //depot/projects/ethng/src/release/doc/share/sgml/release.ent#2 integrate .. //depot/projects/ethng/src/sbin/atacontrol/atacontrol.c#2 integrate .. //depot/projects/ethng/src/sbin/reboot/boot_i386.8#2 integrate .. //depot/projects/ethng/src/sbin/tunefs/tunefs.8#2 integrate .. //depot/projects/ethng/src/share/man/man4/mfi.4#2 integrate .. //depot/projects/ethng/src/share/man/man4/ng_fec.4#2 integrate .. //depot/projects/ethng/src/share/man/man5/Makefile#2 integrate .. //depot/projects/ethng/src/share/man/man5/boot.config.5#1 branch .. //depot/projects/ethng/src/share/mk/sys.mk#2 integrate .. //depot/projects/ethng/src/sys/amd64/conf/NOTES#2 integrate .. //depot/projects/ethng/src/sys/amd64/include/specialreg.h#2 integrate .. //depot/projects/ethng/src/sys/arm/arm/busdma_machdep.c#2 integrate .. //depot/projects/ethng/src/sys/boot/arm/at91/boot2/boot2.c#2 integrate .. //depot/projects/ethng/src/sys/compat/freebsd32/freebsd32_proto.h#2 integrate .. //depot/projects/ethng/src/sys/compat/freebsd32/freebsd32_syscall.h#2 integrate .. //depot/projects/ethng/src/sys/compat/freebsd32/freebsd32_syscalls.c#2 integrate .. //depot/projects/ethng/src/sys/compat/freebsd32/freebsd32_sysent.c#2 integrate .. //depot/projects/ethng/src/sys/compat/freebsd32/syscalls.master#2 integrate .. //depot/projects/ethng/src/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/ethng/src/sys/conf/NOTES#2 integrate .. //depot/projects/ethng/src/sys/conf/files.amd64#2 integrate .. //depot/projects/ethng/src/sys/conf/files.i386#2 integrate .. //depot/projects/ethng/src/sys/dev/ata/ata-raid.c#2 integrate .. //depot/projects/ethng/src/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/common/cxgb_t3_hw.c#2 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#8 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_ioctl.h#2 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#11 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.c#3 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.h#2 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#10 integrate .. //depot/projects/ethng/src/sys/dev/dcons/dcons_os.c#2 integrate .. //depot/projects/ethng/src/sys/dev/ichwd/ichwd.c#2 integrate .. //depot/projects/ethng/src/sys/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/ethng/src/sys/dev/mfi/mfi.c#2 integrate .. //depot/projects/ethng/src/sys/dev/mfi/mfi_disk.c#2 integrate .. //depot/projects/ethng/src/sys/dev/mfi/mfi_pci.c#2 integrate .. //depot/projects/ethng/src/sys/dev/mfi/mfireg.h#2 integrate .. //depot/projects/ethng/src/sys/dev/mfi/mfivar.h#2 integrate .. //depot/projects/ethng/src/sys/dev/mpt/mpt.c#2 integrate .. //depot/projects/ethng/src/sys/dev/mpt/mpt.h#2 integrate .. //depot/projects/ethng/src/sys/dev/mpt/mpt_cam.c#2 integrate .. //depot/projects/ethng/src/sys/dev/re/if_re.c#2 integrate .. //depot/projects/ethng/src/sys/dev/usb/ehci.c#2 integrate .. //depot/projects/ethng/src/sys/fs/msdosfs/msdosfs_vfsops.c#3 integrate .. //depot/projects/ethng/src/sys/fs/tmpfs/tmpfs_vnops.c#3 integrate .. //depot/projects/ethng/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#2 integrate .. //depot/projects/ethng/src/sys/i386/conf/NOTES#2 integrate .. //depot/projects/ethng/src/sys/i386/include/specialreg.h#2 integrate .. //depot/projects/ethng/src/sys/kern/init_sysent.c#2 integrate .. //depot/projects/ethng/src/sys/kern/kern_cpu.c#2 integrate .. //depot/projects/ethng/src/sys/kern/kern_thr.c#2 integrate .. //depot/projects/ethng/src/sys/kern/syscalls.c#2 integrate .. //depot/projects/ethng/src/sys/kern/syscalls.master#2 integrate .. //depot/projects/ethng/src/sys/kern/systrace_args.c#2 integrate .. //depot/projects/ethng/src/sys/kern/vfs_mount.c#2 integrate .. //depot/projects/ethng/src/sys/kern/vfs_subr.c#2 integrate .. //depot/projects/ethng/src/sys/modules/Makefile#2 integrate .. //depot/projects/ethng/src/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/ethng/src/sys/modules/netgraph/bluetooth/Makefile#2 integrate .. //depot/projects/ethng/src/sys/net/bridgestp.c#2 integrate .. //depot/projects/ethng/src/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/ethng/src/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#2 integrate .. //depot/projects/ethng/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/ethng/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/ethng/src/sys/netgraph/ng_base.c#2 integrate .. //depot/projects/ethng/src/sys/netinet/sctp_asconf.c#2 integrate .. //depot/projects/ethng/src/sys/netinet/sctp_input.c#2 integrate .. //depot/projects/ethng/src/sys/netinet/sctp_output.c#2 integrate .. //depot/projects/ethng/src/sys/netinet/sctp_pcb.c#2 integrate .. //depot/projects/ethng/src/sys/netinet/sctp_timer.c#2 integrate .. //depot/projects/ethng/src/sys/netinet/sctp_usrreq.c#2 integrate .. //depot/projects/ethng/src/sys/netinet/sctputil.c#2 integrate .. //depot/projects/ethng/src/sys/netinet/tcp_subr.c#2 integrate .. //depot/projects/ethng/src/sys/powerpc/include/intr_machdep.h#3 integrate .. //depot/projects/ethng/src/sys/powerpc/include/md_var.h#2 integrate .. //depot/projects/ethng/src/sys/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/ethng/src/sys/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/ethng/src/sys/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/ethng/src/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/ethng/src/sys/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/ethng/src/sys/powerpc/powerpc/interrupt.c#3 integrate .. //depot/projects/ethng/src/sys/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/ethng/src/sys/powerpc/powerpc/nexus.c#2 integrate .. //depot/projects/ethng/src/sys/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/ethng/src/sys/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/ethng/src/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/ethng/src/sys/sys/ata.h#2 integrate .. //depot/projects/ethng/src/sys/sys/syscall.h#2 integrate .. //depot/projects/ethng/src/sys/sys/syscall.mk#2 integrate .. //depot/projects/ethng/src/sys/sys/sysproto.h#2 integrate .. //depot/projects/ethng/src/sys/sys/thr.h#2 integrate .. //depot/projects/ethng/src/sys/vm/device_pager.c#3 integrate .. //depot/projects/ethng/src/sys/vm/phys_pager.c#2 integrate .. //depot/projects/ethng/src/usr.sbin/freebsd-update/freebsd-update.sh#3 integrate .. //depot/projects/ethng/src/usr.sbin/rpc.statd/file.c#2 integrate .. //depot/projects/ethng/src/usr.sbin/sysinstall/menus.c#2 integrate Differences ... ==== //depot/projects/ethng/src/contrib/gcc/BASE-VER#2 (text+ko) ==== @@ -1,1 +1,1 @@ -4.2.0 +4.2.1 ==== //depot/projects/ethng/src/contrib/gcc/ChangeLog#2 (text+ko) ==== @@ -1,3 +1,441 @@ +2007-07-19 Release Manager + + * GCC 4.2.1 released. + +2007-07-18 Paolo Bonzini + + Revert: + + 2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + + 2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-16 Paul Brook + + PR target/32753 + gcc/ + * config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn. + +2007-07-10 Rainer Orth + + PR target/32538 + * config/mips/iris6.h (LIBGCC_SPEC): Add libm. + +2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + +2007-07-09 Uros Bizjak + + PR tree-optimization/32681 + * tree-if-conv.c (find_phi_replacement_condition): Use the condition + saved in second_edge->aux when first_bb is a loop header. + +2007-07-07 Anatoly Sokolov + + PR target/31331 + * config/avr/avr.c (avr_naked_function_p): Handle receiving a type + rather than a decl. + (avr_attribute_table): Make "naked" attribute apply to function types + rather than to decls. + (avr_handle_fntype_attribute): New function. + +2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-06 Uros Bizjak + + PR rtl-optimization/32450 + * function.c (thread_prologue_and_epilogue_insns): Emit blockage insn + to ensure that instructions are not moved into the prologue when + profiling is on. + +2007-07-04 Richard Guenther + + PR tree-optimization/32500 + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): + Only use basic blocks that are always executed to infer loop bounds. + +2007-07-04 Uros Bizjak + + PR tree-optimization/31966 + PR tree-optimization/32533 + * tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not + "basic_block" description as its third argument. Update function + calls to get destination bb from "edge" argument. Save "cond" into + aux field of the edge. Update prototype for changed arguments. + (if_convertible_loop_p): Clear aux field of incoming edges if bb + contains phi node. + (find_phi_replacement_condition): Operate on incoming edges, not + on predecessor blocks. If there is a condition saved in the + incoming edge aux field, AND it with incoming bb predicate. + Return source bb of the first edge. + (clean_predicate_lists): Clean aux field of outgoing node edges. + (tree_if_conversion): Do not initialize cond variable. Move + variable declaration into the loop. + (replace_phi_with_cond_gimple_modify_stmt): Remove unneded + initializations of new_stmt, arg0 and arg1 variables. + +2007-07-04 Kaz Kojima + + PR target/32506 + Backport from mainline. + * config/sh/sh.md (udivsi3_i1_media): Use target_reg_operand + predicate instead of target_operand. + (divsi3_i1_media, divsi3_media_2): Likewise. + +2007-07-03 Richard Guenther + + Backport from mainline: + 2006-12-11 Zdenek Dvorak + + PR rtl-optimization/30113 + * loop-iv.c (implies_p): Require the mode of the operands to be + scalar. + +2007-07-03 Rainer Orth + + PR target/28307 + * gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK] + (__gthrw_pragma): Provide default definition. + (__gthrw2): Use it. + * gthr-posix.c (__gthrw_pragma): Define. + +2007-07-02 Jakub Jelinek + + PR libgomp/32468 + * omp-low.c (check_combined_parallel): New function. + (lower_omp_parallel): Call it via walk_stmts, set + OMP_PARALLEL_COMBINED if appropriate. + (determine_parallel_type): If OMP_FOR resp. OMP_SECTIONS + isn't the only statement in WS_ENTRY_BB or OMP_RETURN + the only one in PAR_EXIT_BB and not OMP_PARALLEL_COMBINED, + don't consider it as combined parallel. + +2007-06-30 Alexandre Oliva + + * dwarf2out.c (dwarf2out_finish): Accept namespaces as context of + limbo die nodes. + +2007-06-28 Seongbae Park + + * config/arm/arm.c (arm_get_frame_offsets): Set + offsets->locals_base to avoid negative stack size. + (thumb_expand_prologue): Assert on negative stack size. + +2007-06-28 Jakub Jelinek + + * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure + decl is non-external for AIX ABI. + +2007-06-28 David Edelsohn + + * config/rs6000/predicates.md (current_file_function_operand): + Ensure the symbol is non-external for AIX ABI. + +2007-06-21 H.J. Lu + + * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_VEC_EXT_V16QI. + (ix86_init_mmx_sse_builtins): Add __builtin_ia32_vec_ext_v16qi. + (ix86_expand_builtin): Handle IX86_BUILTIN_VEC_EXT_V16QI. + +2007-06-21 Jakub Jelinek + + PR middle-end/32362 + * omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL, + but decl is a global var, instead return decl. + * gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses + even for is_global_var decls, if they are private in some outer + context. + +2007-06-21 Uros Bizjak + + PR target/32389 + * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL. + * config/i386/i386.c (assign_386_stack_local): Assert that + SLOT_VIRTUAL is valid only before virtual regs are instantiated. + (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]: + Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP. + * config/i386/i386.md (truncdfsf2, truncxfsf2, truncxfdf2): Ditto. + +2007-06-20 Jakub Jelinek + + PR inline-asm/32109 + * gimplify.c (gimplify_asm_expr): Issue error if type is addressable + and !allows_mem. + + PR middle-end/32285 + * calls.c (precompute_arguments): Also precompute CALL_EXPR arguments + if ACCUMULATE_OUTGOING_ARGS. + +2007-06-20 Kaz Kojima + + PR rtl-optimization/28011 + Backport from mainline. + * reload.c (push_reload): Set dont_share if IN appears in OUT + also when IN is a PLUS rtx. + (reg_overlap_mentioned_for_reload_p): Return true if X and IN + are same PLUS rtx. + +2007-06-19 Richard Guenther + Michael Matz + + PR tree-optimization/30252 + * tree-ssa-structalias.c (solution_set_add): Make sure to + preserve all relevant vars. + (handle_ptr_arith): Make sure to only handle positive + offsets. + (push_fields_onto_fieldstack): Create fields for empty + bases. + +2007-06-19 Jakub Jelinek + + PR tree-optimization/32353 + * tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL. + +2007-06-17 Eric Botcazou + + * config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the + return mode from the builtin itself. + (sparc_fold_builtin): Fix cast of zero constant. + +2007-06-15 Diego Novillo + + PR 32327 + * tree-ssa-operands.c (build_ssa_operands): Initially assume + that the statement does not take any addresses. + +2007-06-13 Eric Botcazou + + * config/sparc/sparc.c (sparc_override_options): Initialize + fpu mask correctly. + +2007-06-09 Ian Lance Taylor + + PR tree-optimization/32169 + * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and + CONVERT_EXPR, check whether min and max both converted to an + overflow infinity representation. + +2007-06-08 Kaz Kojima + + PR target/32163 + Backport from mainline. + * config/sh/sh.md (symGOT_load): Don't schedule insns when + the symbol is generated with the stack protector. + +2007-06-06 Ian Lance Taylor + + * fold-const.c (merge_ranges): If range_successor or + range_predecessor fail, just return 0. + +2007-06-05 Ian Lance Taylor + + * tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a + PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p. + (extract_range_from_assert): Set TREE_NO_WARNING when creating an + expression. + (test_for_singularity): Likewise. + +2007-06-04 Ian Lance Taylor + + * tree-vrp.c (adjust_range_with_scev): When loop is not expected + to overflow, reduce overflow infinity to regular infinity. + (vrp_var_may_overflow): New static function. + (vrp_visit_phi_node): Check vrp_var_may_overflow. + +2007-05-31 H.J. Lu + + Backport from mainline: + 2007-05-25 H.J. Lu + + * config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it + with MASK_SSE2. + (__builtin_ia32_vec_ext_v2di): Likewise. + (__builtin_ia32_vec_ext_v4si): Likewise. + (__builtin_ia32_vec_ext_v8hi): Likewise. + (__builtin_ia32_vec_set_v8hi): Likewise. + +2007-05-31 John David Anglin + + Backport from mainline: + 2007-05-05 Aurelien Jarno + + * config/pa/pa.md: Split tgd_load, tld_load and tie_load + into pic and non-pic versions. Mark r19 as used for + tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used + for tgd_load, tld_load and tie_load . + * config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic + version of tgd_load, tld_load and tie_load depending on the + value of flag_pic. + +2007-05-27 Daniel Berlin + + Fix PR/30052 + Backport PTA solver from mainline + + * pointer-set.c: Copy from mainline + * pointer-set.h: Ditto. + * tree-ssa-structalias.c: Copy solver portions from mainline. + * Makefile.in (tree-ssa-structalias.o): Update dependencies + +2007-05-30 Ralf Wildenhues + + * tree-vrp.c (compare_names): Initialize sop. + +2007-05-30 Jakub Jelinek + + PR tree-optimization/31769 + * except.c (duplicate_eh_regions): Clear prev_try if + ERT_MUST_NOT_THROW region is inside of ERT_TRY region. + +2007-05-28 Andrew Pinski + + PR tree-opt/32100 + * fold-const.c (tree_expr_nonnegative_warnv_p): Don't + return true when truth_value_p is true and the type + is of signed:1. + +2007-05-27 H.J. Lu + + Backport from mainline: + 2007-05-25 Uros Bizjak + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate + "memory" attribute for "sseishft" type insn without operands[2]. + + 2007-05-25 H.J. Lu + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift. + +2007-05-22 Ian Lance Taylor + + * tree-vrp.c (avoid_overflow_infinity): New static function, + broken out of set_value_range_to_value. + (set_value_range_to_value): Call avoid_overflow_infinity. + (extract_range_from_assert): Likewise. + +2007-05-23 Chen Liqin + + PR target/30987 + * config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove. + * config/score/predicate.md (const_pow2, const_npow2): remove. + * config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef. + PR target/30474 + * config/score/score.c (score_print_operand): makes sure that only lower + bits are used. + +2007-05-21 Uros Bizjak + + PR target/31167 + Backport from mainline. + * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use + x86_64_general_operand as operand[2] predicate. Remove "iF" + from operand constraints and use "e" constraint instead. + (*subti3_1, *subti3_1 splitter): Ditto. + (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as + operand[1] predicate. + +2007-05-21 Uros Bizjak + + PR target/30041 + Backport from mainline. + * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and + operands[1] in insn constraint. Correct type attribute to sselog1. + +2007-05-20 Kaz Kojima + + PR target/31701 + Backport from mainline. + * config/sh/sh.c (output_stack_adjust): Avoid using the frame + register itself to hold the offset constant. Tell flow the use + of r4 and r5 when they are used. + +2007-05-20 Kaz Kojima + + PR target/31480 + Backport from mainline. + * config/sh/sh.md (length): Check if prev_nonnote_insn (insn) + is null. + +2007-05-20 Kaz Kojima + + PR target/31022 + Backport from mainline. + * config/sh/sh.c (sh_adjust_cost): Use the result of single_set + instead of PATTERN. + +2007-05-20 Kaz Kojima + + PR target/27405 + Backport from mainline. + * config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove. + (cmpsi{eq,gt,gtu}{si,di}_media): Rename to + cmp{eq,gt,gtu}{si,di}_media. + (*cmpne0si_media): Remove. + (*movsicc_umin): Adjust gen_cmp*_media call. + (unordered): Change the mode of unordered and operands[1] to + SImode. + (seq): Adjust gen_cmp*_media calls. Make the mode of + a temporary result of compare SImode if needed. If the mode + of operands[0] is DImode, extend the temporary result to DImode. + (slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise. + (sunorderd): Change the mode of match_operand and unorderd to + SImode. + (cmpeq{sf,df}_media): Remove. + (cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media. + (cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand + and compare operation to SImode. + +2007-05-18 Joseph Myers + + * config/soft-fp/double.h, config/soft-fp/extended.h, + config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c, + config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c, + config/soft-fp/op-2.h, config/soft-fp/op-4.h, + config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from + glibc CVS. + +2007-05-17 Ian Lance Taylor + + PR tree-optimization/31953 + * tree-vrp.c (set_value_range_to_value): Add equiv parameter. + Change all callers. + (set_value_range_to_null): Call set_value_range_to_value. + (extract_range_from_comparison): Likewise. + +2007-05-17 Eric Botcazou + + PR rtl-optimization/31691 + * combine.c (simplify_set): Build a new src pattern instead of + substituting its operands in the COMPARE case. + +2007-05-14 Mark Mitchell + + * BASE-VER: Set to 4.2.1. + * DEV-PHASE: Set to prerelease. + 2007-05-13 Release Manager * GCC 4.2.0 released. @@ -307,7 +745,8 @@ 2007-04-03 Stuart Hastings PR 31281 - * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl. + * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile + from rethrow decl. * cse.c (record_jump_equiv): Bail out on CCmode comparisons. 2007-04-03 Jakub Jelinek ==== //depot/projects/ethng/src/contrib/gcc/DATESTAMP#2 (text+ko) ==== @@ -1,1 +1,1 @@ -20070514 +20070719 ==== //depot/projects/ethng/src/contrib/gcc/Makefile.in#2 (text+ko) ==== @@ -1839,7 +1839,7 @@ tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \ $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \ $(TM_H) coretypes.h $(CGRAPH_H) tree-pass.h $(TIMEVAR_H) \ - gt-tree-ssa-structalias.h $(PARAMS_H) + gt-tree-ssa-structalias.h $(PARAMS_H) pointer-set.h tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ ==== //depot/projects/ethng/src/contrib/gcc/calls.c#2 (text+ko) ==== @@ -1238,13 +1238,25 @@ /* If this is a libcall, then precompute all arguments so that we do not get extraneous instructions emitted as part of the libcall sequence. */ - if ((flags & ECF_LIBCALL_BLOCK) == 0) + + /* If we preallocated the stack space, and some arguments must be passed + on the stack, then we must precompute any parameter which contains a + function call which will store arguments on the stack. + Otherwise, evaluating the parameter may clobber previous parameters + which have already been stored into the stack. (we have code to avoid + such case by saving the outgoing stack arguments, but it results in + worse code) */ + if ((flags & ECF_LIBCALL_BLOCK) == 0 && !ACCUMULATE_OUTGOING_ARGS) return; for (i = 0; i < num_actuals; i++) { enum machine_mode mode; + if ((flags & ECF_LIBCALL_BLOCK) == 0 + && TREE_CODE (args[i].tree_value) != CALL_EXPR) + continue; + /* If this is an addressable type, we cannot pre-evaluate it. */ gcc_assert (!TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value))); ==== //depot/projects/ethng/src/contrib/gcc/combine.c#2 (text+ko) ==== @@ -5341,14 +5341,14 @@ } else if (GET_MODE (op0) == compare_mode && op1 == const0_rtx) { - SUBST(SET_SRC (x), op0); + SUBST (SET_SRC (x), op0); src = SET_SRC (x); } - else + /* Otherwise, update the COMPARE if needed. */ + else if (XEXP (src, 0) != op0 || XEXP (src, 1) != op1) { - /* Otherwise, update the COMPARE if needed. */ - SUBST (XEXP (src, 0), op0); - SUBST (XEXP (src, 1), op1); + SUBST (SET_SRC (x), gen_rtx_COMPARE (compare_mode, op0, op1)); + src = SET_SRC (x); } } else ==== //depot/projects/ethng/src/contrib/gcc/config/arm/arm.c#2 (text+ko) ==== @@ -10555,6 +10555,7 @@ if (leaf && frame_size == 0) { offsets->outgoing_args = offsets->soft_frame; + offsets->locals_base = offsets->soft_frame; return offsets; } @@ -13874,6 +13875,7 @@ amount = offsets->locals_base - offsets->saved_regs; } + gcc_assert (amount >= 0); if (amount) { if (amount < 512) ==== //depot/projects/ethng/src/contrib/gcc/config/arm/cirrus.md#2 (text+ko) ==== @@ -404,28 +404,6 @@ ;; Cirrus SI values have been outlawed. Look in arm.h for the comment ;; on HARD_REGNO_MODE_OK. -(define_insn "*cirrus_arm_movsi_insn" - [(set (match_operand:SI 0 "general_operand" "=r,r,r,m,*v,r,*v,T,*v") - (match_operand:SI 1 "general_operand" "rI,K,mi,r,r,*v,T,*v,*v"))] - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0 - && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "@ - mov%?\\t%0, %1 - mvn%?\\t%0, #%B1 - ldr%?\\t%0, %1 - str%?\\t%1, %0 - cfmv64lr%?\\t%Z0, %1 - cfmvr64l%?\\t%0, %Z1 - cfldr32%?\\t%V0, %1 - cfstr32%?\\t%V1, %0 - cfsh32%?\\t%V0, %V1, #0" - [(set_attr "type" "*, *, load1,store1, *, *, load1,store1, *") - (set_attr "pool_range" "*, *, 4096, *, *, *, 1024, *, *") - (set_attr "neg_pool_range" "*, *, 4084, *, *, *, 1012, *, *") - (set_attr "cirrus" "not,not, not, not,move,normal,normal,normal,normal")] -) - (define_insn "*cirrus_movsf_hard_insn" [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m") (match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))] ==== //depot/projects/ethng/src/contrib/gcc/config/i386/i386.c#2 (text+ko) ==== @@ -19,7 +19,7 @@ the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.24 2007/05/19 02:26:26 kan Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.25 2007/08/14 03:04:42 kan Exp $ */ #include "config.h" #include "system.h" @@ -13480,6 +13480,9 @@ gcc_assert (n < MAX_386_STACK_LOCALS); + /* Virtual slot is valid only before vregs are instantiated. */ + gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated); + for (s = ix86_stack_locals; s; s = s->next) if (s->mode == mode && s->n == n) return s->rtl; @@ -14570,6 +14573,7 @@ IX86_BUILTIN_VEC_EXT_V4SF, IX86_BUILTIN_VEC_EXT_V4SI, IX86_BUILTIN_VEC_EXT_V8HI, + IX86_BUILTIN_VEC_EXT_V16QI, IX86_BUILTIN_VEC_EXT_V2SI, IX86_BUILTIN_VEC_EXT_V4HI, IX86_BUILTIN_VEC_SET_V8HI, @@ -15542,13 +15546,13 @@ /* Access to the vec_extract patterns. */ ftype = build_function_type_list (double_type_node, V2DF_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2df", ftype, IX86_BUILTIN_VEC_EXT_V2DF); ftype = build_function_type_list (long_long_integer_type_node, V2DI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2di", ftype, IX86_BUILTIN_VEC_EXT_V2DI); ftype = build_function_type_list (float_type_node, V4SF_type_node, @@ -15558,12 +15562,12 @@ ftype = build_function_type_list (intSI_type_node, V4SI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v4si", ftype, IX86_BUILTIN_VEC_EXT_V4SI); ftype = build_function_type_list (intHI_type_node, V8HI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v8hi", ftype, IX86_BUILTIN_VEC_EXT_V8HI); ftype = build_function_type_list (intHI_type_node, V4HI_type_node, @@ -15576,11 +15580,15 @@ def_builtin (MASK_MMX, "__builtin_ia32_vec_ext_v2si", ftype, IX86_BUILTIN_VEC_EXT_V2SI); + ftype = build_function_type_list (intQI_type_node, V16QI_type_node, + integer_type_node, NULL_TREE); + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v16qi", ftype, IX86_BUILTIN_VEC_EXT_V16QI); + /* Access to the vec_set patterns. */ ftype = build_function_type_list (V8HI_type_node, V8HI_type_node, intHI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_set_v8hi", ftype, IX86_BUILTIN_VEC_SET_V8HI); ftype = build_function_type_list (V4HI_type_node, V4HI_type_node, @@ -16124,13 +16132,13 @@ case IX86_BUILTIN_LDMXCSR: op0 = expand_normal (TREE_VALUE (arglist)); - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_move_insn (target, op0); emit_insn (gen_sse_ldmxcsr (target)); return 0; case IX86_BUILTIN_STMXCSR: - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_insn (gen_sse_stmxcsr (target)); return copy_to_mode_reg (SImode, target); @@ -16492,6 +16500,7 @@ case IX86_BUILTIN_VEC_EXT_V4SF: case IX86_BUILTIN_VEC_EXT_V4SI: case IX86_BUILTIN_VEC_EXT_V8HI: + case IX86_BUILTIN_VEC_EXT_V16QI: case IX86_BUILTIN_VEC_EXT_V2SI: case IX86_BUILTIN_VEC_EXT_V4HI: return ix86_expand_vec_ext_builtin (arglist, target); ==== //depot/projects/ethng/src/contrib/gcc/config/i386/i386.h#2 (text+ko) ==== @@ -2166,7 +2166,8 @@ enum ix86_stack_slot { - SLOT_TEMP = 0, + SLOT_VIRTUAL = 0, + SLOT_TEMP, SLOT_CW_STORED, SLOT_CW_TRUNC, SLOT_CW_FLOOR, ==== //depot/projects/ethng/src/contrib/gcc/config/i386/i386.md#2 (text+ko) ==== @@ -3716,7 +3716,7 @@ ; else { - rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP); + rtx temp = assign_386_stack_local (SFmode, SLOT_VIRTUAL); emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp)); DONE; } @@ -3868,7 +3868,7 @@ DONE; } else - operands[2] = assign_386_stack_local (SFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (SFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfsf2_mixed" @@ -3966,7 +3966,7 @@ DONE; } else - operands[2] = assign_386_stack_local (DFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (DFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfdf2_mixed" @@ -4749,7 +4749,7 @@ (define_insn "*addti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "%0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (PLUS, TImode, operands)" "#") @@ -4757,7 +4757,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (unspec:CC [(match_dup 1) (match_dup 2)] @@ -6483,7 +6483,7 @@ (define_insn "*subti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (MINUS, TImode, operands)" "#") @@ -6491,7 +6491,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 20 02:41:40 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1E52016A41B; Mon, 20 Aug 2007 02:41:40 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C874B16A419 for ; Mon, 20 Aug 2007 02:41:39 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B810013C4A6 for ; Mon, 20 Aug 2007 02:41:39 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K2fds8038254 for ; Mon, 20 Aug 2007 02:41:39 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K2fdWk038251 for perforce@freebsd.org; Mon, 20 Aug 2007 02:41:39 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 02:41:39 GMT Message-Id: <200708200241.l7K2fdWk038251@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125378 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 02:41:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=125378 Change 125378 by cnst@dale on 2007/08/20 02:41:29 add sensor_attach.9 manual page and connect it to the build don't document sensordev_get() and sensor_find(), because these functions are internal to kern_sensors.c remove some references to things that I'm not certain are true/relevant, and add some references to the see also section whilst here, document the porting to FreeBSD part in the history section Obtained from: OpenBSD + local modifications for FreeBSD Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man9/Makefile#2 edit .. //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#1 add Differences ... ==== //depot/projects/soc2007/cnst-sensors/share.man.man9/Makefile#2 (text+ko) ==== @@ -209,6 +209,7 @@ securelevel_gt.9 \ selrecord.9 \ sema.9 \ + sensor_attach.9 \ sf_buf.9 \ signal.9 \ sleep.9 \ @@ -974,6 +975,11 @@ sema.9 sema_trywait.9 \ sema.9 sema_value.9 \ sema.9 sema_wait.9 +MLINKS+=sensor_attach.9 sensordev_install.9 \ + sensor_attach.9 sensordev_deinstall.9 \ + sensor_attach.9 sensor_detach.9 \ + sensor_attach.9 sensor_task_register.9 \ + sensor_attach.9 sensor_task_unregister.9 MLINKS+=sf_buf.9 sf_buf_alloc.9 \ sf_buf.9 sf_buf_free.9 \ sf_buf.9 sf_buf_kva.9 \ From owner-p4-projects@FreeBSD.ORG Mon Aug 20 02:55:58 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1841816A41A; Mon, 20 Aug 2007 02:55:58 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFD1C16A419 for ; Mon, 20 Aug 2007 02:55:57 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CF3E313C478 for ; Mon, 20 Aug 2007 02:55:57 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K2tvWU038985 for ; Mon, 20 Aug 2007 02:55:57 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K2tvg3038982 for perforce@freebsd.org; Mon, 20 Aug 2007 02:55:57 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 02:55:57 GMT Message-Id: <200708200255.l7K2tvg3038982@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125379 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 02:55:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=125379 Change 125379 by cnst@dale on 2007/08/20 02:55:18 why not also show sensor_attach(9) to those asking for ksensor(9) and ksensordev(9)? Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man9/Makefile#3 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/share.man.man9/Makefile#3 (text+ko) ==== @@ -978,6 +978,8 @@ MLINKS+=sensor_attach.9 sensordev_install.9 \ sensor_attach.9 sensordev_deinstall.9 \ sensor_attach.9 sensor_detach.9 \ + sensor_attach.9 ksensordev.9 \ + sensor_attach.9 ksensor.9 \ sensor_attach.9 sensor_task_register.9 \ sensor_attach.9 sensor_task_unregister.9 MLINKS+=sf_buf.9 sf_buf_alloc.9 \ From owner-p4-projects@FreeBSD.ORG Mon Aug 20 03:47:05 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 12B9D16A468; Mon, 20 Aug 2007 03:47:05 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4F7516A419 for ; Mon, 20 Aug 2007 03:47:04 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A29F513C467 for ; Mon, 20 Aug 2007 03:47:04 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K3l46k043446 for ; Mon, 20 Aug 2007 03:47:04 GMT (envelope-from ivoras@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K3l4GN043443 for perforce@freebsd.org; Mon, 20 Aug 2007 03:47:04 GMT (envelope-from ivoras@FreeBSD.org) Date: Mon, 20 Aug 2007 03:47:04 GMT Message-Id: <200708200347.l7K3l4GN043443@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ivoras@FreeBSD.org using -f From: Ivan Voras To: Perforce Change Reviews Cc: Subject: PERFORCE change 125384 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 03:47:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=125384 Change 125384 by ivoras@ivoras_finstall on 2007/08/20 03:46:03 Finished partitioning and image copy / install primitives. Affected files ... .. //depot/projects/soc2007/ivoras_finstall/installer/basewin.py#5 edit .. //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#12 edit .. //depot/projects/soc2007/ivoras_finstall/installer/glade/installprogress.glade#3 edit .. //depot/projects/soc2007/ivoras_finstall/installer/text/progress_1.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/text/progress_2.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/text/progress_3.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/text/progress_4.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/makeimage/makeimage.py#11 edit .. //depot/projects/soc2007/ivoras_finstall/makeimage/maptree.py#1 add .. //depot/projects/soc2007/ivoras_finstall/pybackend/freebsd.py#7 edit .. //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#10 edit Differences ... ==== //depot/projects/soc2007/ivoras_finstall/installer/basewin.py#5 (text+ko) ==== @@ -45,6 +45,7 @@ given label control""" label.set_text(self._get_text(file_name, dir)) label.set_use_markup(True) + label.set_line_wrap(True) def _set_label(self, label, txt): @@ -52,6 +53,7 @@ markup tags""" label.set_text(txt) label.set_use_markup(True) + label.set_line_wrap(True) def _get_text(self, file_name, dir="text"): ==== //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#12 (text+ko) ==== @@ -313,15 +313,11 @@ the following separate file systems: / swap - /usr/local + /usr /var /home and a symlink from /usr/ports to /usr/local/ports. - This is a slight deviation from the way FreeBSD is usually partitioned, but I feel - that having the whole base system on the root partition is a good thing for a novice - user. The only thing not belonging here is the ports tree, which can get huge, so - we'll move it to /usr/local. - We'll also not use the traditional BSD layout of bsdlabels (a=root, b=swap), except + We'll not use the traditional BSD layout of bsdlabels (a=root, b=swap), except for the unfortunately special "c" label. """ @@ -363,7 +359,7 @@ # Calculate the partitioning scheme var_size = min(2048, int(self.trackdata["drive_size"] * 0.1)) - usrlocal_size = min(10240, int(self.trackdata["drive_size"] * 0.3)) + usr_size = min(15*1024, int(self.trackdata["drive_size"] * 0.3)) if fs in ("UFS+SU", "UFS+GJ", "Ext2"): # "Normal" file systems, unix-like @@ -373,53 +369,54 @@ var_fs = fs parts = [] self.trackdata["new_parts"] = parts # a reference + parts.append({ "base" : self.trackdata["drive"], "type" : "fdisk", + "size" : self.trackdata["drive_size"], + "name" : "%ss1" % self.trackdata["drive"], + "mount" : None, + "fs" : None, + "flags" : "init,active,boot" + }) + parts.append({ + "base" : parts[0]["name"], + "type" : "bsdlabel", "size" : 512, - "name" : "%ss1" % self.trackdata["drive"], + "name" : "%sa" % parts[0]["name"], "mount" : "/", "fs" : "UFS+SU", - "flags" : "init,active,boot" + "flags" : "init,boot" }) parts.append({ - "base" : self.trackdata["drive"], - "type" : "fdisk", + "base" : parts[0]["name"], + "type" : "bsdlabel", "size" : physmem, - "name" : "%ss2" % self.trackdata["drive"], + "name" : "%sb" % parts[0]["name"], "mount" : "swap", "fs" : "swap" }) parts.append({ - "base" : self.trackdata["drive"], - "type" : "fdisk", - "size" : self.trackdata["drive_size"] - parts[0]["size"] - parts[1]["size"], # i.e. all the rest - "name" : "%ss3" % self.trackdata["drive"], - "mount" : None, - "fs" : None - }) - parts.append({ - "base" : parts[2]["name"], + "base" : parts[0]["name"], "type" : "bsdlabel", "size" : var_size, - "name" : "%sa" % parts[2]["name"], + "name" : "%sd" % parts[0]["name"], "mount" : "/var", - "fs" : var_fs, - "flags" : "init" + "fs" : var_fs }) parts.append({ - "base" : parts[2]["name"], + "base" : parts[0]["name"], "type" : "bsdlabel", - "size" : usrlocal_size, - "name" : "%sb" % parts[2]["name"], - "mount" : "/usr/local", + "size" : usr_size, + "name" : "%se" % parts[0]["name"], + "mount" : "/usr", "fs" : fs }) parts.append({ - "base" : parts[2]["name"], + "base" : parts[0]["name"], "type" : "bsdlabel", - "size" : parts[2]["size"] - parts[3]["size"] - parts[4]["size"] -2, # TODO: why is the bsdlabel 2679 sectors smaller than it should be? - "name" : "%sd" % parts[2]["name"], + "size" : parts[0]["size"] - parts[1]["size"] - parts[2]["size"] - parts[3]["size"] - parts[4]["size"] - 6, + "name" : "%sf" % parts[0]["name"], "mount" : "/home", "fs" : fs }) @@ -428,28 +425,37 @@ self.trackdata["new_parts"] = parts # The root file system will be UFS, but all the rest we'll set to ZFS, # including the swap. Since we'll boot from the root file system, - # we need to encapsulate ZFS in fdisk partition + # we need to encapsulate ZFS in a fdisk partition. parts.append({ "base" : self.trackdata["drive"], "type" : "fdisk", "size" : 512, "name" : "%ss1" % self.trackdata["drive"], + "mount" : None, + "fs" : None, + "flags" : "init,active,boot" + }) + parts.append({ + "base" : parts[0]["name"], + "type" : "bsdlabel", + "size" : 512, + "name" : "%sa" % parts[0]["name"], "mount" : "/", "fs" : "UFS+SU", - "flags" : "init,active,boot" + "flags" : "init,boot" }) parts.append({ "base" : self.trackdata["drive"], "type" : "fdisk", - "size" : self.trackdata["drive_size"] - parts[0]["size"], + "size" : self.trackdata["drive_size"] - parts[1]["size"], "name" : "%ss2" % self.trackdata["drive"], "mount" : None, "fs" : None }) parts.append({ - "base" : parts[1]["name"], + "base" : parts[2]["name"], "type" : "zpool", - "size" : parts[1]["size"], + "size" : None, "name" : "FreeBSD", "mount" : None, "fs" : None @@ -473,9 +479,9 @@ parts.append({ "base" : parts[2]["name"], "type" : "zfs", - "size" : usrlocal_size, - "name" : "%s/usrlocal" % parts[2]["name"], - "mount" : "/usr/local", + "size" : usrl_size, + "name" : "%s/usr" % parts[2]["name"], + "mount" : "/usr", "fs" : "ZFS" }) parts.append({ @@ -515,30 +521,76 @@ def ninstall_on_load(self): self._load_label(self["label2"], "ninstall.txt") - self.trackdata["install_list"] = "Creating file systems...\n" - self._set_label(self["label3"], self.trackdata["install_list"]) + self.trackdata["install_list"] = [] + self.add_install_list("Creating file systems") + self.trackdata["advert_n"] = 1 + self.next_progress_advert() self.trackdata["part_job"] = self.server.StartPartitionJob(self.trackdata["new_parts"]) gobject.timeout_add(500, self.part_progress) + + def add_install_list(self, msg): + self.trackdata["install_list"].append(msg) + label = "" + for i, s in enumerate(self.trackdata["install_list"]): + if i == len(self.trackdata["install_list"])-1: + label += "+ %s\n" % s + else: + label += "+ %s\n" % s + self._set_label(self["progresstext"], label) + + + def next_progress_advert(self): + filename = "progress_%d.txt" % self.trackdata["advert_n"] + if not os.path.exists("text/%s" % filename): + self.trackdata["advert_n"] = 1 + self.next_progress_advert() + return + self._load_label(self["ads"], filename) + self.trackdata["advert_n"] += 1 + def part_progress(self): try: pcnt = self.server.QueryJobProgress(self.trackdata["part_job"]) except Exception, e: - print "Exception ===================================================================" - print e code, result = self.server.QueryJobError(self.trackdata["part_job"]) print code, result + self._show_message(result[-1000:], "Error during backend function (part_job)") return False self["progressbar"].set_fraction(float(pcnt) / 100) if pcnt == 100: result = self.server.QueryJobResult(self.trackdata["part_job"]) - print result + self.server.DismantleJob(self.trackdata["part_job"]) + del self.trackdata["part_job"] + # Start a new job - base install + self.trackdata["install_job"] = self.server.StartInstallJob(self.trackdata["new_parts"]) + self["progressbar"].set_fraction(0) + self.add_install_list("Installing FreeBSD base system...") + gobject.timeout_add(1000, self.install_progress) + self.next_progress_advert() + return False + return True + + + def install_progress(self): + try: + pcnt = self.server.QueryJobProgress(self.trackdata["install_job"]) + except Exception, e: + code, result = self.server.QueryJobError(self.trackdata["install_job"]) + print code, result + self._show_message(result[-1000:], "Error during backend function (install_job)") + return False + self["progressbar"].set_fraction(float(pcnt) / 100) + if pcnt > 0 and pcnt % 15 == 0: + self.next_progress_advert() + if pcnt == 100: return False return True + my_dir = os.path.split(sys.argv[0])[0] if my_dir != "": # attempt to chdir into the directory where the script is located ==== //depot/projects/soc2007/ivoras_finstall/installer/glade/installprogress.glade#3 (text+ko) ==== @@ -1,6 +1,6 @@ - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -34,10 +34,12 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 520 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 label + True False @@ -48,7 +50,9 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + + 520 + 80 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 @@ -56,6 +60,9 @@ True True + + False + @@ -77,7 +84,18 @@ - + + 520 + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Ads / billboards during progress + True + True + + + 2 + ==== //depot/projects/soc2007/ivoras_finstall/makeimage/makeimage.py#11 (text+ko) ==== @@ -26,6 +26,7 @@ from time import strftime from getopt import getopt, GetoptError from util import nukedir, execute, printmsg, cmdout, readline, initutils, getpkgdeps, getpkgfullname +from maptree import write_maptree class MakeImageException(Exception): pass @@ -177,7 +178,10 @@ execute("make distribution DESTDIR=%s" % DESTDIR) execute("rm %s/boot/kernel/*.symbols" % DESTDIR) os.chdir(DESTDIR) - execute("mtree -c > livecd.mtree") + f = file("maptree.txt", "w") + write_maptree(".", f) + f.close() + execute("mtree -c > base.mtree") os.chdir(STARTDIR) else: if not os.path.exists(DESTDIR) or not os.path.exists("%s/COPYRIGHT" % DESTDIR): ==== //depot/projects/soc2007/ivoras_finstall/pybackend/freebsd.py#7 (text+ko) ==== @@ -29,6 +29,7 @@ cmd_sysctl = "/sbin/sysctl" cmd_geom = "/sbin/geom" cmd_mount = "/sbin/mount" +cmd_umount = "/sbin/umount" cmd_fdisk = "/sbin/fdisk" cmd_bsdlabel = "/sbin/bsdlabel" cmd_file = "/usr/bin/file -s" @@ -37,6 +38,7 @@ cmd_kldstat = "/sbin/kldstat" cmd_kldload = "/sbin/kldload" cmd_mke2fs = "/usr/local/sbin/mke2fs" +cmd_boot0cfg = "/usr/sbin/boot0cfg" file_dmesg = "/var/run/dmesg.boot" @@ -161,7 +163,7 @@ def create_fdisk_partition(dev, index, offset_sectors, size_sectors, flags=[]): - global cmd_fdisk + global cmd_fdisk, cmd_boot0cfg temp_fname, f = make_temp_script() # Create the script f.write("p %d 165 %d %d\n" % (index, offset_sectors, size_sectors)) @@ -179,7 +181,7 @@ return (code, output, None) if 'boot' in flags: # Make the device bootable - code, o = exec_cmd("%s -B %s" % (cmd_fdisk, dev), "y\ny\n") + code, o = exec_cmd("%s -B %s" % (cmd_boot0cfg, dev)) output += o if code != 0: return (code, o, None) @@ -283,6 +285,27 @@ return exec_cmd("%s -J %s.journal" % (cmd_newfs, dev)) +def mount(dev, mount, fs_type, mkdir_mount=True): + global cmd_mount + if not dev.startswith("/dev/"): + dev = "/dev/"+dev + if fs_type in ("UFS", "UFS+SU"): + cmd = "%s %s %s" % (cmd_mount, dev, mount) + elif fs_type == "UFS+GJ": + cmd = "%s -o async %s.journal %s" % (cmd_mount, dev, mount) + elif fs_type == "Ext2": + cmd = "%s -t ext2fs %s %s" % (cmd_mount, dev, mount) + else: + return (0, "Unsupported file system: "+str(fs_type)) + if not os.path.exists(mount) and mkdir_mount: + os.makedirs(mount) + return exec_cmd(cmd) + + +def umount(mount): + global cmd_umount + return exec_cmd("%s %s" % (cmd_umount, mount)) + if __name__ == "__main__": xml = get_geom_xml() for cls in xml["mesh"]["class"]: ==== //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#10 (text+ko) ==== @@ -21,7 +21,7 @@ # SysToolD Engine: implements SysToolD XML-RPC methods -import os, sys +import os, sys, shutil import re import logging, warnings from threading import Thread, Lock @@ -72,7 +72,8 @@ class PartitionJob(SysToolJob): - """A partitioning SysTool job. This one accept a list of partitions + """ + A partitioning SysTool job. This one accept a list of partitions to create and creates them one by one. The list cannot be arbitrary, it is evaluated sequentially. After creation, the partitions are also formatted with the file system specified (if any). @@ -163,6 +164,100 @@ if self.result == None: self.result = buf.getvalue() self.finished = True + del self.part_spec + + +class InstallJob(SysToolJob): + """ + The install job. The job progress is: + - Mount partitions to a temporary tree + - Parse mtree record and use it as a list of files to install + """ + def __init__(self, part_spec): + SysToolJob.__init__(self) + self.part_spec = part_spec + + def run(self): + install_root = "/dist" + if not os.path.exists(install_root): + os.mkdir(install_root) + buf = StringIO() + # mount partitions + for part in self.part_spec: + if part["fs"] == None or part["fs"] == "swap": + continue + if part["mount"] == "/": + mount = install_root + else: + mount = "%s/%s" % (install_root, part["mount"]) + code, result = freebsd.mount(part["name"], mount, part["fs"]) + buf.write(result) + if code != 0: + self.error = code + self.result = buf.getvalue() + self.finished = True + return + maptree_filename = "/maptree.txt" + if not os.path.exists(maptree_filename): + self.error = 1 + self.result = "No "+maptree_filename + self.finished = True + return + maptree_size = os.path.getsize(maptree_filename) + f = file(maptree_filename, "r") + for line in f: + self.percent_complete = self._calc_percent(f.tell(), maptree_size) + rec = line.strip().split("|") + rec_file = rec[-1] + dest_file = "%s/%s" % (install_root, rec_file) + src_file = "/%s" % rec_file + if rec[0] == "F": + if not os.path.exists(src_file): + logging.info("File not found: "+src_file) + continue + shutil.copyfile(src_file, dest_file) + shutil.copystat(src_file, dest_file) + logging.info("copy %s to %s" % (src_file, dest_file)) + elif rec[0] == "D": + if not os.path.exists(dest_file): + os.mkdir(dest_file) + elif rec[0] == "H": + if os.path.exists(dest_file): + os.unlink(dest_file) + try: + os.link("%s/%s" % (install_root, rec[1]), dest_file) + except: + logging.error("Cannot hardlink '/%s' to '%s'" % (rec[1], dest_file)) + try: + shutil.copyfile("/%s" % rec[1], dest_file) + except: + logging.error("Cannot replace hardlink from '/%s' to '%s' with file copy" % (rec[1], dest_file)) + elif rec[0] == "L": + if os.path.exists(dest_file): + if os.path.islink(dest_file): + os.unlink(dest_file) + os.symlink("/%s" % rec[1], dest_file) + else: + os.symlink("/%s" % rec[1], dest_file) + else: + self.error = 1 + self.result = "Unknown record type: "+line + break + for part in reversed(self.part_spec): + if part["fs"] == None or part["fs"] == "swap": + continue + if part["mount"] == "/": + mount = install_root + else: + mount = "%s/%s" % (install_root, part["mount"]) + code, result = freebsd.umount(mount) + if code != 0: + self.error = 1 + if self.result != None: + self.result += "\n"+result + else: + self.result = result + self.finished = True class SysToolEngine: @@ -383,6 +478,20 @@ @logexception + def StartInstallJob(self, part_spec): + """ + Starts the install job. Returns an integer job_id. + """ + self.job_list_lock.acquire() + job = InstallJob(part_spec) + self.job_list.append(job) + job_id = len(self.job_list) + job.start() + self.job_list_lock.release() + return job_id + + + @logexception def QueryJobProgress(self, job_id): """ Queries the progress of a job, returns percent complete or None @@ -424,3 +533,16 @@ return None return (job.error, job.result) + + @logexception + def DismantleJob(self, job_id): + """ + Dismantles a job. After this method is called, job_id is + no longer valid. + """ + self.job_list_lock.acquire() + del self.job_list[job_id-1] + self.job_list_lock.release() + return True + + From owner-p4-projects@FreeBSD.ORG Mon Aug 20 03:51:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F098B16A420; Mon, 20 Aug 2007 03:51:10 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C73D816A417 for ; Mon, 20 Aug 2007 03:51:10 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B5E4F13C45E for ; Mon, 20 Aug 2007 03:51:10 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K3pAlD043879 for ; Mon, 20 Aug 2007 03:51:10 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K3pArk043866 for perforce@freebsd.org; Mon, 20 Aug 2007 03:51:10 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 03:51:10 GMT Message-Id: <200708200351.l7K3pArk043866@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125385 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 03:51:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=125385 Change 125385 by cnst@dale on 2007/08/20 03:50:39 add a caveats section documenting sensor_task differences in OpenBSD 4.2, sensor_task was converted to use use OpenBSD's workq_add_task(9), which is not available on FreeBSD. In cnst-sensors, I have so far ported the older version of sensor_task as all of the necessary functions that it uses are here on FreeBSD. It is questionable whether sensor_task in soc2007/cnst-sensors should be compatible with 4.2, because it will involve additional code that is, at this point, noone except for me is testing. So for now, I think it is a much wiser choice to stick with sensor_task that is compatible with 4.1, and then when I'll have some testers, write an entirely new sensor_task if that will be deemed necessary. P.S. Converting the drivers from old sensor_task to new sensor_task (and back) is as easy as 123. :) In any case, any help or hints with sensor_task is appreciated. The current implementation for FreeBSD is long as available in the p4 repository, in soc2007/cnst-sensors/sys.kern/kern_sensors.c. Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#2 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#2 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $P4: //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#1 $ +.\" $P4: //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#2 $ .\" $FreeBSD$ .\" $OpenBSD: sensor_attach.9,v 1.4 2007/03/22 16:55:31 deraadt Exp $ .\" @@ -126,3 +126,22 @@ by .An Constantine A. Murenin as a Google Summer of Code 2007 project. +.Sh CAVEATS +The +.Fn sensor_task_register +and +.Fn sensor_task_unregister +functions that are included in +.Ox 4.2 +and later +are not compatible with +.Fx . +.Fx +includes an implementation that is similar and compatible +with an earlier version of +these +.Va sensor_task +functions that was available from +.Ox 3.9 +until +.Ox 4.1 . From owner-p4-projects@FreeBSD.ORG Mon Aug 20 04:15:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 867A216A41A; Mon, 20 Aug 2007 04:15:43 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3084F16A417 for ; Mon, 20 Aug 2007 04:15:43 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1F0C613C459 for ; Mon, 20 Aug 2007 04:15:43 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K4FgRP046542 for ; Mon, 20 Aug 2007 04:15:43 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K4Fgsv046539 for perforce@freebsd.org; Mon, 20 Aug 2007 04:15:42 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 04:15:42 GMT Message-Id: <200708200415.l7K4Fgsv046539@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125387 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 04:15:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=125387 Change 125387 by cnst@dale on 2007/08/20 04:15:34 it's systat(1), not 8 Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#3 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#3 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $P4: //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#2 $ +.\" $P4: //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#3 $ .\" $FreeBSD$ .\" $OpenBSD: sensor_attach.9,v 1.4 2007/03/22 16:55:31 deraadt Exp $ .\" @@ -105,10 +105,10 @@ with an argument of .Fa arg . .Sh SEE ALSO +.Xr systat 1 , .Xr sysctl 3 , .Xr sensorsd 8 , -.Xr sysctl 8 , -.Xr systat 8 +.Xr sysctl 8 .Sh HISTORY The sensor framework was written by .An Alexander Yurchenko Aq grange@openbsd.org From owner-p4-projects@FreeBSD.ORG Mon Aug 20 04:18:48 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2A4F716A418; Mon, 20 Aug 2007 04:18:48 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A65EC16A41B for ; Mon, 20 Aug 2007 04:18:47 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7794013C491 for ; Mon, 20 Aug 2007 04:18:47 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K4Ilwl046643 for ; Mon, 20 Aug 2007 04:18:47 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K4Il3x046640 for perforce@freebsd.org; Mon, 20 Aug 2007 04:18:47 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 04:18:47 GMT Message-Id: <200708200418.l7K4Il3x046640@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125388 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 04:18:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=125388 Change 125388 by cnst@dale on 2007/08/20 04:18:00 branch man4 makefile Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man4/Makefile#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Mon Aug 20 05:00:40 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B683416A468; Mon, 20 Aug 2007 05:00:39 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82C6216A417 for ; Mon, 20 Aug 2007 05:00:39 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 58E4D13C457 for ; Mon, 20 Aug 2007 05:00:39 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K50d0t057549 for ; Mon, 20 Aug 2007 05:00:39 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K50cqJ057546 for perforce@freebsd.org; Mon, 20 Aug 2007 05:00:38 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 05:00:38 GMT Message-Id: <200708200500.l7K50cqJ057546@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125389 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 05:00:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=125389 Change 125389 by cnst@dale on 2007/08/20 05:00:26 add lm(4) manual page, already converted to FreeBSD's format, and fitted with all relevant information Obtained from: OpenBSD + applied many local modifications Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man4/Makefile#2 edit .. //depot/projects/soc2007/cnst-sensors/share.man.man4/lm.4#1 add Differences ... ==== //depot/projects/soc2007/cnst-sensors/share.man.man4/Makefile#2 (text+ko) ==== @@ -141,6 +141,7 @@ le.4 \ led.4 \ lge.4 \ + lm.4 \ lmc.4 \ lo.4 \ lp.4 \ From owner-p4-projects@FreeBSD.ORG Mon Aug 20 06:52:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4075016A420; Mon, 20 Aug 2007 06:52:59 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAC7D16A418 for ; Mon, 20 Aug 2007 06:52:58 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C925A13C46A for ; Mon, 20 Aug 2007 06:52:58 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K6qwBv066902 for ; Mon, 20 Aug 2007 06:52:58 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K6qwIq066897 for perforce@freebsd.org; Mon, 20 Aug 2007 06:52:58 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Mon, 20 Aug 2007 06:52:58 GMT Message-Id: <200708200652.l7K6qwIq066897@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 125392 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 06:52:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=125392 Change 125392 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/20 06:52:20 test program for sysvshm Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/Makefile#7 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.h#4 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/shmtest.c#1 add Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/Makefile#7 (text+ko) ==== @@ -6,7 +6,7 @@ #CFLAGS+=-DHAS_TRUNCATE64 #CFLAGS+=-DHAS_STAT64 -all: macproc mactest mdconfigopenrdonly fifo_io pipe_io macping +all: macproc mactest mdconfigopenrdonly fifo_io pipe_io macping shmtest macproc: macproc.c gcc -Wall ${CFLAGS} macproc.c -o macproc -lutil @@ -22,6 +22,8 @@ macping: macping.c macconf.c mactestparser.tab.c gcc ${CFLAGS} -o macping macping.c macconf.c mactestparser.tab.c chmod 4555 macping +shmtest: shmtest.c macconf.c mactestparser.tab.c + gcc ${CFLAGS} -o shmtest shmtest.c macconf.c mactestparser.tab.c clean: rm -f macproc @@ -30,3 +32,4 @@ rm -f fifo_io rm -f pipe_io rm -f macping + rm -f shmtest ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.h#4 (text+ko) ==== @@ -58,5 +58,6 @@ int label_compare(char *conf, char *log); int labelstrings_compare(struct labelstrings *ls_conf, struct labelstrings *ls_log); void machookmatch(const char *macconf_file, pid_t pid); +#define BEGINLOG _IO('m',1) #endif /* !_REGRESSION_MAC_TEST__H */ From owner-p4-projects@FreeBSD.ORG Mon Aug 20 07:07:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7DAD116A41B; Mon, 20 Aug 2007 07:07:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 350AF16A417 for ; Mon, 20 Aug 2007 07:07:17 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 22F6213C457 for ; Mon, 20 Aug 2007 07:07:17 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K77HZI069363 for ; Mon, 20 Aug 2007 07:07:17 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K77GNQ069360 for perforce@freebsd.org; Mon, 20 Aug 2007 07:07:16 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 20 Aug 2007 07:07:16 GMT Message-Id: <200708200707.l7K77GNQ069360@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125393 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 07:07:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=125393 Change 125393 by kmacy@kmacy_home:ethng on 2007/08/20 07:06:25 - make KASSERT for cpuid == curcpu only compile in for STRICT_AFFINITY - add sysctl information for txq ring stats - split sysctl into 2 parts attach time and post-initialization - fix tx cleaning bug whereby in_use would go negative causing the queue to stall permanently Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#9 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#12 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#9 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#11 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#9 (text+ko) ==== @@ -127,10 +127,12 @@ struct task timer_reclaim_task; struct cdev *port_cdev; +#define PORT_LOCK_NAME_LEN 32 +#define TASKQ_NAME_LEN 32 #define PORT_NAME_LEN 32 -#define TASKQ_NAME_LEN 32 - char lockbuf[PORT_NAME_LEN]; + char lockbuf[PORT_LOCK_NAME_LEN]; char taskqbuf[TASKQ_NAME_LEN]; + char namebuf[PORT_NAME_LEN]; }; enum { /* adapter flags */ @@ -304,6 +306,8 @@ int idx; /* qset # */ int qs_cpuid; int qs_flags; +#define QS_NAME_LEN 32 + char namebuf[QS_NAME_LEN]; }; struct sge { @@ -529,7 +533,8 @@ void t3_rx_eth(struct port_info *p, struct sge_rspq *rq, struct mbuf *m, int ethpad); void t3_lro_flush(adapter_t *adap, struct sge_qset *qs, struct lro_state *state); -void t3_add_sysctls(adapter_t *sc); +void t3_add_attach_sysctls(adapter_t *sc); +void t3_add_configured_sysctls(adapter_t *sc); int t3_get_desc(const struct sge_qset *qs, unsigned int qnum, unsigned int idx, unsigned char *data); void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p); ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#12 (text+ko) ==== @@ -600,7 +600,7 @@ G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers), G_FW_VERSION_MICRO(vers)); - t3_add_sysctls(sc); + t3_add_attach_sysctls(sc); out: if (error) cxgb_free(sc); @@ -1565,6 +1565,7 @@ alloc_filters(sc); setup_rss(sc); + t3_add_configured_sysctls(sc); sc->flags |= FULL_INIT_DONE; } ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#9 (text+ko) ==== @@ -410,8 +410,8 @@ m_freem_vec(m_vec[i]); j++; - txq->cleaned += reclaimed; - txq->in_use -= reclaimed; + txq->cleaned += reclaimable; + txq->in_use -= reclaimable; if (isset(&qs->txq_stopped, TXQ_ETH)) clrbit(&qs->txq_stopped, TXQ_ETH); reclaimable = desc_reclaimable(txq); @@ -582,6 +582,7 @@ struct sge_qset *qs = arg; struct thread *td; struct adapter *sc = qs->port->adapter; + struct sge_txq *txq = &qs->txq[TXQ_ETH]; int err = 0; td = curthread; @@ -599,9 +600,9 @@ if (qs->qs_flags & QS_EXITING) break; - if (mtx_trylock(&qs->txq[TXQ_ETH].lock)) { + if (mtx_trylock(&txq->lock)) { err = cxgb_pcpu_start_(qs, NULL, TRUE); - mtx_unlock(&qs->txq[TXQ_ETH].lock); + mtx_unlock(&txq->lock); } else err = EINPROGRESS; @@ -615,13 +616,13 @@ mtx_unlock(&qs->rspq.lock); } - if ((!mbufq_empty(&qs->txq[TXQ_ETH].sendq) || - (qs->txq[TXQ_ETH].txq_mr.mr_cons != qs->txq[TXQ_ETH].txq_mr.mr_prod)) && + if ((!mbufq_empty(&txq->sendq) || + (txq->txq_mr.mr_cons != txq->txq_mr.mr_prod)) && err == 0) { if (cxgb_debug) printf("head=%p cons=%d prod=%d\n", - qs->txq[TXQ_ETH].sendq.head, qs->txq[TXQ_ETH].txq_mr.mr_cons, - qs->txq[TXQ_ETH].txq_mr.mr_prod); + txq->sendq.head, txq->txq_mr.mr_cons, + txq->txq_mr.mr_prod); continue; } tsleep(qs, 1, "cxgbidle", sleep_ticks); ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#11 (text+ko) ==== @@ -1197,7 +1197,7 @@ struct tx_desc *txd; struct cpl_tx_pkt *cpl; -#ifdef IFNET_MULTIQUEUE +#if defined(IFNET_MULTIQUEUE) && defined(STRICT_AFFINITY) KASSERT(qs->qs_cpuid == curcpu, ("cpu qset mismatch cpuid=%d curcpu=%d", qs->qs_cpuid, curcpu)); #endif DPRINTF("t3_encap cpu=%d ", curcpu); @@ -2720,11 +2720,11 @@ void -t3_add_sysctls(adapter_t *sc) +t3_add_attach_sysctls(adapter_t *sc) { struct sysctl_ctx_list *ctx; struct sysctl_oid_list *children; - + ctx = device_get_sysctl_ctx(sc->dev); children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)); @@ -2740,11 +2740,6 @@ 0, t3_lro_enable, "I", "enable large receive offload"); - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, - "intr_coal", - CTLTYPE_INT|CTLFLAG_RW, sc, - 0, t3_set_coalesce_nsecs, - "I", "interrupt coalescing timer (ns)"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "enable_debug", CTLFLAG_RW, &cxgb_debug, @@ -2770,8 +2765,76 @@ "bogus_imm", CTLFLAG_RD, &bogus_imm, 0, "#times a bogus immediate response was seen"); + } +void +t3_add_configured_sysctls(adapter_t *sc) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *children; + int i, j; + + ctx = device_get_sysctl_ctx(sc->dev); + children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, + "intr_coal", + CTLTYPE_INT|CTLFLAG_RW, sc, + 0, t3_set_coalesce_nsecs, + "I", "interrupt coalescing timer (ns)"); + + for (i = 0; i < sc->params.nports; i++) { + struct port_info *pi = &sc->port[i]; + struct sysctl_oid *poid; + struct sysctl_oid_list *poidlist; + + snprintf(pi->namebuf, PORT_NAME_LEN, "port%d", i); + poid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, + pi->namebuf, CTLFLAG_RD, NULL, "port statistics"); + poidlist = SYSCTL_CHILDREN(poid); + SYSCTL_ADD_INT(ctx, poidlist, OID_AUTO, + "nqsets", CTLFLAG_RD, &pi->nqsets, + 0, "#queue sets"); + + for (j = 0; j < pi->nqsets; j++) { + struct sge_qset *qs = &sc->sge.qs[pi->first_qset + j]; + struct sysctl_oid *qspoid; + struct sysctl_oid_list *qspoidlist; + struct sge_txq *txq = &qs->txq[TXQ_ETH]; + + snprintf(qs->namebuf, QS_NAME_LEN, "qs%d", j); + + qspoid = SYSCTL_ADD_NODE(ctx, poidlist, OID_AUTO, + qs->namebuf, CTLFLAG_RD, NULL, "qset statistics"); + qspoidlist = SYSCTL_CHILDREN(qspoid); + + SYSCTL_ADD_INT(ctx, qspoidlist, OID_AUTO, "dropped", + CTLFLAG_RD, &qs->txq[TXQ_ETH].txq_drops, + 0, "#tunneled packets dropped"); + SYSCTL_ADD_INT(ctx, qspoidlist, OID_AUTO, "sendqlen", + CTLFLAG_RD, &qs->txq[TXQ_ETH].sendq.qlen, + 0, "#tunneled packets waiting to be sent"); + SYSCTL_ADD_UINT(ctx, qspoidlist, OID_AUTO, "queue_pidx", + CTLFLAG_RD, (uint32_t *)(uintptr_t)&qs->txq[TXQ_ETH].txq_mr.mr_prod, + 0, "#tunneled packets queue producer index"); + SYSCTL_ADD_UINT(ctx, qspoidlist, OID_AUTO, "queue_cidx", + CTLFLAG_RD, (uint32_t *)(uintptr_t)&qs->txq[TXQ_ETH].txq_mr.mr_cons, + 0, "#tunneled packets queue consumer index"); + SYSCTL_ADD_INT(ctx, qspoidlist, OID_AUTO, "processed", + CTLFLAG_RD, &qs->txq[TXQ_ETH].processed, + 0, "#tunneled packets processed by the card"); + SYSCTL_ADD_UINT(ctx, qspoidlist, OID_AUTO, "cleaned", + CTLFLAG_RD, &txq->cleaned, + 0, "#tunneled packets cleaned"); + SYSCTL_ADD_UINT(ctx, qspoidlist, OID_AUTO, "in_use", + CTLFLAG_RD, &txq->in_use, + 0, "#tunneled packet slots in use"); + + } + } +} + /** * t3_get_desc - dump an SGE descriptor for debugging purposes * @qs: the queue set From owner-p4-projects@FreeBSD.ORG Mon Aug 20 08:41:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CCAC516A41B; Mon, 20 Aug 2007 08:41:13 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95A7516A418 for ; Mon, 20 Aug 2007 08:41:13 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 841E513C46E for ; Mon, 20 Aug 2007 08:41:13 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K8fDvP078071 for ; Mon, 20 Aug 2007 08:41:13 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K8fDhG078062 for perforce@freebsd.org; Mon, 20 Aug 2007 08:41:13 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 20 Aug 2007 08:41:13 GMT Message-Id: <200708200841.l7K8fDhG078062@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125394 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 08:41:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=125394 Change 125394 by kmacy@kmacy_home:ethng on 2007/08/20 08:40:30 add txq_stopped sysctl don't fail send because coalesce indicated that the sendq is full Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#10 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#12 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#10 (text+ko) ==== @@ -441,7 +441,7 @@ err = ENXIO; else { txq = &qs->txq[TXQ_ETH]; - err = cxgb_pcpu_pkt_coalesce(txq, immpkt, &complete); + cxgb_pcpu_pkt_coalesce(txq, immpkt, &complete); immpkt = NULL; } if (err) { ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#12 (text+ko) ==== @@ -2830,6 +2830,9 @@ SYSCTL_ADD_UINT(ctx, qspoidlist, OID_AUTO, "in_use", CTLFLAG_RD, &txq->in_use, 0, "#tunneled packet slots in use"); + SYSCTL_ADD_UINT(ctx, qspoidlist, OID_AUTO, "stopped_flags", + CTLFLAG_RD, &qs->txq_stopped, + 0, "tx queues stopped"); } } From owner-p4-projects@FreeBSD.ORG Mon Aug 20 09:11:40 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 48BB416A41B; Mon, 20 Aug 2007 09:11:40 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0699416A418; Mon, 20 Aug 2007 09:11:40 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id B4F6313C45A; Mon, 20 Aug 2007 09:11:39 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id BB5E98C145B; Mon, 20 Aug 2007 11:11:37 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BYIurTS8Ouas; Mon, 20 Aug 2007 11:11:36 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 7FF728C1387; Mon, 20 Aug 2007 11:11:36 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l7K9BaMl047924; Mon, 20 Aug 2007 11:11:36 +0200 (CEST) (envelope-from rdivacky) Date: Mon, 20 Aug 2007 11:11:36 +0200 From: Roman Divacky To: Jesper Brix Rosenkilde Message-ID: <20070820091136.GA47764@freebsd.org> References: <200708200201.l7K21c3v034586@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708200201.l7K21c3v034586@repoman.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: Perforce Change Reviews Subject: Re: PERFORCE change 125372 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 09:11:40 -0000 > + PROC_LOCK(p); > outsysshm.pid = p->p_pid; > - strncpy(outsysshm.progtitle, p->p_comm, MAXCOMLEN); > - strncpy(outsysshm.proctitle, "\0", 1); > - copyout((caddr_t) &outsysshm, (caddr_t) *addr, sizeof(struct sysshm)); > + copyout(&outsysshm, (vm_offset_t *) p->p_usrsysshm, > + sizeof(struct sysshm)); > + PROC_UNLOCK(p); I dont think you can copyout while holding proc lock. From owner-p4-projects@FreeBSD.ORG Mon Aug 20 09:28:15 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8352D16A468; Mon, 20 Aug 2007 09:28:15 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CC5B16A420 for ; Mon, 20 Aug 2007 09:28:15 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0A10213C478 for ; Mon, 20 Aug 2007 09:28:15 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K9SEHG005272 for ; Mon, 20 Aug 2007 09:28:14 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K9SBfq005245 for perforce@freebsd.org; Mon, 20 Aug 2007 09:28:11 GMT (envelope-from rdivacky@FreeBSD.org) Date: Mon, 20 Aug 2007 09:28:11 GMT Message-Id: <200708200928.l7K9SBfq005245@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 125395 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 09:28:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=125395 Change 125395 by rdivacky@rdivacky_witten on 2007/08/20 09:27:45 IFC Affected files ... .. //depot/projects/soc2007/rdivacky/linux_futex/sys/amd64/conf/NOTES#4 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/amd64/include/specialreg.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/arm/arm/busdma_machdep.c#4 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/boot/arm/at91/boot2/boot2.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/freebsd32_proto.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/freebsd32_syscall.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/freebsd32_syscalls.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/freebsd32_sysent.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/syscalls.master#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/conf/NOTES#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/conf/files.amd64#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/conf/files.i386#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/ata/ata-raid.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/common/cxgb_t3_hw.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_adapter.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_ioctl.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_main.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_offload.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_offload.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_sge.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/dcons/dcons_os.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/ichwd/ichwd.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/mfi/mfi.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/mfi/mfi_disk.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/mfi/mfi_pci.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/mfi/mfireg.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/mfi/mfivar.h#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/mpt/mpt.c#4 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/mpt/mpt.h#4 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/mpt/mpt_cam.c#4 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/re/if_re.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/usb/ehci.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/fs/msdosfs/msdosfs_vfsops.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/fs/tmpfs/tmpfs_vnops.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/i386/conf/NOTES#4 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/i386/include/specialreg.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/init_sysent.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/kern_cpu.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/kern_switch.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/kern_thr.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/sched_ule.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/syscalls.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/syscalls.master#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/systrace_args.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/vfs_mount.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/kern/vfs_subr.c#4 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/modules/Makefile#4 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/soc2007/rdivacky/linux_futex/sys/modules/netgraph/bluetooth/Makefile#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/net/bridgestp.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netgraph/ng_base.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netinet/sctp_asconf.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netinet/sctp_input.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netinet/sctp_output.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netinet/sctp_pcb.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netinet/sctp_timer.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netinet/sctp_usrreq.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netinet/sctputil.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/netinet/tcp_subr.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/include/intr_machdep.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/include/md_var.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/powerpc/interrupt.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/powerpc/nexus.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/sys/ata.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/sys/syscall.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/sys/syscall.mk#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/sys/sysproto.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/sys/thr.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/vm/device_pager.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_futex/sys/vm/phys_pager.c#3 integrate Differences ... ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/amd64/conf/NOTES#4 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.68 2007/07/04 00:18:38 bz Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.69 2007/08/15 19:26:02 des Exp $ # # @@ -446,6 +446,13 @@ # device ichwd +# +# Temperature sensors: +# +# coretemp: on-die sensor on Intel Core and newer CPUs +# +device coretemp + #--------------------------------------------------------------------------- # ISDN4BSD # ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/amd64/include/specialreg.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.39 2007/05/31 11:26:44 des Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.40 2007/08/15 19:26:01 des Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -179,6 +179,7 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/arm/arm/busdma_machdep.c#4 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.34 2007/07/27 14:46:43 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.35 2007/08/18 16:47:28 cognet Exp $"); /* * ARM bus dma support routines @@ -1091,13 +1091,19 @@ { char _tmp_cl[arm_dcache_align], _tmp_clend[arm_dcache_align]; - if (op & BUS_DMASYNC_PREWRITE) { + if ((op & BUS_DMASYNC_PREWRITE) && !(op & BUS_DMASYNC_PREREAD)) { cpu_dcache_wb_range((vm_offset_t)buf, len); cpu_l2cache_wb_range((vm_offset_t)buf, len); } if (op & BUS_DMASYNC_PREREAD) { - cpu_idcache_wbinv_range((vm_offset_t)buf, len); - cpu_l2cache_wbinv_range((vm_offset_t)buf, len); + if ((op & BUS_DMASYNC_PREWRITE) || + ((((vm_offset_t)(buf) | len) & arm_dcache_align_mask) == 0)) { + cpu_dcache_inv_range((vm_offset_t)buf, len); + cpu_l2cache_inv_range((vm_offset_t)buf, len); + } else { + cpu_dcache_wbinv_range((vm_offset_t)buf, len); + cpu_l2cache_wbinv_range((vm_offset_t)buf, len); + } } if (op & BUS_DMASYNC_POSTREAD) { if ((vm_offset_t)buf & arm_dcache_align_mask) { ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/boot/arm/at91/boot2/boot2.c#3 (text+ko) ==== @@ -14,7 +14,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.6 2007/07/13 14:27:04 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.7 2007/08/17 18:22:31 imp Exp $"); #include #include @@ -216,7 +216,7 @@ return; } addr = eh.e_entry; - ((void(*)(int))addr)(RB_BOOTINFO | (opts & RBX_MASK)); + ((void(*)(int))addr)(opts & RBX_MASK); } static int ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/freebsd32_proto.h#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.77 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.78 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/freebsd32_syscall.h#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.75 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.76 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -337,4 +337,5 @@ #define FREEBSD32_SYS_freebsd32_lseek 478 #define FREEBSD32_SYS_freebsd32_truncate 479 #define FREEBSD32_SYS_freebsd32_ftruncate 480 -#define FREEBSD32_SYS_MAXSYSCALL 481 +#define FREEBSD32_SYS_thr_kill2 481 +#define FREEBSD32_SYS_MAXSYSCALL 482 ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/freebsd32_syscalls.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.66 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.67 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -488,4 +488,5 @@ "freebsd32_lseek", /* 478 = freebsd32_lseek */ "freebsd32_truncate", /* 479 = freebsd32_truncate */ "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */ + "thr_kill2", /* 481 = thr_kill2 */ }; ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/freebsd32_sysent.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.76 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.77 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -519,4 +519,5 @@ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0 }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0 }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0 }, /* 480 = freebsd32_ftruncate */ + { AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 }, /* 481 = thr_kill2 */ }; ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/freebsd32/syscalls.master#3 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.91 2007/08/16 05:30:04 davidxu Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; @@ -794,3 +794,4 @@ u_int32_t lengthlo, u_int32_t lengthhi); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ u_int32_t lengthlo, u_int32_t lengthhi); } +481 AUE_KILL NOPROTO { int thr_kill2(pid_t pid, long id, int sig); } ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/opensolaris/sys/proc.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/compat/opensolaris/sys/proc.h,v 1.1 2007/04/06 01:09:06 pjd Exp $ + * $FreeBSD: src/sys/compat/opensolaris/sys/proc.h,v 1.2 2007/08/16 20:33:20 pjd Exp $ */ #ifndef _OPENSOLARIS_SYS_PROC_H_ @@ -56,6 +56,12 @@ typedef struct thread *kthread_id_t; typedef struct proc proc_t; +#if (KSTACK_PAGES * PAGE_SIZE) < 16384 +#define ZFS_KSTACK_PAGES (16384 / PAGE_SIZE) +#else +#define ZFS_KSTACK_PAGES 0 +#endif + static __inline kthread_t * thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), void *arg, size_t len, proc_t *pp, int state, pri_t pri) @@ -71,7 +77,8 @@ ASSERT(len == 0); ASSERT(state == TS_RUN); - error = kthread_create(proc, arg, &p, 0, 0, "solthread %p", proc); + error = kthread_create(proc, arg, &p, 0, ZFS_KSTACK_PAGES, + "solthread %p", proc); return (error == 0 ? FIRST_THREAD_IN_PROC(p) : NULL); } ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/conf/NOTES#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1448 2007/08/05 16:16:15 bz Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1449 2007/08/13 17:19:27 emax Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -627,7 +627,7 @@ options NETGRAPH_ATM_ATMPIF options NETGRAPH_BLUETOOTH # ng_bluetooth(4) options NETGRAPH_BLUETOOTH_BT3C # ng_bt3c(4) -# options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) - not MPSAFE +options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) options NETGRAPH_BLUETOOTH_HCI # ng_hci(4) options NETGRAPH_BLUETOOTH_L2CAP # ng_l2cap(4) options NETGRAPH_BLUETOOTH_SOCKET # ng_btsocket(4) ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/conf/files.amd64#5 (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.amd64,v 1.106 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.107 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -145,6 +145,7 @@ dev/atkbdc/atkbdc_isa.c optional atkbdc isa dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc +dev/coretemp/coretemp.c optional coretemp # There are no systems with isa slots, so all ed isa entries should go.. dev/ed/if_ed_3c503.c optional ed isa ed_3c503 dev/ed/if_ed_isa.c optional ed isa ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/conf/files.i386#5 (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.i386,v 1.579 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.580 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -158,6 +158,7 @@ dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce dev/cm/if_cm_isa.c optional cm isa +dev/coretemp/coretemp.c optional coretemp dev/cp/cpddk.c optional cp dev/cp/if_cp.c optional cp dev/ctau/ctau.c optional ctau ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/ata/ata-raid.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.123 2007/02/21 19:07:18 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.124 2007/08/13 18:46:31 jhb Exp $"); #include "opt_ata.h" #include @@ -56,7 +56,7 @@ /* prototypes */ static void ata_raid_done(struct ata_request *request); static void ata_raid_config_changed(struct ar_softc *rdp, int writeback); -static int ata_raid_status(struct ata_ioc_raid_config *config); +static int ata_raid_status(struct ata_ioc_raid_status *status); static int ata_raid_create(struct ata_ioc_raid_config *config); static int ata_raid_delete(int array); static int ata_raid_addspare(struct ata_ioc_raid_config *config); @@ -216,13 +216,14 @@ static int ata_raid_ioctl(u_long cmd, caddr_t data) { + struct ata_ioc_raid_status *status = (struct ata_ioc_raid_status *)data; struct ata_ioc_raid_config *config = (struct ata_ioc_raid_config *)data; int *lun = (int *)data; int error = EOPNOTSUPP; switch (cmd) { case IOCATARAIDSTATUS: - error = ata_raid_status(config); + error = ata_raid_status(status); break; case IOCATARAIDCREATE: @@ -929,25 +930,32 @@ } static int -ata_raid_status(struct ata_ioc_raid_config *config) +ata_raid_status(struct ata_ioc_raid_status *status) { struct ar_softc *rdp; int i; - if (!(rdp = ata_raid_arrays[config->lun])) + if (!(rdp = ata_raid_arrays[status->lun])) return ENXIO; - config->type = rdp->type; - config->total_disks = rdp->total_disks; + status->type = rdp->type; + status->total_disks = rdp->total_disks; for (i = 0; i < rdp->total_disks; i++ ) { - if ((rdp->disks[i].flags & AR_DF_PRESENT) && rdp->disks[i].dev) - config->disks[i] = device_get_unit(rdp->disks[i].dev); - else - config->disks[i] = -1; + status->disks[i].state = 0; + if ((rdp->disks[i].flags & AR_DF_PRESENT) && rdp->disks[i].dev) { + status->disks[i].lun = device_get_unit(rdp->disks[i].dev); + if (rdp->disks[i].flags & AR_DF_PRESENT) + status->disks[i].state |= AR_DISK_PRESENT; + if (rdp->disks[i].flags & AR_DF_ONLINE) + status->disks[i].state |= AR_DISK_ONLINE; + if (rdp->disks[i].flags & AR_DF_SPARE) + status->disks[i].state |= AR_DISK_SPARE; + } else + status->disks[i].lun = -1; } - config->interleave = rdp->interleave; - config->status = rdp->status; - config->progress = 100 * rdp->rebuild_lba / rdp->total_sectors; + status->interleave = rdp->interleave; + status->status = rdp->status; + status->progress = 100 * rdp->rebuild_lba / rdp->total_sectors; return 0; } ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/common/cxgb_t3_hw.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_hw.c,v 1.6 2007/07/17 06:50:34 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_hw.c,v 1.7 2007/08/17 05:57:04 kmacy Exp $"); #ifdef CONFIG_DEFINED @@ -501,7 +501,7 @@ #undef CAPS_10G #define VPD_ENTRY(name, len) \ - u8 name##_kword[2]; u8 name##_len; u8 name##_data[len] + u8 name##_kword[2]; u8 name##_len; char name##_data[len] /* * Partial EEPROM Vital Product Data structure. Includes only the ID and ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_adapter.h#3 (text+ko) ==== @@ -26,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.15 2007/08/10 23:33:34 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.16 2007/08/17 05:57:03 kmacy Exp $ ***************************************************************************/ @@ -36,7 +36,7 @@ #define _CXGB_ADAPTER_H_ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.15 2007/08/10 23:33:34 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.16 2007/08/17 05:57:03 kmacy Exp $"); #include #include @@ -310,7 +310,7 @@ TAILQ_ENTRY(adapter) adapter_entry; /* PCI register resources */ - uint32_t regs_rid; + int regs_rid; struct resource *regs_res; bus_space_handle_t bh; bus_space_tag_t bt; ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_ioctl.h#3 (text+ko) ==== @@ -25,7 +25,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_ioctl.h,v 1.4 2007/07/17 06:50:33 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_ioctl.h,v 1.5 2007/08/17 05:57:03 kmacy Exp $ ***************************************************************************/ #ifndef __CHIOCTL_H__ @@ -128,7 +128,7 @@ int8_t channel; int32_t kbps; /* rate in Kbps */ int32_t class_ipg; /* tenths of nanoseconds */ - int32_t flow_ipg; /* usec */ + uint32_t flow_ipg; /* usec */ }; struct ch_filter_tuple { ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_l2t.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.c,v 1.2 2007/05/28 22:57:26 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.c,v 1.3 2007/08/17 05:57:03 kmacy Exp $"); #include #include @@ -37,9 +37,10 @@ #include #include #include +#if __FreeBSD_version > 700000 #include +#endif - #include #include #include @@ -58,7 +59,7 @@ #define VLAN_NONE 0xfff #define SDL(s) ((struct sockaddr_dl *)s) -#define RT_ENADDR(rt) ((char *)LLADDR(SDL((rt)))) +#define RT_ENADDR(rt) ((u_char *)LLADDR(SDL((rt)))) #define rt_expire rt_rmx.rmx_expire struct llinfo_arp { ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_l2t.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.h,v 1.1 2007/05/25 09:48:19 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.h,v 1.2 2007/08/17 05:57:03 kmacy Exp $ ***************************************************************************/ #ifndef _CHELSIO_L2T_H @@ -33,7 +33,18 @@ #include #include + +#if __FreeBSD_version > 700000 #include +#else +#define rwlock mtx +#define rw_wlock(x) mtx_lock((x)) +#define rw_wunlock(x) mtx_unlock((x)) +#define rw_rlock(x) mtx_lock((x)) +#define rw_runlock(x) mtx_unlock((x)) +#define rw_init(x, str) mtx_init((x), (str), NULL, MTX_DEF) +#define rw_destroy(x) mtx_destroy((x)) +#endif enum { L2T_STATE_VALID, /* entry is up to date */ ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_main.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.30 2007/08/10 23:47:39 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.31 2007/08/17 05:57:04 kmacy Exp $"); #include #include @@ -384,10 +384,12 @@ device_t child; const struct adapter_info *ai; struct adapter *sc; - int i, reg, msi_needed, error = 0; + int i, reg, error = 0; uint32_t vers; int port_qsets = 1; - +#ifdef MSI_SUPPORTED + int msi_needed; +#endif sc = device_get_softc(dev); sc->dev = dev; sc->msi_count = 0; @@ -935,6 +937,7 @@ /* Don't enable TSO6 yet */ #define CXGB_CAP_ENABLE (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_JUMBO_MTU) #define IFCAP_TSO4 0x0 +#define IFCAP_TSO6 0x0 #define CSUM_TSO 0x0 #endif @@ -1038,7 +1041,7 @@ taskqueue_thread_enqueue, &p->tq); #else /* Create a port for handling TX without starvation */ - p->tq = taskqueue_create_fast(buf, M_NOWAIT, + p->tq = taskqueue_create_fast(p->taskqbuf, M_NOWAIT, taskqueue_thread_enqueue, &p->tq); #endif ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_offload.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_offload.c,v 1.7 2007/08/10 23:33:34 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_offload.c,v 1.8 2007/08/17 05:57:04 kmacy Exp $"); #include #include @@ -596,7 +596,7 @@ BUG_ON(tid >= t->ntids); if (tdev->type == T3A) - atomic_cmpset_ptr((long *)&t->tid_tab[tid].ctx, (long)NULL, (long)ctx); + atomic_cmpset_ptr((uintptr_t *)&t->tid_tab[tid].ctx, (long)NULL, (long)ctx); else { struct mbuf *m; ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_offload.h#2 (text+ko) ==== @@ -26,7 +26,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_offload.h,v 1.3 2007/07/17 06:50:33 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_offload.h,v 1.4 2007/08/17 05:57:04 kmacy Exp $ ***************************************************************************/ @@ -149,7 +149,7 @@ struct tid_info { struct toe_tid_entry *tid_tab; unsigned int ntids; - volatile int tids_in_use; + volatile unsigned int tids_in_use; union listen_entry *stid_tab; unsigned int nstids; ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/cxgb/cxgb_sge.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.26 2007/08/10 23:47:39 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.27 2007/08/17 05:57:04 kmacy Exp $"); #include #include @@ -1168,8 +1168,8 @@ struct sge_txq *txq; struct tx_sw_desc *stx; struct txq_state txqs; - unsigned int nsegs, ndesc, flits, cntrl, mlen; - int err, tso_info = 0; + unsigned int ndesc, flits, cntrl, mlen; + int err, nsegs, tso_info = 0; struct work_request_hdr *wrp; struct tx_sw_desc *txsd; @@ -1212,7 +1212,7 @@ struct cpl_tx_pkt_lso *hdr = (struct cpl_tx_pkt_lso *) cpl; struct ip *ip; struct tcphdr *tcp; - uint8_t *pkthdr, tmp[TCPPKTHDRSIZE]; /* is this too large for the stack? */ + char *pkthdr, tmp[TCPPKTHDRSIZE]; /* is this too large for the stack? */ txd->flit[2] = 0; cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT_LSO); @@ -1222,7 +1222,7 @@ pkthdr = &tmp[0]; m_copydata(m0, 0, TCPPKTHDRSIZE, pkthdr); } else { - pkthdr = mtod(m0, uint8_t *); + pkthdr = mtod(m0, char *); } if (__predict_false(m0->m_flags & M_VLANTAG)) { @@ -1792,12 +1792,10 @@ static int ofld_xmit(adapter_t *adap, struct sge_txq *q, struct mbuf *m) { - int ret; - unsigned int pidx, gen, nsegs; - unsigned int ndesc; + unsigned int pidx, gen, ndesc; struct mbuf *m_vec[TX_CLEAN_MAX_DESC]; bus_dma_segment_t segs[TX_MAX_SEGS]; - int i, cleaned; + int i, cleaned, ret, nsegs; struct tx_sw_desc *stx = &q->sdesc[q->pidx]; mtx_lock(&q->lock); ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/dcons/dcons_os.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.18 2007/06/11 04:08:50 simokawa Exp $ + * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.19 2007/08/17 05:32:39 simokawa Exp $ */ #include @@ -241,11 +241,10 @@ #endif static int -dcons_os_checkc(struct dcons_softc *dc) +dcons_os_checkc_nopoll(struct dcons_softc *dc) { int c; - EVENTHANDLER_INVOKE(dcons_poll, 0); if (dg.dma_tag != NULL) bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_POSTREAD); @@ -257,6 +256,13 @@ return (c); } +static int +dcons_os_checkc(struct dcons_softc *dc) +{ + EVENTHANDLER_INVOKE(dcons_poll, 0); + return (dcons_os_checkc_nopoll(dc)); +} + #if defined(GDB) || !defined(CONS_NODEV) static int dcons_os_getc(struct dcons_softc *dc) @@ -408,7 +414,7 @@ for (i = 0; i < DCONS_NPORT; i ++) { dc = &sc[i]; tp = ((DEV)dc->dev)->si_tty; - while ((c = dcons_os_checkc(dc)) != -1) + while ((c = dcons_os_checkc_nopoll(dc)) != -1) if (tp->t_state & TS_ISOPEN) #if __FreeBSD_version < 502113 (*linesw[tp->t_line].l_rint)(c, tp); ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/dev/ichwd/ichwd.c#2 (text+ko) ==== @@ -51,10 +51,12 @@ * (document no. 292273-001). The WDT is also described in the individual * chipset datasheets, e.g. Intel82801EB ICH5 / 82801ER ICH5R Datasheet * (document no. 252516-001) sections 9.10 and 9.11. + * + * ICH6/7/8 support by Takeharu KATO */ #include -__FBSDID("$FreeBSD: src/sys/dev/ichwd/ichwd.c,v 1.9 2007/03/27 21:03:36 n_hibma Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ichwd/ichwd.c,v 1.10 2007/08/13 18:52:37 des Exp $"); #include #include @@ -71,20 +73,27 @@ #include static struct ichwd_device ichwd_devices[] = { - { VENDORID_INTEL, DEVICEID_82801AA, "Intel 82801AA watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801AB, "Intel 82801AB watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801BA, "Intel 82801BA watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801BAM, "Intel 82801BAM watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801CA, "Intel 82801CA watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801CAM, "Intel 82801CAM watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801DB, "Intel 82801DB watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801DBM, "Intel 82801DBM watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801E, "Intel 82801E watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801EBR, "Intel 82801EB/ER watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801FBR, "Intel 82801FB/FR watchdog timer" }, - { VENDORID_INTEL, DEVICEID_ICH5, "Intel ICH5 watchdog timer"}, - { VENDORID_INTEL, DEVICEID_6300ESB, "Intel 6300ESB watchdog timer"}, - { 0, 0, NULL }, + { DEVICEID_82801AA, "Intel 82801AA watchdog timer", 1 }, + { DEVICEID_82801AB, "Intel 82801AB watchdog timer", 1 }, + { DEVICEID_82801BA, "Intel 82801BA watchdog timer", 2 }, + { DEVICEID_82801BAM, "Intel 82801BAM watchdog timer", 2 }, + { DEVICEID_82801CA, "Intel 82801CA watchdog timer", 3 }, + { DEVICEID_82801CAM, "Intel 82801CAM watchdog timer", 3 }, + { DEVICEID_82801DB, "Intel 82801DB watchdog timer", 4 }, + { DEVICEID_82801DBM, "Intel 82801DBM watchdog timer", 4 }, + { DEVICEID_82801E, "Intel 82801E watchdog timer", 5 }, + { DEVICEID_82801EBR, "Intel 82801EB/ER watchdog timer", 5 }, + { DEVICEID_6300ESB, "Intel 6300ESB watchdog timer", 5 }, + { DEVICEID_82801FBR, "Intel 82801FB/FR watchdog timer", 6 }, + { DEVICEID_ICH6M, "Intel ICH6M watchdog timer", 6 }, + { DEVICEID_ICH6W, "Intel ICH6W watchdog timer", 6 }, + { DEVICEID_ICH7, "Intel ICH7 watchdog timer", 7 }, + { DEVICEID_ICH7M, "Intel ICH7M watchdog timer", 7 }, + { DEVICEID_ICH7MDH, "Intel ICH7MDH watchdog timer", 7 }, + { DEVICEID_ICH8, "Intel ICH8 watchdog timer", 8 }, + { DEVICEID_ICH8DH, "Intel ICH8DH watchdog timer", 8 }, + { DEVICEID_ICH8DO, "Intel ICH8DO watchdog timer", 8 }, + { 0, NULL, 0 }, }; static devclass_t ichwd_devclass; @@ -95,6 +104,10 @@ bus_space_read_2((sc)->tco_bst, (sc)->tco_bsh, (off)) #define ichwd_read_tco_4(sc, off) \ bus_space_read_4((sc)->tco_bst, (sc)->tco_bsh, (off)) +#define ichwd_read_smi_4(sc, off) \ + bus_space_read_4((sc)->smi_bst, (sc)->smi_bsh, (off)) +#define ichwd_read_gcs_4(sc, off) \ + bus_space_read_4((sc)->gcs_bst, (sc)->gcs_bsh, (off)) #define ichwd_write_tco_1(sc, off, val) \ bus_space_write_1((sc)->tco_bst, (sc)->tco_bsh, (off), (val)) @@ -102,12 +115,17 @@ bus_space_write_2((sc)->tco_bst, (sc)->tco_bsh, (off), (val)) #define ichwd_write_tco_4(sc, off, val) \ bus_space_write_4((sc)->tco_bst, (sc)->tco_bsh, (off), (val)) - -#define ichwd_read_smi_4(sc, off) \ - bus_space_read_4((sc)->smi_bst, (sc)->smi_bsh, (off)) #define ichwd_write_smi_4(sc, off, val) \ bus_space_write_4((sc)->smi_bst, (sc)->smi_bsh, (off), (val)) +#define ichwd_write_gcs_4(sc, off, val) \ + bus_space_write_4((sc)->gcs_bst, (sc)->gcs_bsh, (off), (val)) +#define ichwd_verbose_printf(dev, ...) \ + do { \ + if (bootverbose) \ + device_printf(dev, __VA_ARGS__);\ + } while (0) + static __inline void ichwd_intr_enable(struct ichwd_softc *sc) { @@ -136,8 +154,7 @@ cnt = ichwd_read_tco_2(sc, TCO1_CNT) & TCO_CNT_PRESERVE; ichwd_write_tco_2(sc, TCO1_CNT, cnt & ~TCO_TMR_HALT); sc->active = 1; - if (bootverbose) - device_printf(sc->device, "timer enabled\n"); + ichwd_verbose_printf(sc->device, "timer enabled\n"); } static __inline void @@ -148,25 +165,85 @@ cnt = ichwd_read_tco_2(sc, TCO1_CNT) & TCO_CNT_PRESERVE; ichwd_write_tco_2(sc, TCO1_CNT, cnt | TCO_TMR_HALT); sc->active = 0; - if (bootverbose) - device_printf(sc->device, "timer disabled\n"); + ichwd_verbose_printf(sc->device, "timer disabled\n"); } static __inline void ichwd_tmr_reload(struct ichwd_softc *sc) { - ichwd_write_tco_1(sc, TCO_RLD, 1); - if (bootverbose) - device_printf(sc->device, "timer reloaded\n"); + if (sc->ich_version <= 5) + ichwd_write_tco_1(sc, TCO_RLD, 1); + else + ichwd_write_tco_2(sc, TCO_RLD, 1); + + ichwd_verbose_printf(sc->device, "timer reloaded\n"); } static __inline void -ichwd_tmr_set(struct ichwd_softc *sc, uint8_t timeout) +ichwd_tmr_set(struct ichwd_softc *sc, unsigned int timeout) { - ichwd_write_tco_1(sc, TCO_TMR, timeout); + + /* + * If the datasheets are to be believed, the minimum value + * actually varies from chipset to chipset - 4 for ICH5 and 2 for + * all other chipsets. I suspect this is a bug in the ICH5 + * datasheet and that the minimum is uniformly 2, but I'd rather + * err on the side of caution. + */ + if (timeout < 4) + timeout = 4; + + if (sc->ich_version <= 5) { + uint8_t tmr_val8 = ichwd_read_tco_1(sc, TCO_TMR1); + + tmr_val8 &= 0xc0; + if (timeout > 0xbf) + timeout = 0xbf; + tmr_val8 |= timeout; + ichwd_write_tco_1(sc, TCO_TMR1, tmr_val8); + } else { + uint16_t tmr_val16 = ichwd_read_tco_2(sc, TCO_TMR2); + + tmr_val16 &= 0xfc00; + if (timeout > 0x0bff) + timeout = 0x0bff; + tmr_val16 |= timeout; + ichwd_write_tco_2(sc, TCO_TMR2, tmr_val16); + } + sc->timeout = timeout; - if (bootverbose) - device_printf(sc->device, "timeout set to %u ticks\n", timeout); + + ichwd_verbose_printf(sc->device, "timeout set to %u ticks\n", timeout); +} + +static __inline int +ichwd_clear_noreboot(struct ichwd_softc *sc) +{ + uint32_t status; + int rc = 0; + + /* try to clear the NO_REBOOT bit */ + if (sc->ich_version <= 5) { + status = pci_read_config(sc->ich, ICH_GEN_STA, 1); + status &= ~ICH_GEN_STA_NO_REBOOT; + pci_write_config(sc->ich, ICH_GEN_STA, status, 1); + status = pci_read_config(sc->ich, ICH_GEN_STA, 1); + if (status & ICH_GEN_STA_NO_REBOOT) + rc = EIO; + } else { + status = ichwd_read_gcs_4(sc, 0); + status &= ~ICH_GCS_NO_REBOOT; + ichwd_write_gcs_4(sc, 0, status); + status = ichwd_read_gcs_4(sc, 0); + if (status & ICH_GCS_NO_REBOOT) + rc = EIO; + } + + if (rc) + device_printf(sc->device, + "ICH WDT present but disabled in BIOS or hardware\n"); + + return (rc); } /* @@ -181,14 +258,12 @@ /* convert from power-of-two-ns to WDT ticks */ cmd &= WD_INTERVAL; timeout = ((uint64_t)1 << cmd) / ICHWD_TICK; - if (cmd > 0 && cmd <= 63 - && timeout >= ICHWD_MIN_TIMEOUT && timeout <= ICHWD_MAX_TIMEOUT) { + if (cmd) { if (timeout != sc->timeout) { if (!sc->active) ichwd_tmr_enable(sc); ichwd_tmr_set(sc, timeout); } - ichwd_tmr_reload(sc); *error = 0; } else { @@ -197,7 +272,28 @@ } } -static unsigned int pmbase = 0; +static device_t +ichwd_find_ich_lpc_bridge(struct ichwd_device **id_p) +{ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 20 09:56:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 09C4B16A46E; Mon, 20 Aug 2007 09:56:51 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B182B16A417 for ; Mon, 20 Aug 2007 09:56:50 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9E0F013C4F7 for ; Mon, 20 Aug 2007 09:56:50 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7K9uo9g017117 for ; Mon, 20 Aug 2007 09:56:50 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7K9uogf017114 for perforce@freebsd.org; Mon, 20 Aug 2007 09:56:50 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 20 Aug 2007 09:56:50 GMT Message-Id: <200708200956.l7K9uogf017114@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125396 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 09:56:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=125396 Change 125396 by mharvan@mharvan_bike-planet on 2007/08/20 09:56:09 DNS plugin Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/Makefile#11 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#8 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/Makefile#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/base32.c#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/base32.h#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/common.c#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/common.h#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/dns.c#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/dns.h#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/encoding.c#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/encoding.h#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/plugin_dns.c#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/read.c#1 add .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/read.h#1 add Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/Makefile#11 (text+ko) ==== ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#8 (text+ko) ==== @@ -1187,17 +1187,19 @@ signal(SIGTERM, sigcb); /* load the plugins */ - if (server) { - pl = load_plugin("./plugin_udp_catchall.so"); - pl->name = "udp_catchall"; - } else { /* client */ - pl = load_plugin("./plugin_udp.so"); - pl->name = "udp_53"; - } +/* if (server) { */ +/* pl = load_plugin("./plugin_udp_catchall.so"); */ +/* pl->name = "udp_catchall"; */ +/* } else { /\* client *\/ */ +/* pl = load_plugin("./plugin_udp.so"); */ +/* pl->name = "udp_53"; */ +/* } */ /* pl = load_plugin("./plugin_tcp.so"); */ /* pl->name = "tcp_1234"; */ /* pl = load_plugin("./plugin_icmp.so"); */ /* pl->name = "icmp"; */ + pl = load_plugin("./plugin_dns/plugin_dns.so"); + pl->name = "dns_53"; if (server) { /* initialize all plugins */ From owner-p4-projects@FreeBSD.ORG Mon Aug 20 10:44:08 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB5D016A420; Mon, 20 Aug 2007 10:44:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AFFC16A41B for ; Mon, 20 Aug 2007 10:44:07 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 597C413C45A for ; Mon, 20 Aug 2007 10:44:07 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KAi7pc037621 for ; Mon, 20 Aug 2007 10:44:07 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KAi7SW037615 for perforce@freebsd.org; Mon, 20 Aug 2007 10:44:07 GMT (envelope-from andrew@freebsd.org) Date: Mon, 20 Aug 2007 10:44:07 GMT Message-Id: <200708201044.l7KAi7SW037615@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125399 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 10:44:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=125399 Change 125399 by andrew@andrew_hermies on 2007/08/20 10:43:08 Send a salt to the client to be used to check the password sent is correct Add an authenticate call. It accepts a password in the form sha256(sha256(password) + salt). Only when this is correct does it enable the other calls Ass a password dialog when connecting Set the correct attributes to a response when reading it in in the front end Affected files ... .. //depot/projects/soc2007/andrew-update/backend/facund-be.c#26 edit .. //depot/projects/soc2007/andrew-update/backend/freebsd-config-control.conf#2 edit .. //depot/projects/soc2007/andrew-update/frontend/facund-fe.glade#7 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/call.py#3 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#15 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#15 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#15 edit .. //depot/projects/soc2007/andrew-update/lib/facund_connection.h#5 edit .. //depot/projects/soc2007/andrew-update/lib/facund_server.c#13 edit Differences ... ==== //depot/projects/soc2007/andrew-update/backend/facund-be.c#26 (text+ko) ==== @@ -74,6 +74,8 @@ static struct facund_response *facund_read_type_directory(const char *, const struct facund_object *, const char ***, int *, int *); +static struct facund_response *facund_call_authenticate(const char *, + struct facund_object *); static struct facund_response *facund_call_ping(const char *, struct facund_object *); static struct facund_response *facund_get_directories(const char *, @@ -123,7 +125,8 @@ static unsigned int watched_db_count = 0; static struct fbsd_update_db *watched_db = NULL; -struct utsname facund_uname; +static struct utsname facund_uname; +static char *password_hash = NULL; /* * Decodes the data in a line from the tag file @@ -517,6 +520,8 @@ facund_comms_in_loop = 0; } +static long facund_salt = 0; + static void * do_communication(void *data) { @@ -534,7 +539,11 @@ /* We are now in the loop. This will change on SIGPIPE */ facund_comms_in_loop = 1; - if(facund_server_start(conn) == -1) { + assert(facund_salt == 0); + do { + facund_salt = random(); + } while (facund_salt == 0); + if(facund_server_start(conn, facund_salt) == -1) { if (facund_in_loop != 0) { /* * When we are not quiting tell @@ -545,8 +554,10 @@ } break; } - if (facund_comms_in_loop == 0) + if (facund_comms_in_loop == 0) { + facund_salt = 0; continue; + } while(ret == 0) { ret = facund_server_get_request(conn); @@ -559,6 +570,7 @@ if (facund_comms_in_loop == 0) break; } + facund_salt = 0; if (facund_comms_in_loop == 0) continue; @@ -573,6 +585,40 @@ } static struct facund_response * +facund_call_authenticate(const char *id, struct facund_object *obj) +{ + char *buf, sum[65]; + + if (facund_salt == 0) { + return facund_response_new(id, 1, "Already authenticated",NULL); + } + if (facund_object_get_type(obj) != FACUND_STRING) { + return facund_response_new(id, 1, "Incorrect Data", NULL); + } + + /* Check the password */ + asprintf(&buf, "%s%ld", password_hash, facund_salt); + SHA256_Data(buf, strlen(buf), sum); + free(buf); + printf("%s\n%s\n\n", sum, facund_object_get_string(obj)); + if (strcmp(sum, facund_object_get_string(obj)) != 0) { + return facund_response_new(id, 1, "Incorrect Password", NULL); + } + + /* Add the callbacks for each call */ + facund_server_add_call("ping", facund_call_ping); + facund_server_add_call("get_directories", facund_get_directories); + facund_server_add_call("list_updates", facund_call_list_updates); + facund_server_add_call("list_installed", facund_call_list_installed); + facund_server_add_call("install_patches", facund_call_install_patches); + facund_server_add_call("rollback_patches",facund_call_rollback_patches); + facund_server_add_call("get_services", facund_call_get_services); + facund_server_add_call("restart_services",facund_call_restart_services); + + return facund_response_new(id, 0, "No Error", NULL); +} + +static struct facund_response * facund_call_ping(const char *id, struct facund_object *obj __unused) { struct facund_response *resp; @@ -1321,6 +1367,14 @@ errx(1, "Malloc failed"); } + password_hash = property_find(config_data, "password"); + if (password_hash != NULL) { + password_hash = strdup(password_hash); + if (password_hash == NULL) { + errx(1, "Malloc failed"); + } + } + properties_free(config_data); } @@ -1347,15 +1401,8 @@ sizeof facund_uname.release); } - /* Add the callbacks for each call */ - facund_server_add_call("ping", facund_call_ping); - facund_server_add_call("get_directories", facund_get_directories); - facund_server_add_call("list_updates", facund_call_list_updates); - facund_server_add_call("list_installed", facund_call_list_installed); - facund_server_add_call("install_patches", facund_call_install_patches); - facund_server_add_call("rollback_patches",facund_call_rollback_patches); - facund_server_add_call("get_services", facund_call_get_services); - facund_server_add_call("restart_services",facund_call_restart_services); + /* Only allow people to authenticate to begin with */ + facund_server_add_call("authenticate", facund_call_authenticate); pthread_create(&update_thread, NULL, look_for_updates, NULL); pthread_create(&comms_thread, NULL, do_communication, conn); ==== //depot/projects/soc2007/andrew-update/backend/freebsd-config-control.conf#2 (text+ko) ==== @@ -1,1 +1,5 @@ base_dirs = / + +; The password is "password". Change this with: +; ecgo -n password | sha256 +password = 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8 ==== //depot/projects/soc2007/andrew-update/frontend/facund-fe.glade#7 (text+ko) ==== @@ -1,6 +1,6 @@ - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -110,34 +110,27 @@ 5 5 - + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Restart + Connect 0 - - 2 - 2 - 3 - - + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Remove + Disconnect 0 1 2 - 1 - 2 @@ -155,28 +148,35 @@ - + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Disconnect + Remove 0 1 2 + 1 + 2 - + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Connect + Restart 0 + + 2 + 2 + 3 + @@ -276,27 +276,34 @@ 3 10 - + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Computer's description +This is a Human redable +name for the computer + + + + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Socket location -Leave blank for -the default socket - 2 - 3 + 1 + 2 - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Computer's name -leave blank for the -local computer + 1 + 2 1 2 @@ -315,37 +322,109 @@ - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Computer's name +leave blank for the +local computer - 1 - 2 1 2 - + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Socket location +Leave blank for +the default socket + + + 2 + 3 + + + + + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_BUTTONBOX_END + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-save + True + 0 + + + + True True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-cancel + True + 0 - 1 - 2 + 1 + + + False + GTK_PACK_END + + + + + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + False + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Password: + GTK_JUSTIFY_RIGHT + + - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Computer's description -This is a Human redable -name for the computer + False + True + + 1 + @@ -353,23 +432,23 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK GTK_BUTTONBOX_END - + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-save + gtk-ok True 0 - + True True True ==== //depot/projects/soc2007/andrew-update/frontend/facund/call.py#3 (text+ko) ==== @@ -65,7 +65,11 @@ def __str__(self): return "%s" \ - % (self.__id, self.__message, self.__code, str(self.__data)) + % (self.__id, self.__message, self.__code, + str(self.__data or '')) def getData(self): return self.__data + + def getCode(self): + return self.__code ==== //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#15 (text+ko) ==== @@ -24,8 +24,9 @@ # SUCH DAMAGE. # +import facund.network +import hashlib import socket -import facund.network import threading import types @@ -174,7 +175,7 @@ return call.getResponse() - def connect(self): + def connect(self, password): '''Connects to the remote computer''' if self.__connection is not None: return @@ -194,6 +195,22 @@ self.__connection.startLock.acquire() self.__connection.startLock.release() + # Authenticate with the server + salt = self.__connection.getSalt() + pass_hash = hashlib.sha256(password).hexdigest() + pass_hash = pass_hash + str(salt) + pass_hash = hashlib.sha256(pass_hash).hexdigest() + pass_hash = facund.String(pass_hash) + call = facund.Call("authenticate", pass_hash) + self.__connection.doCall(call) + call.acquireLock() + call.releaseLock() + # Disconnect if we failed to authenticate + if call.getResponse().getCode() != 0: + print call.getResponse().getCode() + self.disconnect() + return + # Get a list of directories the server offers call = facund.Call("get_directories", None) self.__connection.doCall(call) @@ -202,6 +219,7 @@ dirs = call.getResponse().getData().getData() for dir in dirs: self.addDir(dir.getData()) + except socket.error: print "Couldn't connect to %s " % (self.__host or self.__socket) del self.__connection ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#15 (text+ko) ==== @@ -60,6 +60,7 @@ menuItem.connect('activate', self.onQuit) self.__newConnectionDialog = None + self.__passwordDialog = None # Connect the signals to the new connection dialog box button = self.__xml.get_widget('newConnectionCancel') @@ -68,6 +69,13 @@ button = self.__xml.get_widget('newConnectionSave') button.connect('clicked', self.connectionSave) + # Connect the signals to the password dialog + button = self.__xml.get_widget('passwordOkButton') + button.connect('clicked', self.connectionStart) + + button = self.__xml.get_widget('passwordCancelButton') + button.connect('clicked', self.connectionCancel) + def onQuit(self, data): self.__controller.shutdown() @@ -186,17 +194,13 @@ def onConnectClick(self, widget): '''Signal handler for the connect button''' - #treeView = self.__xml.get_widget('computerView') - computer = self.__controller.getCurrentComputer() - computer.connect() - self.setConnected(computer.getConnectionStatus()) - self.__computerTreeModel.populateComputer(computer) + self.__passwordDialog = self.__xml.get_widget('passwordDialog') + self.__passwordDialog.show() self.setInstallable(False, False) def onDisconnectClick(self, widget): '''Signal handler for the connect button''' - #treeView = self.__xml.get_widget('computerView') computer = self.__controller.getCurrentComputer() computer.disconnect() self.setConnected(computer.getConnectionStatus()) @@ -205,6 +209,22 @@ # Disable the install/remove buttons self.setInstallable(False, False) + def connectionStart(self, widget): + password = self.__xml.get_widget('passwordEntry').get_text() + + computer = self.__controller.getCurrentComputer() + computer.connect(password) + self.setConnected(computer.getConnectionStatus()) + self.__computerTreeModel.populateComputer(computer) + + self.connectionCancel(widget) + + def connectionCancel(self, widget): + self.__passwordDialog.hide() + self.__passwordDialog = None + + self.__xml.get_widget('passwordEntry').set_text('') + def onInstallClick(self, widget): dir = self.__controller.getCurrentDirectory() self.__controller.installUpdates((dir.getName(), 'base')) ==== //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#15 (text+ko) ==== @@ -112,7 +112,6 @@ pass def doCall(self, call): - print call.getID() call.acquireLock() self.__calls[str(call.getID())] = call self.send(call.getCall()) @@ -123,6 +122,9 @@ def recv(self, len): return self.__connection.read(len) + def getSalt(self): + return self.__salt + def interact(self): '''Reads data from the connection and passes it to the XML parser''' @@ -136,8 +138,6 @@ return False def startElement(self, name, attributes): - print "> " + name + " " + str(attributes.items()) - if name == "data": data_type = None data = None @@ -166,23 +166,24 @@ self.__responseMessage = None self.__responseCode = None - for attr in attributes.items(): - if attr[0] == "id": - self.__responseID = int(attr[1]) - elif attr[0] == "code": - print self.__responseCode - elif attr[0] == "message": - self.__responseMessage = str(attr[1]) + for name, value in attributes.items(): + if name == "id": + self.__responseID = int(value) + elif name == "code": + self.__responseCode = int(value) + elif name == "message": + self.__responseMessage = str(value) else: print attr elif name == "facund-server": + for name, value in attributes.items(): + if name == 'salt': + self.__salt = int(value) self.__connected_lock.acquire() self.startLock.release() def endElement(self, name): - print "< " + name - if name == "data": data = self.__data.getParent() if data is not None: @@ -191,7 +192,7 @@ elif name == "response": response = facund.Response(self.__responseID, - self.__responseMessage, self.__responseCode, + self.__responseCode, self.__responseMessage, self.__data) # TODO: Check this is a valid item ==== //depot/projects/soc2007/andrew-update/lib/facund_connection.h#5 (text+ko) ==== @@ -43,7 +43,7 @@ void facund_close(struct facund_conn *); /* Server specific functions */ -int facund_server_start(struct facund_conn *); +int facund_server_start(struct facund_conn *, long); int facund_server_finish(struct facund_conn *); int facund_server_get_request(struct facund_conn *); ==== //depot/projects/soc2007/andrew-update/lib/facund_server.c#13 (text+ko) ==== @@ -55,9 +55,9 @@ * next it replys with the server start and returns */ int -facund_server_start(struct facund_conn *conn) +facund_server_start(struct facund_conn *conn, long salt) { - const char *str; + char *str; conn->close = 0; conn->parser = XML_ParserCreate(NULL); @@ -72,8 +72,17 @@ facund_server_end_tag); XML_SetCharacterDataHandler(conn->parser, facund_server_text); - str = ""; + if (salt == 0) { + str = strdup(""); + } else { + asprintf(&str, "", + salt); + } + if (str == NULL) { + return -1; + } facund_send(conn, str, strlen(str)); + free(str); return 0; } From owner-p4-projects@FreeBSD.ORG Mon Aug 20 12:38:30 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8654016A41B; Mon, 20 Aug 2007 12:38:30 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 479D516A419 for ; Mon, 20 Aug 2007 12:38:30 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 35EFF13C45A for ; Mon, 20 Aug 2007 12:38:30 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KCcUpS058224 for ; Mon, 20 Aug 2007 12:38:30 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KCcTHh058221 for perforce@freebsd.org; Mon, 20 Aug 2007 12:38:29 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 20 Aug 2007 12:38:29 GMT Message-Id: <200708201238.l7KCcTHh058221@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125402 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 12:38:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=125402 Change 125402 by mharvan@mharvan_bike-planet on 2007/08/20 12:38:13 plugin_send() reports the number of bytes consumed - used in the DNS plugin Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#9 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#4 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin.h#8 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/plugin_dns.c#2 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_icmp.c#11 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#15 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#11 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp_catchall.c#4 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#9 (text+ko) ==== @@ -433,6 +433,7 @@ char data[10]; char *datap = data; int len=0; + int consumed; cl->ping_counter++; @@ -453,7 +454,7 @@ len++; nwrite = cl->pl->send(cl->pl, cl->clid, - data, len, NORMAL_DATA); + data, len, NORMAL_DATA, &consumed); printf("send_echo_request(): nwrite: 0x%x\n", nwrite); } } @@ -468,6 +469,8 @@ int nwrite = 0; char data[10]; char *pdata = data; + int consumed; + if (cl->pl != NULL) { /* client ID */ *pdata = 0; @@ -482,7 +485,8 @@ pdata += sizeof(cl->reqid); nwrite = cl->pl->send(cl->pl, cl->clid, - data, pdata - data, NORMAL_DATA); + data, pdata - data, NORMAL_DATA, + &consumed); //pl->ping_counter--; printf("send_id_request(): nwrite: 0x%x\n", nwrite); } @@ -557,6 +561,7 @@ u_int8_t dispatch; int i; int nwrite; + int consumed; struct client *cl = NULL; /* fragment reassembly */ @@ -750,7 +755,7 @@ *data = myclid; } - nwrite = pl->send(pl, 0, data, len, URGENT_DATA); + nwrite = pl->send(pl, 0, data, len, URGENT_DATA, &consumed); printf("sending reply, returned 0x%x\n", nwrite); if (server) { @@ -819,7 +824,7 @@ *(data) = DISPATCH_ID_OFFER; *(data+1) = *clid; - nwrite = pl->send(pl, *clid, data, 2, URGENT_DATA); + nwrite = pl->send(pl, *clid, data, 2, URGENT_DATA, &consumed); fprintf(stderr, "got ID request (plugin: %s)\n", pl->name); printf("sending an offer, returned 0x%x\n", nwrite); @@ -868,6 +873,7 @@ process_data_from_tun(struct client *cl, struct plugin *pl, uint8_t dispatch, char *data, int len) { + int consumed; char ldata[MTU+3]; if (pl == NULL) @@ -887,13 +893,15 @@ *(ldata) = dispatch; memcpy(ldata + 1, data, min(sizeof(ldata)-1, len)); return (pl->send(pl, cl->clid, ldata, - min(sizeof(ldata), len + 1), NORMAL_DATA)); + min(sizeof(ldata), len + 1), NORMAL_DATA, + &consumed)); } else { /* client */ *ldata = myclid; *(ldata + 1) = dispatch; memcpy(ldata+2, data, min(sizeof(ldata)-2, len)); return (pl->send(pl, myclid, ldata, - min(sizeof(ldata), len + 2), NORMAL_DATA)); + min(sizeof(ldata), len + 2), NORMAL_DATA, + &consumed)); } /* add the fragmentation header */ } else { @@ -935,6 +943,7 @@ send_next_frag(struct client *cl) { int nwrite = SEND_PKT_SENT; + int consumed; int n; if (server) { @@ -955,16 +964,20 @@ /* send it */ //TODO: maybe we should check how much data // was actually sent - n = min(cl->pl->mtu, cl->frag_data_len); + if (cl->pl->mtu > 0) + n = min(cl->pl->mtu, cl->frag_data_len); + else + n = cl->frag_data_len; nwrite = cl->pl->send(cl->pl, cl->clid, - cl->frag_datap, n, NORMAL_DATA); + cl->frag_datap, n, NORMAL_DATA, &consumed); + printf("send_next_frag: consumed: %d\n", consumed); switch (nwrite) { case SEND_PKT_SENT: case SEND_PKT_QUEUED: - n -= sizeof(cl->frag_hdr); - cl->frag_datap += n; - cl->frag_hdr.offset += n; - cl->frag_data_len -= n; + consumed -= sizeof(cl->frag_hdr); + cl->frag_datap += consumed; + cl->frag_hdr.offset += consumed; + cl->frag_data_len -= consumed; break; default: //plugin_report(current_pl, REPORT_ERROR_SEND); @@ -994,16 +1007,19 @@ /* send it */ //TODO: maybe we should check how much data // was actually sent - n = min(cl->pl->mtu, cl->frag_data_len); + if (cl->pl->mtu > 0) + n = min(cl->pl->mtu, cl->frag_data_len); + else + n = cl->frag_data_len; nwrite = cl->pl->send(cl->pl, cl->clid, - cl->frag_datap, n, NORMAL_DATA); + cl->frag_datap, n, NORMAL_DATA, &consumed); switch (nwrite) { case SEND_PKT_SENT: case SEND_PKT_QUEUED: - n -= sizeof(cl->frag_hdr) + 1; - cl->frag_datap += n; - cl->frag_hdr.offset += n; - cl->frag_data_len -= n; + consumed -= sizeof(cl->frag_hdr) + 1; + cl->frag_datap += consumed; + cl->frag_hdr.offset += consumed; + cl->frag_data_len -= consumed; break; default: //plugin_report(current_pl, REPORT_ERROR_SEND); @@ -1187,6 +1203,8 @@ signal(SIGTERM, sigcb); /* load the plugins */ +/* pl = load_plugin("./plugin_udp.so"); */ +/* pl->name = "udp_1234"; */ /* if (server) { */ /* pl = load_plugin("./plugin_udp_catchall.so"); */ /* pl->name = "udp_catchall"; */ ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#4 (text+ko) ==== @@ -28,7 +28,7 @@ int (*initialize)(struct plugin*, int, char*, char*); void (*deinitialize)(struct plugin*); void (*receive)(int fd, short ev_type, void *arg); /* select fired on some fd - check for data */ - int (*send)(struct plugin*, uint8_t, char*, int, int); + int (*send)(struct plugin*, uint8_t, char*, int, int, int*); int (*is_ready_to_send)(struct plugin*, uint8_t); void (*conn_close)(struct plugin*, uint8_t); void (*conn_map)(struct plugin*, uint8_t, int); ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin.h#8 (text+ko) ==== @@ -79,10 +79,10 @@ /* * Send the data. - * Return: number of bytes sent, -1 on error. + * consumed: number of bytes sent */ int plugin_send(struct plugin *pl, uint8_t clid, - char *data, int len, int data_type); + char *data, int len, int data_type, int *consumed); /* * Data for the plugin from plugin to plugin communication. ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/plugin_dns.c#2 (text+ko) ==== @@ -224,6 +224,7 @@ /* the client has to reset the timer for keep-alive requests */ register_timer_ev(&pldata->timer_ev); + printf("dns_send(): consumed: %d\n", consumed); return consumed; } } @@ -255,8 +256,11 @@ plugin_register(struct plugin* pl) { pl->name = "dns"; - //pl->mtu = 1024; - pl->mtu = 512; + if (server) + //pl->mtu = 1024; + pl->mtu = 512; + else + pl->mtu = 0; pl->initialize = plugin_initialize; pl->deinitialize = plugin_deinitialize; pl->is_ready_to_send = plugin_is_ready_to_send; @@ -312,8 +316,6 @@ struct plugin_dns_data *data = (struct plugin_dns_data*) pl->data; int fd_flags; - fprintf(stderr, "starting plugin_initialize...\n"); - conn_init(data->conns); data->conn = data->conns; if (server) { @@ -586,10 +588,10 @@ } int -plugin_send(struct plugin *pl, clientid_t clid, char *data, int len, int data_type) +plugin_send(struct plugin *pl, clientid_t clid, + char *data, int len, int data_type, int *consumed) { struct plugin_dns_data *pldata = pl->data; - int n = 0; char **queued_data; int *queued_data_len; struct conn *conn; @@ -620,8 +622,10 @@ } memcpy(*queued_data, data, len); *queued_data_len = len; + *consumed = len; return SEND_PKT_QUEUED; } else { + *consumed = 0; return SEND_ERROR_QUEUE_FULL; } @@ -631,8 +635,8 @@ } } else { /* client - send the data straight away */ - n = dns_send(pldata, pldata->conns, data, len); - if (n > 0) { + *consumed = dns_send(pldata, pldata->conns, data, len); + if (*consumed > 0) { conn->data_sent_after_last_receive = 1; return SEND_PKT_SENT; } else ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_icmp.c#11 (text+ko) ==== @@ -37,7 +37,7 @@ * how often should an empty request be sent to the server - This is * useful when the server has data to send but the client doesn't. */ -#define PLUGIN_ICMP_KEEP_ALIVE 2 +#define PLUGIN_ICMP_KEEP_ALIVE 1 struct conn { clientid_t clid; @@ -215,7 +215,6 @@ int fd_flags; struct plugin_icmp_data *data = (struct plugin_icmp_data*) pl->data; - fprintf(stderr, "starting plugin_initialize...\n"); conn_init(data->conns); data->conn = data->conns; @@ -567,7 +566,8 @@ } int -plugin_send(struct plugin *pl, clientid_t clid, char *data, int len, int data_type) +plugin_send(struct plugin *pl, clientid_t clid, + char *data, int len, int data_type, int *consumed) { struct plugin_icmp_data *pldata = pl->data; int n = 0; @@ -606,8 +606,10 @@ } memcpy(*queued_data, data, len); *queued_data_len = len; + *consumed = len; return SEND_PKT_QUEUED; } else { + *consumed = 0; return SEND_ERROR_QUEUE_FULL; } @@ -620,9 +622,11 @@ n = send_icmp_pkt(pl, pldata->conns, data, len); fprintf(stderr, "send_icmp_pkt: send returned %d\n", n); if (n > 0) { + *consumed = n; conn->data_sent_after_last_receive = 1; return SEND_PKT_SENT; } else + *consumed = 0; return SEND_ERROR; } } ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#15 (text+ko) ==== @@ -512,7 +512,7 @@ */ int plugin_send(struct plugin *pl, uint8_t clid, - char *data, int len, int data_type) + char *data, int len, int data_type, int* consumed) { struct plugin_tcp_data *pldata = (struct plugin_tcp_data*) pl->data; int n = 0; @@ -548,9 +548,11 @@ n = write(conn->fd, ldata, sizeof(l) + l); free(ldata); - if (n < 0) + if (n < 0) { + *consumed = 0; warn("plugin_tcp: write failed"); - + } else + *consumed = n; if (n < 0 || (l != 0 && n == 0) ) { plugin_report(pl, clid, REPORT_ERROR_SEND); return SEND_ERROR; ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#11 (text+ko) ==== @@ -162,7 +162,7 @@ int plugin_register(struct plugin* pl) { pl->name = "udp"; - pl->mtu = 145; + pl->mtu = 1400; pl->initialize = plugin_initialize; pl->deinitialize = plugin_deinitialize; pl->is_ready_to_send = plugin_is_ready_to_send; @@ -203,7 +203,7 @@ { //int n = 0; struct plugin_udp_data *data = (struct plugin_udp_data*)pl->data; - fprintf(stderr, "starting plugin_initialize...\n"); + if (server == 1) { data->fd = udp_open(port); if (data->fd != -1) @@ -306,7 +306,7 @@ int plugin_send(struct plugin *pl, uint8_t clid, - char *data, int len, int data_type) + char *data, int len, int data_type, int* consumed) { struct plugin_udp_data *datapl = (struct plugin_udp_data*) pl->data; int nwrite = 0; @@ -317,9 +317,10 @@ nwrite = sendto(datapl->fd, data, len, 0, (struct sockaddr*)&conn->addr, conn->addrlen); - if (nwrite == len) + if (nwrite == len) { + *consumed = nwrite; return (SEND_PKT_SENT); - else { + } else { warn("plugin_send: send returned %d", nwrite); return (SEND_ERROR); } @@ -329,6 +330,7 @@ "discarding data\n"); return (SEND_ERROR); } else { + *consumed = nwrite; nwrite = send(datapl->fd, data, len, 0); fprintf(stderr, "plugin_send: send returned %d\n", nwrite); ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp_catchall.c#4 (text+ko) ==== @@ -443,7 +443,7 @@ int plugin_send(struct plugin *pl, uint8_t clid, - char *data, int len, int data_type) + char *data, int len, int data_type, int* consumed) { struct plugin_udpall_data *pldata = pl->data; struct conn *conn ; @@ -458,6 +458,11 @@ /* send the data */ nwrite = send(conn->fd, data, len, 0); + if (nwrite >= 0) + *consumed = nwrite; + else + *consumed = 0; + /* error checking */ if (nwrite == len) return (SEND_PKT_SENT); From owner-p4-projects@FreeBSD.ORG Mon Aug 20 12:56:53 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 52B9816A46B; Mon, 20 Aug 2007 12:56:53 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 066D016A41A for ; Mon, 20 Aug 2007 12:56:53 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D125513C458 for ; Mon, 20 Aug 2007 12:56:52 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KCuqZJ078669 for ; Mon, 20 Aug 2007 12:56:52 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KCuqW8078666 for perforce@freebsd.org; Mon, 20 Aug 2007 12:56:52 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 20 Aug 2007 12:56:52 GMT Message-Id: <200708201256.l7KCuqW8078666@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125403 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 12:56:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=125403 Change 125403 by mharvan@mharvan_bike-planet on 2007/08/20 12:56:00 DNS plugin - incremen id on each request Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/plugin_dns.c#3 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/plugin_dns.c#3 (text+ko) ==== @@ -635,6 +635,7 @@ } } else { /* client - send the data straight away */ + pldata->q.id++; *consumed = dns_send(pldata, pldata->conns, data, len); if (*consumed > 0) { conn->data_sent_after_last_receive = 1; From owner-p4-projects@FreeBSD.ORG Mon Aug 20 13:01:00 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE18716A46E; Mon, 20 Aug 2007 13:00:59 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A72E16A4C8 for ; Mon, 20 Aug 2007 13:00:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 87E5A13C494 for ; Mon, 20 Aug 2007 13:00:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KD0xO8079125 for ; Mon, 20 Aug 2007 13:00:59 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KD0vbI079112 for perforce@freebsd.org; Mon, 20 Aug 2007 13:00:57 GMT (envelope-from gonzo@FreeBSD.org) Date: Mon, 20 Aug 2007 13:00:57 GMT Message-Id: <200708201300.l7KD0vbI079112@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 125404 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 13:01:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=125404 Change 125404 by gonzo@gonzo_jeeves on 2007/08/20 13:00:07 o IFC Affected files ... .. //depot/projects/mips2/src/etc/namedb/named.conf#4 integrate .. //depot/projects/mips2/src/etc/rc.d/Makefile#4 integrate .. //depot/projects/mips2/src/etc/rc.d/lockd#2 integrate .. //depot/projects/mips2/src/etc/rc.d/nfslocking#5 integrate .. //depot/projects/mips2/src/etc/rc.d/statd#2 integrate .. //depot/projects/mips2/src/gnu/lib/libgcc/Makefile#5 integrate .. //depot/projects/mips2/src/gnu/lib/libstdc++/Makefile#4 integrate .. //depot/projects/mips2/src/lib/libarchive/archive_read_support_format_tar.c#5 integrate .. //depot/projects/mips2/src/lib/libarchive/test/test_read_format_gtar_sparse.c#3 integrate .. //depot/projects/mips2/src/lib/libc/mips/string/strcmp.S#2 edit .. //depot/projects/mips2/src/release/Makefile#4 integrate .. //depot/projects/mips2/src/release/doc/Makefile#2 integrate .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/Makefile#2 integrate .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#4 integrate .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#5 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/hardware/common/hw.ent#3 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/hardware/common/intro.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/Makefile#3 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/Makefile.inc#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/amd64/Makefile#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/amd64/article.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/common/abstract.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/common/install.ent#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/common/install.sgml#4 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/common/layout.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/common/upgrade.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/i386/Makefile#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/i386/article.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/ia64/Makefile#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/ia64/article.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/pc98/Makefile#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/pc98/article.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/powerpc/Makefile#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/powerpc/article.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/sparc64/Makefile#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/sparc64/article.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/installation/sparc64/install.sgml#2 delete .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/readme/article.sgml#3 integrate .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#7 integrate .. //depot/projects/mips2/src/release/doc/share/examples/Makefile.relnotesng#3 integrate .. //depot/projects/mips2/src/release/doc/share/misc/dev.archlist.txt#5 integrate .. //depot/projects/mips2/src/release/doc/share/sgml/release.ent#3 integrate .. //depot/projects/mips2/src/sbin/reboot/boot_i386.8#3 integrate .. //depot/projects/mips2/src/share/man/man5/Makefile#4 integrate .. //depot/projects/mips2/src/share/man/man5/boot.config.5#1 branch .. //depot/projects/mips2/src/sys/amd64/conf/NOTES#4 integrate .. //depot/projects/mips2/src/sys/amd64/include/specialreg.h#5 integrate .. //depot/projects/mips2/src/sys/arm/arm/busdma_machdep.c#5 integrate .. //depot/projects/mips2/src/sys/boot/arm/at91/boot2/boot2.c#3 integrate .. //depot/projects/mips2/src/sys/compat/freebsd32/freebsd32_proto.h#4 integrate .. //depot/projects/mips2/src/sys/compat/freebsd32/freebsd32_syscall.h#4 integrate .. //depot/projects/mips2/src/sys/compat/freebsd32/freebsd32_syscalls.c#4 integrate .. //depot/projects/mips2/src/sys/compat/freebsd32/freebsd32_sysent.c#4 integrate .. //depot/projects/mips2/src/sys/compat/freebsd32/syscalls.master#5 integrate .. //depot/projects/mips2/src/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/mips2/src/sys/conf/files.amd64#5 integrate .. //depot/projects/mips2/src/sys/conf/files.i386#6 integrate .. //depot/projects/mips2/src/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/mips2/src/sys/dev/cxgb/common/cxgb_t3_hw.c#3 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_adapter.h#5 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_ioctl.h#3 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_main.c#5 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_offload.c#3 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_offload.h#2 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_sge.c#6 integrate .. //depot/projects/mips2/src/sys/dev/dcons/dcons_os.c#4 integrate .. //depot/projects/mips2/src/sys/dev/mpt/mpt.c#5 integrate .. //depot/projects/mips2/src/sys/dev/mpt/mpt.h#5 integrate .. //depot/projects/mips2/src/sys/dev/mpt/mpt_cam.c#6 integrate .. //depot/projects/mips2/src/sys/fs/msdosfs/msdosfs_vfsops.c#6 integrate .. //depot/projects/mips2/src/sys/fs/tmpfs/tmpfs_vnops.c#4 integrate .. //depot/projects/mips2/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#4 integrate .. //depot/projects/mips2/src/sys/i386/conf/NOTES#4 integrate .. //depot/projects/mips2/src/sys/i386/include/specialreg.h#6 integrate .. //depot/projects/mips2/src/sys/kern/init_sysent.c#6 integrate .. //depot/projects/mips2/src/sys/kern/kern_cpu.c#4 integrate .. //depot/projects/mips2/src/sys/kern/kern_switch.c#5 integrate .. //depot/projects/mips2/src/sys/kern/kern_thr.c#5 integrate .. //depot/projects/mips2/src/sys/kern/sched_ule.c#6 integrate .. //depot/projects/mips2/src/sys/kern/syscalls.c#6 integrate .. //depot/projects/mips2/src/sys/kern/syscalls.master#6 integrate .. //depot/projects/mips2/src/sys/kern/systrace_args.c#3 integrate .. //depot/projects/mips2/src/sys/kern/vfs_aio.c#4 integrate .. //depot/projects/mips2/src/sys/kern/vfs_mount.c#6 integrate .. //depot/projects/mips2/src/sys/modules/Makefile#7 integrate .. //depot/projects/mips2/src/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/mips2/src/sys/net/bridgestp.c#6 integrate .. //depot/projects/mips2/src/sys/netgraph/ng_base.c#4 integrate .. //depot/projects/mips2/src/sys/netinet/sctp_asconf.c#4 integrate .. //depot/projects/mips2/src/sys/netinet/sctp_input.c#7 integrate .. //depot/projects/mips2/src/sys/netinet/sctp_output.c#6 integrate .. //depot/projects/mips2/src/sys/netinet/sctp_pcb.c#6 integrate .. //depot/projects/mips2/src/sys/netinet/sctp_timer.c#5 integrate .. //depot/projects/mips2/src/sys/netinet/sctp_usrreq.c#7 integrate .. //depot/projects/mips2/src/sys/netinet/sctputil.c#7 integrate .. //depot/projects/mips2/src/sys/netinet/tcp_subr.c#8 integrate .. //depot/projects/mips2/src/sys/sys/syscall.h#6 integrate .. //depot/projects/mips2/src/sys/sys/syscall.mk#6 integrate .. //depot/projects/mips2/src/sys/sys/sysproto.h#6 integrate .. //depot/projects/mips2/src/sys/sys/thr.h#5 integrate .. //depot/projects/mips2/src/sys/vm/device_pager.c#4 integrate .. //depot/projects/mips2/src/sys/vm/phys_pager.c#5 integrate .. //depot/projects/mips2/src/sys/vm/vm_map.c#5 integrate .. //depot/projects/mips2/src/sys/vm/vm_map.h#2 integrate .. //depot/projects/mips2/src/sys/vm/vm_mmap.c#4 integrate .. //depot/projects/mips2/src/usr.bin/uname/uname.c#2 edit .. //depot/projects/mips2/src/usr.sbin/freebsd-update/freebsd-update.sh#4 integrate Differences ... ==== //depot/projects/mips2/src/etc/namedb/named.conf#4 (text+ko) ==== @@ -1,4 +1,4 @@ -// $FreeBSD: src/etc/namedb/named.conf,v 1.25 2007/08/02 09:18:53 dougb Exp $ +// $FreeBSD: src/etc/namedb/named.conf,v 1.26 2007/08/17 04:37:02 dougb Exp $ // // Refer to the named.conf(5) and named(8) man pages, and the documentation // in /usr/share/doc/bind9 for more details. @@ -68,6 +68,12 @@ 2. No spurious traffic will be sent from your network to the roots 3. Greater resilience to any potential root server failure/DDoS + On the other hand, this method requires more monitoring than the + hints file to be sure that an unexpected failure mode has not + incapacitated your server. Name servers that are serving a lot + of clients will benefit more from this approach than individual + hosts. Use with caution. + To use this mechanism, uncomment the entries below, and comment the hint zone above. */ @@ -76,9 +82,7 @@ type slave; file "slave/root.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -86,9 +90,7 @@ type slave; file "slave/arpa.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -96,9 +98,7 @@ type slave; file "slave/in-addr.arpa.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -155,9 +155,9 @@ // TEST-NET for Documentation (RFC 3330) zone "2.0.192.in-addr.arpa" { type master; file "master/empty.db"; }; -// Router Benchmark Testing (RFC 2544) -zone "18.192.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "19.192.in-addr.arpa" { type master; file "master/empty.db"; }; +// Router Benchmark Testing (RFC 3330) +zone "18.198.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "19.198.in-addr.arpa" { type master; file "master/empty.db"; }; // IANA Reserved - Old Class E Space zone "240.in-addr.arpa" { type master; file "master/empty.db"; }; ==== //depot/projects/mips2/src/etc/rc.d/Makefile#4 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.81 2007/04/09 19:21:27 pjd Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.82 2007/08/17 07:58:26 mtm Exp $ .include @@ -20,7 +20,7 @@ ipnat ipsec ipxrouted isdnd \ jail \ kadmind kerberos kernel keyserv kldxref kpasswdd \ - ldconfig local localpkg lpd \ + ldconfig local localpkg lockd lpd \ mixer motd mountcritlocal mountcritremote mountlate \ mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \ named natd netif netoptions \ @@ -33,7 +33,7 @@ random rarpd resolv root \ route6d routed routing rpcbind rtadvd rwho \ savecore sdpd securelevel sendmail \ - serial sppp swap1 \ + serial sppp statd swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ ==== //depot/projects/mips2/src/etc/rc.d/lockd#2 (text+ko) ==== @@ -1,22 +1,28 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/lockd,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm +# $FreeBSD: src/etc/rc.d/lockd,v 1.17 2007/08/18 04:08:53 mtm Exp $ # -# PROVIDE: nfslocking +# PROVIDE: lockd # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr -# Save the (one) commandline argument in case it gets clobbered. -arg=$1 +name="lockd" +rcvar=rpc_lockd_enable +command="/usr/sbin/rpc.${name}" +start_precmd='lockd_precmd' +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' +status_precmd=$stop_precmd -# Either NFS client or server must be enabled and rpcbind(8) must be started. +# Make sure that we are either an NFS client or server, and that we get +# the correct flags from rc.conf(5). # -nfslocking_precmd() +lockd_precmd() { local ret ret=0 @@ -30,34 +36,9 @@ then force_depend rpcbind || ret=1 fi - - if [ $name = "statd" ] - then - rc_flags=${rpc_statd_flags} - elif [ $name = "lockd" ] - then - rc_flags=${rpc_lockd_flags} - fi - + rc_flags=${rpc_lockd_flags} return ${ret} } -start_precmd="nfslocking_precmd" -stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' -status_precmd=$stop_precmd - -# rpc.statd -# -name="statd" -rcvar=rpc_statd_enable -command="/usr/sbin/rpc.${name}" load_rc_config $name -run_rc_command "$arg" - -# rpc.lockd -# -name="lockd" -rcvar=rpc_lockd_enable -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" +run_rc_command $1 ==== //depot/projects/mips2/src/etc/rc.d/nfslocking#5 (text+ko) ==== @@ -1,13 +1,13 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/nfslocking,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# $FreeBSD: src/etc/rc.d/nfslocking,v 1.15 2007/08/17 07:58:26 mtm Exp $ # # PROVIDE: nfslocking # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON -# KEYWORD: nojail +# KEYWORD: nojail nostart . /etc/rc.subr ==== //depot/projects/mips2/src/etc/rc.d/statd#2 (text+ko) ==== @@ -1,22 +1,28 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/statd,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp +# $FreeBSD: src/etc/rc.d/statd,v 1.17 2007/08/18 04:08:53 mtm Exp $ # -# PROVIDE: nfslocking +# PROVIDE: statd # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr -# Save the (one) commandline argument in case it gets clobbered. -arg=$1 +name="statd" +rcvar=rpc_statd_enable +command="/usr/sbin/rpc.${name}" +start_precmd='statd_precmd' +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' +status_precmd=$stop_precmd -# Either NFS client or server must be enabled and rpcbind(8) must be started. +# Make sure that we are either an NFS client or server, and that we get +# the correct flags from rc.conf(5). # -nfslocking_precmd() +statd_precmd() { local ret ret=0 @@ -30,34 +36,9 @@ then force_depend rpcbind || ret=1 fi - - if [ $name = "statd" ] - then - rc_flags=${rpc_statd_flags} - elif [ $name = "lockd" ] - then - rc_flags=${rpc_lockd_flags} - fi - + rc_flags=${rpc_statd_flags} return ${ret} } -start_precmd="nfslocking_precmd" -stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' -status_precmd=$stop_precmd - -# rpc.statd -# -name="statd" -rcvar=rpc_statd_enable -command="/usr/sbin/rpc.${name}" load_rc_config $name -run_rc_command "$arg" - -# rpc.lockd -# -name="lockd" -rcvar=rpc_lockd_enable -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" +run_rc_command $1 ==== //depot/projects/mips2/src/gnu/lib/libgcc/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.57 2007/05/19 04:25:55 kan Exp $ +# $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.58 2007/08/14 20:49:57 kan Exp $ GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs @@ -217,7 +217,7 @@ # # Objects that should be in static library only. # -#SYMS_ST = ${LIB2FUNCS_ST} ${LIB2ADD_ST} +SYMS_ST = ${LIB2FUNCS_ST} ${LIB2ADD_ST} STAT_OBJS_T = ${SYMS_ST:S/$/.o/} STAT_OBJS_P = ${SYMS_ST:S/$/.po/} STATICOBJS = ${SYMS_ST:S/$/.o/} ==== //depot/projects/mips2/src/gnu/lib/libstdc++/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.60 2007/05/19 15:41:01 kan Exp $ +# $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.61 2007/08/16 23:02:00 kan Exp $ GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs @@ -143,10 +143,10 @@ stdio_filebuf.h stdio_sync_filebuf.h functional \ hash_map hash_set hash_fun.h hashtable.h iterator \ malloc_allocator.h memory mt_allocator.h new_allocator.h \ - numeric pod_char_traits.h pool_allocator.h rb_tree rope \ - ropeimpl.h slist throw_allocator.h typelist.h type_traits.h \ - rc_string_base.h sso_string_base.h vstring.h vstring.tcc \ - vstring_fwd.h vstring_util.h + numeric numeric_traits.h pod_char_traits.h pool_allocator.h \ + rb_tree rope ropeimpl.h slist throw_allocator.h typelist.h \ + type_traits.h rc_string_base.h sso_string_base.h vstring.h \ + vstring.tcc vstring_fwd.h vstring_util.h EXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;} EXTHDRSDIR= ${CXXINCLUDEDIR}/ext ==== //depot/projects/mips2/src/lib/libarchive/archive_read_support_format_tar.c#5 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.60 2007/07/15 19:13:59 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.61 2007/08/18 21:53:25 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include @@ -72,6 +72,8 @@ #include "archive_private.h" #include "archive_read_private.h" +#define tar_min(a,b) ((a) < (b) ? (a) : (b)) + /* * Layout of POSIX 'ustar' tar header. */ @@ -172,6 +174,7 @@ static char *base64_decode(const wchar_t *, size_t, size_t *); static void gnu_add_sparse_entry(struct tar *, off_t offset, off_t remaining); +static void gnu_clear_sparse_list(struct tar *); static int gnu_sparse_old_read(struct archive_read *, struct tar *, const struct archive_entry_header_gnutar *header); static void gnu_sparse_old_parse(struct tar *, @@ -211,7 +214,8 @@ static int pax_header(struct archive_read *, struct tar *, struct archive_entry *, char *attr); static void pax_time(const wchar_t *, int64_t *sec, long *nanos); -static ssize_t readline(struct archive_read *, struct tar *, const char **); +static ssize_t readline(struct archive_read *, struct tar *, const char **, + ssize_t limit); static int read_body_to_string(struct archive_read *, struct tar *, struct archive_string *, const void *h); static int64_t tar_atol(const char *, unsigned); @@ -263,14 +267,9 @@ archive_read_format_tar_cleanup(struct archive_read *a) { struct tar *tar; - struct sparse_block *p; tar = (struct tar *)(a->format->data); - while (tar->sparse_list != NULL) { - p = tar->sparse_list; - tar->sparse_list = p->next; - free(p); - } + gnu_clear_sparse_list(tar); archive_string_free(&tar->acl_text); archive_string_free(&tar->entry_name); archive_string_free(&tar->entry_linkname); @@ -423,7 +422,6 @@ const char *p; int r; size_t l; - ssize_t size; /* Assign default device/inode values. */ archive_entry_set_dev(entry, 1 + default_dev); /* Don't use zero. */ @@ -446,22 +444,6 @@ r = tar_read_header(a, tar, entry); /* - * Yuck. See comments for gnu_sparse_10_read for why this - * is here and not in _read_data where it "should" go. - */ - if (tar->sparse_gnu_pending - && tar->sparse_gnu_major == 1 - && tar->sparse_gnu_minor == 0) { - tar->sparse_gnu_pending = 0; - /* Read initial sparse map. */ - size = gnu_sparse_10_read(a, tar); - if (size < 0) - return (size); - tar->entry_bytes_remaining -= size; - tar->entry_padding += size; - } - - /* * "non-sparse" files are really just sparse files with * a single block. */ @@ -497,11 +479,12 @@ if (tar->sparse_gnu_pending) { if (tar->sparse_gnu_major == 1 && tar->sparse_gnu_minor == 0) { - /* - * We should parse the sparse data - * here, but have to parse it as part of the - * header because of a bug in GNU tar 1.16.1. - */ + tar->sparse_gnu_pending = 0; + /* Read initial sparse map. */ + bytes_read = gnu_sparse_10_read(a, tar); + tar->entry_bytes_remaining -= bytes_read; + if (bytes_read < 0) + return (bytes_read); } else { *size = 0; *offset = 0; @@ -559,7 +542,6 @@ { off_t bytes_skipped; struct tar* tar; - struct sparse_block *p; tar = (struct tar *)(a->format->data); @@ -577,12 +559,7 @@ tar->entry_padding = 0; /* Free the sparse list. */ - while (tar->sparse_list != NULL) { - p = tar->sparse_list; - tar->sparse_list = p->next; - free(p); - } - tar->sparse_last = NULL; + gnu_clear_sparse_list(tar); return (ARCHIVE_OK); } @@ -1650,6 +1627,19 @@ p->remaining = remaining; } +static void +gnu_clear_sparse_list(struct tar *tar) +{ + struct sparse_block *p; + + while (tar->sparse_list != NULL) { + p = tar->sparse_list; + tar->sparse_list = p->next; + free(p); + } + tar->sparse_last = NULL; +} + /* * GNU tar old-format sparse data. * @@ -1793,7 +1783,7 @@ */ static int64_t gnu_sparse_10_atol(struct archive_read *a, struct tar *tar, - ssize_t *total_read) + ssize_t *remaining) { int64_t l, limit, last_digit_limit; const char *p; @@ -1804,10 +1794,16 @@ limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; - bytes_read = readline(a, tar, &p); - if (bytes_read <= 0) - return (ARCHIVE_FATAL); - *total_read += bytes_read; + /* + * Skip any lines starting with '#'; GNU tar specs + * don't require this, but they should. + */ + do { + bytes_read = readline(a, tar, &p, tar_min(*remaining, 100)); + if (bytes_read <= 0) + return (ARCHIVE_FATAL); + *remaining -= bytes_read; + } while (p[0] == '#'); l = 0; while (bytes_read > 0) { @@ -1828,32 +1824,39 @@ } /* - * Returns number of bytes consumed to read the sparse block data. + * Returns length (in bytes) of the sparse data description + * that was read. */ static ssize_t gnu_sparse_10_read(struct archive_read *a, struct tar *tar) { - ssize_t bytes_read = 0; + ssize_t remaining, bytes_read; int entries; off_t offset, size, to_skip; + /* Clear out the existing sparse list. */ + gnu_clear_sparse_list(tar); + + remaining = tar->entry_bytes_remaining; + /* Parse entries. */ - entries = gnu_sparse_10_atol(a, tar, &bytes_read); + entries = gnu_sparse_10_atol(a, tar, &remaining); if (entries < 0) return (ARCHIVE_FATAL); /* Parse the individual entries. */ while (entries-- > 0) { /* Parse offset/size */ - offset = gnu_sparse_10_atol(a, tar, &bytes_read); + offset = gnu_sparse_10_atol(a, tar, &remaining); if (offset < 0) return (ARCHIVE_FATAL); - size = gnu_sparse_10_atol(a, tar, &bytes_read); + size = gnu_sparse_10_atol(a, tar, &remaining); if (size < 0) return (ARCHIVE_FATAL); /* Add a new sparse entry. */ gnu_add_sparse_entry(tar, offset, size); } /* Skip rest of block... */ + bytes_read = tar->entry_bytes_remaining - remaining; to_skip = 0x1ff & -bytes_read; if (to_skip != (a->decompressor->skip)(a, to_skip)) return (ARCHIVE_FATAL); @@ -2004,7 +2007,8 @@ * when possible. */ static ssize_t -readline(struct archive_read *a, struct tar *tar, const char **start) +readline(struct archive_read *a, struct tar *tar, const char **start, + ssize_t limit) { ssize_t bytes_read; ssize_t total_size = 0; @@ -2020,12 +2024,24 @@ /* If we found '\n' in the read buffer, return pointer to that. */ if (p != NULL) { bytes_read = 1 + ((const char *)p) - s; + if (bytes_read > limit) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Line too long"); + return (ARCHIVE_FATAL); + } (a->decompressor->consume)(a, bytes_read); *start = s; return (bytes_read); } /* Otherwise, we need to accumulate in a line buffer. */ for (;;) { + if (total_size + bytes_read > limit) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Line too long"); + return (ARCHIVE_FATAL); + } if (archive_string_ensure(&tar->line, total_size + bytes_read) == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate working buffer"); ==== //depot/projects/mips2/src/lib/libarchive/test/test_read_format_gtar_sparse.c#3 (text+ko) ==== @@ -23,107 +23,466 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_gtar_sparse.c,v 1.5 2007/08/12 01:16:19 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_gtar_sparse.c,v 1.6 2007/08/18 21:53:25 kientzle Exp $"); + + +struct contents { + off_t o; + size_t s; + char *d; +}; + +struct contents archive_contents_sparse[] = { + { 1000000, 1, "a" }, + { 2000000, 1, "a" }, + { 3145728, 0, NULL } +}; + +struct contents archive_contents_sparse2[] = { + { 1000000, 1, "a" }, + { 2000000, 1, "a" }, + { 3000000, 1, "a" }, + { 4000000, 1, "a" }, + { 5000000, 1, "a" }, + { 6000000, 1, "a" }, + { 7000000, 1, "a" }, + { 8000000, 1, "a" }, + { 9000000, 1, "a" }, + { 10000000, 1, "a" }, + { 11000000, 1, "a" }, + { 12000000, 1, "a" }, + { 13000000, 1, "a" }, + { 14000000, 1, "a" }, + { 15000000, 1, "a" }, + { 16000000, 1, "a" }, + { 17000000, 1, "a" }, + { 18000000, 1, "a" }, + { 19000000, 1, "a" }, + { 20000000, 1, "a" }, + { 21000000, 1, "a" }, + { 22000000, 1, "a" }, + { 23000000, 1, "a" }, + { 24000000, 1, "a" }, + { 25000000, 1, "a" }, + { 26000000, 1, "a" }, + { 27000000, 1, "a" }, + { 28000000, 1, "a" }, + { 29000000, 1, "a" }, + { 30000000, 1, "a" }, + { 31000000, 1, "a" }, + { 32000000, 1, "a" }, + { 33000000, 1, "a" }, + { 34000000, 1, "a" }, + { 35000000, 1, "a" }, + { 36000000, 1, "a" }, + { 37000000, 1, "a" }, + { 38000000, 1, "a" }, + { 39000000, 1, "a" }, + { 40000000, 1, "a" }, + { 41000000, 1, "a" }, + { 42000000, 1, "a" }, + { 43000000, 1, "a" }, + { 44000000, 1, "a" }, + { 45000000, 1, "a" }, + { 46000000, 1, "a" }, + { 47000000, 1, "a" }, + { 48000000, 1, "a" }, + { 49000000, 1, "a" }, + { 50000000, 1, "a" }, + { 51000000, 1, "a" }, + { 52000000, 1, "a" }, + { 53000000, 1, "a" }, + { 54000000, 1, "a" }, + { 55000000, 1, "a" }, + { 56000000, 1, "a" }, + { 57000000, 1, "a" }, + { 58000000, 1, "a" }, + { 59000000, 1, "a" }, + { 60000000, 1, "a" }, + { 61000000, 1, "a" }, + { 62000000, 1, "a" }, + { 63000000, 1, "a" }, + { 64000000, 1, "a" }, + { 65000000, 1, "a" }, + { 66000000, 1, "a" }, + { 67000000, 1, "a" }, + { 68000000, 1, "a" }, + { 69000000, 1, "a" }, + { 70000000, 1, "a" }, + { 71000000, 1, "a" }, + { 72000000, 1, "a" }, + { 73000000, 1, "a" }, + { 74000000, 1, "a" }, + { 75000000, 1, "a" }, + { 76000000, 1, "a" }, + { 77000000, 1, "a" }, + { 78000000, 1, "a" }, + { 79000000, 1, "a" }, + { 80000000, 1, "a" }, + { 81000000, 1, "a" }, + { 82000000, 1, "a" }, + { 83000000, 1, "a" }, + { 84000000, 1, "a" }, + { 85000000, 1, "a" }, + { 86000000, 1, "a" }, + { 87000000, 1, "a" }, + { 88000000, 1, "a" }, + { 89000000, 1, "a" }, + { 90000000, 1, "a" }, + { 91000000, 1, "a" }, + { 92000000, 1, "a" }, + { 93000000, 1, "a" }, + { 94000000, 1, "a" }, + { 95000000, 1, "a" }, + { 96000000, 1, "a" }, + { 97000000, 1, "a" }, + { 98000000, 1, "a" }, + { 99000000, 1, "a" }, + { 99000001, 0, NULL } +}; + +struct contents archive_contents_nonsparse[] = { + { 0, 1, "a" }, + { 1, 0, NULL } +}; /* - * Each of the following is an archive containing the following - * entries: + * Describe an archive with three entries: * * File 1: named "sparse" * * a length of 3145728 bytes (3MiB) * * a single 'a' byte at offset 1000000 * * a single 'a' byte at offset 2000000 - * File 2: named 'non-sparse' + * File 2: named "sparse2" + * * a single 'a' byte at offset 1,000,000, 2,000,000, ..., 99,000,000 + * * length of 99,000,001 + * File 3: named 'non-sparse' * * length of 1 byte * * contains a single byte 'a' */ -static struct contents { - off_t o; - size_t s; - char *d; -} archive_contents[] = { - { 1000000, 1, "a" }, - { 2000000, 1, "a" }, - { 3145728, 0, NULL } +struct archive_contents { + const char *filename; + struct contents *contents; +} files[] = { + { "sparse", archive_contents_sparse }, + { "sparse2", archive_contents_sparse2 }, + { "non-sparse", archive_contents_nonsparse }, + { NULL, NULL } }; -/* Old GNU tar sparse format. */ -static unsigned char archive_old[] = { -31,139,8,0,215,'[',190,'F',0,3,237,213,223,10,130,'0',20,199,241,'=',202, -'^',' ',216,'q',211,'=','H','O',224,'E',23,']','d',225,236,253,243,'d','i', -'P','(',132,'C',162,239,7,'d',219,241,'/',7,253,153,'.','u',155,14,'&','+', -215,171,'B',208,'Q','b',233,'^','G','U',244,155,17,'W',149,'1',148,193,'i', -']','b',244,222,216,'}',222,199,26,'\\','S','W',183,214,154,238,'x',154,'=', -'n','i',255,215,180,5,190,10,162,']','x','t','d',156,247,']','*','>',212, -'%',12,235,'g',253,'>',159,187,193,'x',194,234,234,245,'/',137,'?',194,251, -179,173,230,220,236,'R',230,127,192,'B',254,235,'r',202,255,168,249,'/',133, -23,'c','3',196,213,187,205,243,127,'[','|',127,0,0,0,0,0,0,0,0,0,0,0,252, -190,27,'H',10,',',253,0,'(',0,0}; + +/* Old GNU tar sparse format, as created by gtar 1.13 */ +static unsigned char archive_old_gtar_1_13[] = { +31,139,8,0,30,'%',193,'F',0,3,237,215,'K','n',219,'H',20,133,'a',246,'N', +180,129,6,170,'n',189,22,210,'+',208,' ',131,12,146,14,',','g',255,'}',201, +192,142,17,29,'(','A',159,24,'l',160,255,207,3,219,'e',193,186,'$',127,241, +'q',251,'r','}',186,'}',216,222,'U',169,165,204,222,183,'R','J',']',163,188, +253,190,139,252,'u',171,'e',206,18,17,189,205,'m','_',')',177,']',254,'z', +223,177,190,249,'z','{',190,'>',']','.',219,243,199,'O',15,'_',247,179,191, +255,'k',251,'.','h',179,231,'>','z',221,'#',175,'?',231,'^',10,177,'^',219, +':',188,172,239,'K',15,223,160,246,'o',175,250,253,211,'_',127,255,191,196, +255,8,253,0,231,185,29,215,255,'x',215,247,'x','x',253,175,'=',218,221,245, +'?','j',31,'\\',255,31,'\\',255,'[','o','j','}','E',233,'?',174,255,'Q',202, +'X','u',212,213,212,'M',194,'~',167,213,'J',31,226,191,197,'\\','e',138,245, +22,163,'/',181,158,27,161,182,162,'G',12,181,21,'}',214,170,182,'"','G',29, +'w','[',177,175,143,'Y',213,156,'3','c','Q','s',206,209,170,154,'s',213,':', +139,'Z',207,157,'-',230,220,227,157,'b',206,154,'{','-',196,156,185,15,218, +20,'s',214,',','=',196,156,'5',223,'s',138,'9','k',180,213,196,156,'5','V', +30,'O',177,190,'G',161,230,'l','+',214,'}',21,175,199,191,246,'V',155,154, +183,207,181,212,188,'#','f','S',243,142,'c',171,239,215,'g','4','U','w',157, +'3','T',221,'G',196,'j',191,230,'f',23,'1','g',228,';','w','1','g',148,172, +'H',204,25,181,198,16,'s','F','~','F','T',191,217,196,'R',253,230,185,'j', +170,'~',143,143,147,154,'3',15,'O','U','s',246,220,0,'5','g',238,132,'P', +'s',246,'5',167,154,'s',180,161,250,141,177,218,'}',191,223,143,127,30,205, +'P',29,31,31,127,'5',239,218,191,212,250,'<','6',227,199,245,150,19,'7','1', +'o','+','3',255,145,'X',175,'Q','U',199,'-',247,210,'}',199,251,233,168,'N', +213,239,'q',154,18,'s',182,204,189,171,'9','s',247,21,'5','g',198,219,213, +156,'=',207,130,'j',206,145,225,169,'9',247,'U','5','g','^',247,'T',191,'/', +167,211,251,245,181,134,154,'3',15,'s','U','s',230,'^',27,15,142,127,223, +247,136,152,'7','?','<','U','u',220,'3','z',213,'q',207,15,180,234,248,'8', +253,139,'y','{',134,'7',197,188,'=','s',12,177,'_',243,206,' ',239,'"',196, +'z',207,'3',134,154,'3','?',133,170,223,'>',242,'D',172,230,28,'#','T',191, +199,'e','J',205,'9','3','/','5','g','~','l',154,154,'s','e','0','b',206,177, +167,'\'',230,28,185,'G','U',191,251,177,'W',253,142,'<',209,171,'~',143,203, +233,131,227,'?',242,196,'t',127,215,176,175,175,'P',247,5,'#','s','Q',247, +5,'#',195,'T',247,5,'#',15,180,234,'8','O',218,']','u',156,135,161,169,142, +143,203,191,154,'s',238,'W',0,181,190,127,137,245,227,'f',232,205,'z',145, +'7','F',248,'%','<',191,195,'A','?','p',208,15,28,244,3,7,253,192,'A','?', +'p',184,253,208,31,28,244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,227,249,252,247,231,'?','o','_', +174,'O',183,15,239,247,30,165,150,'2','{',223,'J',')','u',141,242,246,251, +139,173,150,'9','K','D',244,'6',243,245,'5',127,218,'.',229,253,'F',250,238, +235,237,249,250,'t',185,'l',207,31,'?','=','|',221,207,254,14,0,0,0,0,0,0, +0,255,'1',255,0,178,'s',140,'2',0,240,0,0}; + +/* Old GNU tar sparse format, as created by gtar 1.17 */ +static unsigned char archive_old_gtar_1_17[] = { +31,139,8,0,30,'%',193,'F',0,3,237,215,']','r',19,'G',20,134,'a','e','\'', +218,'@',170,186,'O',255,'-','$','+',208,5,23,'\\','@','(',203,236,'?','g', +134,216,'8',232,139,160,248,'P','M',170,242,'>',20,'%',211,'6',214,153,158, +'W','#',205,245,211,229,233,250,238,244,'P','%',205,222,183,199,186,'F','y', +251,184,137,252,'{',170,'e',206,18,17,189,205,'S','~','w',197,'<',157,255, +'x',236,'X','_','|',190,'>','_',158,206,231,211,243,251,15,'w',127,238,'{', +223,255,'i',219,22,180,217,235,182,11,127,239,200,235,215,185,'K','!',214, +'k',255,242,239,151,245,253,235,'{','O',240,250,31,'~',185,203,175,255,149, +248,31,161,159,'c',']',247,235,127,'<',244,'9',238,'^',255,'k',143,'V',234, +'?',175,255,17,'5',127,156,235,255,191,'^',255,'[',235,'M',173,175,'(',253, +219,245,223,'J',25,171,142,186,182,'m','V',207,158,251,223,135,248,'m','1', +'W',153,'b',189,197,232,'K',173,231,'A',168,163,232,17,'C',29,'E',159,181, +170,163,200,'Q',199,205,'Q','l',235,'c','V','5',231,172,'}',168,'9',231,'h', +'U',205,185,'j',157,'E',173,231,'f',139,'9',243,'a','N','1','g',205,']',11, +'1','g',238,'A',155,'b',206,154,165,135,152,179,230,'s','N','1','g',141,182, +154,152,179,198,202,243,')',214,183,'(',212,156,'m',197,186,173,226,245,252, +215,222,'j','S',243,246,185,150,154,'w',196,'l','j',222,177,31,245,237,250, +140,166,234,174,'s',134,170,'{',143,'X',237,'k',30,'v',17,'s','F','>','s', +23,'s','F',201,138,196,156,'Q','k',12,'1','g',228,'k','D',245,155,'M',',', +213,'o','^',171,166,234,'w',127,'9',169,'9',243,244,'T','5','g',207,3,'P', +'s',230,'&',132,154,179,175,'9',213,156,163,13,213,'o',140,213,'n',251,253, +'z',254,243,'l',134,234,'x',127,249,171,'y',215,246,'G',173,207,253,'0',190, +']','o','9','q',19,243,182,'2',243,23,137,245,26,'U','u',220,'r',151,'n', +';',222,'.','G','u',170,'~',247,203,148,152,179,'e',238,']',205,153,219,'W', +212,156,25,'o','W','s',246,188,10,170,'9','G',134,167,230,220,'V',213,156, +249,190,167,250,'}',185,156,222,174,175,'5',212,156,'y',154,171,154,'3','w', +'m',220,'9',255,'}',219,17,'1','o',190,'x',170,234,184,'g',244,170,227,158, +'/','h',213,241,'~',249,23,243,246,12,'o',138,'y','{',230,24,'b','_',243, +147,'A','~',138,16,235,'=',175,24,'j',206,'|',21,170,'~',251,200,11,177,154, +'s',140,'P',253,238,'o','S','j',206,153,'y',169,'9',243,'e',211,212,156,'+', +131,17,'s',142,'-','=','1',231,200,29,'U',253,'n',231,'^',245,';',242,'B', +175,250,221,223,'N',239,156,255,145,23,166,219,'O',13,219,250,10,245,185, +'`','d','.',234,'s',193,200,'0',213,231,130,145,'\'','Z','u',156,23,237,174, +':',206,211,208,'T',199,251,219,191,154,'s','n',239,0,'j','}',251,'#',214, +247,15,'C','o',214,139,252,'`',132,31,194,253,27,28,244,3,7,253,192,'A','?', +'p',208,15,28,244,3,135,219,15,253,193,'A','?','p',208,15,28,244,3,7,253, +192,'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208, +15,28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?',158,143,127, +'~',252,253,250,233,242,'t','}',247,184,231,'(','i',246,190,'=',214,'5',202, +219,199,23,167,'Z',230,',',17,209,219,'<',149,'Z','#',234,233,'\\',30,'7', +210,'W',159,175,207,151,167,243,249,244,252,254,195,221,159,251,222,247,1, +0,0,0,0,0,0,0,248,15,249,11,162,'$',218,227,0,240,0,0}; #if ARCHIVE_VERSION_STAMP >= 1009000 -/* libarchive < 1.9 doesn't support these. */ +/* libarchive < 1.9 does not support this. */ +/* GNU tar "posix" sparse format 0.0, as created by gtar 1.17 */ +static unsigned char archive_0_0_gtar_1_17[] = { +31,139,8,0,31,'%',193,'F',0,3,237,217,207,'n',218,'X',20,199,'q',214,'<', +5,'/','0',228,222,'s','}',255,'x',193,'z',186,26,'u',211,7,240,164,174,20, +205,'$',169,'0',145,'2',243,244,'5','%',205,144,200,193,'p',14,141,203,232, +251,217,'P','A',14,'8','9',191,'[',253,',',150,'W',31,155,199,15,'m',243, +185,']','w',203,232,156,148,171,238,'k',179,238,218,217,249,184,'^',170,170, +237,163,207,209,237,'?','~','W','9',153,'y',151,146,19,145,'*',228,153,243, +161,'J','2','[','<',158,241,26,222,244,208,'m',154,'u',127,')',214,247,'y', +250,']',158,31,'/',132,228,197,239,127,'|','Z',238,'v',190,236,'n',254,'m', +'W',193,'W','1','K',153,'K',218,127,233,238,225,246,207,191,239,175,255,234, +'V','a','.','e',255,149,251,'/','_',186,'v',179,170,'{','!',205,'_',190,225, +'v',234,159,'M',219,173,162,151,185,212,3,'c',190,31,'+','Y','N',158,'{', +190,202,'8','8',231,230,226,22,205,230,230,182,']','y','_',178,'K',193,'e', +191,'}',238,250,229,'s','n','>',245,6,166,'u',246,195,'>','`',228,252,203, +246,184,252,'w',254,'S',127,254,'}',14,'a',182,'x',151,'C',244,227,252,247, +177,'8',248,'s','c',175,'_',232,249,183,'j',166,190,0,'\\','4',242,'3',173, +229,'[',253,'O',206,247,25,135,255,255,247,193,247,157,239,'U',255,139,'1', +210,255,222,195,203,'*',247,189,255,213,245,'n','/',3,149,'l','W',0,235,250, +151,'h',128,178,157,'s',229,244,230,216,207,229,170,':','y',174,234,231,'R', +'q','\'',207,197,237,156,'?',253,239,146,250,185,24,'O',255,187,148,']',2, +'O',159,'S',238,175,30,223,'_','p','C','{','w',227,11,28,30,244,227,27,28, +30,148,241,21,14,15,134,241,29,14,15,'V',227,'K',28,30,'L',227,'[','|','c', +'p','|',141,195,131,'Y',187,199,162,221,'c',173,220,163,'8',229,30,197,'+', +247,'(',162,220,163,'T',202,'=','J',165,220,163,'D',229,30,'%',')',247,'(', +'Y',187,199,162,221,'c',173,220,'c','p',202,'=',6,'Q',238,'1',136,'r',143, >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 20 13:35:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7812516A419; Mon, 20 Aug 2007 13:35:43 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D76D16A418 for ; Mon, 20 Aug 2007 13:35:43 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3C16013C45A for ; Mon, 20 Aug 2007 13:35:43 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KDZhQ4082675 for ; Mon, 20 Aug 2007 13:35:43 GMT (envelope-from dongmei@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KDZgWC082672 for perforce@freebsd.org; Mon, 20 Aug 2007 13:35:42 GMT (envelope-from dongmei@FreeBSD.org) Date: Mon, 20 Aug 2007 13:35:42 GMT Message-Id: <200708201335.l7KDZgWC082672@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to dongmei@FreeBSD.org using -f From: dongmei To: Perforce Change Reviews Cc: Subject: PERFORCE change 125406 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 13:35:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=125406 Change 125406 by dongmei@dongmei2007 on 2007/08/20 13:35:09 add the file reset functions Affected files ... .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/main.c#4 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/simple_dialog.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/trail_file_dlg.c#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#4 edit Differences ... ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/main.c#4 (text+ko) ==== @@ -11,6 +11,8 @@ #include "tree_view.h" #include "stdbool.h" #include "toolbar.h" +#include "simple_dialog.h" +#include "compat_macros.h" trailer_file cfile; bool fstop=FALSE; @@ -18,13 +20,88 @@ static GtkWidget *menubar, *main_vbox, *main_tb, *pkt_scrollw, *stat_hbox, *filter_tb; static GtkWidget *main_pane_v1, *main_pane_v2, *main_pane_h1, *main_pane_h2,*vpaned; +gboolean +main_do_quit(void) +{ + + /* Are we in the middle of reading a capture? */ + if (cfile.state == FILE_READ_IN_PROGRESS) { + /* Yes, so we can't just close the file and quit, as + that may yank the rug out from under the read in + progress; instead, just set the state to + "FILE_READ_ABORTED" and return - the code doing the read + will check for that and, if it sees that, will clean + up and quit. */ + cfile.state = FILE_READ_ABORTED; + + /* Say that the window should *not* be deleted; + that'll be done by the code that cleans up. */ + return TRUE; + } else { + /* Close any capture file we have open; on some OSes, you + can't unlink a temporary capture file if you have it + open. + "cf_close()" will unlink it after closing it if + it's a temporary file. + + We do this here, rather than after the main loop returns, + as, after the main loop returns, the main window may have + been destroyed (if this is called due to a "destroy" + even on the main window rather than due to the user + selecting a menu item), and there may be a crash + or other problem when "cf_close()" tries to + clean up stuff in the main window. + + XXX - is there a better place to put this? + Or should we have a routine that *just* closes the + capture file, and doesn't do anything with the UI, + which we'd call here, and another routine that + calls that routine and also cleans up the UI, which + we'd call elsewhere? */ + tf_close(&cfile); + /* Exit by leaving the main loop, so that any quit functions + we registered get called. */ + gtk_main_quit(); + + /* Say that the window should be deleted. */ + return FALSE; + } +} + +static void file_quit_answered_cb(gpointer dialog _U_, gint btn, gpointer data _U_) +{ + switch(btn) { + case(ESD_BTN_SAVE): + /* save file first */ +// file_save_as_cmd(after_save_exit, NULL); + break; + case(ESD_BTN_DONT_SAVE): + main_do_quit(); + break; + case(ESD_BTN_CANCEL): + break; + default: + g_assert_not_reached(); + } +} + /* This function is connected to the Close button or * closing the window from the WM */ gint file_quit_cmd_cb(GtkWidget *widget, GdkEvent *event, gpointer data) { - gtk_main_quit (); - return FALSE; + gpointer dialog; + + if((cfile.state != FILE_CLOSED) && !cfile.user_saved ) { + /* user didn't saved his current file, ask him */ + dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_SAVE_DONTSAVE_CANCEL, + PRIMARY_TEXT_START "Save capture file before program quit?" PRIMARY_TEXT_END "\n\n" + "If you quit the program without saving, your capture data will be discarded."); + simple_dialog_set_cb(dialog, file_quit_answered_cb, NULL); + } else { + /* unchanged file, just exit */ + main_do_quit(); + } } static GtkWidget *create_toolbar(void) { ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/trail_file_dlg.c#2 (text+ko) ==== @@ -7,6 +7,7 @@ #include "gui_utils.h" #include "../tfile.h" #include "gtkglobals.h" +#include "simple_dialog.h" #define DEF_WIDTH 750 #define DEF_HEIGHT 550 @@ -119,8 +120,37 @@ else window_destroy(file_open_w); } + +static void file_open_answered_cb(gpointer dialog _U_, gint btn, gpointer data _U_) +{ + switch(btn) { + case(ESD_BTN_SAVE): + /* save file first */ +// file_save_as_cmd(after_save_open_dialog, data); + break; + case(ESD_BTN_DONT_SAVE): + tf_close(&cfile); + file_open_cmd(data); + break; + case(ESD_BTN_CANCEL): + break; + default: + g_assert_not_reached(); + } +} + void file_open_cmd_cb(GtkWidget *widget, gpointer data _U_) { + gpointer dialog; + + if((cfile.state != FILE_CLOSED) && !cfile.user_saved){ + /* user didn't saved his current file, ask him */ + dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_SAVE_DONTSAVE_CANCEL, + PRIMARY_TEXT_START "Save capture file before opening a new one?" PRIMARY_TEXT_END "\n\n" + "If you open a new capture file without saving, your capture data will be discarded."); + simple_dialog_set_cb(dialog, file_open_answered_cb, widget); + } else { file_open_cmd(widget); } +} ==== //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#4 (text+ko) ==== @@ -47,15 +47,9 @@ static void tf_reset_state(trailer_file *tf) { - g_assert(tf->state != FILE_READ_IN_PROGRESS); - /* ...which means we have nothing to save. */ tf->user_saved = FALSE; - if (tf->rlist_chunk != NULL) { - g_mem_chunk_destroy(tf->rlist_chunk); - tf->rlist_chunk = NULL; - } tf->rlist = NULL; tf->rlist_end = NULL; tf->first_displayed = NULL; @@ -64,14 +58,11 @@ /* No record selected. */ tf->current_record = NULL; - /* Clear the packet list. */ -// record_list_freeze(); -// record_list_clear(); -// record_list_thaw(); - tf->f_datalen = 0; tf->count = 0; - +/*clear list*/ + record_list_clear(); + clear_tree_view_rows(); /* We have no file open. */ tf->state = FILE_CLOSED; } @@ -501,6 +492,8 @@ void tf_close(trailer_file *tf) { - fclose(tf->ts->fd); + if (tf->state!=FILE_CLOSED){ + tf_reset_state(tf); + } } From owner-p4-projects@FreeBSD.ORG Mon Aug 20 13:38:48 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2110216A41B; Mon, 20 Aug 2007 13:38:48 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2C516A419 for ; Mon, 20 Aug 2007 13:38:47 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AC5BA13C442 for ; Mon, 20 Aug 2007 13:38:47 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KDcl5m082773 for ; Mon, 20 Aug 2007 13:38:47 GMT (envelope-from karma@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KDclxw082768 for perforce@freebsd.org; Mon, 20 Aug 2007 13:38:47 GMT (envelope-from karma@FreeBSD.org) Date: Mon, 20 Aug 2007 13:38:47 GMT Message-Id: <200708201338.l7KDclxw082768@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to karma@FreeBSD.org using -f From: Alexey Mikhailov To: Perforce Change Reviews Cc: Subject: PERFORCE change 125407 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 13:38:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=125407 Change 125407 by karma@karma_ez on 2007/08/20 13:38:46 - Add missing routines for configuration parsing - Fix last commit Affected files ... .. //depot/projects/soc2007/karma_audit/dlog/daemon/client.c#7 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config.c#7 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config.h#7 edit .. //depot/projects/soc2007/karma_audit/dlog/lib/libdlogd.c#5 edit .. //depot/projects/soc2007/karma_audit/dlog/lib/libdlogd.h#4 edit Differences ... ==== //depot/projects/soc2007/karma_audit/dlog/daemon/client.c#7 (text+ko) ==== @@ -103,11 +103,12 @@ snprintf(jobbuf, PATH_MAX, "%s/.%ld.%s.hds", pathbuf,ts,basename(pathname)); fd = open(jobbuf, O_CREAT | O_TRUNC, S_IRUSR | S_IRGRP); hl = client_get_hosts(keyword); - while (hl == NULL) { + while (hl != NULL) { bzero(&j, sizeof(j)); memcpy(&(j.sa), &(hl->hs->s), sizeof(struct sockaddr)); j.done = 0; write(fd, &j, sizeof(j)); + hl = hl -> next; } close(fd); /* we re done */ @@ -123,8 +124,10 @@ return ; } } else { - /* TODO: can't check permissions. wrong query */ - fprintf(stderr,"client: can't check permissions"); + /* Can't check permission */ + ans = 1; + write(cs, &ans, sizeof(ans)); + return ; } } ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config.c#7 (text+ko) ==== @@ -402,5 +402,40 @@ char * verify_server_access (struct sockaddr * sa, const char * keyword) { - return 0; + sv_kw_data * sk; + sv_kw_hostdir * hs; + host_ll * h; + + sk = (sv_kw_data *) search_tree (server_kw_tree, keyword); + + if (sk == NULL) { + return NULL; /* bad keyword */ + } + + hs = sk -> hds; + + while (hs != NULL) { + h = hs -> hs; + while (h != NULL) { + if (strcmp(h -> s.sa_data, sa -> sa_data) == 0) { + return (hs -> dir); + } + } + } + + return NULL; +} + +cl_kw_hosts * +client_get_hosts (const char * keyword) +{ + cl_kw_data * ck; + + ck = (cl_kw_data *) search_tree(client_kw_tree, keyword); + + if (ck == NULL) { + return NULL; /* bad keyword */ + } + + return ck -> hosts; } ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config.h#7 (text+ko) ==== ==== //depot/projects/soc2007/karma_audit/dlog/lib/libdlogd.c#5 (text+ko) ==== @@ -14,8 +14,29 @@ #include #include +static const char *dlog_errlist[] = { + "Success", + "Can't create socket", + "Can't bind() on socket", + "Can't chmod() on socket", + "Can't connect() on socket", + "Can't sendmsg() on socket", + "Can't read() from socket", + "Bad response from server" +}; + + static int dlogd_connect (); +const char * +dlog_strerror (int code) +{ + if (code >= 0 && code <= 7) { + return dlog_errlist[-code]; + } + return "Unknown error"; +} + /* Submit log file On success: 0 returned ==== //depot/projects/soc2007/karma_audit/dlog/lib/libdlogd.h#4 (text+ko) ==== @@ -2,5 +2,6 @@ #define DLOG_LIB_H int dlogd_submit(const char * pathname, const char * keyword); +const char * dlog_strerror(int code); #endif From owner-p4-projects@FreeBSD.ORG Mon Aug 20 13:43:55 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E5A4716A468; Mon, 20 Aug 2007 13:43:54 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A18F916A419 for ; Mon, 20 Aug 2007 13:43:54 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 90A7C13C45D for ; Mon, 20 Aug 2007 13:43:54 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KDhsLV083159 for ; Mon, 20 Aug 2007 13:43:54 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KDhsVm083156 for perforce@freebsd.org; Mon, 20 Aug 2007 13:43:54 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 20 Aug 2007 13:43:54 GMT Message-Id: <200708201343.l7KDhsVm083156@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125408 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 13:43:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=125408 Change 125408 by mharvan@mharvan_bike-planet on 2007/08/20 13:43:46 added DISPATCH_PLUGIN_SELECT dispatch to explicitly notify the server of plugin failover Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#10 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#5 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#10 (text+ko) ==== @@ -105,6 +105,7 @@ static int send_next_frag(); static void cleanup(); +static void send_plugin_select(struct client *cl); /* GLOBAL VARIABLES */ int server = 0; /* are we a server or a client? */ @@ -201,6 +202,9 @@ cl->ping_counter = 0; if (pl != NULL && cl->tun_fd != -1) { + if (!server) /* client */ + send_plugin_select(cl); + if (cl->pl->is_ready_to_send(cl->pl, cl->clid) == WILL_SEND_IMMEDIATELY) event_add(&cl->tun_ev, NULL); @@ -423,6 +427,36 @@ } /* + * send a message to the server notifying it of plugin failover + */ +static void +send_plugin_select(struct client *cl) +{ + int nwrite = 0; + char data[10]; + char *datap = data; + int len=0; + int consumed; + + + if (cl->pl != NULL) { + /* client prepends the client ID */ + if (!server) { + *datap = cl->clid; + datap++; + len++; + } + + *datap = DISPATCH_PLUGIN_SELECT; + datap++; + len++; + + nwrite = cl->pl->send(cl->pl, cl->clid, + data, len, NORMAL_DATA, &consumed); + printf("send_plugin_select(): nwrite: 0x%x\n", nwrite); + } +} +/* * Send a tunnel probe - echo request. Note that this is different * from ICMP echo. */ @@ -617,6 +651,23 @@ break; + case DISPATCH_PLUGIN_SELECT: + printf("process_data_from_plugin(): PLUGIN_SELECT\n"); + /* only associated clients can send DATA to the server */ + if (server && *clid == 0) { + *conn_flag = CONN_DISCARD; + pl->conn_map(pl, *clid, *conn_flag); + return; + } + + *conn_flag = CONN_PERM; + pl->conn_map(pl, *clid, CONN_PERM); + + /* update the current plugin for this client */ + set_client_pl(cl, pl); + + break; + case DISPATCH_FRAG: /* fragment reassembly */ pl->conn_map(pl, *clid, CONN_PERM); @@ -1203,8 +1254,10 @@ signal(SIGTERM, sigcb); /* load the plugins */ -/* pl = load_plugin("./plugin_udp.so"); */ -/* pl->name = "udp_1234"; */ + pl = load_plugin("./plugin_udp.so"); + pl->name = "udp_1234"; + pl = load_plugin("./plugin_udp.so"); + pl->name = "udp_1235"; /* if (server) { */ /* pl = load_plugin("./plugin_udp_catchall.so"); */ /* pl->name = "udp_catchall"; */ @@ -1212,10 +1265,10 @@ /* pl = load_plugin("./plugin_udp.so"); */ /* pl->name = "udp_53"; */ /* } */ -/* pl = load_plugin("./plugin_tcp.so"); */ -/* pl->name = "tcp_1234"; */ -/* pl = load_plugin("./plugin_icmp.so"); */ -/* pl->name = "icmp"; */ + pl = load_plugin("./plugin_tcp.so"); + pl->name = "tcp_1234"; + pl = load_plugin("./plugin_icmp.so"); + pl->name = "icmp"; pl = load_plugin("./plugin_dns/plugin_dns.so"); pl->name = "dns_53"; ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#5 (text+ko) ==== @@ -79,16 +79,14 @@ /* dispatch type - prepended before the payload */ enum { - DISPATCH_ECHO_REQUEST = 1, - DISPATCH_ECHO_REPLY = 2, - DISPATCH_FRAG = 3, + DISPATCH_ECHO_REQUEST, + DISPATCH_ECHO_REPLY, + DISPATCH_PLUGIN_SELECT, + DISPATCH_FRAG, DISPATCH_ID_REQUEST, /* client requesting an ID */ DISPATCH_ID_OFFER, /* daemon offering an ID to the client */ - //DISPATCH_ID_CANCEL, /* client ending a session */ DISPATCH_PLUGIN_DATA, /* plugin to plugin communication */ DISPATCH_DATA = 0x42, - DIPATCH_PLUGIN_RESERVED_MIN = 128, /* dispatch values used by plugins, */ - DIPATCH_PLUGIN_RESERVED_MAX = 255, /* i.e., not passed to the daemon */ }; /* From owner-p4-projects@FreeBSD.ORG Mon Aug 20 16:10:18 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9D2D316A46D; Mon, 20 Aug 2007 16:10:18 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7154116A469 for ; Mon, 20 Aug 2007 16:10:18 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5EEB413C4F4 for ; Mon, 20 Aug 2007 16:10:18 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KGAIve011542 for ; Mon, 20 Aug 2007 16:10:18 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KGAI1V011532 for perforce@freebsd.org; Mon, 20 Aug 2007 16:10:18 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 20 Aug 2007 16:10:18 GMT Message-Id: <200708201610.l7KGAI1V011532@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125418 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 16:10:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=125418 Change 125418 by mharvan@mharvan_bike-planet on 2007/08/20 16:10:17 code cleanup - daemon Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#11 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#6 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin.h#9 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/tun_dev.c#3 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/tun_dev.c.freebsd#3 delete .. //depot/projects/soc2007/mharvan-mtund/mtund.src/tun_dev.h#3 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#11 (text+ko) ==== @@ -1,18 +1,38 @@ -/* - * Tunneling code idea based and tun interface handling based on the - * ICMP tunnel described at - * http://neworder.box.sk/newsread.php?newsid=13688 - * which had following comments: - * > Code is ruthlessly ripped from vtun and itunnel with appropriate changes. - * > Guys, thanks for the great stuff! - * > - * > itunnel - an ICMP tunnel by edi / teso - * > VTun - Virtual Tunnel over TCP/IP network. +/*- + * Copyright (c) 2007 Matus Harvan + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include + #include #include #include @@ -28,92 +48,91 @@ #include "tun_dev.h" #include "mtund.h" -// Linux only -//#include -//#include - /* max transfered unit - encapsulated packet size */ #define MTU 1500 -/* how many pings can fail before the plugin is declared broken */ +/* + * probes ad keep-alive pings + * + * PING_INTERVAL - how often to send pings + * PING_FAIL_PLUGIN - how many can fail before the plugin is declared broken + * PING_FAIL_PLUGIN - how many can fail before the client is declared + * dead by the server and its ID reclaimed + * + * The counter for failed pings is reset whenever a ping reply is + * received or the plugin is changed. + */ #define PING_INTERVAL 5 #define PING_FAIL_PLUGIN 3 #define PING_FAIL_COMPLETE 10 -#define IDREQUEST_RETRIES 3 #define min(a,b) ( (a>b) ? b : a ) + /* DATA TYPES */ /* fragment header */ struct frag_hdr { u_int8_t dispatch; - uint id; /* Id of the whole packet, same in each fragment */ - uint size; /* length of the whole packet, same in each fragment */ - uint offset; /* fragment offset (in bytes) from the beginning - * of the packet */ + uint id; /* ID of the packet. same in each fragment + * belonging to the same packet */ + uint size; /* length of the whole packet, same in each fragment */ + uint offset; /* fragment offset (in bytes) from the beginning + * of the packet */ }; /* info about a packet being reassembled from fragments */ struct frag_info { - uint id; /* Id of the whole packet, same in each fragment */ - uint size; /* length of the whole packet, same in each fragment */ - time_t tv_sec; /* seconds after epoch when reassembly - * of this packet started */ - u_int8_t *bitmap; /* bitmap representing already - * received parts of the packet */ - char *buf; /* buffer into which the fragment is reassembled */ - LIST_ENTRY(frag_info) frag_infos; + uint id; /* ID of the packet. same in each fragment + * belonging to the same packet */ + uint size; /* length of the whole packet, same + * in each fragment */ + time_t tv_sec; /* seconds after epoch when reassembly + * of this packet started */ + u_int8_t *bitmap; /* bitmap representing already + * received parts of the packet */ + char *buf; /* buffer into which the fragment is + * reassembled */ + LIST_ENTRY(frag_info) frag_infos; /* queue(3) */ }; +/* structure representing a client */ struct client { - clientid_t clid; /* client ID */ - int used; /* client active or not */ - long reqid; /* request ID used for the client ID request */ - struct plugin* pl; - + clientid_t clid; /* client ID */ + int used; /* client active or not */ + long reqid; /* request ID used for the client ID request */ + struct plugin *pl; /* tunnel device */ - char tun_dev[16]; - int tun_fd; - struct event tun_ev; - + char tun_dev[16]; + int tun_fd; + struct event tun_ev; /* ping */ - int ping_counter; - uint8_t echo_seq; - + int ping_counter; + uint8_t echo_seq; /* fragmentation */ - struct frag_hdr frag_hdr; - char frag_data[MTU+sizeof(struct frag_hdr)]; - char *frag_datap; - int frag_data_len; - uint frag_id; /* id for the next packet to be fragmented */ - // TODO: randomize initial value of frag_id - - /* fragmentat reassembly */ + struct frag_hdr frag_hdr; + char frag_data[MTU+sizeof(struct frag_hdr)]; + char *frag_datap; + int frag_data_len; + uint frag_id;/* id for the next packet to be fragmented */ + /* fragment reassembly information */ LIST_HEAD(frag_infos_head, frag_info) frag_infos; }; -//TODO: init: frag_datap, frag_data_len, frag_id, echo_seq, client id, -// frag_info_list -// pl->ping_counter = PING_FAIL; +/* TODO: randomize initial value of frag_id */ +/* TODO: init: frag_datap, frag_data_len, frag_id, echo_seq, client id, */ +/* frag_info_list */ -struct client clients[MAXCLIENTS]; /* FUNCTION HEADERS */ -/* - * Pass data received from the tun interface to the daemon. - */ static int process_data_from_tun(struct client *cl, struct plugin *pl, uint8_t dispatch, char *data, int len); - static int send_next_frag(); static void cleanup(); static void send_plugin_select(struct client *cl); + /* GLOBAL VARIABLES */ -int server = 0; /* are we a server or a client? */ -TAILQ_HEAD(plugins_head, plugin) plugins = - TAILQ_HEAD_INITIALIZER(plugins); - -static struct event timer_ev; - +int server = 0; /* are we a server or a client? */ +TAILQ_HEAD(plugins_head, plugin) plugins = TAILQ_HEAD_INITIALIZER(plugins); +struct client clients[MAXCLIENTS]; /* client is using clients[0] for itself */ static uint8_t myclid = 0; /* client ID of this client (client only) */ /* server host */ @@ -121,8 +140,9 @@ char *host; char *port = "12345"; -//static int client_state; +static struct event timer_ev; +/* dump data in hex format */ static void dump_data(char *data, int len) { @@ -133,6 +153,10 @@ printf("\n"); } +/* + * not used yet - useful out, i.e., which plugins work should be + * produced with this function + */ int mylog(const char *fmt, ...) { @@ -146,6 +170,9 @@ return out; } +/* + * debugging output - will be removed + */ int debug(const char *fmt, ...) { @@ -159,6 +186,7 @@ return out; } +/* show and execute a command */ int ssystem(const char *fmt, ...) { @@ -171,7 +199,7 @@ return system(cmd); } -/* lookup client by ID */ +/* lookup the client by ID */ static struct client * lookup_clid(clientid_t clid) { @@ -213,8 +241,8 @@ } /* - * entry function if a polling plugin can send more data - if - * fragments pending, send these; otherwise read data from the tun + * entry function if a polling plugin can send more data - if there + * are pending fragments, send these; otherwise read data from the tun * interface and pass it to the daemon */ static void @@ -246,7 +274,7 @@ } while (nread > 0 && nwrite == SEND_PKT_SENT); } -/* send data via the tun interface for the client */ +/* write a packet (data) to the the tun interface of a client */ static int tun_send(struct client *cl, char *data, int len) { int n; @@ -278,7 +306,8 @@ request_tun_data(cl); } - int +/* initialize a tun device */ +int tun_init(struct client *cl) { int tun_flags; @@ -336,19 +365,16 @@ if (cl->pl->is_ready_to_send(cl->pl, cl->clid) == WILL_SEND_IMMEDIATELY) event_add(&cl->tun_ev, NULL); - // else the tun read is timed by the plugin + /* else the tun read is timed by the plugin */ } return 0; } +/* deinitialize a tun device */ static void tun_deinit(struct client *cl) { - if (!server) { - // TODO: fix routing table - } - if (cl->tun_fd != -1) { event_del(&cl->tun_ev); tun_close(cl->tun_fd, cl->tun_dev); @@ -361,42 +387,43 @@ */ static struct plugin * load_plugin(char *path) { - struct plugin *pl; - int (*plugin_register)(struct plugin*); - void *handle; - const char *error; - pl = malloc(sizeof(struct plugin)); - if (!pl) { - warnx("failed to malloc plugin: out of memory!\n"); - return NULL; - } + struct plugin *pl; + int (*plugin_register)(struct plugin*); + void *handle; + const char *error; - /* open the library */ - handle = dlopen (path, RTLD_NOW); - if (!handle) { - fputs(dlerror(), stderr); - return NULL; - } - /* load the plugin */ - plugin_register = dlsym(handle, "plugin_register"); - if ((error = dlerror()) != NULL) - goto error; - /* prepare the plugin for registration */ - plugin_register(pl); + pl = malloc(sizeof(struct plugin)); + if (!pl) { + warnx("failed to malloc plugin: out of memory!\n"); + return NULL; + } - /* add plugin to the list of loaded plugins */ - TAILQ_INSERT_TAIL(&plugins, pl, plugins); + /* open the library */ + handle = dlopen (path, RTLD_NOW); + if (!handle) { + fputs(dlerror(), stderr); + return NULL; + } + /* load the plugin */ + plugin_register = dlsym(handle, "plugin_register"); + if ((error = dlerror()) != NULL) + goto error; + /* prepare the plugin for registration */ + plugin_register(pl); + + /* add plugin to the list of loaded plugins */ + TAILQ_INSERT_TAIL(&plugins, pl, plugins); + + debug("successfully loaded plugin %s\n", pl->name); + return (pl); - fprintf(stderr, "successfully loaded plugin %s\n", pl->name); - return pl; - error: fputs(error, stderr); free(pl); - return NULL; + return (NULL); } -/* initialize the client datastructure */ +/* initialize a client */ static struct client * client_init(clientid_t clid) { @@ -416,13 +443,26 @@ return cl; } -/* deinitialize the client datastructure, corresponding tun device,... */ +/* deinitialize a client datastructure, the corresponding tun device,... */ static void client_deinit(struct client *cl) { - //TODO - //TODO close conn + struct frag_info *np, *np_temp; + + /* close the (plugin) connection */ + if (cl->pl) + cl->pl->conn_close(cl->pl, cl->clid); + /* deinitialize the tun device */ tun_deinit(cl); + + /* deallocate fragment reassembly information */ + LIST_FOREACH_SAFE(np, &cl->frag_infos, frag_infos, np_temp) { + LIST_REMOVE(np, frag_infos); + free(np->bitmap); + free(np->buf); + free(np); + } + cl->used = 0; } @@ -447,13 +487,14 @@ len++; } + /* dispatch */ *datap = DISPATCH_PLUGIN_SELECT; datap++; len++; nwrite = cl->pl->send(cl->pl, cl->clid, data, len, NORMAL_DATA, &consumed); - printf("send_plugin_select(): nwrite: 0x%x\n", nwrite); + debug("send_plugin_select(): nwrite: 0x%x\n", nwrite); } } /* @@ -479,17 +520,19 @@ len++; } + /* dispatch */ *datap = DISPATCH_ECHO_REQUEST; datap++; len++; + /* ping sequence number */ *datap = cl->echo_seq++; datap++; len++; nwrite = cl->pl->send(cl->pl, cl->clid, data, len, NORMAL_DATA, &consumed); - printf("send_echo_request(): nwrite: 0x%x\n", nwrite); + debug("send_echo_request(): nwrite: 0x%x\n", nwrite); } } @@ -521,8 +564,7 @@ nwrite = cl->pl->send(cl->pl, cl->clid, data, pdata - data, NORMAL_DATA, &consumed); - //pl->ping_counter--; - printf("send_id_request(): nwrite: 0x%x\n", nwrite); + debug("send_id_request(): nwrite: 0x%x\n", nwrite); } } @@ -532,61 +574,60 @@ static void timer_ev_handler(int fd, short ev_type, void *arg) { - struct timeval tv; - struct frag_info *np, *np_temp; - struct client *cl; - int i; + struct timeval tv; + struct frag_info *np, *np_temp; + struct client *cl; + int i; - /* check if too many ping requests have not failed */ - for(i = 0; i < MAXCLIENTS; i++) { - cl = &clients[i]; - if (cl->used == 0) - continue; - - printf("ping_counter: %d\n", cl->ping_counter); - if (cl->ping_counter > PING_FAIL_COMPLETE && - server) - client_deinit(cl); - else if (cl->pl) { - if (cl->ping_counter > PING_FAIL_PLUGIN) - plugin_report(cl->pl, cl->clid, - REPORT_ERROR_PING); - send_echo_request(cl); - } - } - - /* fragment reassembly timeout */ - gettimeofday(&tv, NULL); - for(i = 0; i < MAXCLIENTS; i++) { - cl = &clients[i]; - if (cl->used == 0) - continue; - - LIST_FOREACH_SAFE(np, &cl->frag_infos, frag_infos, np_temp) { - if (tv.tv_sec - np->tv_sec > FRAG_TIMEOUT) { - LIST_REMOVE(np, frag_infos); - free(np->bitmap); - free(np->buf); - free(np); - } - } - } + /* check if too many ping requests have not failed */ + for(i = 0; i < MAXCLIENTS; i++) { + cl = &clients[i]; + if (cl->used == 0) + continue; + + printf("ping_counter: %d\n", cl->ping_counter); + if (cl->ping_counter > PING_FAIL_COMPLETE && + server) + client_deinit(cl); + else if (cl->pl) { + if (cl->ping_counter > PING_FAIL_PLUGIN) + plugin_report(cl->pl, cl->clid, + REPORT_ERROR_PING); + send_echo_request(cl); + } + } + + /* fragment reassembly timeout */ + gettimeofday(&tv, NULL); + for(i = 0; i < MAXCLIENTS; i++) { + cl = &clients[i]; + if (cl->used == 0) + continue; + + LIST_FOREACH_SAFE(np, &cl->frag_infos, frag_infos, np_temp) { + if (tv.tv_sec - np->tv_sec > FRAG_TIMEOUT) { + LIST_REMOVE(np, frag_infos); + free(np->bitmap); + free(np->buf); + free(np); + } + } + } - /* register a timer event again */ - tv.tv_sec=PING_INTERVAL; - tv.tv_usec=0; - evtimer_set(&timer_ev, timer_ev_handler, NULL); - evtimer_add(&timer_ev, &tv); + /* register a timer event again */ + tv.tv_sec=PING_INTERVAL; + tv.tv_usec=0; + evtimer_set(&timer_ev, timer_ev_handler, NULL); + evtimer_add(&timer_ev, &tv); } /* - * Pass data received by the plugin to the daemon. - * - * called 1st time: *conn == NULL - * lookup client's conn by client ID and return + * Pass data received by the plugin to the daemon. This function is + * called from plugins. Before calling plugin_send, it should call + * plugin_conn_map(). * - * called 2nd time: *conn != NULL - * + * clid and conn_flag will be removed from the function signature as + * plugin_conn_map() is used now. */ void process_data_from_plugin(struct plugin *pl, char *data, int len, @@ -606,8 +647,8 @@ struct timeval tv; int dgram_reassembled; - printf("data from plugin: "); - dump_data(data, len); +/* debug("data from plugin: "); */ +/* dump_data(data, len); */ *conn_flag = CONN_DISCARD; @@ -628,12 +669,10 @@ /* process the dispatch */ dispatch = *data; - - printf("clid: %hhd, dispatch: 0x%02hhx\n", *clid, dispatch); - + debug("clid: %hhd, dispatch: 0x%02hhx\n", *clid, dispatch); switch (dispatch) { case DISPATCH_DATA: - printf("process_data_from_plugin(): DATA\n"); + debug("process_data_from_plugin(): DATA\n"); /* only associated clients can send DATA to the server */ if (server && *clid == 0) { *conn_flag = CONN_DISCARD; @@ -647,12 +686,13 @@ /* update the current plugin for this client */ set_client_pl(cl, pl); + /* pass data to the tun device */ tun_send(cl, data+1, len-1); break; case DISPATCH_PLUGIN_SELECT: - printf("process_data_from_plugin(): PLUGIN_SELECT\n"); + debug("process_data_from_plugin(): PLUGIN_SELECT\n"); /* only associated clients can send DATA to the server */ if (server && *clid == 0) { *conn_flag = CONN_DISCARD; @@ -680,7 +720,6 @@ data += sizeof(struct frag_hdr); len -= sizeof(struct frag_hdr); - /* debugging output */ debug("got a frag header: id %d, size %d, off %d, len %d\n", frag_hdr->id, frag_hdr->size, frag_hdr->offset, len); @@ -735,17 +774,26 @@ if (frag_hdr->offset + len <= p->size) { /* copy the data */ memcpy(p->buf + frag_hdr->offset, data, len); - /* update the bitmap */ - // TODO: we ignore overlaps, but that should be caught - // by the upper layer checksum + /* update the bitmap + * + * We ignore fragment overlaps as these should + * be caught by the upper layer + * checksum. Actually, they should not happen + * at all. + */ for (i = frag_hdr->offset; i < frag_hdr->offset+len; i++) p->bitmap[i/8] |= (0x1 << (i%8)); } else { - warnx("fragment outside of packet payload\n"); + debug("fragment outside of packet payload\n"); return; } - + + /* + * Fragment was processed without errors, so it was + * valid traffic and the plugin used by this client + * should be updated. + */ set_client_pl(cl, pl); /* check if the complete packet has been reassembled */ @@ -766,9 +814,11 @@ if (dgram_reassembled) { debug("frag reassembly: packet complete\n"); set_client_pl(cl, pl); + + /* pass the reassembled packet to the tun device */ tun_send(cl, p->buf, p->size); - /* remove fragment info from linked list */ + /* fragment info for this packet no longer needed */ LIST_REMOVE(p, frag_infos); free(p->buf); free(p->bitmap); @@ -778,18 +828,18 @@ break; case DISPATCH_ECHO_REQUEST: - printf("process_data_from_plugin(): ECHO_REQUEST\n"); - fprintf(stderr, "got echo request (plugin: %s)\n", - pl->name); + debug("process_data_from_plugin(): ECHO_REQUEST\n"); + debug("got echo request (plugin: %s)\n", pl->name); + /* pings are qualify for temporary connection status only */ + *conn_flag = CONN_TEMP; pl->conn_map(pl, *clid, CONN_TEMP); /* generate a reply to the echo request */ - char *ndata; - *conn_flag = CONN_TEMP; - *data = (u_int8_t)DISPATCH_ECHO_REPLY; + /* client only - prepend the client ID */ + char *ndata; if (!server) { /* client */ /* * payload from the client should contain the @@ -807,7 +857,7 @@ } nwrite = pl->send(pl, 0, data, len, URGENT_DATA, &consumed); - printf("sending reply, returned 0x%x\n", nwrite); + debug("sending reply, returned 0x%x\n", nwrite); if (server) { if (*clid != 0) @@ -818,22 +868,26 @@ break; case DISPATCH_ECHO_REPLY: - printf("process_data_from_plugin(): ECHO_REPLY\n"); - fprintf(stderr, "got echo reply (plugin: %s)\n", - pl->name); + debug("process_data_from_plugin(): ECHO_REPLY\n"); + debug("got echo reply (plugin: %s)\n", pl->name); + /* pings are qualify for temporary connection status only */ pl->conn_map(pl, *clid, CONN_TEMP); *conn_flag = CONN_TEMP; /* update the ping counter */ cl->ping_counter = 0; - //TODO + /* + * Receiving a ping reply indicates a working plugin. + * This is a good point to update the currently used + * plugin if none is set and to request a client ID if + * not associated already. + */ if (!server) { /* client */ - //TODO set_client_pl(0, pl); if(cl->pl == NULL) set_client_pl(0, pl); - + /* request a client ID from the server */ if (myclid == 0) send_id_request(); } @@ -841,23 +895,22 @@ break; case DISPATCH_ID_REQUEST: - //long reqid; - printf("process_data_from_plugin(): ID_REQUEST\n"); + debug("process_data_from_plugin(): ID_REQUEST\n"); /* only relevant to the server */ if (!server) { pl->conn_map(pl, *clid, CONN_DISCARD); return; } - /* the client ID in a request has to be zero */ + /* the client ID in a request has to be zero */ if (*clid != 0) { pl->conn_map(pl, *clid, CONN_DISCARD); return; } - //reqid = *(data+1); - //TODO: assign new ID - int i; + /* TODO reqid = *(data+1); */ + + /* assign a new client ID */ for (i = 1; i < MAXCLIENTS && clients[i].used != 0; i++); if (i == MAXCLIENTS) { *conn_flag = CONN_DISCARD; @@ -865,6 +918,7 @@ return; } + /* found an available ID, associate it with the client */ *clid = i; *conn_flag = CONN_PERM; pl->conn_map(pl, *clid, CONN_PERM); @@ -873,46 +927,55 @@ tun_init(cl); set_client_pl(cl, pl); + /* reply to the client offering the ID */ *(data) = DISPATCH_ID_OFFER; *(data+1) = *clid; nwrite = pl->send(pl, *clid, data, 2, URGENT_DATA, &consumed); - fprintf(stderr, "got ID request (plugin: %s)\n", - pl->name); - printf("sending an offer, returned 0x%x\n", nwrite); + debug("got ID request (plugin: %s)\n", pl->name); + debug("sending an offer, returned 0x%x\n", nwrite); break; case DISPATCH_ID_OFFER: - printf("process_data_from_plugin(): ID_OFFER\n"); + debug("process_data_from_plugin(): ID_OFFER\n"); /* only relevant to the client */ if (server) { pl->conn_map(pl, *clid, CONN_DISCARD); return; } - if (myclid != 0) { + if (myclid != 0) { /* ID already assigned */ pl->conn_map(pl, *clid, CONN_DISCARD); - return; /* ID already assigned */ + return; } + /* parse the reply for the client ID */ myclid = *(data+1); cl->clid = myclid; - printf("got an ID offer (%d)\n", myclid); + debug("got an ID offer (%d)\n", myclid); + /* + * We can start tunneling after a successful + * association with a server so initialize the tun + * device. + */ tun_init(clients); break; case DISPATCH_PLUGIN_DATA: - printf("process_data_from_plugin(): PLUGIN_DATA\n"); + /* plugin-to-plugin communication */ + debug("process_data_from_plugin(): PLUGIN_DATA\n"); pl->conn_map(pl, *clid, CONN_TEMP); + + /* pass the payload to the plugin */ pl->custom_receive(pl, 0, data + 1, len - 1); break; default: - fprintf(stderr, "unknown dispatch 0x%X in data from plugin " - "%s\n", dispatch, pl->name); + debug("unknown dispatch 0x%X in data from plugin " + "%s\n", dispatch, pl->name); pl->conn_map(pl, *clid, CONN_DISCARD); } } @@ -936,7 +999,7 @@ return SEND_ERROR; } - printf("process_data_from_tun: len: %d, pl->mtu: %d\n", + debug("process_data_from_tun: len: %d, pl->mtu: %d\n", len, pl->mtu); /* no need to add the fragmentation header */ if (len < pl->mtu || dispatch == DISPATCH_PLUGIN_DATA) { @@ -959,10 +1022,15 @@ /* prepare the frag header */ cl->frag_hdr.dispatch = DISPATCH_FRAG; cl->frag_hdr.id = cl->frag_id; - cl->frag_id++; cl->frag_hdr.size = len; cl->frag_hdr.offset = 0; + /* increment the fragment ID */ + if (cl->frag_id == 65535) + cl->frag_id = 0; + else + cl->frag_id++; + cl->frag_data_len = 0; cl->frag_datap = cl->frag_data; @@ -981,6 +1049,7 @@ } } +/* plugin can request sending data, used for plugin-to=plugin communication */ int plugin_custom_send(struct plugin *pl, uint8_t clid, char *data, int len) @@ -1000,7 +1069,7 @@ if (server) { while(cl->frag_data_len > sizeof(cl->frag_hdr) && nwrite == SEND_PKT_SENT) { - printf("send_next_frag: sending frag " + debug("send_next_frag: sending frag " "offset %d, send_len %d, frag_data_len %d\n", cl->frag_hdr.offset, min(cl->pl->mtu, cl->frag_data_len), @@ -1021,7 +1090,7 @@ n = cl->frag_data_len; nwrite = cl->pl->send(cl->pl, cl->clid, cl->frag_datap, n, NORMAL_DATA, &consumed); - printf("send_next_frag: consumed: %d\n", consumed); + debug("send_next_frag: consumed: %d\n", consumed); switch (nwrite) { case SEND_PKT_SENT: case SEND_PKT_QUEUED: @@ -1031,7 +1100,7 @@ cl->frag_data_len -= consumed; break; default: - //plugin_report(current_pl, REPORT_ERROR_SEND); + /*plugin_report(current_pl, REPORT_ERROR_SEND);*/ return nwrite; } } @@ -1039,10 +1108,11 @@ cl->frag_datap = NULL; cl->frag_data_len = 0; } + } else { /* client */ while(cl->frag_data_len > sizeof(cl->frag_hdr) + 1 && nwrite == SEND_PKT_SENT) { - printf("send_next_frag: sending frag " + debug("send_next_frag: sending frag " "offset %d, send_len %d, frag_data_len %d\n", cl->frag_hdr.offset, min(cl->pl->mtu, cl->frag_data_len), @@ -1056,8 +1126,6 @@ sizeof(cl->frag_hdr)); /* send it */ - //TODO: maybe we should check how much data - // was actually sent if (cl->pl->mtu > 0) n = min(cl->pl->mtu, cl->frag_data_len); else @@ -1073,7 +1141,7 @@ cl->frag_data_len -= consumed; break; default: - //plugin_report(current_pl, REPORT_ERROR_SEND); + /*plugin_report(current_pl, REPORT_ERROR_SEND);*/ return nwrite; } } @@ -1086,6 +1154,11 @@ return nwrite; } +/* + * entry function for plugins to report various things to the daemon, + * such as errors, availability to send mroe data (all queued data has + * been sent),... + */ void plugin_report(struct plugin *pl, clientid_t clid, int err) { @@ -1105,15 +1178,18 @@ request_tun_data(cl); return; - //case REPORT_INIT_SUCCESS: /* initialization succeeded */ - //case REPORT_INIT_FAIL: /* initialization failed */ + /* not used yet */ +/* case REPORT_INIT_SUCCESS: /\* initialization succeeded *\/ */ +/* case REPORT_INIT_FAIL: /\* initialization failed *\/ */ /* errors */ case REPORT_ERROR_PING: /* too many probes have failed */ case REPORT_ERROR_SEND: /* problem with sending */ case REPORT_ERROR_RECEIVE: /* problem with receiving */ pl->conn_close(pl, clid); + /* FALLTHROUGH */ + case REPORT_BOOTSTRAP: /* no plugin initialized yet */ default: if (server) { @@ -1123,7 +1199,7 @@ } else { /* client */ if (pl) { /* deinitialize the broken plugin */ - printf("plugin failed: %s\n", pl->name); + mylog("plugin failed: %s\n", pl->name); pl->deinitialize(pl); /* move to next plugin */ @@ -1133,22 +1209,22 @@ for (; pl; pl = TAILQ_NEXT(pl, plugins)) { /* try to initialize plugin */ - fprintf(stderr, "initalizing plugin: %s...\n", - pl->name); + debug("initalizing plugin: %s...\n", + pl->name); if (((pl->initialize)(pl, server, host, pl->name+4)) == 0) { - fprintf(stderr, "initialized " - "plugin %s\n", pl->name); + mylog("initialized plugin %s\n", + pl->name); set_client_pl(cl, pl); cl->ping_counter = 0; send_echo_request(cl); return; } else { - fprintf(stderr, "plugin %s failed to " + mylog("plugin %s failed to " "initialize\n", pl->name); } } - warnx("all plugins failed, giving up\n"); + mylog("all plugins failed, giving up\n"); cleanup(); } } @@ -1158,27 +1234,17 @@ void cleanup() >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 20 16:44:13 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C74516A469; Mon, 20 Aug 2007 16:44:13 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0506A16A41B for ; Mon, 20 Aug 2007 16:44:13 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E749A13C478 for ; Mon, 20 Aug 2007 16:44:12 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KGiCD3026609 for ; Mon, 20 Aug 2007 16:44:12 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KGiCBN026603 for perforce@freebsd.org; Mon, 20 Aug 2007 16:44:12 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 20 Aug 2007 16:44:12 GMT Message-Id: <200708201644.l7KGiCBN026603@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125424 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 16:44:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=125424 Change 125424 by mharvan@mharvan_bike-planet on 2007/08/20 16:43:13 removed server from plugin_initialize() signature TCP and UDP plugins cleanup Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#12 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#7 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin.h#10 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/plugin_dns.c#4 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_icmp.c#12 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#16 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#12 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp_catchall.c#5 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#12 (text+ko) ==== @@ -1211,8 +1211,8 @@ /* try to initialize plugin */ debug("initalizing plugin: %s...\n", pl->name); - if (((pl->initialize)(pl, server, - host, pl->name+4)) == 0) { + if (((pl->initialize)(pl, host, pl->name+4)) + == 0) { mylog("initialized plugin %s\n", pl->name); set_client_pl(cl, pl); @@ -1349,7 +1349,7 @@ /* initialize all plugins */ TAILQ_FOREACH(pl, &plugins, plugins) { //(void) (pl->initialize)(server, host, port); - (void) (pl->initialize)(pl, server, host, pl->name+4); + (void) (pl->initialize)(pl, host, pl->name+4); // we should unload plugins which fail to initialize } } else { /* client */ ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#7 (text+ko) ==== @@ -48,7 +48,7 @@ /* structure representing a plugin in the main tunnel daemon */ struct plugin { - int (*initialize)(struct plugin*, int, char*, char*); + int (*initialize)(struct plugin*, char*, char*); void (*deinitialize)(struct plugin*); void (*receive)(int fd, short ev_type, void *arg); /* select fired on some fd - check for data */ int (*send)(struct plugin*, uint8_t, char*, int, int, int*); @@ -143,4 +143,9 @@ */ int plugin_custom_send(struct plugin *pl, uint8_t clid, char *data, int len); +/* + * debugging output + */ +int debug(const char *fmt, ...); + #endif ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin.h#10 (text+ko) ==== @@ -72,7 +72,7 @@ * opened. For a client, success means a socket has been connected and * in case of UDP handshake data exchanged. */ -int plugin_initialize(struct plugin *pl, const int server, char *host, char *port); +int plugin_initialize(struct plugin *pl, char *host, char *port); /* * Deinitialize the plugin, close open sockets, unregister them with ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_dns/plugin_dns.c#4 (text+ko) ==== @@ -1,7 +1,38 @@ +/*- + * Copyright (c) 2007 Matus Harvan + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + /* * DNS encapsulation plugin * - * uses iodine source code + * calls functions from iodine source code to do the dns en/decoding */ #include @@ -303,15 +334,8 @@ register_timer_ev(&data->timer_ev); } -/* - * server: 0 - client, 1 - server - * - * Note that udp_connect wil not fail even if the remote endpoint does - * not work. It will fail once we try to send data, so it may be wise - * to first send some handshake data. - */ int -plugin_initialize(struct plugin *pl, const int server, char *host, char *port) +plugin_initialize(struct plugin *pl, char *host, char *port) { struct plugin_dns_data *data = (struct plugin_dns_data*) pl->data; int fd_flags; ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_icmp.c#12 (text+ko) ==== @@ -1,3 +1,34 @@ +/*- + * Copyright (c) 2007 Matus Harvan + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + /* * ICMP encapsulation plugin * @@ -199,15 +230,8 @@ register_timer_ev(&data->timer_ev); } -/* - * server: 0 - client, 1 - server - * - * Note that udp_connect wil not fail even if the remote endpoint does - * not work. It will fail once we try to send data, so it may be wise - * to first send some handshake data. - */ int -plugin_initialize(struct plugin *pl, const int server, char *host, char *port) +plugin_initialize(struct plugin *pl, char *host, char *port) { struct addrinfo hints, *ai; int n; ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#16 (text+ko) ==== @@ -1,3 +1,34 @@ +/*- + * Copyright (c) 2007 Matus Harvan + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include #include #include @@ -22,14 +53,9 @@ #define TEMP_CONN_TIMEOUT 5 #define USE_TCP_CATCHALL 1 -enum { - CONN_STATUS_FREE, /* connection not in use */ - CONN_STATUS_TEMP, /* temporary connection */ - CONN_STATUS_PERM /* permanenet connection */ -}; - #define min(a,b) ( (a>b) ? b : a ) +/* structure representing a connection, one per client */ struct conn { int status; uint8_t clid; @@ -39,16 +65,28 @@ struct plugin_tcp_data *data; }; +enum { + CONN_STATUS_FREE, /* connection not in use */ + CONN_STATUS_TEMP, /* temporary connection */ + CONN_STATUS_PERM /* permanenet connection */ +}; + +/* plugin-specific data */ struct plugin_tcp_data { int state; /* is a client connected? */ - //struct conn conn; /* server - bind fd, client - connect fd */ + /* conns[0]: server - bind fd, client - connect fd */ struct conn conns[MAXCLIENTS]; /* server - accept fds */ struct conn tmpconns[MAXTMPCONNS]; /* server - accept fds */ - struct conn *conn; + struct conn *conn; /* most recently receiving connection */ struct plugin *pl; }; void plugin_accept_new_conn(int fd, short ev_type, void *arg); +void plugin_conn_timeout(int fd, short ev_type, void *arg); +static void conn_discard(struct conn *conn); +void plugin_conn_close(struct plugin *pl, uint8_t clid); +static void conn_update_to_perm(struct plugin_tcp_data *data, + uint8_t clid, int fd); /* * Create a listening TCP endpoint. First get the list of potential @@ -66,7 +104,6 @@ memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; - //hints.ai_family = AF_UNSPEC; hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; @@ -154,7 +191,6 @@ struct timeval tv; memset(&hints, 0, sizeof(hints)); - //hints.ai_family = AF_UNSPEC; hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; @@ -208,7 +244,14 @@ return close(fd); } +/* timer event handler function - used to timeout CONN_TYPE_TEMP connections */ +void +plugin_conn_timeout(int fd, short ev_type, void *arg) +{ + conn_discard(arg); +} +/* close connection */ static void conn_discard(struct conn *conn) { @@ -222,12 +265,77 @@ conn->status = CONN_STATUS_FREE; } +/* close connection - calls conn_discard() */ void -plugin_conn_timeout(int fd, short ev_type, void *arg) +plugin_conn_close(struct plugin *pl, uint8_t clid) +{ + struct plugin_tcp_data *data = pl->data; + if (server) + if (clid == 0) + conn_discard(data->conn); + else + conn_discard(&data->conns[clid]); + else + conn_discard(data->conns); +} + +/* server only - update connection to CONN_TYPE_PERM */ +static void +conn_update_to_perm(struct plugin_tcp_data *data, uint8_t clid, int fd) { - conn_discard(arg); + struct conn *conn = &data->conns[clid]; + + if (conn->clid == clid && conn->fd == fd) + return; /* nothing to do */ + + /* discard previous connection */ + if (conn->status == CONN_STATUS_PERM) + conn_discard(conn); + + /* set up the new connection */ + conn->fd = fd; + conn->clid = clid; + event_set(&conn->ev, conn->fd, EV_PERSIST | EV_READ, + plugin_receive, conn); + event_add(&conn->ev, NULL); + evtimer_set(&conn->timer_ev, plugin_conn_timeout, conn); } +/* server only */ +void +plugin_conn_map(struct plugin *pl, uint8_t clid, int conn_flag) +{ + struct plugin_tcp_data *data = pl->data; + struct conn *conn = data->conn; + int fd; + + if (!server) + return; + + /* update the connection status (server only) */ + switch (conn_flag) { + case CONN_DISCARD: + conn_discard(conn); + return; + + case CONN_TEMP: + break; + + case CONN_PERM: + /* migrate a temporary connection to a permanent one */ + fd = conn->fd; + if (conn->status == CONN_STATUS_TEMP) { + conn->status = CONN_STATUS_FREE; + evtimer_del(&conn->timer_ev); + event_del(&conn->ev); + conn->fd = -1; + } + conn_update_to_perm(data, clid, fd); + break; + } +} + + int plugin_register(struct plugin* pl) { @@ -260,22 +368,15 @@ } } -/* - * server: 0 - client, 1 - server - * - * Note that udp_connect wil not fail even if the remote endpoint does - * not work. It will fail once we try to send data, so it may be wise - * to first send some handshake data. - */ int -plugin_initialize(struct plugin *pl, const int server, - char *host, char *port) +plugin_initialize(struct plugin *pl, char *host, char *port) { struct plugin_tcp_data *data = (struct plugin_tcp_data*) pl->data; int i; data->pl = pl; + /* initialize conns and tmpconns */ for (i = 0; i < MAXCLIENTS; i++) { data->conns[i].status = CONN_STATUS_FREE; data->conns[i].fd = -1; @@ -289,6 +390,7 @@ } data->conn = NULL; + /* open the socket */ if (server) { data->conns->fd = tcp_listen(port); /* enable TCP_CATCHALL */ @@ -338,76 +440,8 @@ data->state = PLUGIN_STATE_UNINITIALIZED; } +/* accept a new connection on the listening fd - called by libevent */ void -plugin_conn_close(struct plugin *pl, uint8_t clid) -{ - struct plugin_tcp_data *data = pl->data; - if (server) - if (clid == 0) - conn_discard(data->conn); - else - conn_discard(&data->conns[clid]); - else - conn_discard(data->conns); -} - -/* server only */ -static void -conn_update_to_perm(struct plugin_tcp_data *data, uint8_t clid, int fd) -{ - struct conn *conn = &data->conns[clid]; - - if (conn->clid == clid && conn->fd == fd) - return; /* nothing to do */ - - /* discard previous connection */ - if (conn->status == CONN_STATUS_PERM) - conn_discard(conn); - - /* set up the new connection */ - conn->fd = fd; - conn->clid = clid; - event_set(&conn->ev, conn->fd, EV_PERSIST | EV_READ, - plugin_receive, conn); - event_add(&conn->ev, NULL); - evtimer_set(&conn->timer_ev, plugin_conn_timeout, conn); -} - -/* server only */ -void -plugin_conn_map(struct plugin *pl, uint8_t clid, int conn_flag) -{ - struct plugin_tcp_data *data = pl->data; - struct conn *conn = data->conn; - int fd; - - if (!server) - return; - - /* update the connection status (server only) */ - switch (conn_flag) { - case CONN_DISCARD: - conn_discard(conn); - return; - - case CONN_TEMP: - break; - - case CONN_PERM: - /* migrate a temporary connection to a permanent one */ - fd = conn->fd; - if (conn->status == CONN_STATUS_TEMP) { - conn->status = CONN_STATUS_FREE; - evtimer_del(&conn->timer_ev); - event_del(&conn->ev); - conn->fd = -1; - } - conn_update_to_perm(data, clid, fd); - break; - } -} - -void plugin_accept_new_conn(int fd, short ev_type, void *arg) { struct plugin_tcp_data *data = ((struct conn *)arg)->data; @@ -415,8 +449,8 @@ int i; struct timeval tv; - //assert(server); - //assert(conn == data->conn); +/* assert(server); */ +/* assert(conn == data->conn); */ /* find a free tmpcopnn to store the connection metadata */ for (i = 0; i < MAXTMPCONNS; i++) @@ -448,7 +482,7 @@ evtimer_add(&conn->timer_ev, &tv); data->conn = conn; - //data->state = PLUGIN_STATE_CONNECTED; + /* data->state = PLUGIN_STATE_CONNECTED; */ } } @@ -464,7 +498,7 @@ uint8_t clid = 0; int conn_flag; - printf("plugin_tcp: plugin_receive(): fd: %d, conn: 0x%x, " + debug("plugin_tcp: plugin_receive(): fd: %d, conn: 0x%x, " "conn->fd: %d\n", fd, (uint32_t)conn, conn->fd); /* get length of the next packet */ @@ -565,4 +599,5 @@ plugin_custom_receive(struct plugin *pl, uint8_t clid, char *data, int len) { + /* nothing to do */ } ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#12 (text+ko) ==== @@ -1,24 +1,69 @@ -#include +/*- + * Copyright (c) 2007 Matus Harvan + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include + +#include #include #include #include +#include #include -#include #include #include #include +#include -#include -#include -#include -#include -#include -//#include -#include - #include "mtund.h" #include "plugin.h" +/* structure representing a connection, one per client */ +struct conn { + struct sockaddr_storage addr; + socklen_t addrlen; +}; + +/* plugin-specific data */ +struct plugin_udp_data { + int state; + int fd; /* udp socket to the other endpoint */ + struct event ev; /* for monitoring fd */ + struct conn conns[MAXCLIENTS]; /* 0 is last conn and client conn */ +}; + /* * Establish a connected UDP endpoint. First get the list of potential * network layer addresses and transport layer port numbers. Iterate @@ -27,56 +72,42 @@ * exists). */ -struct conn { - struct sockaddr_storage addr; - socklen_t addrlen; -}; - -struct plugin_udp_data { - int fd; /* udp socket to the other endpoint */ - struct event ev; - int state; - struct conn conns[MAXCLIENTS]; /* 0 is last conn and client conn */ -}; - static int udp_connect(char *host, char *port) { - struct addrinfo hints, *ai_list, *ai; - int n, fd = 0; + struct addrinfo hints, *ai_list, *ai; + int n, fd = 0; - memset(&hints, 0, sizeof(hints)); - //hints.ai_family = AF_UNSPEC; - hints.ai_family = AF_INET; - hints.ai_socktype = SOCK_DGRAM; - - n = getaddrinfo(host, port, &hints, &ai_list); - if (n) { - fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(n)); - exit(EXIT_FAILURE); - } - - for (ai = ai_list; ai; ai = ai->ai_next) { - fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); - if (fd < 0) { - continue; - } - if (connect(fd, ai->ai_addr, ai->ai_addrlen) == 0) { - break; - } - close(fd); - } - - freeaddrinfo(ai_list); - - if (ai == NULL) { - fprintf(stderr, "socket or connect: failed for %s port %s\n", - host, port); -// exit(EXIT_FAILURE); + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_DGRAM; + + n = getaddrinfo(host, port, &hints, &ai_list); + if (n) { + fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(n)); + exit(EXIT_FAILURE); + } + + for (ai = ai_list; ai; ai = ai->ai_next) { + fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); + if (fd < 0) { + continue; + } + if (connect(fd, ai->ai_addr, ai->ai_addrlen) == 0) { + break; + } + close(fd); + } + + freeaddrinfo(ai_list); + + if (ai == NULL) { + fprintf(stderr, "socket or connect: failed for %s port %s\n", + host, port); return -1; - } - - return fd; + } + + return fd; } /* @@ -89,42 +120,41 @@ static int udp_open(char *port) { - struct addrinfo hints, *ai_list, *ai; - int n, fd = 0, on = 1; - - memset(&hints, 0, sizeof(hints)); - hints.ai_flags = AI_PASSIVE; - //hints.ai_family = AF_UNSPEC; - hints.ai_family = AF_INET; - hints.ai_socktype = SOCK_DGRAM; - - n = getaddrinfo(NULL, port, &hints, &ai_list); - if (n) { - fprintf(stderr, "getaddrinfo failed: %s\n", gai_strerror(n)); - return -1; - } - - for (ai = ai_list; ai; ai = ai->ai_next) { - fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); - if (fd < 0) { - continue; - } - - setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); - if (bind(fd, ai->ai_addr, ai->ai_addrlen) == 0) { - break; - } - close(fd); - } - - freeaddrinfo(ai_list); - - if (ai == NULL) { - fprintf(stderr, "bind failed for port %s\n", port); - return -1; - } - - return fd; + struct addrinfo hints, *ai_list, *ai; + int n, fd = 0, on = 1; + + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_PASSIVE; + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_DGRAM; + + n = getaddrinfo(NULL, port, &hints, &ai_list); + if (n) { + fprintf(stderr, "getaddrinfo failed: %s\n", gai_strerror(n)); + return -1; + } + + for (ai = ai_list; ai; ai = ai->ai_next) { + fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); + if (fd < 0) { + continue; + } + + setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); + if (bind(fd, ai->ai_addr, ai->ai_addrlen) == 0) { + break; + } + close(fd); + } + + freeaddrinfo(ai_list); + + if (ai == NULL) { + fprintf(stderr, "bind failed for port %s\n", port); + return -1; + } + + return fd; } /* @@ -139,27 +169,6 @@ } -/* static struct client * */ -/* lookup_addr(struct plugin_udp_data *data, */ -/* struct sockaddr *addr, socklen_t addrlen) */ -/* { */ -/* struct client *p; */ -/* LIST_FOREACH(p, &data->clientl, clients) */ -/* if (memcmp(addr, &p->addr, addrlen) == 0) */ -/* return p; */ -/* return NULL; */ -/* } */ - -/* static struct client * */ -/* lookup_clid(struct plugin_udp_data *data, clientid_t clid) */ -/* { */ -/* struct conn *p; */ -/* LIST_FOREACH(p, &data->conns, conns) */ -/* if (p->clid == clid) */ -/* return p; */ -/* return NULL; */ -/* } */ - int plugin_register(struct plugin* pl) { pl->name = "udp"; pl->mtu = 1400; @@ -190,18 +199,9 @@ } } -/* - * server: 0 - client, 1 - server - * - * Note that udp_connect wil not fail even if the remote endpoint does - * not work. It will fail once we try to send data, so it may be wise - * to first send some handshake data. - */ int -plugin_initialize(struct plugin *pl, const int server, - char *host, char *port) +plugin_initialize(struct plugin *pl, char *host, char *port) { - //int n = 0; struct plugin_udp_data *data = (struct plugin_udp_data*)pl->data; if (server == 1) { @@ -242,7 +242,6 @@ int conn_flag; uint8_t clid = 0; - //memset(conn, 0, sizeof(*conn)); conn->addrlen = sizeof(conn->addr); n = recvfrom(data->fd, packet, sizeof(packet), 0, (struct sockaddr *) &conn->addr, &conn->addrlen); @@ -270,11 +269,6 @@ } process_data_from_plugin(pl, packet, n, &clid, &conn_flag); - -/* if (conn_flag == CONN_PERM && clid != 0) { */ -/* printf("plugin_send: CONN_PERM, clid: %hhd, updating...\n", clid); */ -/* memcpy(&data->conns[clid], conn, sizeof(*conn)); */ -/* } */ } int @@ -298,10 +292,8 @@ if (!server) return; - if (conn_flag == CONN_PERM && clid != 0) { - printf("plugin_idp: conn_map(): CONN_PERM, clid: %hhd\n",clid); + if (conn_flag == CONN_PERM && clid != 0) memcpy(&data->conns[clid], data->conns, sizeof(struct conn)); - } } int @@ -312,7 +304,6 @@ int nwrite = 0; struct conn *conn = &(datapl->conns[clid]); - printf("plugin_send: clid: %hhd\n", clid); if (server) { nwrite = sendto(datapl->fd, data, len, 0, (struct sockaddr*)&conn->addr, @@ -326,14 +317,11 @@ } } else { /* client */ if (datapl->state != PLUGIN_STATE_CONNECTED) { - fprintf(stderr, "not connected yet, " - "discarding data\n"); + debug("not connected yet, discarding data\n"); return (SEND_ERROR); } else { *consumed = nwrite; nwrite = send(datapl->fd, data, len, 0); - fprintf(stderr, "plugin_send: send returned %d\n", - nwrite); } return (SEND_PKT_SENT); } @@ -343,4 +331,5 @@ plugin_custom_receive(struct plugin *pl, uint8_t clid, char *data, int len) { + /* nothing to do */ } ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp_catchall.c#5 (text+ko) ==== @@ -1,3 +1,34 @@ +/*- + * Copyright (c) 2007 Matus Harvan + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include #include @@ -119,8 +150,7 @@ * to first send some handshake data. */ int -plugin_initialize(struct plugin *pl, const int server, - char *host, char *port) +plugin_initialize(struct plugin *pl, char *host, char *port) { struct plugin_udpall_data *data = pl->data; struct sockaddr_in sa; From owner-p4-projects@FreeBSD.ORG Mon Aug 20 16:44:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 241D716A52A; Mon, 20 Aug 2007 16:44:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC0AC16A515 for ; Mon, 20 Aug 2007 16:44:13 +0000 (UTC) (envelope-from sat@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 48A6813C45D for ; Mon, 20 Aug 2007 16:44:13 +0000 (UTC) (envelope-from sat@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KGiDtj026619 for ; Mon, 20 Aug 2007 16:44:13 GMT (envelope-from sat@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KGiCjB026612 for perforce@freebsd.org; Mon, 20 Aug 2007 16:44:12 GMT (envelope-from sat@freebsd.org) Date: Mon, 20 Aug 2007 16:44:12 GMT Message-Id: <200708201644.l7KGiCjB026612@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sat@freebsd.org using -f From: Andrew Pantyukhin To: Perforce Change Reviews Cc: Subject: PERFORCE change 125425 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 16:44:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=125425 Change 125425 by sat@sat_amilo on 2007/08/20 16:43:40 - Make "yes" case-insensitive Affected files ... .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#25 edit Differences ... ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#25 (text+ko) ==== @@ -116,7 +116,7 @@ USE_PERL5_STRING= yes .endif -.if ${USE_PERL5_STRING} != "yes" +.if ${USE_PERL5_STRING:L} != "yes" want_perl_sign= ${USE_PERL5_STRING:C|^[0-9.]+||} want_perl_ver= ${USE_PERL5_STRING:S|${want_perl_sign}$||} want_perl_major= ${want_perl_ver:C|\..*||} @@ -153,7 +153,7 @@ .else # wrong suffix IGNORE= improper use of USE_PERL5 .endif -.endif #${USE_PERL5_STRING} != "yes" +.endif #${USE_PERL5_STRING:L} != "yes" SITE_PERL_REL?= lib/perl5/site_perl/${PERL_VER} SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL} From owner-p4-projects@FreeBSD.ORG Mon Aug 20 16:52:24 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 948E716A421; Mon, 20 Aug 2007 16:52:24 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5185616A41B for ; Mon, 20 Aug 2007 16:52:24 +0000 (UTC) (envelope-from fabio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3259D13C4A3 for ; Mon, 20 Aug 2007 16:52:24 +0000 (UTC) (envelope-from fabio@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KGqOOB038712 for ; Mon, 20 Aug 2007 16:52:24 GMT (envelope-from fabio@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KGqNJT038706 for perforce@freebsd.org; Mon, 20 Aug 2007 16:52:23 GMT (envelope-from fabio@FreeBSD.org) Date: Mon, 20 Aug 2007 16:52:23 GMT Message-Id: <200708201652.l7KGqNJT038706@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fabio@FreeBSD.org using -f From: Fabio Checconi To: Perforce Change Reviews Cc: Subject: PERFORCE change 125426 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 16:52:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=125426 Change 125426 by fabio@fabio_gror on 2007/08/20 16:51:50 Update the perforce repository with the snapshot that will be reviewed for the SoC evaluation. The project is tracked with git: http://feanor.sssup.it/~fabio/git/?p=soc07.git Affected files ... .. //depot/projects/soc2007/fabio-lkvm/README#1 add .. //depot/projects/soc2007/fabio-lkvm/kvm-17/configure#2 edit .. //depot/projects/soc2007/fabio-lkvm/kvm-17/qemu/configure#2 edit .. //depot/projects/soc2007/fabio-lkvm/kvm-17/qemu/exec.c#2 edit .. //depot/projects/soc2007/fabio-lkvm/kvm-17/qemu/vl.c#2 edit .. //depot/projects/soc2007/fabio-lkvm/kvm-17/user/configure#2 edit .. //depot/projects/soc2007/fabio-lkvm/kvm-17/user/kvmctl.c#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/bitops.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/bug.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/current.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/desc.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/highmem.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/io.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/msr.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/processor.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/segment.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/semaphore.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/system.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/topology.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/types.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/ldev_stub.c#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/ldev_stub.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/dcache.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/file.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/fs.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/gfp.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/interrupt.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/mm.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/module.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/mutex.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/page.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/sched.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/signal.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/smp.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/spinlock.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/vmalloc.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/linux_compat/linux_compat.c#2 edit .. //depot/projects/soc2007/fabio-lkvm/lkvm/Makefile.kld#2 edit .. //depot/projects/soc2007/fabio-lkvm/lkvm/include/linux/kvm.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/lkvm/kvm.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/lkvm/kvm_main.c#2 edit .. //depot/projects/soc2007/fabio-lkvm/lkvm/mmu.c#2 edit .. //depot/projects/soc2007/fabio-lkvm/lkvm/paging_tmpl.h#2 edit .. //depot/projects/soc2007/fabio-lkvm/lkvm/svm.c#2 edit .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-90_security#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-Makefile#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-PRId64#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-aa#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-audio-4#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-audio::ossaudio.c#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-bc#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-bd#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-be#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-bf#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-bg#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-bh#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-bk#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-block-qcow2.c#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-block-raw.c#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-block.c#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-bsdusb.patch#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-bt#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-fbsd#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-fpu-softfloat-native.c#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-libmath#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-libmath2#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-libmath4#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-osdep.c#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-qemu-img.c#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-qemu-img.texi#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-target-mips-cpu.h#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-vl.c#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-vl.c-nographic#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-vl.c-ppbus#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-vl.c-serial#1 add .. //depot/projects/soc2007/fabio-lkvm/patches/qemu/patch-x_keymap.c#1 add Differences ... ==== //depot/projects/soc2007/fabio-lkvm/kvm-17/configure#2 (xtext/text+ko) ==== ==== //depot/projects/soc2007/fabio-lkvm/kvm-17/qemu/configure#2 (xtext/text+ko) ==== ==== //depot/projects/soc2007/fabio-lkvm/kvm-17/qemu/exec.c#2 (text+ko) ==== @@ -42,6 +42,7 @@ //#define DEBUG_FLUSH //#define DEBUG_TLB //#define DEBUG_UNASSIGNED +#define DEBUG_IOPORT /* make various TB consistency checks */ //#define DEBUG_TB_CHECK ==== //depot/projects/soc2007/fabio-lkvm/kvm-17/qemu/vl.c#2 (text+ko) ==== @@ -106,8 +106,8 @@ #endif #endif -//#define DEBUG_UNUSED_IOPORT -//#define DEBUG_IOPORT +#define DEBUG_UNUSED_IOPORT +#define DEBUG_IOPORT #define PHYS_RAM_MAX_SIZE (2047 * 1024 * 1024) ==== //depot/projects/soc2007/fabio-lkvm/kvm-17/user/configure#2 (xtext/text+ko) ==== ==== //depot/projects/soc2007/fabio-lkvm/kvm-17/user/kvmctl.c#2 (text+ko) ==== @@ -36,6 +36,36 @@ /* FIXME: or dynamically alloc/realloc regions */ #define KVM_MAX_NUM_MEM_REGIONS 4u +#ifndef __FreeBSD__ +#define kvm_mmap mmap +#else +/* + * On FreeBSD we cannot hook the mmap call, so we turn it into + * something else... + */ +static inline void * +kvm_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t pos) +{ + struct kvm_mmap_args args; + int r; + + args.addr = addr; + args.len = len; + args.prot = prot; + args.flags = flags; + args.fd = fd; + args.pos = pos; + + r = ioctl(fd, KVM_VM_MMAP, &args); + + if (r == 0) + return args.retval; + + errno = r; + return MAP_FAILED; +} +#endif + /** * \brief The KVM context * @@ -268,7 +298,7 @@ kvm_memory_region_save_params(kvm, &low_memory); kvm_memory_region_save_params(kvm, &extended_memory); - *vm_mem = mmap(0, memory, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + *vm_mem = kvm_mmap(0, memory, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (*vm_mem == MAP_FAILED) { fprintf(stderr, "mmap: %m\n"); return -1; @@ -312,7 +342,7 @@ if (writable) prot |= PROT_WRITE; - ptr = mmap(0, len, prot, MAP_SHARED, fd, phys_start); + ptr = kvm_mmap(0, len, prot, MAP_SHARED, fd, phys_start); if (ptr == MAP_FAILED) return 0; return ptr; @@ -338,7 +368,7 @@ log.u.dirty_bitmap = buf; - r = ioctl(kvm->vm_fd, ioctl_num, &log); + r = ioctl(kvm->vm_fd, (unsigned long)ioctl_num, &log); if (r == -1) return -errno; return 0; @@ -538,19 +568,23 @@ sizer.nmsrs = 0; r = ioctl(kvm->fd, KVM_GET_MSR_INDEX_LIST, &sizer); -#ifndef __FreeBSD__ +#ifdef __FreeBSD__ + if (sizer.error != 0) { + r = -1; + errno = -sizer.error; + } +#endif if (r == -1 && errno != E2BIG) return 0; -#else - if (r == -1 || sizer.error != E2BIG) - return 0; -#endif msrs = malloc(sizeof *msrs + sizer.nmsrs * sizeof *msrs->indices); if (!msrs) { errno = ENOMEM; return 0; } msrs->nmsrs = sizer.nmsrs; +#ifdef __FreeBSD__ + msrs->indices = (__u32 *)&msrs[1]; +#endif r = ioctl(kvm->fd, KVM_GET_MSR_INDEX_LIST, msrs); if (r == -1) { e = errno; @@ -773,6 +807,14 @@ kvm_run.emulated = 0; kvm_run.mmio_completed = 0; + +#ifdef __FreeBSD__ + if (kvm_run.error != 0) { + r = -1; + errno = -kvm_run.error; + } +#endif + if (r == -1 && errno != EINTR) { r = -errno; printf("kvm_run: %m\n"); ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/bitops.h#2 (text+ko) ==== @@ -1,26 +1,41 @@ #ifndef _LINUX_ASM_BITOPS_H #define _LINUX_ASM_BITOPS_H +#include + +/* + * In Linux (at least i386/amd64) this is undefined if word is zero. + */ static inline unsigned long __ffs(unsigned long word) { - return 0; + int i; + + for (i = 0; i < sizeof(word) * 8; i++) + if (word & (1UL << i)) + break; + + return i; } -static inline void set_bit(int nr, volatile unsigned long *addr) -{ -} +/* + * XXX this should be atomic (so it should be defined in an + * arch-dependent way) + */ +#define set_bit(nr, addr) __set_bit(nr, addr) static inline void __set_bit(int nr, volatile unsigned long *addr) { + addr[nr / __LONG_BIT] |= 1UL << (nr % __LONG_BIT); } -static inline int test_bit(int nr, const volatile void *addr) +static inline int test_bit(int nr, const volatile unsigned long *addr) { - return 0; + return (addr[nr / __LONG_BIT] & (1UL << (nr % __LONG_BIT))) != 0; } static inline void clear_bit(int nr, volatile unsigned long *addr) { + addr[nr / __LONG_BIT] &= ~(1UL << (nr % __LONG_BIT)); } #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/bug.h#2 (text+ko) ==== @@ -1,6 +1,9 @@ #ifndef _LINUX_ASM_BUG_H #define _LINUX_ASM_BUG_H -#define BUG_ON(condition) +#define BUG_ON(condition) do { \ + if ((condition)) \ + panic("BUG\n"); \ +} while(0) #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/current.h#2 (text+ko) ==== @@ -1,11 +1,15 @@ #ifndef _LINUX_CURRENT_H #define _LINUX_CURRENT_H -struct task_struct; +/* + * XXX should really do something better, this makes little or no + * sense when we have more than one caller... + */ +extern struct task_struct __current; static inline struct task_struct *get_current(void) { - return 0; + return &__current; } #define current get_current() ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/desc.h#2 (text+ko) ==== @@ -2,6 +2,7 @@ #define _LINUX_ASM_DESC_H #include +#include struct Xgt_desc_struct { unsigned short size; @@ -9,6 +10,12 @@ unsigned short pad; } __attribute__((packed)); -#define load_TR_desc() +static inline void load_TR_desc(void) +{ + int gsel_tss; + + gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); + ltr(gsel_tss); +} #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/highmem.h#2 (text+ko) ==== @@ -3,10 +3,11 @@ #include #include +#include static inline void *kmap_atomic(struct page *page, enum km_type type) { - return 0; + return (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page->vm_page)); } static inline void kunmap_atomic(void *kvaddr, enum km_type type) ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/io.h#2 (text+ko) ==== @@ -1,9 +1,8 @@ #ifndef _LINUX_ASM_IO_H #define _LINUX_ASM_IO_H -static inline unsigned long virt_to_phys(volatile void *address) -{ - return 0; -} +#include + +#define virt_to_phys(address) __pa(address) #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/msr.h#2 (text+ko) ==== @@ -13,33 +13,35 @@ * pointer indirection), this allows gcc to optimize better */ -#define rdmsr_compat(msr,val1,val2) \ - __asm__ __volatile__("rdmsr" \ - : "=a" (val1), "=d" (val2) \ - : "c" (msr)) +#define rdmsr_compat(msr,val1,val2) \ + __asm__ __volatile__("rdmsr" \ + : "=a" (val1), "=d" (val2) \ + : "c" (msr)) -#define wrmsr_compat(msr,val1,val2) \ - __asm__ __volatile__("wrmsr" \ - : /* no outputs */ \ - : "c" (msr), "a" (val1), "d" (val2)) +#define wrmsr_compat(msr,val1,val2) \ + __asm__ __volatile__("wrmsr" \ + : /* no outputs */ \ + : "c" (msr), "a" (val1), "d" (val2)) #define rdmsrl(msr, val) ((val) = rdmsr(msr)) #define wrmsrl(msr, val) wrmsr(msr, val) /* wrmsr with exception handling */ -#define wrmsr_safe(msr,a,b) ({ int ret__; \ - asm volatile("2: wrmsr ; xorl %0,%0\n" \ - "1:\n\t" \ - ".section .fixup,\"ax\"\n\t" \ - "3: movl %4,%0 ; jmp 1b\n\t" \ - ".previous\n\t" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n\t" \ - " .long 2b,3b\n\t" \ - ".previous" \ - : "=a" (ret__) \ - : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT));\ - ret__; }) +static inline int wrmsr_safe(u_int msr, u_int32_t low, u_int32_t high) +{ + int ret = -EFAULT; + + __asm__ __volatile__("movq $1f, %4\n" + "wrmsr\n" + "movl $0, %0\n" + "1:\n" + : "=m"(ret) + : "a"(low), "c"(msr), "d"(high), + "m"(PCPU_GET(curpcb)->pcb_onfault)); + + PCPU_GET(curpcb)->pcb_onfault = NULL; + return ret; +} /* rdmsr with exception handling */ static inline int rdmsr_safe(u_int msr, u_int32_t *low, u_int32_t *high) @@ -47,12 +49,12 @@ int ret = -EFAULT; __asm__ __volatile__("movq $1f, %4\n" - "rdmsr\n" - "movl $0, %3\n" - "1:\n" - : "=a"(*low), "=d"(*high) - : "c"(msr), "m"(ret), - "m"(PCPU_GET(curpcb)->pcb_onfault)); + "rdmsr\n" + "movl $0, %2\n" + "1:\n" + : "=a"(*low), "=d"(*high), "=m"(ret) + : "c"(msr), + "m"(PCPU_GET(curpcb)->pcb_onfault)); PCPU_GET(curpcb)->pcb_onfault = NULL; return ret; ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/processor.h#2 (text+ko) ==== @@ -41,8 +41,8 @@ #define boot_cpu_data (get_boot_cpu_data()) static inline void cpuid(unsigned int op, unsigned int *eax, - unsigned int *ebx, unsigned int *ecx, - unsigned int *edx) + unsigned int *ebx, unsigned int *ecx, + unsigned int *edx) { __asm __volatile("cpuid" : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) @@ -51,12 +51,18 @@ static inline unsigned int cpuid_ebx(unsigned int op) { - return 0; + unsigned int r[4]; + + cpuid(op, &r[0], &r[1], &r[2], &r[3]); + return r[1]; } static inline unsigned int cpuid_ecx(unsigned int op) { - return 0; + unsigned int r[4]; + + cpuid(op, &r[0], &r[1], &r[2], &r[3]); + return r[2]; } static inline void set_debugreg(int regno, unsigned long value) @@ -64,7 +70,7 @@ } struct desc_struct { - unsigned long a, b; + unsigned int a, b; }; #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/segment.h#2 (text+ko) ==== @@ -1,10 +1,12 @@ #ifndef _LINUX_ASM_SEGMENT_H #define _LINUX_ASM_SEGMENT_H -#define GDT_ENTRY_TSS 0 +#include + +#define GDT_ENTRY_TSS GPROC0_SEL -#define __KERNEL_CS 0 -#define __KERNEL_DS 0 -#define __USER_DS 0 +#define __KERNEL_CS GSEL(GCODE_SEL, SEL_KPL) +#define __KERNEL_DS GSEL(GDATA_SEL, SEL_KPL) +#define __USER_DS GSEL(GUDATA_SEL, SEL_UPL) #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/semaphore.h#2 (text+ko) ==== @@ -1,26 +1,30 @@ -/* - * stub for asm/semaphore.h - */ - #ifndef _LINUX_ASM_SEMAPHORE_H #define _LINUX_ASM_SEMAPHORE_H -#include -#if 1 /* freebsd semaphores */ +#include +#include +#include -#include +/* + * We don't know when the semaphore object is destroyed, since in + * Linux there is no explicit call to notify this, so or we modify + * drivers to include a destructor code, or we leak some memory. + * We have the same problem with spinlocks. + * + * XXX By now just ignore that. + */ struct semaphore { - struct mtx m; + struct sema sema; }; static inline void init_MUTEX(struct semaphore *sem) { - mtx_init(&sem->m, "ldev", NULL, MTX_DEF); + //sema_init(&sem->sema, 1, "lkc-mutex"); } static inline void down(struct semaphore *sem) { - mtx_lock(&sem->m); + //sema_wait(&sem->sema); } static inline int down_interruptible(struct semaphore *sem) @@ -31,57 +35,7 @@ static inline void up(struct semaphore *sem) { - mtx_unlock(&sem->m); -} - -#else /* linux semaphores */ -/* from asm/semaphore.h */ -struct semaphore { - atomic_t count; - int sleepers; - wait_queue_head_t wait; -}; - -static inline void sema_init (struct semaphore *sem, int val) -{ -/* - * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); - * - * i'd rather use the more flexible initialization above, but sadly - * GCC 2.7.2.3 emits a bogus warning. EGCS doesn't. Oh well. - */ - atomic_set(&sem->count, val); - sem->sleepers = 0; - init_waitqueue_head(&sem->wait); -} - -static inline void init_MUTEX (struct semaphore *sem) -{ - sema_init(sem, 1); -} - -static inline void up(struct semaphore *sem) -{ - // XXX to be filled + //sema_post(&sem->sema); } -static inline void down(struct semaphore *sem) -{ - // XXX to be filled -} - -static inline int down_interruptible(struct semaphore *sem) -{ - down(sem); - return 0; -} - -/* these are fake implementation to be fixed */ -#define spin_lock(sem) do {} while (0) -#define spin_lock_irq(sem) do {} while (0) -#define spin_lock_irqsave(sem, flags) do {flags = 0;} while (0) -#define spin_unlock_irqrestore(sem, flags) do {} while (0) -#define spin_unlock(sem) do {} while (0) -#define spin_unlock_irq(sem) do {} while (0) -#endif #endif /* _LINUX_ASM_SEMAPHORE_H */ ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/system.h#2 (text+ko) ==== @@ -1,22 +1,12 @@ #ifndef _LINUX_ASM_SYSTEM_H #define _LINUX_ASM_SYSTEM_H -static inline void write_cr4(unsigned int val) -{ -} +#include -static inline unsigned long read_cr0(void) -{ - return 0; -} +#define write_cr4(val) load_cr4(val) -static inline unsigned long read_cr3(void) -{ - return 0; -} -static inline unsigned long read_cr4(void) -{ - return 0; -} +#define read_cr0() rcr0() +#define read_cr3() rcr3() +#define read_cr4() rcr4() #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/topology.h#2 (text+ko) ==== @@ -1,9 +1,6 @@ #ifndef _LINUX_ASM_TOPOLOGY_H #define _LINUX_ASM_TOPOLOGY_H -static inline int cpu_to_node(int cpu) -{ - return 0; -} +#define cpu_to_node(cpu) (cpu) #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/asm/types.h#2 (text+ko) ==== @@ -1,6 +1,8 @@ #ifndef _I386_TYPES_H #define _I386_TYPES_H +#include + #ifndef __ASSEMBLY__ typedef unsigned short umode_t; @@ -31,7 +33,7 @@ */ #ifdef __KERNEL__ -#define BITS_PER_LONG 32 +#define BITS_PER_LONG __LONG_BIT #ifndef __ASSEMBLY__ ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/ldev_stub.c#2 (text+ko) ==== @@ -275,7 +275,7 @@ sc->sc_dev_t = make_dev(&ldev_cdevsw, unit, UID_ROOT, GID_OPERATOR, 0666, "%s%d", DEV_NAME, unit); /* call the attach routine (where ???) */ - usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->udev,USBDEV(sc->sc_dev)); + usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->udev,sc->sc_dev); return 0; /* success */ } @@ -294,7 +294,7 @@ selwakeuppri(&sc->rsel,PZERO); } device_printf(sc->sc_dev, "Disconnected while device is in use!\n"); - usb_detach_wait(USBDEV(sc->sc_dev)); + usb_detach_wait(sc->sc_dev); } /* free resources etc. */ if (sc->l_u_d.mem) /* memory allocated for linux emulation */ @@ -304,12 +304,12 @@ mtx_destroy(&sc->ptrlock); /* free memory ? */ - usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->udev,USBDEV(sc->sc_dev)); + usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->udev,sc->sc_dev); return 0; } static int -ldev_open(struct cdev *dev, int flag, int mode, usb_proc_ptr p) +ldev_open(struct cdev *dev, int flag, int mode, struct thread *p) { int err = 0; int unit = LDEVUNIT(dev); @@ -340,7 +340,7 @@ /* Watch out for races between close and detach */ static int -ldev_close(struct cdev *dev, int flag, int mode, usb_proc_ptr p) +ldev_close(struct cdev *dev, int flag, int mode, struct thread *p) { int unit = LDEVUNIT(dev); struct ldev_softc *sc = devclass_get_softc(ldev_devclass, unit); @@ -352,7 +352,7 @@ err = -sc->l_u_d.fops->release((struct inode *)sc, &sc->l_u_d.file); sc->vopen = 0; - usb_detach_wakeup(USBDEV(sc->sc_dev)); /* if a detach is pending */ + usb_detach_wakeup(sc->sc_dev); /* if a detach is pending */ return err; } @@ -405,7 +405,8 @@ #include static int -ldev_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) +ldev_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *p) { int unit = LDEVUNIT(dev); struct ldev_softc *sc = devclass_get_softc(ldev_devclass, unit); @@ -434,7 +435,7 @@ /* XXX this is still incomplete */ static int -ldev_poll(struct cdev *dev, int events, usb_proc_ptr p) +ldev_poll(struct cdev *dev, int events, struct thread *p) { int unit = LDEVUNIT(dev); struct ldev_softc *sc = devclass_get_softc(ldev_devclass, unit); ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/ldev_stub.h#2 (text+ko) ==== @@ -64,6 +64,7 @@ // #include #include +#include #include #include ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/dcache.h#2 (text+ko) ==== @@ -3,12 +3,12 @@ #include +struct inode; + struct dentry { + struct inode *d_inode; }; -static inline struct dentry *d_alloc_anon(struct inode *ino) -{ - return 0; -} +#define d_alloc_anon(inode) kzalloc(sizeof(struct dentry), GFP_KERNEL) #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/file.h#2 (text+ko) ==== @@ -1,19 +1,13 @@ #ifndef _LINUX_FILE_H #define _LINUX_FILE_H -struct file; +#include -static inline void fput(struct file *filp) +static inline void fput(struct linux_file *filp) { } -static inline int get_unused_fd(void) -{ - return 0; -} - -static inline void fd_install(unsigned int fd, struct file *filp) -{ -} +int get_unused_fd(void); +void fd_install(int fd, struct linux_file *filp); #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/fs.h#2 (text+ko) ==== @@ -33,6 +33,9 @@ #include #include +#include +#include + /* * $Id: fs.h,v 1.4 2007/01/27 16:52:28 luigi Exp $ * Prototype of the struct file_operations used in device drivers. @@ -45,7 +48,7 @@ struct address_space; /* from file.h */ -struct file { +struct linux_file { struct path f_path; const struct file_operations *f_op; atomic_t f_count; @@ -57,6 +60,13 @@ void *private_data; }; +/* + * XXX that's quite dirty, from now on all `file' identifiers will be + * replaced with linux_file. this may cause *a lot* of nasty things + * and hard to find errors, but should work for KVM. + */ +#define file linux_file + // struct kiocb; /* in aio.h */ struct poll_table_struct; // XXX dummy // struct dentry; // XXX dummy @@ -128,10 +138,7 @@ { } -static inline struct file *get_empty_filp(void) -{ - return 0; -} +#define get_empty_filp() kzalloc(sizeof(struct file), GFP_KERNEL) struct super_block; struct super_operations; @@ -164,10 +171,7 @@ return 0; } -static inline struct inode *new_inode(struct super_block *sb) -{ - return 0; -} +#define new_inode(sb) kzalloc(sizeof(struct inode), GFP_KERNEL) static inline struct vfsmount *kern_mount(struct file_system_type *fs_type) { ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/gfp.h#2 (text+ko) ==== @@ -16,9 +16,9 @@ struct page *alloc_pages(gfp_t gfp_mask, unsigned int order); static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, - unsigned int order) + unsigned int order) { - return 0; + return alloc_pages(gfp_mask, order); } static inline void free_pages(unsigned long addr, unsigned int order) ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/interrupt.h#2 (text+ko) ==== @@ -1,12 +1,9 @@ #ifndef _LINUX_INTERRUPT_H #define _LINUX_INTERRUPT_H -static inline void local_irq_enable(void) -{ -} +#include -static inline void local_irq_disable(void) -{ -} +#define local_irq_enable() enable_intr() +#define local_irq_disable() disable_intr() #endif ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/mm.h#2 (text+ko) ==== @@ -95,14 +95,33 @@ int remap_pfn_range(struct vm_area_struct *, unsigned long addr, unsigned long pfn, unsigned long size, pgprot_t); -#define page_address(page) ((void *)__va(VM_PAGE_TO_PHYS(page->vm_page))) +static inline void *page_address(struct page *page) +{ +#ifdef DEBUG_ADDR + KASSERT(pfn_to_page(page_to_pfn(page)) == page, ("page_address")); +#endif + return __va(VM_PAGE_TO_PHYS(page->vm_page)); +} static inline void get_page(struct page *page) { } -#define page_private(page) ((unsigned long)page) -#define set_page_private(page, v) ((page)->private = (v)) +static inline unsigned long page_private(struct page *page) +{ +#ifdef DEBUG_ADDR + KASSERT(pfn_to_page(page_to_pfn(page)) == page, ("page_private")); +#endif + return page->private; +} + +static inline void set_page_private(struct page *page, unsigned long v) +{ +#ifdef DEBUG_ADDR + KASSERT(pfn_to_page(page_to_pfn(page)) == page, ("set_page_private")); +#endif + page->private = v; +} /* XXX this should not be done so late! */ #include ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/module.h#2 (text+ko) ==== @@ -145,7 +145,7 @@ dev->priv = data; } -struct file; +#include struct inode; struct video_device* video_devdata(struct file*); @@ -208,13 +208,18 @@ /* make this non blocking */ #define kmalloc(siz,opt) malloc(siz, M_USBDEV, M_NOWAIT) -#define kfree(pt) free(pt, M_USBDEV) +#define kfree(pt) do { \ + if (curthread->td_critnest == 0) \ + free(pt, M_USBDEV); \ +} while (0) #define HZ hz // on freebsd... #define udelay(t) DELAY(t) void linux_msleep(int ms); #define msleep_compat(ms) linux_msleep(ms) +#undef msleep +#define msleep(ms) linux_msleep(ms) // #define mdelay(ms) linux_msleep(ms) // maybe DELAY... */ #define mdelay(ms) DELAY(ms) // maybe DELAY... */ ==== //depot/projects/soc2007/fabio-lkvm/linux_compat/linux/mutex.h#2 (text+ko) ==== @@ -9,16 +9,16 @@ struct mtx m; }; -#define mutex_init(_m) mtx_init(&(_m)->m, "ldev", NULL, MTX_DEF) -#define mutex_lock(_m) mtx_lock(&(_m)->m) +#define mutex_init(_m) //mtx_init(&(_m)->m, "ldev", NULL, MTX_DEF) +#define mutex_lock(_m) //mtx_lock(&(_m)->m) static inline int mutex_lock_interruptible(struct mutex *_m) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 20 16:56:30 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 59B3116A41B; Mon, 20 Aug 2007 16:56:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F03E16A418 for ; Mon, 20 Aug 2007 16:56:30 +0000 (UTC) (envelope-from sat@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 05AFA13C474 for ; Mon, 20 Aug 2007 16:56:30 +0000 (UTC) (envelope-from sat@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KGuTdf040545 for ; Mon, 20 Aug 2007 16:56:29 GMT (envelope-from sat@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KGuTp8040542 for perforce@freebsd.org; Mon, 20 Aug 2007 16:56:29 GMT (envelope-from sat@freebsd.org) Date: Mon, 20 Aug 2007 16:56:29 GMT Message-Id: <200708201656.l7KGuTp8040542@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sat@freebsd.org using -f From: Andrew Pantyukhin To: Perforce Change Reviews Cc: Subject: PERFORCE change 125427 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 16:56:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=125427 Change 125427 by sat@sat_amilo on 2007/08/20 16:55:41 - Readd USE_PERL5=yes if PERL_CONFIGURE is defined Affected files ... .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#26 edit Differences ... ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#26 (text+ko) ==== @@ -187,6 +187,7 @@ .endif # defined(PERL_MODBUILD) .if defined(PERL_CONFIGURE) +USE_PERL5= yes .if defined(BATCH) && !defined(IS_INTERACTIVE) CONFIGURE_ENV+= PERL_MM_USE_DEFAULT="YES" .endif # defined(BATCH) && !defined(IS_INTERACTIVE) From owner-p4-projects@FreeBSD.ORG Mon Aug 20 17:13:57 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 03C1216A46B; Mon, 20 Aug 2007 17:13:57 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0AA316A41B for ; Mon, 20 Aug 2007 17:13:56 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7F313C491 for ; Mon, 20 Aug 2007 17:13:56 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KHDu6r049385 for ; Mon, 20 Aug 2007 17:13:56 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KHDucI049370 for perforce@freebsd.org; Mon, 20 Aug 2007 17:13:56 GMT (envelope-from fli@FreeBSD.org) Date: Mon, 20 Aug 2007 17:13:56 GMT Message-Id: <200708201713.l7KHDucI049370@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125432 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 17:13:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=125432 Change 125432 by fli@fli_nexus on 2007/08/20 17:13:16 Remove name field from resource retrieval messages, it can be obtained from name retrieval messages. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/shared/mdnsd_ipc.h#3 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/shared/mdnsd_ipc.h#3 (text+ko) ==== @@ -400,25 +400,22 @@ * MIM_IDENT_RES - Information on a resource, response to MIM_IDENT_RES_LIST * * Message structure - * 0 23 31 47 63 79 95 127 - * +------------+----+--------+--------+--------+--------+----------------+ - * | zero |rlen| len | elen | class | type | ttl | - * +------------+----+--------+--------+--------+--------+----------------+ - * 127 159 + * 0 15 31 47 63 95 + * +--------+--------+--------+--------+----------------+ + * | len | elen | class | type | ttl | + * +--------+--------+--------+--------+----------------+ + * 95 127 * +----------------+----//----+----//----+----//----+----//----+ * | ident length | rec name | unexp res| exp res |ident ptr | * +----------------+----//----+----//----+----//----+----//----+ */ struct mipc_dbi_res_get { - unsigned int mirg_zero:24; - unsigned int mirg_rlen:8; /* Name length (in characters) */ uint16_t mirg_len; /* Unencoded resource (in characters) */ uint16_t mirg_elen; /* Encoded resource length */ uint16_t mirg_class; /* Resource class */ uint16_t mirg_type; /* Resource type */ uint32_t mirg_ttl; /* TTL (in seconds)) */ uint32_t mirg_ilen; /* Pointer identifer length */ - /* Record name, wide character encoded */ /* Unencoded (unexpanded) resource data */ /* Expanded, encoded resource data (binary) */ /* Pointer identifier (if applicable) */ From owner-p4-projects@FreeBSD.ORG Mon Aug 20 17:22:08 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C52D316A419; Mon, 20 Aug 2007 17:22:08 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79A9216A417 for ; Mon, 20 Aug 2007 17:22:08 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6857D13C45B for ; Mon, 20 Aug 2007 17:22:08 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KHM8GX052996 for ; Mon, 20 Aug 2007 17:22:08 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KHM7NE052989 for perforce@freebsd.org; Mon, 20 Aug 2007 17:22:07 GMT (envelope-from fli@FreeBSD.org) Date: Mon, 20 Aug 2007 17:22:07 GMT Message-Id: <200708201722.l7KHM7NE052989@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125434 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 17:22:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=125434 Change 125434 by fli@fli_nexus on 2007/08/20 17:22:03 Change how resource lists are obtained, no record names are copied. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.c#6 edit .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.h#4 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.c#6 (text+ko) ==== @@ -588,32 +588,30 @@ MTX_LOCK(dbi, dbi_mtx); sz = dbi->dbi_numnam; + if (dbi->dbi_records > 0) { + sz += (dbi->dbi_records - 1); + } - for (i = 0; i < dbi->dbi_numnam; i++) - sz += dbi->dbi_records; - dn = malloc(sizeof(struct dbr_name) * sz); if (dn == NULL) goto out2; + j = 0; + TAILQ_FOREACH(dr, &dbi->dbi_rech, dr_next) { + dnp = &dn[j]; + dnp->dn_name = _wcsdup(dbi->dbi_names[dbi->dbi_curnam]); + dnp->dn_curnam = 1; + dnp->dn_ename = _wcsdup(dr->dr_name); + j++; + } + for (i = 0; i < dbi->dbi_numnam; i++) { - if (dbi->dbi_records == 0) { - if (dbi->dbi_curnam == i) - dn[i].dn_curnam = 1; - dn[i].dn_ename = NULL; - dn[i].dn_name = _wcsdup(dbi->dbi_names[i]); + if (i == dbi->dbi_curnam) continue; - } - - j = 0; - TAILQ_FOREACH(dr, &dbi->dbi_rech, dr_next) { - dnp = &dn[i + j]; - dnp->dn_name = _wcsdup(dbi->dbi_names[i]); - if (dbi->dbi_curnam == i) - dnp->dn_curnam = 1; - dnp->dn_ename = _wcsdup(dr->dr_name); - j++; - } + dnp = &dn[j]; + dnp->dn_name = _wcsdup(dbi->dbi_names[i]); + dnp->dn_curnam = 0; + dnp->dn_ename = NULL; } *namlen = sz; @@ -800,12 +798,11 @@ dbr_res_list(struct dbr *dbr, char *ident, size_t *reslen) { struct dbr_resource *dres; - struct dbr_rec *dr; struct dbr_ident *dbi, *dbip; struct dbr_ident_res *dir; struct dbr_res *dsh, *ds; struct record_res *rr; - size_t ilen, sz; + size_t ilen, sz, i, j; ilen = strlen(ident); RW_RLOCK(dbr, dbr_lock); @@ -817,51 +814,52 @@ sz = 0; dres = NULL; - + TAILQ_FOREACH(dir, &dbi->dbi_res, dir_next) { MDNS_INIT_ASSERT(dir, dir_magic); + + dres = realloc(dres, sizeof(struct dbr_resource) * (sz+1)); + dres[sz].dres_class = dir->dir_class; + dres[sz].dres_type = dir->dir_type; + dres[sz].dres_ttl = dir->dir_ttl; + if (dir->dir_flags & DIR_POINTER) { + dbip = dir->dir_data.dbi; + dres[sz].dres_resptr = strdup(dbip->dbi_ident); + dres[sz].dres_res = + _wcsdup(dbip->dbi_names[dbi->dbi_curnam]); + } + else { + dres[sz].dres_resptr = NULL; + dres[sz].dres_res = _wcsdup(dir->dir_data.wp); + } + dres[sz].dres_len = 0; + dres[sz].dres_data = NULL; + + j = i = sz; + sz++; TAILQ_FOREACH(dsh, &dir->dir_resh, ds_dir_next) { dres = realloc(dres, sizeof(struct dbr_resource) * - (sz + 1 + dsh->ds_clones)); - dr = dsh->ds_rec; - dres[sz].dres_name = _wcsdup(dr->dr_name); - dres[sz].dres_res = _wcsdup(dsh->ds_data); - dres[sz].dres_resptr = NULL; - if (dir->dir_flags & DIR_POINTER) - dres[sz].dres_resptr = - strdup(dir->dir_data.dbi->dbi_ident); - dres[sz].dres_class = dir->dir_class; - dres[sz].dres_type = dir->dir_type; - dres[sz].dres_ttl = dir->dir_ttl; + (sz + dsh->ds_clones)); + + memcpy(&dres[i], &dres[j], sizeof(struct dbr_resource)); rr = &dsh->ds_res; - dres[sz].dres_len = rr->rr_len; - dres[sz].dres_data = malloc(rr->rr_len); - memcpy(dres[sz].dres_data, (char *)rr->rr_data, + dres[i].dres_len = rr->rr_len; + dres[i].dres_data = malloc(rr->rr_len); + memcpy(dres[i].dres_data, (char *)rr->rr_data, rr->rr_len); - - sz++; + i++; + sz += dsh->ds_clones; TAILQ_FOREACH(ds, &dsh->ds_clone.head, ds_clone.next) { - dres[sz].dres_name = _wcsdup(dr->dr_name); - dres[sz].dres_res = _wcsdup(dsh->ds_data); - dres[sz].dres_resptr = NULL; - if (dir->dir_flags & DIR_POINTER) { - dbip = dir->dir_data.dbi; - MDNS_INIT_ASSERT(dbip, dbi_magic); - dres[sz].dres_resptr = - strdup(dbip->dbi_ident); - } - dres[sz].dres_class = dir->dir_class; - dres[sz].dres_type = dir->dir_type; - dres[sz].dres_ttl = dir->dir_ttl; - rr = &ds->ds_res; - dres[sz].dres_len = rr->rr_len; - dres[sz].dres_data = malloc(rr->rr_len); - memcpy(dres[sz].dres_data, (char *)rr->rr_data, - rr->rr_len); - sz++; + i++; + memcpy(&dres[i], &dres[j], + sizeof(struct dbr_resource)); + dres[i].dres_len = rr->rr_len; + dres[i].dres_data = malloc(rr->rr_len); + memcpy(dres[i].dres_data, (char *)rr->rr_data, + rr->rr_len); } - } + } } *reslen = sz; @@ -883,13 +881,22 @@ dbr_res_list_free(struct dbr_resource *dres, size_t reslen) { size_t i; + void *tmp_res, *tmp_resptr; + tmp_res = tmp_resptr = NULL; + /* Several pointers may point to the same allocated data */ for (i = 0; i < reslen; i++) { - free(dres[i].dres_name); - free(dres[i].dres_res); - free(dres[i].dres_data); - if (dres[i].dres_resptr != NULL) + if (dres[i].dres_res != tmp_res) { + tmp_res = dres[i].dres_res; + free(dres[i].dres_res); + } + if (dres[i].dres_resptr != NULL && + dres[i].dres_resptr != tmp_resptr) { + tmp_resptr = dres[i].dres_resptr; free(dres[i].dres_resptr); + } + if (dres[i].dres_data != NULL) + free(dres[i].dres_data); } free(dres); } ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.h#4 (text+ko) ==== @@ -74,7 +74,7 @@ /* * Used to return information about current names assigned to - * an identifier. + * an identifier. */ struct dbr_name { wchar_t *dn_name; @@ -110,14 +110,13 @@ * an identifier. */ struct dbr_resource { - wchar_t *dres_name; /* Resource name */ - wchar_t *dres_res; /* Resource data source */ + wchar_t *dres_res; /* Unexpanded source */ char *dres_resptr; /* Pointer identifier */ uint16_t dres_class; uint16_t dres_type; uint32_t dres_ttl; - char *dres_data; - size_t dres_len; + size_t dres_len; /* Length of real resource */ + char *dres_data; /* Expanded/encoded resource */ }; /* From owner-p4-projects@FreeBSD.ORG Mon Aug 20 17:25:13 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 964C116A421; Mon, 20 Aug 2007 17:25:13 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 618F816A41A for ; Mon, 20 Aug 2007 17:25:13 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5105313C461 for ; Mon, 20 Aug 2007 17:25:13 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KHPDvq054487 for ; Mon, 20 Aug 2007 17:25:13 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KHPCc7054466 for perforce@freebsd.org; Mon, 20 Aug 2007 17:25:12 GMT (envelope-from fli@FreeBSD.org) Date: Mon, 20 Aug 2007 17:25:12 GMT Message-Id: <200708201725.l7KHPCc7054466@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125435 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 17:25:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=125435 Change 125435 by fli@fli_nexus on 2007/08/20 17:24:29 - Change how resources are sent. - Code to send record names was broken. - Some other minor fixes. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#8 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#8 (text+ko) ==== @@ -993,7 +993,7 @@ if (len < miinl->miinl_ilen) return (MIE_IVAL); - ident = malloc(miinl->miinl_ilen + 0); + ident = malloc(miinl->miinl_ilen + 1); if (ident == NULL) return (MIE_INTE); memcpy(ident, p, miinl->miinl_ilen); @@ -1020,9 +1020,6 @@ goto out; } - miin.miin_ifidx = mif->mif_index; - miin.miin_zero = 0; - RW_UNLOCK(g, g_lock); IPC_SETHDR(&rmih, mih->mih_id, MIM_IDENT_NAME, 0); @@ -1032,23 +1029,26 @@ iov[1].iov_len = sizeof(struct mipc_dbi_name); iov[2].iov_base = ident; iov[2].iov_len = miinl->miinl_ilen; + miin.miin_ilen = miinl->miinl_ilen; + miin.miin_ifidx = mif->mif_index; + miin.miin_zero = 0; for (i = 0; i < namlen; i++) { rmih.mih_msglen = sizeof(struct mipc_head) + sizeof(struct mipc_dbi_name) + miinl->miinl_ilen; - len = wcslen(dn[i].dn_name); + nlen = wcslen(dn[i].dn_name); iov[3].iov_base = dn[i].dn_name; - iov[3].iov_len = len * sizeof(wchar_t); - rmih.mih_msglen += nlen; + iov[3].iov_len = nlen * sizeof(wchar_t); + rmih.mih_msglen += (nlen * sizeof(wchar_t)); miin.miin_len = nlen; if (dn[i].dn_ename != NULL) { - len = wcslen(dn[i].dn_ename); + nlen = wcslen(dn[i].dn_ename); iov[4].iov_base = dn[i].dn_ename; - iov[4].iov_len = len * sizeof(wchar_t); - rmih.mih_msglen += nlen; + iov[4].iov_len = nlen * sizeof(wchar_t); + rmih.mih_msglen += (nlen * sizeof(wchar_t)); miin.miin_elen = nlen; } else { @@ -1265,7 +1265,7 @@ struct dbr_resource *dres; struct mipc_head rmih; struct mipc_dbi_res_get mirg; - struct iovec iov[6]; + struct iovec iov[5]; if (len < sizeof(struct mipc_dbi_res_list)) return (MIE_IVAL); @@ -1299,30 +1299,28 @@ if (dres == NULL) goto out; + dprintf(DEBUG_CS, "Request to list resources on identifier %s, " + "csc=%x, ifidx=%d", ident, csc, mirl->mirl_ifidx); + IPC_SETHDR(&rmih, mih->mih_id, MIM_IDENT_RES, 0); iov[0].iov_base = &rmih; iov[0].iov_len = sizeof(struct mipc_head); iov[1].iov_base = &mirg; iov[1].iov_len = sizeof(struct mipc_dbi_res_get); - mirg.mirg_zero = 0; for (i = 0; i < reslen; i++) { - mih->mih_msglen = sizeof(struct mipc_head) + + rmih.mih_msglen = sizeof(struct mipc_head) + sizeof(struct mipc_dbi_res_get); - iov[2].iov_base = dres[i].dres_name; - tmplen = wcslen(dres[i].dres_name) * sizeof(wchar_t); + iov[2].iov_base = dres[i].dres_res; + mirg.mirg_len = wcslen(dres[i].dres_res); + tmplen = mirg.mirg_len * sizeof(wchar_t); iov[2].iov_len = tmplen; - mih->mih_msglen += tmplen; + rmih.mih_msglen += tmplen; - iov[3].iov_base = dres[i].dres_res; - tmplen = wcslen(dres[i].dres_res) * sizeof(wchar_t); - iov[3].iov_len = tmplen; - mih->mih_msglen += tmplen; - - iov[4].iov_base = dres[i].dres_data; - iov[4].iov_len = dres[i].dres_len; - mih->mih_msglen += dres[i].dres_len; + iov[3].iov_base = dres[i].dres_data; + iov[3].iov_len = dres[i].dres_len; + rmih.mih_msglen += dres[i].dres_len; mirg.mirg_elen = dres[i].dres_len; mirg.mirg_class = dres[i].dres_class; @@ -1330,18 +1328,18 @@ mirg.mirg_ttl = dres[i].dres_ttl; if (dres[i].dres_resptr != NULL) { - iov[5].iov_base = dres[i].dres_resptr; + iov[4].iov_base = dres[i].dres_resptr; tmplen = strlen(dres[i].dres_resptr); - iov[5].iov_len = tmplen; + iov[4].iov_len = tmplen; mirg.mirg_ilen = tmplen; - mih->mih_msglen += tmplen; + rmih.mih_msglen += tmplen; } else { mirg.mirg_ilen = 0; - iov[5].iov_base = NULL; - iov[5].iov_len = 0; + iov[4].iov_base = NULL; + iov[4].iov_len = 0; } - writev(csc->csc_sock, iov, 6); + writev(csc->csc_sock, iov, 5); } RW_UNLOCK(g, g_lock); @@ -1550,6 +1548,7 @@ iov[0].iov_base = &mih; iov[0].iov_len = sizeof(struct mipc_head); writev(csc->csc_sock, iov, 1); + dprintf(DEBUG_CS, "Ack sent to client csc=%x, id=%d", csc, id); } From owner-p4-projects@FreeBSD.ORG Mon Aug 20 17:33:26 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 070B416A41A; Mon, 20 Aug 2007 17:33:26 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF2BD16A418 for ; Mon, 20 Aug 2007 17:33:25 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9DE4E13C4A6 for ; Mon, 20 Aug 2007 17:33:25 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KHXPB5058418 for ; Mon, 20 Aug 2007 17:33:25 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KHXPjQ058409 for perforce@freebsd.org; Mon, 20 Aug 2007 17:33:25 GMT (envelope-from fli@FreeBSD.org) Date: Mon, 20 Aug 2007 17:33:25 GMT Message-Id: <200708201733.l7KHXPjQ058409@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125439 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 17:33:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=125439 Change 125439 by fli@fli_nexus on 2007/08/20 17:32:59 - Add mdns_db_name_{list, freelist}, obtains a list of names assigned to a resource identifier. - Add mdns_db_res_{list, freelist}, obatins a list of resources assigned to a resource identifier. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/libmdns/libmdns.c#4 edit .. //depot/projects/soc2007/fli-mdns_sd/libmdns/mdns.h#4 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/libmdns/libmdns.c#4 (text+ko) ==== @@ -708,6 +708,400 @@ } int +mdns_db_res_list(struct mdns *m, const char *ident, unsigned int ifidx, + struct mdns_res **mr) +{ + int i, mid, validres, count, error; + size_t ilen, l; + char *p; + TAILQ_HEAD(, mdns_msg) msgtmp; + struct mdns_msg *mm, *mm2; + struct mdns_res *mrval; + struct mipc_dbi_res_get *mirg; + struct mipc_dbi_res_list mirl; + + MDNS_ASSERT(m); + + if (ifidx == 0) + return (-1); + ilen = strlen(ident); + if (ilen == 0) + return (-1); + + mirl.mirl_ilen = ilen; + mirl.mirl_ifidx = ifidx; + mid = docmd(m, MIM_IDENT_RES_LIST, 2, &mirl, + sizeof(struct mipc_dbi_res_list), ident, ilen); + if (mid < 0) + return (-1); + + count = 0; + validres = 1; + TAILQ_INIT(&msgtmp); + do { + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + break; + if (mm->mm_msgtype == MIM_IDENT_RES) { + TAILQ_INSERT_TAIL(&msgtmp, mm, mm_next); + count++; + } + else if ((mm->mm_msgtype == MIM_ACK) || + ((error = errormsg(mm)) >= 0)) { + validres = 0; + msg_free(mm); + } + } while (validres); + + if (count == 0) { + *mr = NULL; + return (0); + } + + mrval = malloc(sizeof(struct mdns_res) * count); + if (mrval == NULL) + goto out; + + i = 0; + TAILQ_FOREACH_SAFE(mm, &msgtmp, mm_next, mm2) { + TAILQ_REMOVE(&msgtmp, mm, mm_next); + l = mm->mm_buflen; + if (l < sizeof(struct mipc_dbi_res_get)) { + msg_free(mm); + continue; + } + mirg = (struct mipc_dbi_res_get *)mm->mm_buf; + p = mm->mm_buf + sizeof(struct mipc_dbi_res_get); + l -= sizeof(struct mipc_dbi_res_get); + + if (l < mirg->mirg_len) { + msg_free(mm); + continue; + } + + mrval[i].mr_res = + malloc((mirg->mirg_len + 1) * sizeof(wchar_t)); + if (mrval[i].mr_res == NULL) { + msg_free(mm); + goto out; + } + memcpy(mrval[i].mr_res, p, mirg->mirg_len * sizeof(wchar_t)); + mrval[i].mr_res[mirg->mirg_len] = L'\0'; + + p += (mirg->mirg_len * sizeof(wchar_t)); + l -= (mirg->mirg_len * sizeof(wchar_t)); + + if (l < mirg->mirg_elen) { + free(mrval[i].mr_res); + msg_free(mm); + continue; + } + + mrval[i].mr_data = malloc(mirg->mirg_elen); + if (mrval[i].mr_data == NULL) { + free(mrval[i].mr_res); + msg_free(mm); + goto out; + } + memcpy(mrval[i].mr_data, p, mirg->mirg_elen); + p += mirg->mirg_elen; + l -= mirg->mirg_elen; + + if (mirg->mirg_ilen > 0) { + if (l < mirg->mirg_ilen) { + free(mrval[i].mr_res); + free(mrval[i].mr_data); + msg_free(mm); + continue; + } + mrval[i].mr_ptr = malloc(mirg->mirg_ilen + 1); + if (mrval[i].mr_ptr == NULL) { + free(mrval[i].mr_res); + free(mrval[i].mr_data); + msg_free(mm); + goto out; + } + memcpy(mrval[i].mr_ptr, p, mirg->mirg_ilen); + mrval[i].mr_ptr[mirg->mirg_ilen] = '\0'; + } + else { + mrval[i].mr_ptr = NULL; + } + + mrval[i].mr_ttl = mirg->mirg_ttl; + mrval[i].mr_class = mirg->mirg_class; + mrval[i].mr_type = mirg->mirg_type; + mrval[i].mr_len = mirg->mirg_len; + mrval[i].mr_ident = strdup(ident); + i++; + msg_free(mm); + } + + *mr = mrval; + return (i); +out: + TAILQ_FOREACH_SAFE(mm, &msgtmp, mm_next, mm2) { + TAILQ_REMOVE(&msgtmp, mm, mm_next); + msg_free(mm); + } + return (-1); +} + +void +mdns_db_res_freelist(struct mdns_res *mr, size_t len) +{ + size_t i; + + for (i = 0; i < len; i++) { + free(mr[i].mr_ident); + free(mr[i].mr_res); + free(mr[i].mr_data); + if (mr[i].mr_ptr != NULL) + free(mr[i].mr_ptr); + } + free(mr); +} + +static int +namelist(struct mdns *m, const char *ident, size_t ilen, unsigned int ifidx, + struct mdns_name **mnret) +{ + int i, mid, error, validres; + size_t count, l; + char *p; + struct mdns_msg *mm, *mm2; + struct mdns_name *mn; + struct mipc_dbi_name *miin; + TAILQ_HEAD(, mdns_msg) msgtmp; + struct mipc_dbi_name_list miinl; + + TAILQ_INIT(&msgtmp); + + miinl.miinl_ifidx = ifidx; + miinl.miinl_ilen = ilen; + mid = docmd(m, MIM_IDENT_NAME_LIST, 2, &miinl, + sizeof(struct mipc_dbi_name_list), ident, ilen); + if (mid < 0) + goto out; + + count = 0; + validres = 1; + do { + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + break; + if (mm->mm_msgtype == MIM_IDENT_NAME) { + TAILQ_INSERT_TAIL(&msgtmp, mm, mm_next); + count++; + } + else if ((mm->mm_msgtype == MIM_ACK) || + ((error = errormsg(mm)) >= 0)) { + validres = 0; + msg_free(mm); + } + } while (validres); + + if (count == 0) { + *mnret = NULL; + return (0); + } + + mn = malloc(sizeof(struct mdns_name) * count); + if (mn == NULL) + goto out; + + i = 0; + TAILQ_FOREACH_SAFE(mm, &msgtmp, mm_next, mm2) { + TAILQ_REMOVE(&msgtmp, mm, mm_next); + l = mm->mm_buflen; + if (l < sizeof(struct mipc_dbi_name)) { + msg_free(mm); + continue; + } + + miin = (struct mipc_dbi_name *)mm->mm_buf; + p = mm->mm_buf + sizeof(struct mipc_dbi_name); + l -= sizeof(struct mipc_dbi_name); + + if (l < miin->miin_ilen) { + msg_free(mm); + continue; + } + mn[i].mn_ident = malloc(miin->miin_ilen + 1); + if (mn[i].mn_ident == NULL) + goto out; + memcpy(mn[i].mn_ident, p, miin->miin_ilen); + mn[i].mn_ident[miin->miin_ilen] = '\0'; + + p += miin->miin_ilen; + l -= miin->miin_ilen; + if (l < (miin->miin_len * sizeof(wchar_t))) { + free(mn[i].mn_ident); + msg_free(mm); + continue; + } + + mn[i].mn_name = malloc((miin->miin_len + 1) * sizeof(wchar_t)); + if (mn[i].mn_name == NULL) + goto out; + memcpy(mn[i].mn_name, p, miin->miin_len * sizeof(wchar_t)); + mn[i].mn_name[miin->miin_len] = L'\0'; + + p += (miin->miin_len * sizeof(wchar_t)); + l -= miin->miin_len; + + if (miin->miin_elen > 0) { + if (l < (miin->miin_elen * sizeof(wchar_t))) { + free(mn[i].mn_ident); + free(mn[i].mn_name); + continue; + } + + mn[i].mn_ename = + malloc((miin->miin_elen + 1) * sizeof(wchar_t)); + if (mn[i].mn_ename == NULL) + goto out; + memcpy(mn[i].mn_ename, p, + miin->miin_elen * sizeof(wchar_t)); + mn[i].mn_ename[miin->miin_elen] = L'\0'; + } + else { + mn[i].mn_ename = NULL; + } + + i++; + msg_free(mm); + } + + *mnret = mn; + return (i); +out: + return (-1); +} + +int +mdns_db_name_list(struct mdns *m, const char *ident, unsigned int ifidx, + struct mdns_name **mn) +{ + int mid, validres, error; + char *p, *id; + size_t l, ilen; + ssize_t count, tmp, i, j; + struct mipc_dbident *mii; + struct mdns_msg *mm, *mm2; + struct mdns_name *mn2, *mnret; + void *ptr; + TAILQ_HEAD(, mdns_msg) msgtmp; + struct mipc_dbi_list miil; + + if (ifidx == 0) + return (-1); + + if (ident != NULL) { + ilen = strlen(ident); + count = namelist(m, ident, ilen, ifidx, &mn2); + *mn = mn2; + return (count); + } + + miil.miil_ifidx = ifidx; + mid = docmd(m, MIM_IDENT_LIST, 1, &miil, sizeof(struct mipc_dbi_list)); + if (mid < 0) + return (-1); + + validres = 1; + TAILQ_INIT(&msgtmp); + do { + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + break; + if (mm->mm_msgtype == MIM_IDENT) { + TAILQ_INSERT_TAIL(&msgtmp, mm, mm_next); + } + else if ((mm->mm_msgtype == MIM_ACK) || + ((error = errormsg(mm)) >= 0)) { + validres = 0; + msg_free(mm); + } + } while (validres); + + mnret = NULL; + count = 0; + TAILQ_FOREACH_SAFE(mm, &msgtmp, mm_next, mm2) { + TAILQ_REMOVE(&msgtmp, mm, mm_next); + l = mm->mm_buflen; + if (l < sizeof(struct mipc_dbident)) { + msg_free(mm); + continue; + } + mii = (struct mipc_dbident *)mm->mm_buf; + p = mm->mm_buf + sizeof(struct mipc_dbident); + l -= sizeof(struct mipc_dbident); + + if (l < mii->mii_len) { + msg_free(mm); + continue; + } + + id = malloc(mii->mii_len + 1); + if (id == NULL) + goto out; + + memcpy(id, p, mii->mii_len); + id[mii->mii_len] = '\0'; + + tmp = namelist(m, id, mii->mii_len, ifidx, &mn2); + if (tmp > 0 && mn2 != NULL) { + i = count; + count += tmp; + ptr = realloc(mnret, sizeof(struct mdns_name) * count); + if (ptr == NULL) { + for (j = 0; j < tmp; j++) { + free(mn2[j].mn_ident); + free(mn2[j].mn_name); + if (mn2[j].mn_ename != NULL) + free(mn2[j].mn_ename); + } + goto out; + } + mnret = ptr; + for (j = 0; i < count; i++, j++) { + memcpy(&mnret[i], &mn2[j], + sizeof(struct mdns_name)); + } + } + + msg_free(mm); + } + + *mn = mnret; + return (count); +out: + TAILQ_FOREACH_SAFE(mm, &msgtmp, mm_next, mm2) { + TAILQ_REMOVE(&msgtmp, mm, mm_next); + msg_free(mm); + } + if (mnret == NULL) + free(mnret); + *mn = NULL; + return (-1); +} + +void +mdns_db_name_freelist(struct mdns_name *mn, size_t len) +{ + unsigned int i; + + for (i = 0; i < len; i++) { + free(mn[i].mn_ident); + free(mn[i].mn_name); + if (mn[i].mn_ename != NULL) + free(mn[i].mn_ename); + } + free(mn); +} + +int mdns_cache_flush(struct mdns *m, unsigned int ifidx) { int mid, error; ==== //depot/projects/soc2007/fli-mdns_sd/libmdns/mdns.h#4 (text+ko) ==== @@ -75,6 +75,20 @@ /* Remove a record name from a resource set */ int mdns_db_name_del(struct mdns *, const char *, unsigned int, const wchar_t *); + +/* Represents a name assigned to an identifer */ +struct mdns_name { + char *mn_ident; /* Resource identifier */ + wchar_t *mn_name; /* Unexpanded name */ + wchar_t *mn_ename; /* Expanded name, or NULL */ +}; + +/* List names assigned to one or all resource sets */ +int mdns_db_name_list(struct mdns *, const char *, unsigned int, + struct mdns_name **); +/* Free name list */ +void mdns_db_name_freelist(struct mdns_name *, size_t); + /* Add a resource to a resource set */ int mdns_db_res_add(struct mdns *, const char *, unsigned int, uint16_t, uint16_t, uint32_t, int, const void *); @@ -86,6 +100,24 @@ #define MDNS_RES_DEFAULT (0) /* Default resource type */ #define MDNS_RES_POINTER (-1) /* Resource is a resource set pointer */ +/* Resource assigned to an identifier */ +struct mdns_res { + char *mr_ident; /* Resource identifier */ + wchar_t *mr_res; /* Unexpanded resource */ + char *mr_ptr; /* Pointer resource, or NULL */ + uint32_t mr_ttl; /* TTL (seconds) */ + uint16_t mr_class; /* mDNS class */ + uint16_t mr_type; /* mDNS type */ + char *mr_data; + size_t mr_len; +}; + +/* List resources assigned to an identifier */ +int mdns_db_res_list(struct mdns *, const char *, unsigned int, + struct mdns_res **); +/* Free resource list */ +void mdns_db_res_freelist(struct mdns_res *, size_t); + /* Cache entry */ struct mdns_cache { uint32_t mc_ttl_left; From owner-p4-projects@FreeBSD.ORG Mon Aug 20 17:35:29 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 79DBE16A4A1; Mon, 20 Aug 2007 17:35:29 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D10E16A49C for ; Mon, 20 Aug 2007 17:35:29 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2C1E413C4FD for ; Mon, 20 Aug 2007 17:35:29 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KHZTU9059340 for ; Mon, 20 Aug 2007 17:35:29 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KHZS3P059335 for perforce@freebsd.org; Mon, 20 Aug 2007 17:35:28 GMT (envelope-from fli@FreeBSD.org) Date: Mon, 20 Aug 2007 17:35:28 GMT Message-Id: <200708201735.l7KHZS3P059335@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125441 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 17:35:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=125441 Change 125441 by fli@fli_nexus on 2007/08/20 17:35:23 - Add the ability to list names and resources. - Tweak the syntax a bit on database manipulation routines. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdns/db.c#2 edit .. //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#4 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdns/db.c#2 (text+ko) ==== @@ -42,6 +42,7 @@ enum { DBCMD_ADD, DBCMD_DEL, + DBCMD_LIST, }; static int @@ -203,6 +204,83 @@ return (0); } +static void +getres(struct mdns *m, unsigned int ifidx, char *ident) +{ + ssize_t rlen, i; + const char *class, *type; + struct mdns_res *mr; + + rlen = mdns_db_res_list(m, ident, ifidx, &mr); + if (rlen < 0) { + printf("Failed to obtain a list of resources\n"); + return; + } + + printf("Resources on identifier '%s'\n", ident); + for (i = 0; i < rlen; i++) { + class = mdns_ctoa(mr[i].mr_class); + type = mdns_ttoa(mr[i].mr_class, mr[i].mr_type); + + printf("\t%d ", mr[i].mr_ttl); + if (class != NULL) + printf("%s ", class); + else + printf("%d ", mr[i].mr_class); + + if (type != NULL) + printf("%s ", type); + else + printf("%d ", mr[i].mr_type); + + printf("%ls", mr[i].mr_res); + if (mr[i].mr_ptr != NULL) + printf(" (pointer to '%s')", mr[i].mr_ptr); + + printf("\n"); + } + mdns_db_res_freelist(mr, rlen); +} + +static int +dblist(struct mdns *m, unsigned int ifidx, char *ident) +{ + struct mdns_name *mn; + int len, i, flag; + char *p; + + len = mdns_db_name_list(m, ident, ifidx, &mn); + if (len < 0) { + printf("Failed to obtain list of names\n"); + return (EXIT_FAILURE); + } + else if (len == 0) { + printf("Identifier have no names assigned\n"); + getres(m, ifidx, ident); + return (0); + } + + p = NULL; + flag = 0; + for (i = 0; i < len; i++) { + if (p == NULL || strcmp(p, mn[i].mn_ident) != 0) { + if (i > 0) + getres(m, ifidx, mn[i-1].mn_ident); + + p = mn[i].mn_ident; + flag = 1; + printf("Names on identifier '%s'\n", p); + } + printf("\t%ls", mn[i].mn_name); + if (mn[i].mn_ename != NULL) + printf(" (%ls)", mn[i].mn_ename); + printf("\n"); + + } + getres(m, ifidx, mn[i-1].mn_ident); + return (0); +} + int db(struct mdns *m, int argc, char *argv[]) { @@ -224,15 +302,18 @@ argc -= optind; argv += optind; - if (argc < 4) - return (EXIT_FAILURE); - ident = argv[0]; + if (argc < 2) + ident = NULL; + else + ident = argv[1]; - if (strcasecmp(argv[1], "name") == 0) + if (strcasecmp(argv[0], "name") == 0 && ident != NULL) error = dbname(m, ident, ifidx, argc - 2, argv + 2); - else if (strcasecmp(argv[1], "res") == 0) + else if (strcasecmp(argv[0], "res") == 0 && ident != NULL) error = dbres(m, ident, ifidx, argc - 2, argv + 2); + else if (strcasecmp(argv[0], "list") == 0) + error = dblist(m, ifidx, ident); else { printf("No such sub-command '%s'\n", argv[1]); return (EXIT_FAILURE); ==== //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#4 (text+ko) ==== @@ -46,9 +46,10 @@ printf("%s query [-v] [-i ifnam] [-f family] [-w sec] " "[-c class] [-t type] name\n", exec); - printf("%s db [-i ifnam] `ident' name [-s] add|del `host'\n", exec); - printf("%s db [-i ifnam] `ident' res [-p] [-t ttl] add|del " + printf("%s db [-i ifnam] name `ident' [-s] add|del `host'\n", exec); + printf("%s db [-i ifnam] res `ident' [-p] [-t ttl] add|del " "`class' `type' `res'\n", exec); + printf("%s db -i ifnam list [ident]\n", exec); printf("%s cache [-i ifnam] view|flush\n", exec); } From owner-p4-projects@FreeBSD.ORG Mon Aug 20 17:55:57 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8975A16A475; Mon, 20 Aug 2007 17:55:57 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5699216A420 for ; Mon, 20 Aug 2007 17:55:57 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4081E13C4B7 for ; Mon, 20 Aug 2007 17:55:57 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KHtve5073753 for ; Mon, 20 Aug 2007 17:55:57 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KHtuod073747 for perforce@freebsd.org; Mon, 20 Aug 2007 17:55:56 GMT (envelope-from fli@FreeBSD.org) Date: Mon, 20 Aug 2007 17:55:56 GMT Message-Id: <200708201755.l7KHtuod073747@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125445 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 17:55:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=125445 Change 125445 by fli@fli_manticore on 2007/08/20 17:55:39 Fix compile warnings when DEBUG is undefined. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#9 edit .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.c#7 edit .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/stack_packet.c#11 edit .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/var.c#3 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#9 (text+ko) ==== @@ -393,8 +393,9 @@ "len=%d, suser=%d, sock=%d", csc, n, csc->csc_suser, sock); error = cp_parse(csc, buf, len, csc->csc_suser); - if (error != 0) + if (error != 0) { dprintf(DEBUG_CS, "Failed to parse packet csc=%x", csc); + } } MTX_UNLOCK(csc, csc_mtx); ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.c#7 (text+ko) ==== @@ -1505,7 +1505,7 @@ * pr - Resource data from peers probe packet */ void -dbr_tiebreak(struct dbr *dbr, struct dbr_rec *dr, struct record *pr) +dbr_tiebreak(struct dbr *dbr __unused, struct dbr_rec *dr, struct record *pr) { struct record *r; struct record_type *rt, *prt; @@ -1594,8 +1594,9 @@ dprintf(DEBUG_DBR, "Lost tie-breaking on %ls", dr->dr_name); col_probe(dr); } - else if (outcome == 1) + else if (outcome == 1) { dprintf(DEBUG_DBR, "Won tie-breaking on %ls", dr->dr_name); + } } /* ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/stack_packet.c#11 (text+ko) ==== @@ -1002,8 +1002,9 @@ } retval = 0; out: - if (retval != 0) + if (retval != 0) { dprintf(DEBUG_STACK, "Packet chain finalization failed"); + } return (retval); } ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/var.c#3 (text+ko) ==== @@ -221,7 +221,6 @@ update_var(struct vartag *vt, int flags) { int error; - size_t i; RW_WLOCK(vt, vt_lock); error = vt->vt_update(vt, flags); @@ -232,8 +231,10 @@ vt->vt_data[0].vtd_str); } else { +#ifdef DEBUG + size_t i; + dprintf(DEBUG_VAR, "Variable %s set to", vt->vt_name); -#ifdef DEBUG for (i = 0; i < vt->vt_size; i++) { dprintf(DEBUG_VAR, "\t%ls", vt->vt_data[i].vtd_str); From owner-p4-projects@FreeBSD.ORG Mon Aug 20 19:04:21 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2437C16A46D; Mon, 20 Aug 2007 19:04:21 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED80916A46B for ; Mon, 20 Aug 2007 19:04:20 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DB2A513C458 for ; Mon, 20 Aug 2007 19:04:20 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KJ4Ko8080582 for ; Mon, 20 Aug 2007 19:04:20 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KJ4KTp080579 for perforce@freebsd.org; Mon, 20 Aug 2007 19:04:20 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 20 Aug 2007 19:04:20 GMT Message-Id: <200708201904.l7KJ4KTp080579@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125446 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 19:04:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=125446 Change 125446 by mharvan@mharvan_bike-planet on 2007/08/20 19:04:05 Updated design.txt Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.doc/design.txt#4 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.doc/design.txt#4 (text+ko) ==== @@ -1,175 +1,266 @@ -This document describes the intended design and main implementation -details of mtund. This plan is work in progress and changes are -expected to reflect the outcomes of (mostly email) discussions with my -mentors. + Magic Tunnel Daemon Design and Implementation Details + +IP can easily be tunneled over a plethora of network protocols at +various layers, such as IP, ICMP, UDP, TCP, DNS, HTTP, SSH and many +others. While a direct connection may not always be possible due to a +firewall, the IP packets could be encapsulated as payload in other +protocols, which would get through. However, each such encapsulation +requires the setup of a different program and the user has to manually +probe different encapsulations to find out which of them works in a +given environment. + +The Magic Tunneling Daemon (mtund) uses plugins for different +encapsulations. It automagically selects a working encapsulation in +each environment an can failover to another one if the environment +changes. This document describes the design and main implementation +details of mtund. After an overview of the daemon, various details of +the implemetnation are discussed. Afterwards, the implemented plugins +are described. The document concludes with things remaining to be done +in the future. + + +MTUND - GENERAL OVERVIEW +The daemon and plugins are written in plain C. The daemon can operate +in two modes, as a client or as a server. A server accepts connections +from multiple clients. It uses a tun(4) interface, one per client, as +the tunnel endpoint. Using private ip addresses and nat on the tun(4) +interfaces seems to be a viable solution. Traffic from the client can +be encapsulated in various network protocols. Each such encapsulation +is implemented by a plugin. Plugins are loaded at run-time with +dlopen(3). For multiplexing between the tun interfaces and the sockets +provided used by the plugins libevent is used. Plugins register their +events directly by calling event_add(3) and event_dispatch(3) is +called from main() in the daemon. Libevent can then also call handler +functions from the plugins. + +Each plugin has to implement a set of functions, defined in +plugin.h. A plugin is represented in the daemon by struct plugin. This +struct contains pointers to the plugin functions, allowing the daemon +to interact with the plugin. The functions avialable to the daemon are +described in more detail in plugin.h. In client mode, the plugin tries +to connect to the server after calling plugin_initalize(). The daemon +can then use plugin_send() to send data throught the tunnel set up by +the plugin. For the other direction of data flow, the plugin registers +events for watching its sockets for incoming traffic. Upon receiving +data over the encapsulation, the plugin decapsulates it and passes it +to the daemon by calling the process_data_from_daemon() function. The +plugin also provides a function ot deinitialize itslef, +plugin_deinitialize(). In the server mode, the plugin_initialize() +function sets up a socket listening for incoming +connections. Otherwise, the functionality is similar to the client +mode. + +In server mode, the server initializes all plugins and waits for +incoming connections. The client initializes plugins serially, i.e., +try the next one if the current one fails. After initialization, it +starts sending probes (pings) to the server. If the server receives +them, it generates a reply. Upon reception of a ping reply, the client +request a client ID from the server. If granted, the server and the +client configure tun interfaces and start exchanging traffic using the +plugin. + +PROBING AND KEEP-ALIVE PINGS +The ping probes used for initial probing are also used as regular +keep-alive traffic and to check if unreliable connections have not +failed. If a certain number of successive ping requests is left +without a reply (PING_FAIL_PLUGIN), the encapsulation is considered +malfunctioning and the client tries to find another working +encapsulation. The server is sending such probes to the client as +well. If a certain number of pings is left unanswered +(PING_FAIL_COMPLETE) then it is assumed that the client has +disconnected and its tun interface on the server is deinitialized. If +a working encapsulation is found, the client should send data or a +special message with DISPATCH_SELECT_PLUGIN to notify the server of +plugin failover, i.e., to make sure the server uses the new plugin for +talking to the client. + +MULTI-USER SUPPORT +The server supports concurrent sessions from multi-plient clients. In +order to tunnel traffic for a client, the client first has to +associate with the server. This is done by requesting a client ID. If +the server alsready has too many clients, it simply does not answer +the reuqest for an ID. If a client does not answer PING_FAIL_COMPLETE +pings, it is considered disconnected and its client ID is reclaimed by +the server. The client ID is prepended before the payload in traffic +from the client to the server so that the server could determine from +which client the traffic is coming. Although for TCP the file +descriptor could be used, for DNS or ICMP the client ID is needed. For +traffic from the server to the client no client ID is prepended as +each client talks to only one server at a time. + +The plugins also have to support multiple connections as several users +can be using the same encapsulation to communicate with the server. A +plugin keeps track of its connections on its own. The interface to the +daemon uses the client ID. The previous design had references to +client ID and a connection flag passed to the daemon as arguments to +the process_data_from_plugin() function. However, this was abandoned +in favour of having a separate function plugin_conn_map(), implemented +by the plugin. This function is called from process_data_from_plugin() +before calling plugin_send(). The client ID is passed to this function +and it maps the last incoming connection to the client ID. Note that +there is no race condition as the plugin_conn_map() function is called +before process_data_from_plugin() returns and hence before +plugin_receive() returns. Hence, no other event from libevent can +preempt the call. In addition, a flag is passed indicating whether +* the payload was garbage and hence the connection should be + discarded +* the payload was a ping, the connection is temporary +* the payload was data from an associated client and hence the + connection is permanent + +A temporary connection can be used by the daemon until +process_data_from_plugin() returns. It is used for replying to +pings. For the TCP plugin, the socket is closed after a timeout while +for non-connection oriented encapsulations the connection metadata can +be removed earlier. The metadata of a permanent connection should be +kept around until plugin_conn_close() is called by the daemon. A +permanent connection is used by associated clients. + +The funcitons use the client ID to identify the connection and the +mapping from the client ID to the particular connection is the +responsibility of the plugin. Note that it is not desirable for the +plugins to inspect the payload as this is done centrally by the +daemon. To this end, the above described scheme has been designed. + +DISPATCH +To distinguish between tunneled traffic, pings and other types of +control traffic, a dispatch value indicating the type of payload is +prepended before the payload. It is after the client ID for traffic +originated by the client. The various dispatch values are defined in +mtund.h. -TODO: -o man page -o port skeleton +If a plugin wishes to exchange traffic directly with another plugin, +the payload still has to pass via the daemon so that the client ID +gets prepended. In this way the plugins know to which +client/connection the traffic relates. This is usefull for plugins +probing which types of traffic pass through and for polling plugins to +send empty requests. -TODO this document -o plugin_send() return values - prevent filling the stack -o fragmenation, fragment reassembly, framing +FRAGMENTATION, FRAGMENT REASSEMBLY +Some plugins may offer only a lower mtu. Therefore, fragmentation and +fragment reassembly has been implemented in the daemon. It is used if +a larger packet than the indicated plugin mtu should be sent. For +sending, a fragment header, struct frag_hdr defined in mtund.c, is +prepended before each fragment. As the plugin indicates how much data +was consumed, it is also posA similar problem is solved complete +messages; TCP - framing -TUN(4) INTERFACE (OR SOMETHING ELSE?) -My original idea, as described in the proposal is to use the tun(4) -interface. It gives a virtual network interface (point-to-point). -Whenever a packet comes to it, it is passed into the userspace and one -can write into it packets from the userspace to produce outgoing -packets. Packets start with the IP header. Hence, using it is rather -painless. On the other hand, it is a proper network interface so that -one can assign IP addresses to it and add entries into the routing table -for that interface. An additional benefit is that it is implemented on -several different OSes, allowing for easy portability. Also, I already -know how to use it and hence getting started with it is easy for me. +sible to support plugins where the mtu +varies from packet to packet. -For using the tun interface, my idea was to set up the routing table in -a way that all traffic would be routed via this interface except for -traffic to the tunnel endpoint, i.e. don't try to send the encapsulated -traffic via the tunnel. The tunnel endpoint could then do NAT or -routing, depending on how many public IP addresses it would have -available. This approach would basically be at the IP layer, so one -could not easily say that some ports should go via the tunnel while -others could not. Or maybe this would be doable with one of the -firewalls available on FreeBSD? +Teh reassembly happens then on the receiving end. If not all fragments +are received within a given time, the reassembly buffer is +discarded. After reassembling the complete packet, is is passed to the +tun interface. -One problem with IPv6 and tun(4) is that by default it tags packets as -being IPv4. However, at the moment IPv4 is the main goal and IPv6 -support is left for later. To have IPv6 working over it, one has to -disable the the IFF_NO_PI flag and prefix each packet with a 4-byte -struct specifying the type of traffic (ETH_P_IPV6). These are the flag -constants on linux, as I am currently writing code on linux. On -FreeBSD, the flag seems to be TUNSLMODE. Another approach would be to -change the kernel code to look at the first byte of the packet (the -version field for both IPv4 and IPv6) and determine from that if it's -IPv4 or IPv6. On FreeBSD 6.1, the hardcoded value is set on line 865 -in file /sys/net/if_tun.c. +Note that the fragmentation and fragment reassembly happens in the +daemon rather than the plugins and hence any plugin automatically can +use it. -Max has mentioned netgraph as an alternative for tun. However, it has -been decided that tun(4) would be used rather than netgraph. +DIRECT/POLLING PLUGINS +In general, there are two types of plugins. Direct plugins and polling +plugins. -MULTIPLEXING BETWEEN DIFFERENT FILE DESCRIPTORS -The easiest way that came to my mind was using select(2). The plugins -of course have to register their file descriptors to be watched. The -code will be rewritten to use libevent. This will allow to easily use -timeouts for checking the connectivity of plugins or do other -timeout-related things. +For direct plugins both the client and the server can send a packet +whenever they wish so. An example would be the TCP plugin using a TCP +socket or a UDP plugin using a UDP socket. -Another alternative would be to fork a process for each plugin or to use -threads. It may give more flexibility to the plugins, but at the moment -I do not see a useful advantage in this approach. The current design and -the functions from the main daemon avaialable to the plugins pretty much -dictate the plugin design and to some extent capabilities. +The polling plugins use a request-reply scheme, such as ICMP echo +request/reply or DNS query/answer. While the client can initiate a +request at any time to send data, the server can only tunnel data in +responses. These responses can only originate in response to requests +and hence the server cannot send packets whenever is wants. To tackle +this problem, the plugin queues one packet at a time and sends it when +a response is geneerated. Actually, there are two one-packet +queuues. One is for normal data, such as packets from the tun device +or ping requests. The other, called urgent, is for replies generated +in response to received traffic. These are ping replies and client ID +offers. These have priority over normal data. To distinguish between +the different types of plugins, the plugin_is_ready_to_send() function +return values indicates whether the data would be send immediately, +queued or whether the queue is full. -CHECKING UNRELIABLE CONNECTIONS -One thing that is missing in the code I wrote for the application is -checking whether a udp connection (still) works. For tcp, one can use -the return value of the write(2) call. For unreliable protocols like -udp, icmp or ip, the read call does not indicate that something went -wrong. In order to detect this problem I was thinking of exchanging some -regular keep-alive traffic, i.e. regularly sending an echo request on -the application level and expecting an echo reply within a time -interval. If that fails N times, the connection is declared -malfunctioning. +If a polling plugin is used, the monitoring of the tun device by +libevent is disabled. When a response should be sent, plugin uses the +function report_plugin() with the REPORT_READY_TO_SEND flag to +indicate that is can send a packet. The daemon then checks whether no +fragments are pending. If not, a read on the tun interface is be +attempted. Note that the queue is still needed to originate ping +requests on the server as it does not queue them, but expects the +plugin to do so. Using the "urgent" queue for replies is just a +technical issue to simplify the plugins. -For the implementation, things should get easier with the use of -libevent. This would easily allow signalling timeouts. One issue is -that I might receive the timer signal at an inappropriate time and -would have to properly protect shared variables. This has to be -checked. In general, synchronization and multi-threaded safety should -be considered. +Upon receiving a response, the plugin on the client immediately +generates a new request. If no data is avaiable, it sends an empty +request. The reason is that the server could have more data queued and +is waiting for another response to send it. In addition, the client +sends regular request, possibly empty to decrease the latency in case +traffic becomes avaialable on the tun device on the server, but the +client has no data to send at the moment. -Another way would be to use select(2) with a struct timeval *timeout -(5th argument), which might be easier. +The report_plugin() function is also used to indicate various errors +and failures of a plugin. -For this part, having plugins written as threads/processes might give -them more flexibility. However, I do not think that such flexibility is -needed. At least not at the moment. -REDIRECTING ONLY CERTAIN PORTS -We might want to allow for redirecting only certain ports via the -tunnel while leaving others to go directly. One way to achieve this -would be to use pf anchors. Examples can be found in usr.sbin/authpf -in base or ftp/ftp-proxy in ports. Currently, this is consider an -optional feature and hence left for later, +PLUGINS -MULTI USER SUPPORT ON THE SERVER -The server shall support multiple users concurrently. This is an -important feature and the design has to be changed appropriately to -accomodate for it. +UDP PLUGIN +The UDP plugin is a direct plugin using a UDP socket for the encapsulation. -At the moment, it is unclear how the multi user support could be -achieved, but some session management, possibly with some -atuhentication/handshake out-of-band. Some encapsulations such as UDP -and TCP offer port and addresses for identifiyng the sessions/clients -while for others (ICMP) the session may have to be signalled -in-band. In particular, with the former a separate file descriptor -represents each client, making things easier. +UDP CATCHALL PLUGIN +The UDP CATCHALL plugin uses a raw IP socket to receive unclaimed UDP +traffic, i.e., listen on all unused ports. A kernel patch is provided +to allow this. -Maybe a separate tun(4) interface could be created for each user on -the server and the burden of multiplexing between them and assigning -traffic to the right tun interface (and hence mtund instance) would be -the responsibility of the kernel by using entries in the routing table -or tracking connections when natting. +TCP PLUGIN +The TCP plugin is a direct plugin using a TCP socket for the +encapsulation. In addition, a patch for the kernel is provided to +allow a TCP socket to listen on all unused ports. -AUTODETECTION -I'm not sure what/how could/should be autodetected. I guess some proxy -information could be taken from environment variables, -firefox/opera/konqueror configuration. Default gateway and other routing -informaiton could be taken from the system's routing tables. Maybe some -information about socks proxies could be taken from Dante's SOCKS config -file. Possible name servers could be taken from /etc/resolv.conf to use -for dns tunelling. Maybe the default gateway should be probed for -offering dns, http proxying,... +ICMP PLUGIN +The ICMP plugin is a polling plugin using ICMP echo requeust/response +exchanges. -QUEUING -The current implementation with blocking I/O does queuing of one -packet. If this approach turns out to be problematic, different -queuing strategies would have to be investigated. +DNS PLUGIN +The DNS plugin is a polling plugin using DNS queries/answers. Fro the +DNS encoding/decoding, code from the iodine project is used. -FRAGMENTATION -What if the encapsulation provides a smaler MTU? This might be the -case for DNS tunnelling. We should then probably fragment packets and -reassemble fragments on the other end. For this, in-band signalling -might be needed. +THINGS LEFT TO DO: -In additiona, for TCP we have to do STREAM <-> MSG dissection, for MSG -based protocols we have to figure out MSS (probably without the help -of ICMP) and fragment accordingly. +HTTP PLUGIN +Reading httptunnel sources is a good starting point. -Max thinks the absolute minimum we should provide is a MTU of 1300 -(1280 + 20) which will allow to run a gif tunnel over the mtund tunnel -without the need for IPv4 fragmentation for the gif tunnel. +CONFIG FILE +Currently, the config options are specified with #defines. A parser +for the config needs to be written. lex/yacc is a good candidate +here. The plugin-specific parts of the config file may be parsed by +the plugins. This would allow to leave the daemon independent of the +plugins. CRYPTO The easiest way to secure the tunnel would be to put IPSec on the tun -interface. Other options would likely not be investigated, but -nevertheless are descibed in this document. +interface. However, this would not secure the control traffic. Putting +a symmetric key onto both, the client and the server, the traffic +could be encrypted with blowfish, aes or another symmetric cipher. -Offering basic encryption support should be easy. Putting a symmetric -key onto both, the client and the server, encapsulated payload could -be encrypted with blowfish, aes or another symmetric cipher. +REDIRECTING ONLY CERTAIN PORTS +We might want to allow for redirecting only certain ports via the +tunnel while leaving others to go directly. One way to achieve this +would be to use pf anchors. Examples can be found in usr.sbin/authpf +in base or ftp/ftp-proxy in ports. Currently, this is consider an +optional feature and hence left for later, -Adding authentication might be harder and I'm not sure it's a high -priority. +MAN PAGE +Depened on the config file parsing. -CONFIG FILE -What should be configurable? What should the config file then look -like? The config file would be plain text file. It's format and -contents will be determined later. +PORT SKELETON +Depened on the config file parsing. -PROJECT SCHEDULE -I have put a rough estimate of a schedule in the proposal: -* core tunnel daemon, config file parsing, plugin interface - 2 weeks -* probing/checking strategy for unreliable protocols (UDP, ICMP) - - 1 week -* TCP, UDP plugins - 1 week -* ICMP plugin - 1 week -* HTTP plugin - 1 week -* DNS plugin - 1 week -* SSH plugin - 1 week -* man pages, ports Makefile - 1 week +MTU PROBING +The ping mechanism in the plugin can be used to probe which maximal +MTU passes the firewall. -However, if things go well, most items in the schedule should be done -faster. But at the moment, it seems hard to me to predict the amount of -times the various items would take. +ICMP PLUGIN PROBING +The ICMP plugin should probed if the icmp request/response exchanges +are needed or if the firewall would pass through more responses per +request,... From owner-p4-projects@FreeBSD.ORG Mon Aug 20 19:12:32 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0131C16A41A; Mon, 20 Aug 2007 19:12:32 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D6BB16A418 for ; Mon, 20 Aug 2007 19:12:31 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7CC8E13C46A for ; Mon, 20 Aug 2007 19:12:31 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KJCVGI081103 for ; Mon, 20 Aug 2007 19:12:31 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KJCVAf081098 for perforce@freebsd.org; Mon, 20 Aug 2007 19:12:31 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 20 Aug 2007 19:12:31 GMT Message-Id: <200708201912.l7KJCVAf081098@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125447 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 19:12:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=125447 Change 125447 by mharvan@mharvan_bike-planet on 2007/08/20 19:12:11 Added some omitted details. Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.doc/design.txt#5 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.doc/design.txt#5 (text+ko) ==== @@ -185,10 +185,11 @@ function report_plugin() with the REPORT_READY_TO_SEND flag to indicate that is can send a packet. The daemon then checks whether no fragments are pending. If not, a read on the tun interface is be -attempted. Note that the queue is still needed to originate ping -requests on the server as it does not queue them, but expects the -plugin to do so. Using the "urgent" queue for replies is just a -technical issue to simplify the plugins. +attempted. The entry function here is request_tun_data(). Note that +the queue is still needed to originate ping requests on the server as +it does not queue them, but expects the plugin to do so. Using the +"urgent" queue for replies is just a technical issue to simplify the +plugins. Upon receiving a response, the plugin on the client immediately generates a new request. If no data is avaiable, it sends an empty @@ -210,7 +211,9 @@ UDP CATCHALL PLUGIN The UDP CATCHALL plugin uses a raw IP socket to receive unclaimed UDP traffic, i.e., listen on all unused ports. A kernel patch is provided -to allow this. +to allow this. If the daemon indicates legitimate traffic (suign +plugin_conn_map()), a UDP socket bound/connected to the given source +UDP port, destination UDP port and destination IP address is created. TCP PLUGIN The TCP plugin is a direct plugin using a TCP socket for the @@ -219,13 +222,17 @@ ICMP PLUGIN The ICMP plugin is a polling plugin using ICMP echo requeust/response -exchanges. +exchanges. In addition, a kernel patch is provided to allow receiving +ICMP echo requests in user space rather than having the kernel +generate a reply for them. DNS PLUGIN The DNS plugin is a polling plugin using DNS queries/answers. Fro the DNS encoding/decoding, code from the iodine project is used. THINGS LEFT TO DO: +An updated list of remainig TODO items with explanations can be found +on the project wiki page. HTTP PLUGIN Reading httptunnel sources is a good starting point. @@ -235,7 +242,7 @@ for the config needs to be written. lex/yacc is a good candidate here. The plugin-specific parts of the config file may be parsed by the plugins. This would allow to leave the daemon independent of the -plugins. +plugins. The idea would be CRYPTO The easiest way to secure the tunnel would be to put IPSec on the tun From owner-p4-projects@FreeBSD.ORG Mon Aug 20 19:12:33 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E8CDA16A529; Mon, 20 Aug 2007 19:12:32 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC72216A525 for ; Mon, 20 Aug 2007 19:12:32 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9902E13C46C for ; Mon, 20 Aug 2007 19:12:32 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KJCW5N081110 for ; Mon, 20 Aug 2007 19:12:32 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KJCVwV081106 for perforce@freebsd.org; Mon, 20 Aug 2007 19:12:31 GMT (envelope-from thioretic@FreeBSD.org) Date: Mon, 20 Aug 2007 19:12:31 GMT Message-Id: <200708201912.l7KJCVwV081106@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 125448 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 19:12:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=125448 Change 125448 by thioretic@thioretic_freebox on 2007/08/20 19:12:25 IFC Affected files ... .. //depot/projects/soc2007/thioretic_gidl/amd64/amd64/machdep.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/amd64/amd64/mptable_pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/amd64/amd64/msi.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/amd64/amd64/nexus.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/amd64/amd64/trap.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/amd64/include/intr_machdep.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/amd64/pci/pci_bus.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/acpica/acpi_pcib_acpi.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/acpica/acpi_pcib_pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/common/cxgb_common.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/common/cxgb_ctl_defs.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/common/cxgb_mc5.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/common/cxgb_t3_cpl.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/common/cxgb_t3_hw.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/common/cxgb_vsc7323.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/common/cxgb_xgmac.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/cxgb_adapter.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/cxgb_include.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/cxgb_ioctl.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/cxgb_main.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/cxgb_offload.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/cxgb_offload.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/cxgb_osdep.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/cxgb_sge.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/sys/mvec.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/t3b_protocol_sram-1.1.0.bin.gz.uu#1 branch .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/t3b_tp_eeprom-1.1.0.bin.gz.uu#1 branch .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/t3fw-4.1.0.bin.gz.uu#2 delete .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/t3fw-4.5.0.bin.gz.uu#1 branch .. //depot/projects/soc2007/thioretic_gidl/dev/cxgb/ulp/toecore/toedev.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/digi/con.CX-IBM.h#1 branch .. //depot/projects/soc2007/thioretic_gidl/dev/digi/con.CX.h#1 branch .. //depot/projects/soc2007/thioretic_gidl/dev/digi/con.EPCX.h#1 branch .. //depot/projects/soc2007/thioretic_gidl/dev/digi/con.MBank.h#1 branch .. //depot/projects/soc2007/thioretic_gidl/dev/ipmi/ipmi_isa.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/nmdm/nmdm.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/pci/pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/pci/pci_pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/pci/pci_private.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/pci/pcib_if.m#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/pci/pcib_private.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/pci/pcivar.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/sym/sym_hipd.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/usb/ehci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/fs/smbfs/smbfs_smb.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/i386/i386/machdep.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/i386/i386/mptable_pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/i386/i386/msi.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/i386/i386/nexus.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/i386/i386/trap.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/i386/include/intr_machdep.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/i386/include/proc.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/i386/linux/linux_sysvec.c#3 integrate .. //depot/projects/soc2007/thioretic_gidl/i386/pci/pci_bus.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/kern/sysv_sem.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/kern/tty.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/modules/cxgb/Makefile#2 integrate .. //depot/projects/soc2007/thioretic_gidl/net/if_bridge.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/net/if_bridgevar.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/net/if_lagg.c#3 integrate .. //depot/projects/soc2007/thioretic_gidl/net/if_lagg.h#3 integrate .. //depot/projects/soc2007/thioretic_gidl/netgraph/ng_base.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl/netgraph/ng_bpf.c#2 integrate Differences ... ==== //depot/projects/soc2007/thioretic_gidl/amd64/amd64/machdep.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.638.2.11 2006/12/01 08:34:38 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.638.2.12 2007/08/07 09:16:18 jkoshy Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1219,7 +1219,7 @@ setidt(x, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_DE, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_DB, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); - setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 1); setidt(IDT_BP, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0); setidt(IDT_OF, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_BR, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); ==== //depot/projects/soc2007/thioretic_gidl/amd64/amd64/mptable_pci.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.2.8.3 2007/03/31 15:23:19 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.2.8.4 2007/08/15 20:56:08 jhb Exp $"); #include #include @@ -72,7 +72,7 @@ return (bus_generic_attach(dev)); } -/* Pass MSI alloc requests up to the nexus. */ +/* Pass MSI requests up to the nexus. */ static int mptable_hostb_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) @@ -85,12 +85,22 @@ } static int -mptable_hostb_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +mptable_hostb_alloc_msix(device_t pcib, device_t dev, int *irq) +{ + device_t bus; + + bus = device_get_parent(pcib); + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); +} + +static int +mptable_hostb_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, + uint32_t *data) { device_t bus; bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, index, irq)); + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static device_method_t mptable_hostb_methods[] = { @@ -120,8 +130,8 @@ DEVMETHOD(pcib_alloc_msi, mptable_hostb_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, mptable_hostb_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, mptable_hostb_map_msi), { 0, 0 } }; @@ -177,8 +187,8 @@ DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, pcib_map_msi), {0, 0} }; ==== //depot/projects/soc2007/thioretic_gidl/amd64/amd64/msi.c#2 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.4.2.1 2007/03/31 15:23:19 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.4.2.3 2007/08/15 21:12:07 jhb Exp $"); #include #include @@ -99,21 +99,20 @@ * assigned an ID by the system; however, a group will use the ID from * the first message. * - * For MSI-X, each message is isolated, and msi_index indicates the - * index of this message in the device's MSI-X table. + * For MSI-X, each message is isolated. */ struct msi_intsrc { struct intsrc msi_intsrc; device_t msi_dev; /* Owning device. (g) */ struct msi_intsrc *msi_first; /* First source in group. */ u_int msi_irq; /* IRQ cookie. */ - u_int msi_index; /* Index of this message. */ u_int msi_msix; /* MSI-X message. */ u_int msi_vector:8; /* IDT vector. */ u_int msi_cpu:8; /* Local APIC ID. (g) */ u_int msi_count:8; /* Messages in this group. (g) */ }; +static void msi_create_source(void); static void msi_enable_source(struct intsrc *isrc); static void msi_disable_source(struct intsrc *isrc, int eoi); static void msi_eoi_source(struct intsrc *isrc); @@ -123,19 +122,14 @@ static int msi_config_intr(struct intsrc *isrc, enum intr_trigger trig, enum intr_polarity pol); static void msi_assign_cpu(struct intsrc *isrc, u_int apic_id); -static void msix_enable_intr(struct intsrc *isrc); -static int msix_source_pending(struct intsrc *isrc); -static void msix_assign_cpu(struct intsrc *isrc, u_int apic_id); struct pic msi_pic = { msi_enable_source, msi_disable_source, msi_eoi_source, msi_enable_intr, msi_vector, msi_source_pending, NULL, NULL, msi_config_intr, msi_assign_cpu }; -struct pic msix_pic = { msi_enable_source, msi_disable_source, msi_eoi_source, - msix_enable_intr, msi_vector, msix_source_pending, - NULL, NULL, msi_config_intr, msix_assign_cpu }; static int msi_enabled; -static struct sx msi_sx; +static int msi_last_irq; +static struct mtx msi_lock; static void msi_enable_source(struct intsrc *isrc) @@ -162,17 +156,6 @@ { struct msi_intsrc *msi = (struct msi_intsrc *)isrc; - /* - * Since we can only enable the entire group at once, go ahead and - * enable the messages when the first message is given a handler. - * Note that we assume all devices will register a handler for the - * first message. - */ - if (msi->msi_index == 0) { - mtx_lock_spin(&icu_lock); - pci_enable_msi(msi->msi_dev, INTEL_ADDR(msi), INTEL_DATA(msi)); - mtx_unlock_spin(&icu_lock); - } apic_enable_vector(msi->msi_vector); } @@ -206,49 +189,11 @@ msi->msi_cpu = apic_id; if (bootverbose) - printf("msi: Assigning MSI IRQ %d to local APIC %u\n", - msi->msi_irq, msi->msi_cpu); - mtx_lock_spin(&icu_lock); + printf("msi: Assigning %s IRQ %d to local APIC %u\n", + msi->msi_msix ? "MSI-X" : "MSI", msi->msi_irq, + msi->msi_cpu); if (isrc->is_enabled) - pci_enable_msi(msi->msi_dev, INTEL_ADDR(msi), INTEL_DATA(msi)); - mtx_unlock_spin(&icu_lock); -} - -static void -msix_enable_intr(struct intsrc *isrc) -{ - struct msi_intsrc *msi = (struct msi_intsrc *)isrc; - - mtx_lock_spin(&icu_lock); - pci_enable_msix(msi->msi_dev, msi->msi_index, INTEL_ADDR(msi), - INTEL_DATA(msi)); - pci_unmask_msix(msi->msi_dev, msi->msi_index); - mtx_unlock_spin(&icu_lock); - apic_enable_vector(msi->msi_vector); -} - -static int -msix_source_pending(struct intsrc *isrc) -{ - struct msi_intsrc *msi = (struct msi_intsrc *)isrc; - - return (pci_pending_msix(msi->msi_dev, msi->msi_index)); -} - -static void -msix_assign_cpu(struct intsrc *isrc, u_int apic_id) -{ - struct msi_intsrc *msi = (struct msi_intsrc *)isrc; - - msi->msi_cpu = apic_id; - if (bootverbose) - printf("msi: Assigning MSI-X IRQ %d to local APIC %u\n", - msi->msi_irq, msi->msi_cpu); - mtx_lock_spin(&icu_lock); - if (isrc->is_enabled) - pci_enable_msix(msi->msi_dev, msi->msi_index, INTEL_ADDR(msi), - INTEL_DATA(msi)); - mtx_unlock_spin(&icu_lock); + pci_remap_msi_irq(msi->msi_dev, msi->msi_irq); } void @@ -262,8 +207,29 @@ msi_enabled = 1; intr_register_pic(&msi_pic); - intr_register_pic(&msix_pic); - sx_init(&msi_sx, "msi"); + mtx_init(&msi_lock, "msi", NULL, MTX_DEF); +} + +void +msi_create_source(void) +{ + struct msi_intsrc *msi; + u_int irq; + + mtx_lock(&msi_lock); + if (msi_last_irq >= NUM_MSI_INTS) { + mtx_unlock(&msi_lock); + return; + } + irq = msi_last_irq + FIRST_MSI_INT; + msi_last_irq++; + mtx_unlock(&msi_lock); + + msi = malloc(sizeof(struct msi_intsrc), M_MSI, M_WAITOK | M_ZERO); + msi->msi_intsrc.is_pic = &msi_pic; + msi->msi_irq = irq; + intr_register_source(&msi->msi_intsrc); + nexus_add_irq(irq); } /* @@ -273,18 +239,16 @@ * and *newcount being the number of new IRQ values added. */ int -msi_alloc(device_t dev, int count, int maxcount, int *irqs, int *newirq, - int *newcount) +msi_alloc(device_t dev, int count, int maxcount, int *irqs) { struct msi_intsrc *msi, *fsrc; - int cnt, i, j, vector; + int cnt, i, vector; - *newirq = 0; - *newcount = 0; if (!msi_enabled) return (ENXIO); - sx_xlock(&msi_sx); +again: + mtx_lock(&msi_lock); /* Try to find 'count' free IRQs. */ cnt = 0; @@ -308,26 +272,17 @@ if (cnt < count) { /* If we would exceed the max, give up. */ if (i + (count - cnt) > FIRST_MSI_INT + NUM_MSI_INTS) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENXIO); } + mtx_unlock(&msi_lock); - /* We need count - cnt more sources starting at index 'cnt'. */ - *newirq = cnt; - *newcount = count - cnt; - for (j = 0; j < *newcount; j++) { - - /* Create a new MSI source. */ - msi = malloc(sizeof(struct msi_intsrc), M_MSI, - M_WAITOK | M_ZERO); - msi->msi_intsrc.is_pic = &msi_pic; - msi->msi_irq = i + j; - intr_register_source(&msi->msi_intsrc); - - /* Add it to our array. */ - irqs[cnt] = i + j; + /* We need count - cnt more sources. */ + while (cnt < count) { + msi_create_source(); cnt++; } + goto again; } /* Ok, we now have the IRQs allocated. */ @@ -336,7 +291,7 @@ /* Allocate 'count' IDT vectors. */ vector = apic_alloc_vectors(irqs, count, maxcount); if (vector == 0) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENOSPC); } @@ -344,20 +299,18 @@ fsrc = (struct msi_intsrc *)intr_lookup_source(irqs[0]); for (i = 0; i < count; i++) { msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]); - msi->msi_intsrc.is_pic = &msi_pic; msi->msi_dev = dev; msi->msi_vector = vector + i; if (bootverbose) printf("msi: routing MSI IRQ %d to vector %u\n", msi->msi_irq, msi->msi_vector); - msi->msi_index = i; msi->msi_first = fsrc; /* XXX: Somewhat gross. */ msi->msi_intsrc.is_enabled = 0; } fsrc->msi_count = count; - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (0); } @@ -368,22 +321,22 @@ struct msi_intsrc *msi, *first; int i; - sx_xlock(&msi_sx); + mtx_lock(&msi_lock); first = (struct msi_intsrc *)intr_lookup_source(irqs[0]); if (first == NULL) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENOENT); } /* Make sure this isn't an MSI-X message. */ if (first->msi_msix) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (EINVAL); } /* Make sure this message is allocated to a group. */ if (first->msi_first == NULL) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENXIO); } @@ -392,11 +345,9 @@ * the entire group. */ if (first->msi_first != first || first->msi_count != count) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (EINVAL); } - KASSERT(first->msi_index == 0, ("index mismatch")); - KASSERT(first->msi_dev != NULL, ("unowned group")); /* Clear all the extra messages in the group. */ @@ -408,7 +359,6 @@ msi->msi_dev = NULL; apic_free_vector(msi->msi_vector, msi->msi_irq); msi->msi_vector = 0; - msi->msi_index = 0; } /* Clear out the first message. */ @@ -418,21 +368,58 @@ first->msi_vector = 0; first->msi_count = 0; - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); + return (0); +} + +int +msi_map(int irq, uint64_t *addr, uint32_t *data) +{ + struct msi_intsrc *msi; + + mtx_lock(&msi_lock); + msi = (struct msi_intsrc *)intr_lookup_source(irq); + if (msi == NULL) { + mtx_unlock(&msi_lock); + return (ENOENT); + } + + /* Make sure this message is allocated to a device. */ + if (msi->msi_dev == NULL) { + mtx_unlock(&msi_lock); + return (ENXIO); + } + + /* + * If this message isn't an MSI-X message, make sure it's part + * of a group, and switch to the first message in the + * group. + */ + if (!msi->msi_msix) { + if (msi->msi_first == NULL) { + mtx_unlock(&msi_lock); + return (ENXIO); + } + msi = msi->msi_first; + } + + *addr = INTEL_ADDR(msi); + *data = INTEL_DATA(msi); + mtx_unlock(&msi_lock); return (0); } int -msix_alloc(device_t dev, int index, int *irq, int *new) +msix_alloc(device_t dev, int *irq) { struct msi_intsrc *msi; int i, vector; - *new = 0; if (!msi_enabled) return (ENXIO); - sx_xlock(&msi_sx); +again: + mtx_lock(&msi_lock); /* Find a free IRQ. */ for (i = FIRST_MSI_INT; i < FIRST_MSI_INT + NUM_MSI_INTS; i++) { @@ -442,7 +429,7 @@ if (msi == NULL) break; - /* If this is a free one, start or continue a run. */ + /* Stop at the first free source. */ if (msi->msi_dev == NULL) break; } @@ -451,17 +438,14 @@ if (msi == NULL) { /* If we would exceed the max, give up. */ if (i + 1 > FIRST_MSI_INT + NUM_MSI_INTS) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENXIO); } + mtx_unlock(&msi_lock); /* Create a new source. */ - *new = 1; - msi = malloc(sizeof(struct msi_intsrc), M_MSI, - M_WAITOK | M_ZERO); - msi->msi_intsrc.is_pic = &msix_pic; - msi->msi_irq = i; - intr_register_source(&msi->msi_intsrc); + msi_create_source(); + goto again; } /* Allocate an IDT vector. */ @@ -471,59 +455,33 @@ vector); /* Setup source. */ - msi->msi_intsrc.is_pic = &msix_pic; msi->msi_dev = dev; msi->msi_vector = vector; - msi->msi_index = index; msi->msi_msix = 1; /* XXX: Somewhat gross. */ msi->msi_intsrc.is_enabled = 0; - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); *irq = i; return (0); } int -msix_remap(int index, int irq) -{ - struct msi_intsrc *msi; - - sx_xlock(&msi_sx); - msi = (struct msi_intsrc *)intr_lookup_source(irq); - if (msi == NULL) { - sx_xunlock(&msi_sx); - return (ENOENT); - } - - /* Make sure this is an MSI-X message. */ - if (!msi->msi_msix) { - sx_xunlock(&msi_sx); - return (EINVAL); - } - - KASSERT(msi->msi_dev != NULL, ("unowned message")); - msi->msi_index = index; - sx_xunlock(&msi_sx); - return (0); -} - -int msix_release(int irq) { struct msi_intsrc *msi; - sx_xlock(&msi_sx); + mtx_lock(&msi_lock); msi = (struct msi_intsrc *)intr_lookup_source(irq); if (msi == NULL) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENOENT); } /* Make sure this is an MSI-X message. */ if (!msi->msi_msix) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (EINVAL); } @@ -533,9 +491,8 @@ msi->msi_dev = NULL; apic_free_vector(msi->msi_vector, msi->msi_irq); msi->msi_vector = 0; - msi->msi_index = 0; msi->msi_msix = 0; - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (0); } ==== //depot/projects/soc2007/thioretic_gidl/amd64/amd64/nexus.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.66.2.2 2007/03/31 15:23:19 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.66.2.4 2007/08/15 21:12:07 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -105,9 +105,9 @@ static void nexus_delete_resource(device_t, device_t, int, int); static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs); -static int nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq); -static int nexus_remap_msix(device_t pcib, device_t dev, int index, int irq); +static int nexus_alloc_msix(device_t pcib, device_t dev, int *irq); static int nexus_release_msix(device_t pcib, device_t dev, int irq); +static int nexus_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data); static device_method_t nexus_methods[] = { /* Device interface */ @@ -137,8 +137,8 @@ DEVMETHOD(pcib_alloc_msi, nexus_alloc_msi), DEVMETHOD(pcib_release_msi, nexus_release_msi), DEVMETHOD(pcib_alloc_msix, nexus_alloc_msix), - DEVMETHOD(pcib_remap_msix, nexus_remap_msix), DEVMETHOD(pcib_release_msix, nexus_release_msix), + DEVMETHOD(pcib_map_msi, nexus_map_msi), { 0, 0 } }; @@ -519,22 +519,20 @@ resource_list_delete(rl, type, rid); } -static int -nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +/* Called from the MSI code to add new IRQs to the IRQ rman. */ +void +nexus_add_irq(u_long irq) { - int error, new; - error = msix_alloc(dev, index, irq, &new); - if (new) - rman_manage_region(&irq_rman, *irq, *irq); - return (error); + if (rman_manage_region(&irq_rman, irq, irq) != 0) + panic("%s: failed", __func__); } static int -nexus_remap_msix(device_t pcib, device_t dev, int index, int irq) +nexus_alloc_msix(device_t pcib, device_t dev, int *irq) { - return (msix_remap(index, irq)); + return (msix_alloc(dev, irq)); } static int @@ -547,24 +545,22 @@ static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) { - int error, i, newirq, newcount; - /* First alloc the messages. */ - error = msi_alloc(dev, count, maxcount, irqs, &newirq, &newcount); + return (msi_alloc(dev, count, maxcount, irqs)); +} - /* Always add any new IRQs to the rman, even on failure. */ - for (i = 0; i < newcount; i++) - rman_manage_region(&irq_rman, irqs[newirq + i], - irqs[newirq + i]); +static int +nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs) +{ - return (error); + return (msi_release(irqs, count)); } static int -nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs) +nexus_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data) { - return (msi_release(irqs, count)); + return (msi_map(irq, addr, data)); } #ifdef DEV_ISA ==== //depot/projects/soc2007/thioretic_gidl/amd64/amd64/trap.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.289.2.5 2007/02/03 03:14:21 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.289.2.6 2007/08/14 19:42:51 jhb Exp $"); /* * AMD64 Trap and System call handling @@ -162,8 +162,8 @@ { struct thread *td = curthread; struct proc *p = td->td_proc; - u_int sticks = 0; - int i = 0, ucode = 0, type, code; + u_int sticks = 0, type; + int i = 0, ucode = 0, code; PCPU_LAZY_INC(cnt.v_trap); type = frame.tf_trapno; @@ -589,7 +589,8 @@ struct trapframe *frame; vm_offset_t eva; { - int code, type, ss; + int code, ss; + u_int type; long esp; struct soft_segment_descriptor softseg; char *msg; ==== //depot/projects/soc2007/thioretic_gidl/amd64/include/intr_machdep.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/amd64/include/intr_machdep.h,v 1.5.2.6 2007/03/31 15:23:20 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.5.2.8 2007/08/15 21:12:07 jhb Exp $ */ #ifndef __MACHINE_INTR_MACHDEP_H__ @@ -147,12 +147,12 @@ void intr_resume(void); void intr_suspend(void); void intrcnt_add(const char *name, u_long **countp); -int msi_alloc(device_t dev, int count, int maxcount, int *irqs, int *newirq, - int *newcount); +void nexus_add_irq(u_long irq); +int msi_alloc(device_t dev, int count, int maxcount, int *irqs); void msi_init(void); +int msi_map(int irq, uint64_t *addr, uint32_t *data); int msi_release(int *irqs, int count); -int msix_alloc(device_t dev, int index, int *irq, int *new); -int msix_remap(int index, int irq); +int msix_alloc(device_t dev, int *irq); int msix_release(int irq); #endif /* !LOCORE */ ==== //depot/projects/soc2007/thioretic_gidl/amd64/pci/pci_bus.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.113.2.3 2007/03/31 15:23:20 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.113.2.4 2007/08/15 20:56:09 jhb Exp $"); #include "opt_cpu.h" @@ -81,7 +81,7 @@ return (PCI_INVALID_IRQ); } -/* Pass MSI alloc requests up to the nexus. */ +/* Pass MSI requests up to the nexus. */ static int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, @@ -95,12 +95,22 @@ } static int -legacy_pcib_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) +{ + device_t bus; + + bus = device_get_parent(pcib); + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); +} + +static int +legacy_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, + uint32_t *data) { device_t bus; bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, index, irq)); + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static const char * @@ -347,8 +357,8 @@ DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, legacy_pcib_map_msi), { 0, 0 } }; ==== //depot/projects/soc2007/thioretic_gidl/dev/acpica/acpi_pcib_acpi.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.47.2.4 2007/03/31 14:50:50 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.47.2.5 2007/08/15 20:56:09 jhb Exp $"); #include "opt_acpi.h" #include @@ -76,8 +76,10 @@ device_t dev, int pin); static int acpi_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); +static int acpi_pcib_map_msi(device_t pcib, device_t dev, + int irq, uint64_t *addr, uint32_t *data); static int acpi_pcib_alloc_msix(device_t pcib, device_t dev, - int index, int *irq); + int *irq); static struct resource *acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, @@ -110,8 +112,8 @@ DEVMETHOD(pcib_alloc_msi, acpi_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, acpi_pcib_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, acpi_pcib_map_msi), {0, 0} }; @@ -323,12 +325,22 @@ } static int -acpi_pcib_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +acpi_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) +{ + device_t bus; + + bus = device_get_parent(pcib); + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); +} + +static int +acpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, + uint32_t *data) { device_t bus; bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, index, irq)); + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static u_long acpi_host_mem_start = 0x80000000; ==== //depot/projects/soc2007/thioretic_gidl/dev/acpica/acpi_pcib_pci.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.12.2.3 2007/03/31 14:50:50 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.12.2.4 2007/08/15 20:56:09 jhb Exp $"); #include "opt_acpi.h" @@ -96,8 +96,8 @@ DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, pcib_map_msi), {0, 0} }; ==== //depot/projects/soc2007/thioretic_gidl/dev/cxgb/common/cxgb_common.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/common/cxgb_common.h,v 1.1.2.4 2007/06/17 23:52:16 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/common/cxgb_common.h,v 1.1.2.5 2007/08/18 09:10:25 kmacy Exp $ ***************************************************************************/ #ifndef __CHELSIO_COMMON_H @@ -38,8 +38,6 @@ #endif enum { - MAX_NPORTS = 4, - TP_TMR_RES = 200, /* TP timer resolution in usec */ MAX_FRAME_SIZE = 10240, /* max MAC frame size, includes header + FCS */ EEPROMSIZE = 8192, /* Serial EEPROM size */ RSS_TABLE_SIZE = 64, /* size of RSS lookup and mapping tables */ @@ -48,6 +46,10 @@ NCCTRL_WIN = 32, /* # of congestion control windows */ NTX_SCHED = 8, /* # of HW Tx scheduling queues */ PROTO_SRAM_LINES = 128, /* size of protocol sram */ + MAX_NPORTS = 4, + TP_TMR_RES = 200, + TP_SRAM_OFFSET = 4096, /* TP SRAM content offset in eeprom */ + TP_SRAM_LEN = 2112, /* TP SRAM content offset in eeprom */ }; #define MAX_RX_COALESCING_LEN 12288U @@ -72,8 +74,8 @@ enum { TP_VERSION_MAJOR = 1, - TP_VERSION_MINOR = 0, - TP_VERSION_MICRO = 44 + TP_VERSION_MINOR = 1, + TP_VERSION_MICRO = 0 }; #define S_TP_VERSION_MAJOR 16 @@ -96,7 +98,7 @@ enum { FW_VERSION_MAJOR = 4, - FW_VERSION_MINOR = 1, + FW_VERSION_MINOR = 5, FW_VERSION_MICRO = 0 }; @@ -393,6 +395,7 @@ T3_REV_A = 0, T3_REV_B = 2, T3_REV_B2 = 3, + T3_REV_C = 4, }; struct trace_params { @@ -467,6 +470,7 @@ unsigned int tx_xcnt; u64 tx_mcnt; unsigned int rx_xcnt; + unsigned int rx_ocnt; u64 rx_mcnt; unsigned int toggle_cnt; unsigned int txen; @@ -562,6 +566,9 @@ /* Accumulate MAC statistics every 180 seconds. For 1G we multiply by 10. */ #define MAC_STATS_ACCUM_SECS 180 +/* The external MAC needs accumulation every 30 seconds */ +#define VSC_STATS_ACCUM_SECS 30 + #define XGM_REG(reg_addr, idx) \ ((reg_addr) + (idx) * (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR)) @@ -656,9 +663,10 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 20 19:29:55 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 82DBE16A46B; Mon, 20 Aug 2007 19:29:55 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 242B816A468 for ; Mon, 20 Aug 2007 19:29:55 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0855113C4D0 for ; Mon, 20 Aug 2007 19:29:55 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KJTslB081895 for ; Mon, 20 Aug 2007 19:29:54 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KJTsxD081892 for perforce@freebsd.org; Mon, 20 Aug 2007 19:29:54 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 20 Aug 2007 19:29:54 GMT Message-Id: <200708201929.l7KJTsxD081892@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125449 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 19:29:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=125449 Change 125449 by mharvan@mharvan_bike-planet on 2007/08/20 19:29:29 Removed old content Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/README#4 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/README#4 (text+ko) ==== @@ -1,69 +1,18 @@ - Super Tunnel Daemon + Magic Tunnel Daemon -This is an initial implementation with minimal features. The daemon -creates a tun interfaces, loads encapsulation plugins, finds a working -encapsulation and connects it to the tun interfaces. Failover to other -encapsulations is supported, but currently each encapsulation is -attempted only once. - -There are two encapsulation plugins, a tcp and a udp one. The current -implementation creates three tcp encapsulations (ports 3333, 2222, -1111) and a udp encapsulation. Currently, the udp encapsulation does -not detect malfunction, firewall,..., but the tcp one does. - -Many things are still missing. There is no queuing or buffering of -traffic in the daemon. Should the encapsulation not handle a -sufficiently large MTU, there would be a problem. The tunnel has to -run with superuser privileges to set up the tun interface. Some future -plugins might also require the superuser privileges, e.g. to open a -raw socket. Privilege separation might be a good thing to do in the -future. - -The main design idea is depicted in the following figure - +---+ +-------+ +------+ - |tun| |tunneld| |plugin| - +---+ +-------+ +------+ - | - v - +--------- select() ---------------------+ - | | - v | - tun_receive() ------> plugin_send() | - | - tun_send() <------ plugin_receive() <--+ - BUILDING -On a FreeBSD system, a simple make should suffice. - -On a Linux system, uncommend the LDFLAGS in Makefile, cp -tun_dev.c.linux tun_dev.c. and make should do the trick. +On a FreeBSD system, a simple make should suffice. Before that, please +patch your system with patches in ../sys.patches to get additional +goodies. USAGE server: tunneld -s -p port client: tunneld -c -p port host -After starting tunneld, set up the tun0 interface as follows. - -FreeBSD -server: ifconfig tun0 mtu 1400 192.168.0.1 192.168.0.2 - -client: ifconfig tun0 mtu 1400 192.168.0.2 192.168.0.1 - -Linux -server: ifconfig tun0 mtu 1400 192.168.0.1 - route add 192.168.0.2 tun0 - -client: ifconfig tun0 mtu 1400 192.168.0.2 - route add 192.168.0.1 tun0 - -Then test with ping, netcat or whatever. For example, do this on the client: -ping 192.168.0.1 - -To test failover, just start adding firewall rules. On a linux box the -following would block the first encapsulation, running on TCP port -3333: -iptables -t filter -A INPUT --protocol tcp --destination-port 3333 -j DROP +You should set up nat on the tun interfaces. With pf: + nat on ral0 from !(ral0) to any -> (ral0) +where ral0 is the external network interface. To get some security, you may want to set up IPSec on the tun interface. From owner-p4-projects@FreeBSD.ORG Mon Aug 20 19:31:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3085116A418; Mon, 20 Aug 2007 19:31:59 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDF4A16A4E2 for ; Mon, 20 Aug 2007 19:31:58 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CA30013C4E9 for ; Mon, 20 Aug 2007 19:31:58 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KJVwmA082193 for ; Mon, 20 Aug 2007 19:31:58 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KJVv9C082190 for perforce@freebsd.org; Mon, 20 Aug 2007 19:31:57 GMT (envelope-from thioretic@FreeBSD.org) Date: Mon, 20 Aug 2007 19:31:57 GMT Message-Id: <200708201931.l7KJVv9C082190@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 125450 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 19:31:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=125450 Change 125450 by thioretic@thioretic_freebox on 2007/08/20 19:31:36 IFC Affected files ... .. //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/machdep.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/mptable_pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/msi.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/nexus.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/trap.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/amd64/include/intr_machdep.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/amd64/pci/pci_bus.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/acpica/acpi_pcib_acpi.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/acpica/acpi_pcib_pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/common/cxgb_common.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/common/cxgb_ctl_defs.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/common/cxgb_mc5.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/common/cxgb_t3_cpl.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/common/cxgb_t3_hw.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/common/cxgb_vsc7323.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/common/cxgb_xgmac.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/cxgb_adapter.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/cxgb_include.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/cxgb_ioctl.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/cxgb_main.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/cxgb_offload.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/cxgb_offload.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/cxgb_osdep.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/cxgb_sge.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/sys/mvec.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/t3b_protocol_sram-1.1.0.bin.gz.uu#1 branch .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/t3b_tp_eeprom-1.1.0.bin.gz.uu#1 branch .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/t3fw-4.1.0.bin.gz.uu#2 delete .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/t3fw-4.5.0.bin.gz.uu#1 branch .. //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/ulp/toecore/toedev.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/digi/con.CX-IBM.h#1 branch .. //depot/projects/soc2007/thioretic_gidl2/dev/digi/con.CX.h#1 branch .. //depot/projects/soc2007/thioretic_gidl2/dev/digi/con.EPCX.h#1 branch .. //depot/projects/soc2007/thioretic_gidl2/dev/digi/con.MBank.h#1 branch .. //depot/projects/soc2007/thioretic_gidl2/dev/ipmi/ipmi_isa.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/nmdm/nmdm.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/pci/pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/pci/pci_pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/pci/pci_private.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/pci/pcib_if.m#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/pci/pcib_private.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/pci/pcivar.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/sym/sym_hipd.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/usb/ehci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/fs/smbfs/smbfs_smb.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/i386/i386/machdep.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/i386/i386/mptable_pci.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/i386/i386/msi.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/i386/i386/nexus.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/i386/i386/trap.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/i386/include/intr_machdep.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/i386/include/proc.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/i386/linux/linux_sysvec.c#3 integrate .. //depot/projects/soc2007/thioretic_gidl2/i386/pci/pci_bus.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/kern/sysv_sem.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/kern/tty.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/modules/cxgb/Makefile#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/net/if_bridge.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/net/if_bridgevar.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/net/if_lagg.c#3 integrate .. //depot/projects/soc2007/thioretic_gidl2/net/if_lagg.h#3 integrate .. //depot/projects/soc2007/thioretic_gidl2/netgraph/ng_base.c#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/netgraph/ng_bpf.c#2 integrate Differences ... ==== //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/machdep.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.638.2.11 2006/12/01 08:34:38 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.638.2.12 2007/08/07 09:16:18 jkoshy Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1219,7 +1219,7 @@ setidt(x, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_DE, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_DB, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); - setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 1); setidt(IDT_BP, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0); setidt(IDT_OF, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_BR, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); ==== //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/mptable_pci.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.2.8.3 2007/03/31 15:23:19 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.2.8.4 2007/08/15 20:56:08 jhb Exp $"); #include #include @@ -72,7 +72,7 @@ return (bus_generic_attach(dev)); } -/* Pass MSI alloc requests up to the nexus. */ +/* Pass MSI requests up to the nexus. */ static int mptable_hostb_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) @@ -85,12 +85,22 @@ } static int -mptable_hostb_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +mptable_hostb_alloc_msix(device_t pcib, device_t dev, int *irq) +{ + device_t bus; + + bus = device_get_parent(pcib); + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); +} + +static int +mptable_hostb_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, + uint32_t *data) { device_t bus; bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, index, irq)); + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static device_method_t mptable_hostb_methods[] = { @@ -120,8 +130,8 @@ DEVMETHOD(pcib_alloc_msi, mptable_hostb_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, mptable_hostb_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, mptable_hostb_map_msi), { 0, 0 } }; @@ -177,8 +187,8 @@ DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, pcib_map_msi), {0, 0} }; ==== //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/msi.c#2 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.4.2.1 2007/03/31 15:23:19 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.4.2.3 2007/08/15 21:12:07 jhb Exp $"); #include #include @@ -99,21 +99,20 @@ * assigned an ID by the system; however, a group will use the ID from * the first message. * - * For MSI-X, each message is isolated, and msi_index indicates the - * index of this message in the device's MSI-X table. + * For MSI-X, each message is isolated. */ struct msi_intsrc { struct intsrc msi_intsrc; device_t msi_dev; /* Owning device. (g) */ struct msi_intsrc *msi_first; /* First source in group. */ u_int msi_irq; /* IRQ cookie. */ - u_int msi_index; /* Index of this message. */ u_int msi_msix; /* MSI-X message. */ u_int msi_vector:8; /* IDT vector. */ u_int msi_cpu:8; /* Local APIC ID. (g) */ u_int msi_count:8; /* Messages in this group. (g) */ }; +static void msi_create_source(void); static void msi_enable_source(struct intsrc *isrc); static void msi_disable_source(struct intsrc *isrc, int eoi); static void msi_eoi_source(struct intsrc *isrc); @@ -123,19 +122,14 @@ static int msi_config_intr(struct intsrc *isrc, enum intr_trigger trig, enum intr_polarity pol); static void msi_assign_cpu(struct intsrc *isrc, u_int apic_id); -static void msix_enable_intr(struct intsrc *isrc); -static int msix_source_pending(struct intsrc *isrc); -static void msix_assign_cpu(struct intsrc *isrc, u_int apic_id); struct pic msi_pic = { msi_enable_source, msi_disable_source, msi_eoi_source, msi_enable_intr, msi_vector, msi_source_pending, NULL, NULL, msi_config_intr, msi_assign_cpu }; -struct pic msix_pic = { msi_enable_source, msi_disable_source, msi_eoi_source, - msix_enable_intr, msi_vector, msix_source_pending, - NULL, NULL, msi_config_intr, msix_assign_cpu }; static int msi_enabled; -static struct sx msi_sx; +static int msi_last_irq; +static struct mtx msi_lock; static void msi_enable_source(struct intsrc *isrc) @@ -162,17 +156,6 @@ { struct msi_intsrc *msi = (struct msi_intsrc *)isrc; - /* - * Since we can only enable the entire group at once, go ahead and - * enable the messages when the first message is given a handler. - * Note that we assume all devices will register a handler for the - * first message. - */ - if (msi->msi_index == 0) { - mtx_lock_spin(&icu_lock); - pci_enable_msi(msi->msi_dev, INTEL_ADDR(msi), INTEL_DATA(msi)); - mtx_unlock_spin(&icu_lock); - } apic_enable_vector(msi->msi_vector); } @@ -206,49 +189,11 @@ msi->msi_cpu = apic_id; if (bootverbose) - printf("msi: Assigning MSI IRQ %d to local APIC %u\n", - msi->msi_irq, msi->msi_cpu); - mtx_lock_spin(&icu_lock); + printf("msi: Assigning %s IRQ %d to local APIC %u\n", + msi->msi_msix ? "MSI-X" : "MSI", msi->msi_irq, + msi->msi_cpu); if (isrc->is_enabled) - pci_enable_msi(msi->msi_dev, INTEL_ADDR(msi), INTEL_DATA(msi)); - mtx_unlock_spin(&icu_lock); -} - -static void -msix_enable_intr(struct intsrc *isrc) -{ - struct msi_intsrc *msi = (struct msi_intsrc *)isrc; - - mtx_lock_spin(&icu_lock); - pci_enable_msix(msi->msi_dev, msi->msi_index, INTEL_ADDR(msi), - INTEL_DATA(msi)); - pci_unmask_msix(msi->msi_dev, msi->msi_index); - mtx_unlock_spin(&icu_lock); - apic_enable_vector(msi->msi_vector); -} - -static int -msix_source_pending(struct intsrc *isrc) -{ - struct msi_intsrc *msi = (struct msi_intsrc *)isrc; - - return (pci_pending_msix(msi->msi_dev, msi->msi_index)); -} - -static void -msix_assign_cpu(struct intsrc *isrc, u_int apic_id) -{ - struct msi_intsrc *msi = (struct msi_intsrc *)isrc; - - msi->msi_cpu = apic_id; - if (bootverbose) - printf("msi: Assigning MSI-X IRQ %d to local APIC %u\n", - msi->msi_irq, msi->msi_cpu); - mtx_lock_spin(&icu_lock); - if (isrc->is_enabled) - pci_enable_msix(msi->msi_dev, msi->msi_index, INTEL_ADDR(msi), - INTEL_DATA(msi)); - mtx_unlock_spin(&icu_lock); + pci_remap_msi_irq(msi->msi_dev, msi->msi_irq); } void @@ -262,8 +207,29 @@ msi_enabled = 1; intr_register_pic(&msi_pic); - intr_register_pic(&msix_pic); - sx_init(&msi_sx, "msi"); + mtx_init(&msi_lock, "msi", NULL, MTX_DEF); +} + +void +msi_create_source(void) +{ + struct msi_intsrc *msi; + u_int irq; + + mtx_lock(&msi_lock); + if (msi_last_irq >= NUM_MSI_INTS) { + mtx_unlock(&msi_lock); + return; + } + irq = msi_last_irq + FIRST_MSI_INT; + msi_last_irq++; + mtx_unlock(&msi_lock); + + msi = malloc(sizeof(struct msi_intsrc), M_MSI, M_WAITOK | M_ZERO); + msi->msi_intsrc.is_pic = &msi_pic; + msi->msi_irq = irq; + intr_register_source(&msi->msi_intsrc); + nexus_add_irq(irq); } /* @@ -273,18 +239,16 @@ * and *newcount being the number of new IRQ values added. */ int -msi_alloc(device_t dev, int count, int maxcount, int *irqs, int *newirq, - int *newcount) +msi_alloc(device_t dev, int count, int maxcount, int *irqs) { struct msi_intsrc *msi, *fsrc; - int cnt, i, j, vector; + int cnt, i, vector; - *newirq = 0; - *newcount = 0; if (!msi_enabled) return (ENXIO); - sx_xlock(&msi_sx); +again: + mtx_lock(&msi_lock); /* Try to find 'count' free IRQs. */ cnt = 0; @@ -308,26 +272,17 @@ if (cnt < count) { /* If we would exceed the max, give up. */ if (i + (count - cnt) > FIRST_MSI_INT + NUM_MSI_INTS) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENXIO); } + mtx_unlock(&msi_lock); - /* We need count - cnt more sources starting at index 'cnt'. */ - *newirq = cnt; - *newcount = count - cnt; - for (j = 0; j < *newcount; j++) { - - /* Create a new MSI source. */ - msi = malloc(sizeof(struct msi_intsrc), M_MSI, - M_WAITOK | M_ZERO); - msi->msi_intsrc.is_pic = &msi_pic; - msi->msi_irq = i + j; - intr_register_source(&msi->msi_intsrc); - - /* Add it to our array. */ - irqs[cnt] = i + j; + /* We need count - cnt more sources. */ + while (cnt < count) { + msi_create_source(); cnt++; } + goto again; } /* Ok, we now have the IRQs allocated. */ @@ -336,7 +291,7 @@ /* Allocate 'count' IDT vectors. */ vector = apic_alloc_vectors(irqs, count, maxcount); if (vector == 0) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENOSPC); } @@ -344,20 +299,18 @@ fsrc = (struct msi_intsrc *)intr_lookup_source(irqs[0]); for (i = 0; i < count; i++) { msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]); - msi->msi_intsrc.is_pic = &msi_pic; msi->msi_dev = dev; msi->msi_vector = vector + i; if (bootverbose) printf("msi: routing MSI IRQ %d to vector %u\n", msi->msi_irq, msi->msi_vector); - msi->msi_index = i; msi->msi_first = fsrc; /* XXX: Somewhat gross. */ msi->msi_intsrc.is_enabled = 0; } fsrc->msi_count = count; - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (0); } @@ -368,22 +321,22 @@ struct msi_intsrc *msi, *first; int i; - sx_xlock(&msi_sx); + mtx_lock(&msi_lock); first = (struct msi_intsrc *)intr_lookup_source(irqs[0]); if (first == NULL) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENOENT); } /* Make sure this isn't an MSI-X message. */ if (first->msi_msix) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (EINVAL); } /* Make sure this message is allocated to a group. */ if (first->msi_first == NULL) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENXIO); } @@ -392,11 +345,9 @@ * the entire group. */ if (first->msi_first != first || first->msi_count != count) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (EINVAL); } - KASSERT(first->msi_index == 0, ("index mismatch")); - KASSERT(first->msi_dev != NULL, ("unowned group")); /* Clear all the extra messages in the group. */ @@ -408,7 +359,6 @@ msi->msi_dev = NULL; apic_free_vector(msi->msi_vector, msi->msi_irq); msi->msi_vector = 0; - msi->msi_index = 0; } /* Clear out the first message. */ @@ -418,21 +368,58 @@ first->msi_vector = 0; first->msi_count = 0; - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); + return (0); +} + +int +msi_map(int irq, uint64_t *addr, uint32_t *data) +{ + struct msi_intsrc *msi; + + mtx_lock(&msi_lock); + msi = (struct msi_intsrc *)intr_lookup_source(irq); + if (msi == NULL) { + mtx_unlock(&msi_lock); + return (ENOENT); + } + + /* Make sure this message is allocated to a device. */ + if (msi->msi_dev == NULL) { + mtx_unlock(&msi_lock); + return (ENXIO); + } + + /* + * If this message isn't an MSI-X message, make sure it's part + * of a group, and switch to the first message in the + * group. + */ + if (!msi->msi_msix) { + if (msi->msi_first == NULL) { + mtx_unlock(&msi_lock); + return (ENXIO); + } + msi = msi->msi_first; + } + + *addr = INTEL_ADDR(msi); + *data = INTEL_DATA(msi); + mtx_unlock(&msi_lock); return (0); } int -msix_alloc(device_t dev, int index, int *irq, int *new) +msix_alloc(device_t dev, int *irq) { struct msi_intsrc *msi; int i, vector; - *new = 0; if (!msi_enabled) return (ENXIO); - sx_xlock(&msi_sx); +again: + mtx_lock(&msi_lock); /* Find a free IRQ. */ for (i = FIRST_MSI_INT; i < FIRST_MSI_INT + NUM_MSI_INTS; i++) { @@ -442,7 +429,7 @@ if (msi == NULL) break; - /* If this is a free one, start or continue a run. */ + /* Stop at the first free source. */ if (msi->msi_dev == NULL) break; } @@ -451,17 +438,14 @@ if (msi == NULL) { /* If we would exceed the max, give up. */ if (i + 1 > FIRST_MSI_INT + NUM_MSI_INTS) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENXIO); } + mtx_unlock(&msi_lock); /* Create a new source. */ - *new = 1; - msi = malloc(sizeof(struct msi_intsrc), M_MSI, - M_WAITOK | M_ZERO); - msi->msi_intsrc.is_pic = &msix_pic; - msi->msi_irq = i; - intr_register_source(&msi->msi_intsrc); + msi_create_source(); + goto again; } /* Allocate an IDT vector. */ @@ -471,59 +455,33 @@ vector); /* Setup source. */ - msi->msi_intsrc.is_pic = &msix_pic; msi->msi_dev = dev; msi->msi_vector = vector; - msi->msi_index = index; msi->msi_msix = 1; /* XXX: Somewhat gross. */ msi->msi_intsrc.is_enabled = 0; - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); *irq = i; return (0); } int -msix_remap(int index, int irq) -{ - struct msi_intsrc *msi; - - sx_xlock(&msi_sx); - msi = (struct msi_intsrc *)intr_lookup_source(irq); - if (msi == NULL) { - sx_xunlock(&msi_sx); - return (ENOENT); - } - - /* Make sure this is an MSI-X message. */ - if (!msi->msi_msix) { - sx_xunlock(&msi_sx); - return (EINVAL); - } - - KASSERT(msi->msi_dev != NULL, ("unowned message")); - msi->msi_index = index; - sx_xunlock(&msi_sx); - return (0); -} - -int msix_release(int irq) { struct msi_intsrc *msi; - sx_xlock(&msi_sx); + mtx_lock(&msi_lock); msi = (struct msi_intsrc *)intr_lookup_source(irq); if (msi == NULL) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (ENOENT); } /* Make sure this is an MSI-X message. */ if (!msi->msi_msix) { - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (EINVAL); } @@ -533,9 +491,8 @@ msi->msi_dev = NULL; apic_free_vector(msi->msi_vector, msi->msi_irq); msi->msi_vector = 0; - msi->msi_index = 0; msi->msi_msix = 0; - sx_xunlock(&msi_sx); + mtx_unlock(&msi_lock); return (0); } ==== //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/nexus.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.66.2.2 2007/03/31 15:23:19 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.66.2.4 2007/08/15 21:12:07 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -105,9 +105,9 @@ static void nexus_delete_resource(device_t, device_t, int, int); static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs); -static int nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq); -static int nexus_remap_msix(device_t pcib, device_t dev, int index, int irq); +static int nexus_alloc_msix(device_t pcib, device_t dev, int *irq); static int nexus_release_msix(device_t pcib, device_t dev, int irq); +static int nexus_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data); static device_method_t nexus_methods[] = { /* Device interface */ @@ -137,8 +137,8 @@ DEVMETHOD(pcib_alloc_msi, nexus_alloc_msi), DEVMETHOD(pcib_release_msi, nexus_release_msi), DEVMETHOD(pcib_alloc_msix, nexus_alloc_msix), - DEVMETHOD(pcib_remap_msix, nexus_remap_msix), DEVMETHOD(pcib_release_msix, nexus_release_msix), + DEVMETHOD(pcib_map_msi, nexus_map_msi), { 0, 0 } }; @@ -519,22 +519,20 @@ resource_list_delete(rl, type, rid); } -static int -nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +/* Called from the MSI code to add new IRQs to the IRQ rman. */ +void +nexus_add_irq(u_long irq) { - int error, new; - error = msix_alloc(dev, index, irq, &new); - if (new) - rman_manage_region(&irq_rman, *irq, *irq); - return (error); + if (rman_manage_region(&irq_rman, irq, irq) != 0) + panic("%s: failed", __func__); } static int -nexus_remap_msix(device_t pcib, device_t dev, int index, int irq) +nexus_alloc_msix(device_t pcib, device_t dev, int *irq) { - return (msix_remap(index, irq)); + return (msix_alloc(dev, irq)); } static int @@ -547,24 +545,22 @@ static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) { - int error, i, newirq, newcount; - /* First alloc the messages. */ - error = msi_alloc(dev, count, maxcount, irqs, &newirq, &newcount); + return (msi_alloc(dev, count, maxcount, irqs)); +} - /* Always add any new IRQs to the rman, even on failure. */ - for (i = 0; i < newcount; i++) - rman_manage_region(&irq_rman, irqs[newirq + i], - irqs[newirq + i]); +static int +nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs) +{ - return (error); + return (msi_release(irqs, count)); } static int -nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs) +nexus_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data) { - return (msi_release(irqs, count)); + return (msi_map(irq, addr, data)); } #ifdef DEV_ISA ==== //depot/projects/soc2007/thioretic_gidl2/amd64/amd64/trap.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.289.2.5 2007/02/03 03:14:21 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.289.2.6 2007/08/14 19:42:51 jhb Exp $"); /* * AMD64 Trap and System call handling @@ -162,8 +162,8 @@ { struct thread *td = curthread; struct proc *p = td->td_proc; - u_int sticks = 0; - int i = 0, ucode = 0, type, code; + u_int sticks = 0, type; + int i = 0, ucode = 0, code; PCPU_LAZY_INC(cnt.v_trap); type = frame.tf_trapno; @@ -589,7 +589,8 @@ struct trapframe *frame; vm_offset_t eva; { - int code, type, ss; + int code, ss; + u_int type; long esp; struct soft_segment_descriptor softseg; char *msg; ==== //depot/projects/soc2007/thioretic_gidl2/amd64/include/intr_machdep.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/amd64/include/intr_machdep.h,v 1.5.2.6 2007/03/31 15:23:20 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.5.2.8 2007/08/15 21:12:07 jhb Exp $ */ #ifndef __MACHINE_INTR_MACHDEP_H__ @@ -147,12 +147,12 @@ void intr_resume(void); void intr_suspend(void); void intrcnt_add(const char *name, u_long **countp); -int msi_alloc(device_t dev, int count, int maxcount, int *irqs, int *newirq, - int *newcount); +void nexus_add_irq(u_long irq); +int msi_alloc(device_t dev, int count, int maxcount, int *irqs); void msi_init(void); +int msi_map(int irq, uint64_t *addr, uint32_t *data); int msi_release(int *irqs, int count); -int msix_alloc(device_t dev, int index, int *irq, int *new); -int msix_remap(int index, int irq); +int msix_alloc(device_t dev, int *irq); int msix_release(int irq); #endif /* !LOCORE */ ==== //depot/projects/soc2007/thioretic_gidl2/amd64/pci/pci_bus.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.113.2.3 2007/03/31 15:23:20 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.113.2.4 2007/08/15 20:56:09 jhb Exp $"); #include "opt_cpu.h" @@ -81,7 +81,7 @@ return (PCI_INVALID_IRQ); } -/* Pass MSI alloc requests up to the nexus. */ +/* Pass MSI requests up to the nexus. */ static int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, @@ -95,12 +95,22 @@ } static int -legacy_pcib_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) +{ + device_t bus; + + bus = device_get_parent(pcib); + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); +} + +static int +legacy_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, + uint32_t *data) { device_t bus; bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, index, irq)); + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static const char * @@ -347,8 +357,8 @@ DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, legacy_pcib_map_msi), { 0, 0 } }; ==== //depot/projects/soc2007/thioretic_gidl2/dev/acpica/acpi_pcib_acpi.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.47.2.4 2007/03/31 14:50:50 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.47.2.5 2007/08/15 20:56:09 jhb Exp $"); #include "opt_acpi.h" #include @@ -76,8 +76,10 @@ device_t dev, int pin); static int acpi_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); +static int acpi_pcib_map_msi(device_t pcib, device_t dev, + int irq, uint64_t *addr, uint32_t *data); static int acpi_pcib_alloc_msix(device_t pcib, device_t dev, - int index, int *irq); + int *irq); static struct resource *acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, @@ -110,8 +112,8 @@ DEVMETHOD(pcib_alloc_msi, acpi_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, acpi_pcib_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, acpi_pcib_map_msi), {0, 0} }; @@ -323,12 +325,22 @@ } static int -acpi_pcib_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +acpi_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) +{ + device_t bus; + + bus = device_get_parent(pcib); + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); +} + +static int +acpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, + uint32_t *data) { device_t bus; bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, index, irq)); + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static u_long acpi_host_mem_start = 0x80000000; ==== //depot/projects/soc2007/thioretic_gidl2/dev/acpica/acpi_pcib_pci.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.12.2.3 2007/03/31 14:50:50 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.12.2.4 2007/08/15 20:56:09 jhb Exp $"); #include "opt_acpi.h" @@ -96,8 +96,8 @@ DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), - DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, pcib_map_msi), {0, 0} }; ==== //depot/projects/soc2007/thioretic_gidl2/dev/cxgb/common/cxgb_common.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/common/cxgb_common.h,v 1.1.2.4 2007/06/17 23:52:16 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/common/cxgb_common.h,v 1.1.2.5 2007/08/18 09:10:25 kmacy Exp $ ***************************************************************************/ #ifndef __CHELSIO_COMMON_H @@ -38,8 +38,6 @@ #endif enum { - MAX_NPORTS = 4, - TP_TMR_RES = 200, /* TP timer resolution in usec */ MAX_FRAME_SIZE = 10240, /* max MAC frame size, includes header + FCS */ EEPROMSIZE = 8192, /* Serial EEPROM size */ RSS_TABLE_SIZE = 64, /* size of RSS lookup and mapping tables */ @@ -48,6 +46,10 @@ NCCTRL_WIN = 32, /* # of congestion control windows */ NTX_SCHED = 8, /* # of HW Tx scheduling queues */ PROTO_SRAM_LINES = 128, /* size of protocol sram */ + MAX_NPORTS = 4, + TP_TMR_RES = 200, + TP_SRAM_OFFSET = 4096, /* TP SRAM content offset in eeprom */ + TP_SRAM_LEN = 2112, /* TP SRAM content offset in eeprom */ }; #define MAX_RX_COALESCING_LEN 12288U @@ -72,8 +74,8 @@ enum { TP_VERSION_MAJOR = 1, - TP_VERSION_MINOR = 0, - TP_VERSION_MICRO = 44 + TP_VERSION_MINOR = 1, + TP_VERSION_MICRO = 0 }; #define S_TP_VERSION_MAJOR 16 @@ -96,7 +98,7 @@ enum { FW_VERSION_MAJOR = 4, - FW_VERSION_MINOR = 1, + FW_VERSION_MINOR = 5, FW_VERSION_MICRO = 0 }; @@ -393,6 +395,7 @@ T3_REV_A = 0, T3_REV_B = 2, T3_REV_B2 = 3, + T3_REV_C = 4, }; struct trace_params { @@ -467,6 +470,7 @@ unsigned int tx_xcnt; u64 tx_mcnt; unsigned int rx_xcnt; + unsigned int rx_ocnt; u64 rx_mcnt; unsigned int toggle_cnt; unsigned int txen; @@ -562,6 +566,9 @@ /* Accumulate MAC statistics every 180 seconds. For 1G we multiply by 10. */ #define MAC_STATS_ACCUM_SECS 180 +/* The external MAC needs accumulation every 30 seconds */ +#define VSC_STATS_ACCUM_SECS 30 + #define XGM_REG(reg_addr, idx) \ ((reg_addr) + (idx) * (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR)) @@ -656,9 +663,10 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 20 21:30:27 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 791F916A46B; Mon, 20 Aug 2007 21:30:27 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D35716A417 for ; Mon, 20 Aug 2007 21:30:27 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3C75313C46B for ; Mon, 20 Aug 2007 21:30:27 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KLURW0000423 for ; Mon, 20 Aug 2007 21:30:27 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KLUQiJ000418 for perforce@freebsd.org; Mon, 20 Aug 2007 21:30:26 GMT (envelope-from jbr@FreeBSD.org) Date: Mon, 20 Aug 2007 21:30:26 GMT Message-Id: <200708202130.l7KLUQiJ000418@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125453 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 21:30:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=125453 Change 125453 by jbr@jbr_bob on 2007/08/20 21:29:29 fork and exec, sort of working Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#18 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#5 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#6 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/types.h#3 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#4 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#12 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#8 edit .. //depot/projects/soc2007/jbr-syscall/tests/fork.c#3 edit .. //depot/projects/soc2007/jbr-syscall/tests/mlibc/mlibc.c#2 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#18 (text+ko) ==== @@ -910,17 +910,13 @@ { int error = 0; struct proc *p = imgp->proc; - //vm_offset_t *addr = &imgp->proc->p_usrsysshm; struct sysshm outsysshm; - //if (addr) { - //vm_unmap_sysshm(p); - error = vm_map_sysshm(p); - //} - + error = vm_map_sysshm(p); + PROC_LOCK(p); outsysshm.pid = p->p_pid; - copyout(&outsysshm, (vm_offset_t *) p->p_usrsysshm, + copyout(&outsysshm, (vm_offset_t *) p->p_usrsysshm, sizeof(struct sysshm)); PROC_UNLOCK(p); ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#5 (text+ko) ==== @@ -90,24 +90,12 @@ { int error; struct proc *p2; + error = fork1(td, RFFDG | RFPROC, 0, &p2); - error = fork1(td, RFFDG | RFPROC, 0, &p2); if (error == 0) { td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; } - - vm_map_sysshm(p2); - - struct sysshm outsysshm; - - PROC_LOCK(p2); - outsysshm.pid = p2->p_pid; - printf("%d\n", outsysshm.pid); - copyout(&outsysshm, (vm_offset_t *) p2->p_usrsysshm, - sizeof(struct sysshm)); - PROC_UNLOCK(p2); - return (error); } @@ -742,7 +730,6 @@ thread_single_end(); PROC_UNLOCK(p1); } - /* * Return child proc pointer to parent. */ ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#6 (text+ko) ==== @@ -824,6 +824,7 @@ void faultin(struct proc *p); void fixjobc(struct proc *p, struct pgrp *pgrp, int entering); int fork1(struct thread *, int, int, struct proc **); +void fork_map_sysshm(struct proc *, struct proc *, int); void fork_exit(void (*)(void *, struct trapframe *), void *, struct trapframe *); void fork_return(struct thread *, struct trapframe *); ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/types.h#3 (text+ko) ==== ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#4 (text+ko) ==== @@ -523,6 +523,7 @@ vmspace_unshare(p1); } } + fork_map_sysshm(p1, p2, flags); cpu_fork(td, p2, td2, flags); return; } @@ -541,17 +542,31 @@ if (p1->p_vmspace->vm_shm) shmfork(p1, p2); } - - p2->p_usrsysshm = (vm_offset_t) p1->p_vmspace->vm_taddr - - p1->p_usrsysshm + (vm_offset_t) p2->p_vmspace->vm_taddr; - /* * cpu_fork will copy and update the pcb, set up the kernel stack, * and make the child ready to run. */ + fork_map_sysshm(p1, p2, flags); cpu_fork(td, p2, td2, flags); } +void +fork_map_sysshm(struct proc *old, struct proc *new, int flags) +{ + struct sysshm outsysshm; + + new->p_usrsysshm = (vm_offset_t) old->p_vmspace->vm_taddr - + old->p_usrsysshm + (vm_offset_t) new->p_vmspace->vm_taddr; + + vm_map_sysshm(new); + + PROC_LOCK(new); + outsysshm.pid = new->p_pid; + PROC_UNLOCK(new); + copyout(&outsysshm, (vm_offset_t *) new->p_usrsysshm, + sizeof(struct sysshm)); +} + /* * Called after process has been wait(2)'ed apon and is being reaped. * The idea is to reclaim resources that we could not reclaim while ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#12 (text+ko) ==== @@ -2990,24 +2990,24 @@ int vm_map_sysshm(struct proc *p) { - vm_offset_t *addr = &p->p_usrsysshm; + vm_offset_t addr; vm_map_t map = &p->p_vmspace->vm_map; size_t size = round_page(sizeof(struct sysshm)); PROC_LOCK(p); - *addr = round_page((vm_offset_t) p->p_vmspace->vm_daddr) + + addr = round_page((vm_offset_t) p->p_vmspace->vm_daddr) + lim_cur(p, RLIMIT_DATA); PROC_UNLOCK(p); - if (vm_map_find(map, NULL, *addr, addr, size, TRUE, VM_PROT_RW, + if (vm_map_find(map, NULL, addr, &addr, size, TRUE, VM_PROT_RW, VM_PROT_RW, 0)) panic("vm_map_sysshm: cannot allocated sysshm."); - if (vm_map_wire(map, *addr, *addr + size, VM_MAP_WIRE_USER) + if (vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_USER) != KERN_SUCCESS) panic("vm_map_sysshm: cannot wire page."); - vm_map_t *tmap = ↦ + vm_map_t tmap = map; vm_map_entry_t entry; vm_object_t object; vm_pindex_t pindex; @@ -3015,19 +3015,22 @@ boolean_t wired; vm_page_t page; - if (vm_map_lookup(tmap, *addr, VM_PROT_READ|VM_PROT_WRITE, &entry, + if (vm_map_lookup(&tmap, addr, VM_PROT_READ|VM_PROT_WRITE, &entry, &object, &pindex, &prot, &wired)) panic("vm_map_sysshm: cannot lookup vm_object."); VM_OBJECT_LOCK(object); - page = vm_page_lookup(object, pindex); + if(!(page = vm_page_lookup(object, pindex))) + panic("vm_map_sysshm: cannot wire page."); vm_page_lock_queues(); vm_page_wire(page); vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); - vm_map_lookup_done(*tmap, entry); + vm_map_lookup_done(tmap, entry); + + p->p_usrsysshm = addr; - return (0); + return (addr); } /* ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#8 (text+ko) ==== ==== //depot/projects/soc2007/jbr-syscall/tests/fork.c#3 (text+ko) ==== ==== //depot/projects/soc2007/jbr-syscall/tests/mlibc/mlibc.c#2 (text+ko) ==== @@ -1,4 +1,5 @@ #include "mlibc.h" +#include struct sysshm * sysshm = NULL; @@ -11,9 +12,11 @@ sysctlbyname("kern.usrsysshm", &addr, &size, NULL, 0); sysshm = (struct sysshm * ) addr; + printf("%d\n", addr); } pid_t getpid2(void) { + __mlibc_init(); return(sysshm->pid); } From owner-p4-projects@FreeBSD.ORG Mon Aug 20 21:55:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B536F16A469; Mon, 20 Aug 2007 21:55:01 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87F6F16A419 for ; Mon, 20 Aug 2007 21:55:01 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7303613C480 for ; Mon, 20 Aug 2007 21:55:01 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KLt1Gw002020 for ; Mon, 20 Aug 2007 21:55:01 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KLt1O2002017 for perforce@freebsd.org; Mon, 20 Aug 2007 21:55:01 GMT (envelope-from jbr@FreeBSD.org) Date: Mon, 20 Aug 2007 21:55:01 GMT Message-Id: <200708202155.l7KLt1O2002017@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125459 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 21:55:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=125459 Change 125459 by jbr@jbr_bob on 2007/08/20 21:54:48 sync with current Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_cpu.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_switch.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/sched_ule.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/vfs_aio.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#13 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#9 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_mmap.c#2 integrate Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#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/gnu/fs/xfs/FreeBSD/xfs_mountops.c,v 1.9 2007/05/30 03:03:05 kan Exp $ + * $FreeBSD: src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c,v 1.10 2007/08/20 15:33:22 cognet Exp $ */ #include @@ -131,25 +131,25 @@ args->logbufsize = -1; parse_int(mp, "flags", &args->flags, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; args->flags |= XFSMNT_32BITINODES; parse_int(mp, "sunit", &args->sunit, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; parse_int(mp, "swidth", &args->swidth, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; parse_int(mp, "logbufs", &args->logbufs, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; parse_int(mp, "logbufsize", &args->logbufsize, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; fsname = vfs_getopts(mp->mnt_optnew, "from", &error); ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_cpu.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_cpu.c,v 1.26 2007/08/19 20:34:13 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_cpu.c,v 1.27 2007/08/20 06:28:26 njl Exp $"); #include #include @@ -227,7 +227,7 @@ const struct cf_setting *set; struct cf_saved_freq *saved_freq, *curr_freq; struct pcpu *pc; - int cpu_id, error, i; + int error, i; sc = device_get_softc(dev); error = 0; @@ -294,22 +294,17 @@ goto out; } - /* Bind to the target CPU before switching, if necessary. */ - cpu_id = PCPU_GET(cpuid); + /* Bind to the target CPU before switching. */ pc = cpu_get_pcpu(set->dev); - if (cpu_id != pc->pc_cpuid) { - thread_lock(curthread); - sched_bind(curthread, pc->pc_cpuid); - thread_unlock(curthread); - } + thread_lock(curthread); + sched_bind(curthread, pc->pc_cpuid); + thread_unlock(curthread); CF_DEBUG("setting abs freq %d on %s (cpu %d)\n", set->freq, device_get_nameunit(set->dev), PCPU_GET(cpuid)); error = CPUFREQ_DRV_SET(set->dev, set); - if (cpu_id != pc->pc_cpuid) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); if (error) { goto out; } @@ -323,22 +318,17 @@ goto out; } - /* Bind to the target CPU before switching, if necessary. */ - cpu_id = PCPU_GET(cpuid); + /* Bind to the target CPU before switching. */ pc = cpu_get_pcpu(set->dev); - if (cpu_id != pc->pc_cpuid) { - thread_lock(curthread); - sched_bind(curthread, pc->pc_cpuid); - thread_unlock(curthread); - } + thread_lock(curthread); + sched_bind(curthread, pc->pc_cpuid); + thread_unlock(curthread); CF_DEBUG("setting rel freq %d on %s (cpu %d)\n", set->freq, device_get_nameunit(set->dev), PCPU_GET(cpuid)); error = CPUFREQ_DRV_SET(set->dev, set); - if (cpu_id != pc->pc_cpuid) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); if (error) { /* XXX Back out any successful setting? */ goto out; ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_switch.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.133 2007/08/03 23:35:35 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.134 2007/08/20 06:36:12 jeff Exp $"); #include "opt_sched.h" @@ -360,45 +360,35 @@ } static __inline int -runq_findbit_from(struct runq *rq, u_char start) +runq_findbit_from(struct runq *rq, u_char pri) { struct rqbits *rqb; - int bit; - int pri; + rqb_word_t mask; int i; + /* + * Set the mask for the first word so we ignore priorities before 'pri'. + */ + mask = (rqb_word_t)-1 << (pri & (RQB_BPW - 1)); rqb = &rq->rq_status; - bit = start & (RQB_BPW -1); - pri = 0; - CTR1(KTR_RUNQ, "runq_findbit_from: start %d", start); again: - for (i = RQB_WORD(start); i < RQB_LEN; i++) { - CTR3(KTR_RUNQ, "runq_findbit_from: bits %d = %#x bit = %d", - i, rqb->rqb_bits[i], bit); - if (rqb->rqb_bits[i]) { - if (bit != 0) { - for (pri = bit; pri < RQB_BPW; pri++) - if (rqb->rqb_bits[i] & (1ul << pri)) - break; - bit = 0; - if (pri >= RQB_BPW) - continue; - } else - pri = RQB_FFS(rqb->rqb_bits[i]); - pri += (i << RQB_L2BPW); - CTR3(KTR_RUNQ, "runq_findbit_from: bits=%#x i=%d pri=%d", - rqb->rqb_bits[i], i, pri); - return (pri); - } - bit = 0; + for (i = RQB_WORD(pri); i < RQB_LEN; mask = -1, i++) { + mask = rqb->rqb_bits[i] & mask; + if (mask == 0) + continue; + pri = RQB_FFS(mask) + (i << RQB_L2BPW); + CTR3(KTR_RUNQ, "runq_findbit_from: bits=%#x i=%d pri=%d", + mask, i, pri); + return (pri); } - if (start != 0) { - CTR0(KTR_RUNQ, "runq_findbit_from: restarting"); - start = 0; - goto again; - } - - return (-1); + if (pri == 0) + return (-1); + /* + * Wrap back around to the beginning of the list just once so we + * scan the whole thing. + */ + pri = 0; + goto again; } /* ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/sched_ule.c#3 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.204 2007/08/04 01:21:28 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.205 2007/08/20 06:34:20 jeff Exp $"); #include "opt_hwpmc_hooks.h" #include "opt_sched.h" @@ -1328,6 +1328,12 @@ incr = 1; tickincr = incr; #ifdef SMP + /* + * Set steal thresh to log2(mp_ncpu) but no greater than 4. This + * prevents excess thrashing on large machines and excess idle on + * smaller machines. + */ + steal_thresh = min(ffs(mp_ncpus) - 1, 4); affinity = SCHED_AFFINITY_DEFAULT; #endif } ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/vfs_aio.c#2 (text+ko) ==== @@ -19,7 +19,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.232 2007/06/10 01:50:05 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.233 2007/08/20 11:53:26 kib Exp $"); #include #include @@ -719,6 +719,7 @@ } AIO_UNLOCK(ki); taskqueue_drain(taskqueue_aiod_bio, &ki->kaio_task); + mtx_destroy(&ki->kaio_mtx); uma_zfree(kaio_zone, ki); p->p_aioinfo = NULL; } @@ -837,7 +838,10 @@ */ if (cb->aio_lio_opcode == LIO_READ) { auio.uio_rw = UIO_READ; - error = fo_read(fp, &auio, fp->f_cred, FOF_OFFSET, td); + if (auio.uio_resid == 0) + error = 0; + else + error = fo_read(fp, &auio, fp->f_cred, FOF_OFFSET, td); } else { if (fp->f_type == DTYPE_VNODE) bwillwrite(); ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#13 (text+ko) ==== @@ -63,7 +63,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.386 2007/05/31 22:52:15 attilio Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.387 2007/08/20 12:05:45 kib Exp $"); #include #include @@ -156,6 +156,22 @@ #define PROC_VMSPACE_LOCK(p) do { } while (0) #define PROC_VMSPACE_UNLOCK(p) do { } while (0) +/* + * VM_MAP_RANGE_CHECK: [ internal use only ] + * + * Asserts that the starting and ending region + * addresses fall within the valid range of the map. + */ +#define VM_MAP_RANGE_CHECK(map, start, end) \ + { \ + if (start < vm_map_min(map)) \ + start = vm_map_min(map); \ + if (end > vm_map_max(map)) \ + end = vm_map_max(map); \ + if (start > end) \ + start = end; \ + } + void vm_map_startup(void) { @@ -1146,6 +1162,25 @@ return (0); } +int +vm_map_fixed(vm_map_t map, vm_object_t object, vm_ooffset_t offset, + vm_offset_t *addr /* IN/OUT */, vm_size_t length, vm_prot_t prot, + vm_prot_t max, int cow) +{ + vm_offset_t start, end; + int result; + + start = *addr; + vm_map_lock(map); + end = start + length; + VM_MAP_RANGE_CHECK(map, start, end); + (void) vm_map_delete(map, start, end); + result = vm_map_insert(map, object, offset, start, end, prot, + max, cow); + vm_map_unlock(map); + return (result); +} + /* * vm_map_find finds an unallocated region in the target address * map with the given length. The search is defined to be @@ -1356,22 +1391,6 @@ } /* - * VM_MAP_RANGE_CHECK: [ internal use only ] - * - * Asserts that the starting and ending region - * addresses fall within the valid range of the map. - */ -#define VM_MAP_RANGE_CHECK(map, start, end) \ - { \ - if (start < vm_map_min(map)) \ - start = vm_map_min(map); \ - if (end > vm_map_max(map)) \ - end = vm_map_max(map); \ - if (start > end) \ - start = end; \ - } - -/* * vm_map_submap: [ kernel use only ] * * Mark the given range as handled by a subordinate map. ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#9 (text+ko) ==== @@ -57,7 +57,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $FreeBSD: src/sys/vm/vm_map.h,v 1.119 2006/05/29 21:28:56 tegge Exp $ + * $FreeBSD: src/sys/vm/vm_map.h,v 1.120 2007/08/20 12:05:45 kib Exp $ */ /* @@ -333,6 +333,7 @@ vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); int vm_map_delete (vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, boolean_t, vm_prot_t, vm_prot_t, int); +int vm_map_fixed (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int); int vm_map_findspace (vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *); int vm_map_inherit (vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); void vm_map_init (struct vm_map *, vm_offset_t, vm_offset_t); ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_mmap.c#2 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_mmap.c,v 1.212 2007/07/04 22:57:21 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_mmap.c,v 1.213 2007/08/20 12:05:45 kib Exp $"); #include "opt_compat.h" #include "opt_hwpmc_hooks.h" @@ -1341,7 +1341,6 @@ if (*addr != trunc_page(*addr)) return (EINVAL); fitit = FALSE; - (void) vm_map_remove(map, *addr, *addr + size); } /* * Lookup/allocate object. @@ -1400,8 +1399,11 @@ if (flags & MAP_STACK) rv = vm_map_stack(map, *addr, size, prot, maxprot, docow | MAP_STACK_GROWS_DOWN); + else if (fitit) + rv = vm_map_find(map, object, foff, addr, size, TRUE, + prot, maxprot, docow); else - rv = vm_map_find(map, object, foff, addr, size, fitit, + rv = vm_map_fixed(map, object, foff, addr, size, prot, maxprot, docow); if (rv != KERN_SUCCESS) { From owner-p4-projects@FreeBSD.ORG Mon Aug 20 22:01:10 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C210816A41A; Mon, 20 Aug 2007 22:01:10 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8810516A417 for ; Mon, 20 Aug 2007 22:01:10 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 783D413C459 for ; Mon, 20 Aug 2007 22:01:10 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KM1AnJ002535 for ; Mon, 20 Aug 2007 22:01:10 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KM1AZj002532 for perforce@freebsd.org; Mon, 20 Aug 2007 22:01:10 GMT (envelope-from jbr@FreeBSD.org) Date: Mon, 20 Aug 2007 22:01:10 GMT Message-Id: <200708202201.l7KM1AZj002532@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125461 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 22:01:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=125461 Change 125461 by jbr@jbr_bob on 2007/08/20 22:00:20 clean up Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#6 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#5 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#6 (text+ko) ==== @@ -90,6 +90,7 @@ { int error; struct proc *p2; + error = fork1(td, RFFDG | RFPROC, 0, &p2); if (error == 0) { @@ -730,6 +731,7 @@ thread_single_end(); PROC_UNLOCK(p1); } + /* * Return child proc pointer to parent. */ ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#5 (text+ko) ==== @@ -542,6 +542,7 @@ if (p1->p_vmspace->vm_shm) shmfork(p1, p2); } + /* * cpu_fork will copy and update the pcb, set up the kernel stack, * and make the child ready to run. From owner-p4-projects@FreeBSD.ORG Mon Aug 20 22:02:13 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 45FA016A469; Mon, 20 Aug 2007 22:02:13 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E737616A420 for ; Mon, 20 Aug 2007 22:02:12 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D68CD13C48D for ; Mon, 20 Aug 2007 22:02:12 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KM2CNP002692 for ; Mon, 20 Aug 2007 22:02:12 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KM2Crd002688 for perforce@freebsd.org; Mon, 20 Aug 2007 22:02:12 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 20 Aug 2007 22:02:12 GMT Message-Id: <200708202202.l7KM2Crd002688@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125462 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 22:02:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=125462 Change 125462 by kmacy@kmacy_home:ethng on 2007/08/20 22:02:11 - track number of descriptors skipped and number of mbufs freed - bump txq_drops when coalesce fails due to queue overflow - only print debug statement on 10th iteration in reclaim - fix leak caused by acting as if more were reclaimed per iteration than were in fact - TX_START_MAX_DESC appears to be optimally set to 2^5 - don't call bus_dmamap_destroy when freeing corresponding mbuf Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#10 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#11 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_osdep.h#4 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#13 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#10 (text+ko) ==== @@ -272,6 +272,8 @@ struct mbuf_head sendq; struct mbuf_ring txq_mr; uint32_t txq_drops; + uint32_t txq_skipped; + unsigned long txq_frees; struct mtx lock; #define TXQ_NAME_LEN 32 char lockbuf[TXQ_NAME_LEN]; ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#11 (text+ko) ==== @@ -349,8 +349,10 @@ * Arbitrary threshold at which to apply backpressure */ if (mbufq_len(mbq) > cxgb_txq_mbuf_ring_size) { - if (imm) + if (imm) { m_freem_vec(imm); + txq->txq_drops++; + } *complete = 1; return (ENOBUFS); } @@ -388,72 +390,72 @@ static int cxgb_pcpu_reclaim_tx(struct sge_txq *txq) { - int reclaimable, reclaimed, i, j, n; + int reclaimable, reclaimed, freed, i, j, n; struct mbuf *m_vec[TX_CLEAN_MAX_DESC]; struct sge_qset *qs = txq_to_qset(txq, TXQ_ETH); KASSERT(qs->qs_cpuid == curcpu, ("cpu qset mismatch cpuid=%d curcpu=%d", qs->qs_cpuid, curcpu)); - reclaimed = j = 0; - reclaimable = desc_reclaimable(txq); + freed = reclaimed = j = 0; + reclaimable = min(desc_reclaimable(txq), TX_CLEAN_MAX_DESC); while (reclaimable > 0) { - n = t3_free_tx_desc(txq, min(reclaimable, TX_CLEAN_MAX_DESC), m_vec); + n = t3_free_tx_desc(txq, reclaimable, m_vec); - reclaimed += min(reclaimable, TX_CLEAN_MAX_DESC); + reclaimed += reclaimable; - if (j > 5 || cxgb_debug) + if (j > 10 || cxgb_debug) printf("n=%d reclaimable=%d txq->processed=%d txq->cleaned=%d txq->in_use=%d\n", n, reclaimable, txq->processed, txq->cleaned, txq->in_use); - for (i = 0; i < n; i++) + for (i = 0; i < n; i++) m_freem_vec(m_vec[i]); + freed += n; j++; txq->cleaned += reclaimable; txq->in_use -= reclaimable; if (isset(&qs->txq_stopped, TXQ_ETH)) clrbit(&qs->txq_stopped, TXQ_ETH); - reclaimable = desc_reclaimable(txq); + reclaimable = min(desc_reclaimable(txq), TX_CLEAN_MAX_DESC); } + txq->txq_frees += freed; return (reclaimed); } static int cxgb_pcpu_start_(struct sge_qset *qs, struct mbuf *immpkt, int tx_flush) { - int i, err, flush, complete, reclaimed, stopped; + int i, err, initerr, flush, complete, reclaimed, stopped; struct port_info *pi; struct sge_txq *txq; adapter_t *sc; uint32_t max_desc; pi = qs->port; - err = 0; + initerr = err = i = reclaimed = 0; sc = pi->adapter; - i = reclaimed = 0; retry: if (!pi->link_config.link_ok) - err = ENXIO; + initerr = ENXIO; else if (qs->qs_flags & QS_EXITING) - err = ENXIO; + initerr = ENXIO; else { txq = &qs->txq[TXQ_ETH]; - cxgb_pcpu_pkt_coalesce(txq, immpkt, &complete); + initerr = cxgb_pcpu_pkt_coalesce(txq, immpkt, &complete); immpkt = NULL; } - if (err) { + if (initerr && initerr != ENOBUFS) { if (cxgb_debug) printf("cxgb link down\n"); if (immpkt) m_freem_vec(immpkt); - return (err); + return (initerr); } - - if (desc_reclaimable(txq) > 0) { + if ((tx_flush && (desc_reclaimable(txq) > 0)) || (desc_reclaimable(txq) > (TX_ETH_Q_SIZE>>1))) { int reclaimed = 0; if (cxgb_debug) { @@ -488,6 +490,8 @@ goto retry; } + err = (initerr != 0) ? initerr : err; + return (err); } @@ -495,15 +499,14 @@ cxgb_pcpu_start(struct ifnet *ifp, struct mbuf *immpkt) { uint32_t cookie; - int err, qidx, locked; + int err, qidx, locked, resid; struct port_info *pi; struct sge_qset *qs; struct sge_txq *txq = NULL /* gcc is dumb */; - pi = ifp->if_softc; qs = NULL; - err = cookie = locked = 0; + resid = err = cookie = locked = 0; if (immpkt && (immpkt->m_pkthdr.rss_hash != 0)) { cookie = immpkt->m_pkthdr.rss_hash; @@ -516,11 +519,17 @@ txq = &qs->txq[TXQ_ETH]; if (mtx_trylock(&txq->lock)) { + txq->flags |= TXQ_TRANSMITTING; err = cxgb_pcpu_start_(qs, immpkt, FALSE); + txq->flags &= ~TXQ_TRANSMITTING; + resid = (mbufq_len(&txq->sendq) > 128) || (desc_reclaimable(txq) > 128); mtx_unlock(&txq->lock); } else if (immpkt) err = cxgb_pcpu_enqueue_packet_(qs, immpkt); + if (resid && (txq->flags & TXQ_TRANSMITTING) == 0) + wakeup(qs); + return ((err == ENOSPC) ? 0 : err); } @@ -599,9 +608,14 @@ for (;;) { if (qs->qs_flags & QS_EXITING) break; - + + if ((qs->port->ifp->if_drv_flags && IFF_DRV_RUNNING) == 0) + goto done; + if (mtx_trylock(&txq->lock)) { + txq->flags |= TXQ_TRANSMITTING; err = cxgb_pcpu_start_(qs, NULL, TRUE); + txq->flags &= ~TXQ_TRANSMITTING; mtx_unlock(&txq->lock); } else err = EINPROGRESS; @@ -625,6 +639,7 @@ txq->txq_mr.mr_prod); continue; } + done: tsleep(qs, 1, "cxgbidle", sleep_ticks); } ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_osdep.h#4 (text+ko) ==== @@ -117,12 +117,9 @@ #define TX_START_MIN_DESC (TX_MAX_DESC << 2) -#ifdef IFNET_MULTIQUEUE -#define TX_START_MAX_DESC (TX_MAX_DESC << 4) -#else + #define TX_START_MAX_DESC (TX_MAX_DESC << 3) /* maximum number of descriptors * call to start used per */ -#endif #define TX_CLEAN_MAX_DESC (TX_MAX_DESC << 4) /* maximum tx descriptors * to clean per iteration */ ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#13 (text+ko) ==== @@ -1691,7 +1691,6 @@ if (d->m) { if (d->flags & TX_SW_DESC_MAPPED) { bus_dmamap_unload(q->entry_tag, d->map); - bus_dmamap_destroy(q->entry_tag, d->map); d->flags &= ~TX_SW_DESC_MAPPED; } if (m_get_priority(d->m) == cidx) { @@ -1701,7 +1700,9 @@ } else { printf("pri=%d cidx=%d\n", (int)m_get_priority(d->m), cidx); } - } + } else + q->txq_skipped++; + ++d; if (++cidx == q->size) { cidx = 0; @@ -2830,6 +2831,12 @@ SYSCTL_ADD_UINT(ctx, qspoidlist, OID_AUTO, "in_use", CTLFLAG_RD, &txq->in_use, 0, "#tunneled packet slots in use"); + SYSCTL_ADD_ULONG(ctx, qspoidlist, OID_AUTO, "frees", + CTLFLAG_RD, &txq->txq_frees, + "#tunneled packets freed"); + SYSCTL_ADD_UINT(ctx, qspoidlist, OID_AUTO, "skipped", + CTLFLAG_RD, &txq->txq_skipped, + 0, "#tunneled packet descriptors skipped"); SYSCTL_ADD_UINT(ctx, qspoidlist, OID_AUTO, "stopped_flags", CTLFLAG_RD, &qs->txq_stopped, 0, "tx queues stopped"); From owner-p4-projects@FreeBSD.ORG Mon Aug 20 22:29:47 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 50B9D16A420; Mon, 20 Aug 2007 22:29:47 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 096D116A417 for ; Mon, 20 Aug 2007 22:29:47 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ED69213C459 for ; Mon, 20 Aug 2007 22:29:46 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KMTk35005390 for ; Mon, 20 Aug 2007 22:29:46 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KMTkSl005387 for perforce@freebsd.org; Mon, 20 Aug 2007 22:29:46 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 22:29:46 GMT Message-Id: <200708202229.l7KMTkSl005387@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125463 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 22:29:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=125463 Change 125463 by cnst@dale on 2007/08/20 22:28:55 add some hacks to generate a script to generate a cvs diff this script is quite nasty, but what else am I to do? Affected files ... .. //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#6 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#6 (text+ko) ==== @@ -1,5 +1,5 @@ #!/bin/sh -# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#5 $ +# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#6 $ # Author: Constantine A. Murenin, 2007-07 # This file creates symbolic links for GSoC2007 cnst_sensors project @@ -8,8 +8,14 @@ TPREFIX=${@:-/usr/src} #target prefix, i.e. /usr/src #echo "Source prefix: $SPREFIX; Target prefix: $TPREFIX" + +CVSDIFFSH="sensors.cvsdiff.`date +%Y-%m-%dT%H%M%S%z`.sh" +echo "#!/bin/sh" >$CVSDIFFSH + + #create some directories that are specific for this project, #if they don't exist already +echo "DIRS=\"\\" >>$CVSDIFFSH for i in "sys/dev/lm" "sys/modules/lm" "usr.sbin/sensorsd" do DIR2C=$TPREFIX/$i #directory to create @@ -18,8 +24,12 @@ mkdir $DIR2C && \ echo "Created $DIR2C" fi + echo " $i\\" >>$CVSDIFFSH done +echo "\"">>$CVSDIFFSH + +echo "FILES=\"\\" >>$CVSDIFFSH for i in `find ./ -name "*.*" -type d` do SDIR=`echo $i | sed "s#[.]/##g"` #source directory @@ -42,5 +52,32 @@ fi ln -sh $SFILE $TFILE || \ echo "File $FILEINDIR not copied to $TDIR, error occupied" + echo " $TDIR/$FILEINDIR\\" >>$CVSDIFFSH done done +echo "\"">>$CVSDIFFSH + +echo "CNST_SENSORS_PREFIX=\`pwd\`">>$CVSDIFFSH +echo "CVS_SRC_PREFIX=\${@:-/usr/src}">>$CVSDIFFSH + +echo "DIFFOUT=\$CNST_SENSORS_PREFIX/cnst-sensors.\`date +%Y-%m-%dT%H%M%S%z\`.patch" >>$CVSDIFFSH +echo "cd \$CVS_SRC_PREFIX" >>$CVSDIFFSH +echo "CVSROOT=freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs" >>$CVSDIFFSH +echo "export CVSROOT" >>$CVSDIFFSH + +echo >>$CVSDIFFSH +echo "echo \"cnst-sensors: cvs add (directories)\"" >>$CVSDIFFSH +echo "for i in \$DIRS ; do echo \$i; cvs add \$i; done " >>$CVSDIFFSH +echo "#cvs add \$DIRS" >>$CVSDIFFSH + +echo >>$CVSDIFFSH +echo "echo \"cnst-sensors: cvs add\"" >>$CVSDIFFSH +echo "#for i in \$FILES ; do echo \$i; cvs add \$i; done " >>$CVSDIFFSH +echo "cvs add \$FILES" >>$CVSDIFFSH + +echo >>$CVSDIFFSH +echo "echo \"cnst-sensors: cvs diff\"" >>$CVSDIFFSH +echo "#for i in \$FILES ; do echo \$i; cvs diff -udp4N \$i >>\$DIFFOUT; done " >>$CVSDIFFSH +echo "cvs diff -udp4N \$FILES >\$DIFFOUT; done " >>$CVSDIFFSH + +chmod +x $CVSDIFFSH From owner-p4-projects@FreeBSD.ORG Mon Aug 20 22:32:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8AB9A16A420; Mon, 20 Aug 2007 22:32:51 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AC1716A41A for ; Mon, 20 Aug 2007 22:32:51 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3AC2A13C46B for ; Mon, 20 Aug 2007 22:32:51 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KMWpGL005719 for ; Mon, 20 Aug 2007 22:32:51 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KMWo2s005716 for perforce@freebsd.org; Mon, 20 Aug 2007 22:32:50 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 22:32:50 GMT Message-Id: <200708202232.l7KMWo2s005716@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125464 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 22:32:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=125464 Change 125464 by cnst@dale on 2007/08/20 22:32:30 add a comment to the autogenerated script Affected files ... .. //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#7 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#7 (text+ko) ==== @@ -1,5 +1,5 @@ #!/bin/sh -# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#6 $ +# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#7 $ # Author: Constantine A. Murenin, 2007-07 # This file creates symbolic links for GSoC2007 cnst_sensors project @@ -11,6 +11,7 @@ CVSDIFFSH="sensors.cvsdiff.`date +%Y-%m-%dT%H%M%S%z`.sh" echo "#!/bin/sh" >$CVSDIFFSH +echo "#this **cvs diff** script is **generated by sensors.ln.sh**" >>$CVSDIFFSH #create some directories that are specific for this project, From owner-p4-projects@FreeBSD.ORG Mon Aug 20 22:35:56 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E2D8F16A468; Mon, 20 Aug 2007 22:35:55 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B527B16A418 for ; Mon, 20 Aug 2007 22:35:55 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8CCE113C458 for ; Mon, 20 Aug 2007 22:35:55 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KMZt28005931 for ; Mon, 20 Aug 2007 22:35:55 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KMZtWx005928 for perforce@freebsd.org; Mon, 20 Aug 2007 22:35:55 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 22:35:55 GMT Message-Id: <200708202235.l7KMZtWx005928@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125465 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 22:35:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=125465 Change 125465 by cnst@dale on 2007/08/20 22:35:28 sync Affected files ... .. //depot/projects/soc2007/cnst-sensors/sensors.cvsdiff.sh#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Mon Aug 20 22:53:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7CE6D16A41A; Mon, 20 Aug 2007 22:53:17 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52F7A16A418 for ; Mon, 20 Aug 2007 22:53:17 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 432B413C45A for ; Mon, 20 Aug 2007 22:53:17 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KMrH71006987 for ; Mon, 20 Aug 2007 22:53:17 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KMrGHW006984 for perforce@freebsd.org; Mon, 20 Aug 2007 22:53:16 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 22:53:16 GMT Message-Id: <200708202253.l7KMrGHW006984@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125466 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 22:53:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=125466 Change 125466 by cnst@dale on 2007/08/20 22:52:44 sort in find(1) Affected files ... .. //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#8 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#8 (text+ko) ==== @@ -1,5 +1,5 @@ #!/bin/sh -# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#7 $ +# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#8 $ # Author: Constantine A. Murenin, 2007-07 # This file creates symbolic links for GSoC2007 cnst_sensors project @@ -31,12 +31,12 @@ echo "FILES=\"\\" >>$CVSDIFFSH -for i in `find ./ -name "*.*" -type d` +for i in `find -s ./ -name "*.*" -type d` do SDIR=`echo $i | sed "s#[.]/##g"` #source directory TDIR=`echo $SDIR | sed "s#[.]#/#g" | sed "s#^usr/#usr.#g"` #target directory # echo "Source directory: $SDIR; Target directory: $TDIR" - for j in `find $SDIR -type f -and -not -path "*/CVS/*"` + for j in `find -s $SDIR -type f -and -not -path "*/CVS/*"` do FILEINDIR=`echo $j | sed "s#$SDIR/##g"` # echo "File $FILEINDIR in $SDIR" From owner-p4-projects@FreeBSD.ORG Mon Aug 20 22:54:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 52F8D16A418; Mon, 20 Aug 2007 22:54:19 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17D7316A420 for ; Mon, 20 Aug 2007 22:54:19 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 06F0013C478 for ; Mon, 20 Aug 2007 22:54:19 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KMsIgI007020 for ; Mon, 20 Aug 2007 22:54:18 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KMsIfF007017 for perforce@freebsd.org; Mon, 20 Aug 2007 22:54:18 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 22:54:18 GMT Message-Id: <200708202254.l7KMsIfF007017@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125467 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 22:54:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=125467 Change 125467 by cnst@dale on 2007/08/20 22:53:47 sync Affected files ... .. //depot/projects/soc2007/cnst-sensors/sensors.cvsdiff.sh#2 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sensors.cvsdiff.sh#2 (text+ko) ==== @@ -6,22 +6,26 @@ usr.sbin/sensorsd\ " FILES="\ + lib/libc/gen/sysctl.3\ + sbin/sysctl/Makefile\ + sbin/sysctl/sysctl.8\ + sbin/sysctl/sysctl.c\ + share/man/man4/Makefile\ + share/man/man4/lm.4\ + share/man/man9/Makefile\ + share/man/man9/sensor_attach.9\ + sys/amd64/conf/GENERIC.hints\ sys/conf/files\ + sys/dev/coretemp/coretemp.c\ sys/dev/lm/lm78.c\ sys/dev/lm/lm78_isa.c\ sys/dev/lm/lm78var.h\ sys/i386/conf/GENERIC.hints\ sys/kern/kern_sensors.c\ sys/kern/kern_sysctl.c\ + sys/modules/lm/Makefile\ sys/sys/sensors.h\ sys/sys/sysctl.h\ - sbin/sysctl/Makefile\ - sbin/sysctl/sysctl.8\ - sbin/sysctl/sysctl.c\ - usr.sbin/sensorsd/Makefile\ - usr.sbin/sensorsd/sensorsd.8\ - usr.sbin/sensorsd/sensorsd.c\ - usr.sbin/sensorsd/sensorsd.conf.5\ usr.bin/systat/Makefile\ usr.bin/systat/cmds.c\ usr.bin/systat/cmdtab.c\ @@ -46,21 +50,17 @@ usr.bin/systat/netcmds.c\ usr.bin/systat/netstat.c\ usr.bin/systat/pigs.c\ + usr.bin/systat/sensors.c\ usr.bin/systat/swap.c\ usr.bin/systat/systat.1\ usr.bin/systat/systat.h\ usr.bin/systat/tcp.c\ usr.bin/systat/vmstat.c\ - usr.bin/systat/sensors.c\ usr.sbin/Makefile\ - sys/modules/lm/Makefile\ - sys/amd64/conf/GENERIC.hints\ - sys/dev/coretemp/coretemp.c\ - lib/libc/gen/sysctl.3\ - share/man/man9/sensor_attach.9\ - share/man/man9/Makefile\ - share/man/man4/Makefile\ - share/man/man4/lm.4\ + usr.sbin/sensorsd/Makefile\ + usr.sbin/sensorsd/sensorsd.8\ + usr.sbin/sensorsd/sensorsd.c\ + usr.sbin/sensorsd/sensorsd.conf.5\ " CNST_SENSORS_PREFIX=`pwd` CVS_SRC_PREFIX=${@:-/usr/src} From owner-p4-projects@FreeBSD.ORG Mon Aug 20 23:30:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AF35716A421; Mon, 20 Aug 2007 23:30:14 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82A9116A418 for ; Mon, 20 Aug 2007 23:30:14 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 72DF913C474 for ; Mon, 20 Aug 2007 23:30:14 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7KNUEWR010237 for ; Mon, 20 Aug 2007 23:30:14 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7KNUEeJ010234 for perforce@freebsd.org; Mon, 20 Aug 2007 23:30:14 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 20 Aug 2007 23:30:14 GMT Message-Id: <200708202330.l7KNUEeJ010234@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125469 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 23:30:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=125469 Change 125469 by cnst@dale on 2007/08/20 23:30:08 don't forget to link etc, too Affected files ... .. //depot/projects/soc2007/cnst-sensors/sensors.cvsdiff.sh#3 edit .. //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#9 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sensors.cvsdiff.sh#3 (text+ko) ==== @@ -6,6 +6,7 @@ usr.sbin/sensorsd\ " FILES="\ + etc/sensorsd.conf\ lib/libc/gen/sysctl.3\ sbin/sysctl/Makefile\ sbin/sysctl/sysctl.8\ ==== //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#9 (text+ko) ==== @@ -1,5 +1,5 @@ #!/bin/sh -# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#8 $ +# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#9 $ # Author: Constantine A. Murenin, 2007-07 # This file creates symbolic links for GSoC2007 cnst_sensors project @@ -31,7 +31,7 @@ echo "FILES=\"\\" >>$CVSDIFFSH -for i in `find -s ./ -name "*.*" -type d` +for i in "etc" `find -s ./ -name "*.*" -type d` do SDIR=`echo $i | sed "s#[.]/##g"` #source directory TDIR=`echo $SDIR | sed "s#[.]#/#g" | sed "s#^usr/#usr.#g"` #target directory From owner-p4-projects@FreeBSD.ORG Tue Aug 21 00:22:18 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C256216A5EA; Tue, 21 Aug 2007 00:22:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7214B16A5D8 for ; Tue, 21 Aug 2007 00:22:18 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3FE1F13C48D for ; Tue, 21 Aug 2007 00:22:18 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L0MI6U014456 for ; Tue, 21 Aug 2007 00:22:18 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L0MIYS014453 for perforce@freebsd.org; Tue, 21 Aug 2007 00:22:18 GMT (envelope-from peter@freebsd.org) Date: Tue, 21 Aug 2007 00:22:18 GMT Message-Id: <200708210022.l7L0MIYS014453@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 125470 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 00:22:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=125470 Change 125470 by peter@peter_cheese on 2007/08/21 00:22:04 Swipe phk's diff parts for turning on the clock_* wrappers. Affected files ... .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#6 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#6 (text+ko) ==== @@ -1442,6 +1442,8 @@ POST_MEM_WRITE( ARG3, sizeof(struct vki_mq_attr) ); } +#endif + /* --------------------------------------------------------------------- clock_* wrappers ------------------------------------------------------------------ */ @@ -1482,6 +1484,7 @@ POST_MEM_WRITE( ARG2, sizeof(struct vki_timespec) ); } +#if 0 PRE(sys_clock_nanosleep) { *flags |= SfMayBlock|SfPostOnFail; @@ -2475,9 +2478,9 @@ // BSDXY(__NR_shmdt, sys_shmdt), // 230 // BSDX_(__NR_shmget, sys_shmget), // 231 -// BSDXY(__NR_clock_gettime, sys_clock_gettime), // 232 -// BSDX_(__NR_clock_settime, sys_clock_settime), // 233 -// BSDXY(__NR_clock_getres, sys_clock_getres), // 234 + BSDXY(__NR_clock_gettime, sys_clock_gettime), // 232 + BSDX_(__NR_clock_settime, sys_clock_settime), // 233 + BSDXY(__NR_clock_getres, sys_clock_getres), // 234 // unimpl timer_create 235 // unimpl timer_delete 236 From owner-p4-projects@FreeBSD.ORG Tue Aug 21 00:30:29 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1936B16A469; Tue, 21 Aug 2007 00:30:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E313716A421 for ; Tue, 21 Aug 2007 00:30:28 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D3B2013C4A5 for ; Tue, 21 Aug 2007 00:30:28 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L0USE3014942 for ; Tue, 21 Aug 2007 00:30:28 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L0USiP014939 for perforce@freebsd.org; Tue, 21 Aug 2007 00:30:28 GMT (envelope-from peter@freebsd.org) Date: Tue, 21 Aug 2007 00:30:28 GMT Message-Id: <200708210030.l7L0USiP014939@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 125471 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 00:30:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=125471 Change 125471 by peter@peter_cheese on 2007/08/21 00:29:48 Hopefully solve the stack smashing problem with async syscalls. Change putSyscallArgsIntoGuestState() into a NOP for FreeBSD. On linux, this is harmless because it just writes into the VEX register state, and the syscalls are defined to trash all registers anyway. For FreeBSD, args are on the stack. We'd have to memcpy the new args over the stack frame belonging to the syscall's caller, which the compiler may expect to use later to restore registers (which is entirely reasonable). Pass &sci->args as an additional parameters to do_syscall_for_client() rather than putSyscallArgsIntoGuestState(). Affected files ... .. //depot/projects/valgrind/coregrind/m_syswrap/syscall-x86-freebsd.S#2 edit .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-main.c#3 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_syswrap/syscall-x86-freebsd.S#2 (text+ko) ==== @@ -67,7 +67,23 @@ void* guest_state, // 4 const vki_sigset_t *sysmask, // 8 const vki_sigset_t *postmask, // 12 - Int nsigwords) // 16 + Int nsigwords, // 16 + SyscallArgs *args) // 20 + +See priv_types_n_macros.h for SyscallArgs layout: + UWord sysno; // 0 + UWord arg1; // 4 + UWord arg2; // 8 + UWord arg3; // 12 + UWord arg4; // 16 + UWord arg5; // 20 + UWord arg6; // 24 +#ifdef VGO_freebsd + UWord arg7; // 28 + UWord arg8; // 32 + Word indir_sysno; // 36 (-1 if indirect syscall() or __syscall()) + UWord nargs; // 40 +#endif */ @@ -101,8 +117,7 @@ jb 7f /* sigprocmask failed */ /* We have already collapsed the stupid FreeBSD/i386 indirect syscalls */ - movl 4+FSZ(%esp), %eax /* eax == ThreadState * */ - movl OFFSET_x86_ESP(%eax), %ebx + movl 20+FSZ(%esp), %ebx movl 0+FSZ(%esp), %eax /* use syscallno argument rather than thread EAX */ /* copy 8 args */ movl 4(%ebx), %ecx ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-main.c#3 (text+ko) ==== @@ -227,18 +227,20 @@ void* guest_state, const vki_sigset_t *syscall_mask, const vki_sigset_t *restore_mask, - Int nsigwords ); + Int nsigwords, SyscallArgs *args ); static void do_syscall_for_client ( Int syscallno, ThreadState* tst, - const vki_sigset_t* syscall_mask ) + const vki_sigset_t* syscall_mask, + SyscallArgs * args ) { vki_sigset_t saved; UWord err = ML_(do_syscall_for_client_WRK)( syscallno, &tst->arch.vex, - syscall_mask, &saved, _VKI_NSIG_WORDS * sizeof(UWord) + syscall_mask, &saved, _VKI_NSIG_WORDS * sizeof(UWord), + args ); vg_assert2( err == 0, @@ -411,8 +413,7 @@ gst->guest_EDI = canonical->arg5; gst->guest_EBP = canonical->arg6; -// AAA: missing 7th arg for freebsd/amd64 -#elif defined(VGP_amd64_linux) || defined(VGP_amd64_freebsd) +#elif defined(VGP_amd64_linux) VexGuestAMD64State* gst = (VexGuestAMD64State*)gst_vanilla; gst->guest_RAX = canonical->sysno; gst->guest_RDI = canonical->arg1; @@ -442,11 +443,9 @@ gst->guest_GPR7 = canonical->arg5; gst->guest_GPR8 = canonical->arg6; -#elif defined(VGP_x86_freebsd) - VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla; - UWord *argv = (void *)(UWord)gst->guest_ESP; - gst->guest_EAX = canonical->sysno; - memcpy(&argv[1], &canonical->arg1, canonical->nargs * sizeof(UWord)); +#elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) + /* Nothing. Uses args passed out of band. */ +#endif #else # error "putSyscallArgsIntoGuestState: unknown arch" @@ -905,6 +904,10 @@ /* Gack. More impedance matching. Copy the possibly modified syscall args back into the guest state. */ vg_assert(eq_SyscallArgs(&sci->args, &sci->orig_args)); + /* This is a NOP on FreeBSD - syscall args came from + the user's private stack. We can't change it because + the compiler sometimes expects to restore registers + after the call returns. */ putSyscallArgsIntoGuestState( &sci->args, &tst->arch.vex ); /* Drop the lock */ @@ -912,7 +915,7 @@ /* Do the call, which operates directly on the guest state, not on our abstracted copies of the args/result. */ - do_syscall_for_client(sysno, tst, &mask); + do_syscall_for_client(sysno, tst, &mask, &sci->args); /* do_syscall_for_client may not return if the syscall was interrupted by a signal. In that case, flow of control is From owner-p4-projects@FreeBSD.ORG Tue Aug 21 00:41:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 479E116A468; Tue, 21 Aug 2007 00:41:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0854216A41B for ; Tue, 21 Aug 2007 00:41:43 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ECBE013C4A5 for ; Tue, 21 Aug 2007 00:41:42 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L0fgaI015744 for ; Tue, 21 Aug 2007 00:41:42 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L0fgdJ015741 for perforce@freebsd.org; Tue, 21 Aug 2007 00:41:42 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 21 Aug 2007 00:41:42 GMT Message-Id: <200708210041.l7L0fgdJ015741@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125472 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 00:41:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=125472 Change 125472 by kmacy@kmacy_home:ethng on 2007/08/21 00:41:07 - switch tx software descriptor over to using an mbuf array with a count - make dequeue_packet check for TSO so that TSO packets are handled separately - change most tx sd local variable names to txsd Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#12 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#14 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#12 (text+ko) ==== @@ -183,23 +183,24 @@ if (qs->qs_flags & QS_EXITING) return (NULL); - critical_enter(); for (head = m = mbufq_dequeue(mbq); m != NULL; m = mbufq_dequeue(mbq)) { - /* XXXX debug */ - break; - size += m->m_pkthdr.len; count++; if (tail) tail->m_nextpkt = m; - if (count == 7 || size + mbufq_head_size(mbq) > 11*1024 || cxgb_pcpu_tx_coalesce == 0) + if (count == TX_WR_COUNT_MAX || cxgb_pcpu_tx_coalesce == 0) break; tail = m; + m = mbufq_peek(mbq); + /* + * We can't coalesce TSO packets or past 11K + */ + if (m->m_pkthdr.tso_segsz > 0 || size + m->m_pkthdr.len > TX_WR_SIZE_MAX) + break; } - critical_exit(); return (head); } ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#14 (text+ko) ==== @@ -133,7 +133,8 @@ #define RSPQ_SOP_EOP G_RSPD_SOP_EOP(F_RSPD_SOP|F_RSPD_EOP) struct tx_sw_desc { /* SW state per Tx descriptor */ - struct mbuf *m; + struct mbuf *m[TX_WR_COUNT_MAX]; + int count; bus_dmamap_t map; int flags; }; @@ -965,7 +966,7 @@ static unsigned int busdma_map_mbufs(struct mbuf **m, struct sge_txq *txq, - struct tx_sw_desc *stx, bus_dma_segment_t *segs, int *nsegs) + struct tx_sw_desc *txsd, bus_dma_segment_t *segs, int *nsegs) { struct mbuf *m0; int err, pktlen; @@ -973,7 +974,7 @@ m0 = *m; pktlen = m0->m_pkthdr.len; - err = bus_dmamap_load_mvec_sg(txq->entry_tag, stx->map, m0, segs, nsegs, 0); + err = bus_dmamap_load_mvec_sg(txq->entry_tag, txsd->map, m0, segs, nsegs, 0); #ifdef DEBUG if (err) { int n = 0; @@ -995,7 +996,7 @@ return (ENOBUFS); } *m = m0; - err = bus_dmamap_load_mbuf_sg(txq->entry_tag, stx->map, m0, segs, nsegs, 0); + err = bus_dmamap_load_mbuf_sg(txq->entry_tag, txsd->map, m0, segs, nsegs, 0); } if (err == ENOMEM) { @@ -1010,8 +1011,8 @@ return (err); } - bus_dmamap_sync(txq->entry_tag, stx->map, BUS_DMASYNC_PREWRITE); - stx->flags |= TX_SW_DESC_MAPPED; + bus_dmamap_sync(txq->entry_tag, txsd->map, BUS_DMASYNC_PREWRITE); + txsd->flags |= TX_SW_DESC_MAPPED; return (0); } @@ -1155,7 +1156,8 @@ * is freed all clusters will be freed * with it */ - txsd->m = NULL; + txsd->m[0] = NULL; + txsd->count = 0; wrp = (struct work_request_hdr *)txd; wrp->wr_hi = htonl(V_WR_DATATYPE(1) | V_WR_SGLSFLT(1)) | wr_hi; @@ -1267,7 +1269,8 @@ if (mlen <= WR_LEN - sizeof(*cpl)) { txq_prod(txq, 1, &txqs); - txq->sdesc[txqs.pidx].m = m0; + txq->sdesc[txqs.pidx].m[0] = m0; + txq->sdesc[txqs.pidx].count = 1; m_set_priority(m0, txqs.pidx); if (m0->m_len == m0->m_pkthdr.len) @@ -1308,7 +1311,8 @@ txsd = &txq->sdesc[txqs.pidx]; wr_hi = htonl(V_WR_OP(FW_WROPCODE_TUNNEL_TX_PKT) | txqs.compl); wr_lo = htonl(V_WR_TID(txq->token)); - txsd->m = m0; + txsd->m[0] = m0; + txsd->count = 1; m_set_priority(m0, txqs.pidx); write_wr_hdr_sgl(ndesc, txd, &txqs, txq, sgl, flits, sgl_flits, wr_hi, wr_lo); @@ -1675,7 +1679,7 @@ int t3_free_tx_desc(struct sge_txq *q, int n, struct mbuf **m_vec) { - struct tx_sw_desc *d; + struct tx_sw_desc *txsd; unsigned int cidx; int nbufs = 0; @@ -1684,29 +1688,30 @@ "reclaiming %u Tx descriptors at cidx %u", n, cidx); #endif cidx = q->cidx; - d = &q->sdesc[cidx]; + txsd = &q->sdesc[cidx]; while (n-- > 0) { DPRINTF("cidx=%d d=%p\n", cidx, d); - if (d->m) { - if (d->flags & TX_SW_DESC_MAPPED) { - bus_dmamap_unload(q->entry_tag, d->map); - d->flags &= ~TX_SW_DESC_MAPPED; + if (txsd->count > 0) { + if (txsd->flags & TX_SW_DESC_MAPPED) { + bus_dmamap_unload(q->entry_tag, txsd->map); + txsd->flags &= ~TX_SW_DESC_MAPPED; } - if (m_get_priority(d->m) == cidx) { - m_vec[nbufs] = d->m; - d->m = NULL; + if (m_get_priority(txsd->m[0]) == cidx) { + m_vec[nbufs] = txsd->m[0]; + txsd->m[0] = NULL; + txsd->count = 0; nbufs++; } else { - printf("pri=%d cidx=%d\n", (int)m_get_priority(d->m), cidx); + printf("pri=%d cidx=%d\n", (int)m_get_priority(txsd->m[0]), cidx); } } else q->txq_skipped++; - ++d; + ++txsd; if (++cidx == q->size) { cidx = 0; - d = q->sdesc; + txsd = q->sdesc; } } q->cidx = cidx; @@ -1763,7 +1768,8 @@ struct txq_state txqs; if (immediate(m)) { - q->sdesc[pidx].m = NULL; + q->sdesc[pidx].m[0] = NULL; + q->sdesc[pidx].count = 0; write_imm(d, m, m->m_len, gen); return; } From owner-p4-projects@FreeBSD.ORG Tue Aug 21 00:41:44 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8358416A526; Tue, 21 Aug 2007 00:41:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46E3C16A521 for ; Tue, 21 Aug 2007 00:41:44 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 21FFE13C4B3 for ; Tue, 21 Aug 2007 00:41:44 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L0fhgG015751 for ; Tue, 21 Aug 2007 00:41:43 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L0fgcr015747 for perforce@freebsd.org; Tue, 21 Aug 2007 00:41:42 GMT (envelope-from peter@freebsd.org) Date: Tue, 21 Aug 2007 00:41:42 GMT Message-Id: <200708210041.l7L0fgcr015747@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 125473 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 00:41:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=125473 Change 125473 by peter@peter_cheese on 2007/08/21 00:41:28 Remove nargs and indir_sysno stuff. We don't need it for reconstructing the args on the stack anymore and it removes one infrastructural difference to the linux version. Affected files ... .. //depot/projects/valgrind/coregrind/Makefile.am#3 edit .. //depot/projects/valgrind/coregrind/m_syswrap/makeargsize.sh#2 delete .. //depot/projects/valgrind/coregrind/m_syswrap/makeargsize6.sh#3 delete .. //depot/projects/valgrind/coregrind/m_syswrap/priv_types_n_macros.h#3 edit .. //depot/projects/valgrind/coregrind/m_syswrap/sysargcount.c#3 delete .. //depot/projects/valgrind/coregrind/m_syswrap/syscall-x86-freebsd.S#3 edit .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-main.c#4 edit Differences ... ==== //depot/projects/valgrind/coregrind/Makefile.am#3 (text+ko) ==== @@ -209,8 +209,7 @@ m_dispatch/dispatch-x86-freebsd.S \ m_sigframe/sigframe-x86-freebsd.c \ m_syswrap/syscall-x86-freebsd.S \ - m_syswrap/syswrap-x86-freebsd.c \ - m_syswrap/sysargcount.c + m_syswrap/syswrap-x86-freebsd.c libcoregrind_x86_freebsd_a_CPPFLAGS = $(AM_CPPFLAGS_X86_FREEBSD) libcoregrind_x86_freebsd_a_CFLAGS = $(AM_CFLAGS_X86_FREEBSD) ==== //depot/projects/valgrind/coregrind/m_syswrap/priv_types_n_macros.h#3 (text+ko) ==== @@ -60,8 +60,6 @@ #ifdef VGO_freebsd UWord arg7; UWord arg8; - Word indir_sysno; /* -1 if indirect syscall() or __syscall() */ - UWord nargs; #endif } SyscallArgs; ==== //depot/projects/valgrind/coregrind/m_syswrap/syscall-x86-freebsd.S#3 (text+ko) ==== @@ -81,8 +81,6 @@ #ifdef VGO_freebsd UWord arg7; // 28 UWord arg8; // 32 - Word indir_sysno; // 36 (-1 if indirect syscall() or __syscall()) - UWord nargs; // 40 #endif */ ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-main.c#4 (text+ko) ==== @@ -318,11 +318,6 @@ the platform-specific in-guest-state format to the canonical formats, and back. */ -#if defined(VGP_x86_freebsd) -extern int sysargcount[]; /* HACK! HACK! */ -extern int numsysargcount; /* HACK! HACK! */ -#endif - static void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, /*IN*/ VexGuestArchState* gst_vanilla ) @@ -374,25 +369,21 @@ switch (gst->guest_EAX) { default: canonical->sysno = gst->guest_EAX; - canonical->indir_sysno = -1; break; case 198: canonical->sysno = argv[1]; - canonical->indir_sysno = 198; argv += 2; break; case 0: canonical->sysno = argv[1]; - canonical->indir_sysno = 0; argv += 1; break; } - if (canonical->sysno < numsysargcount) - canonical->nargs = sysargcount[canonical->sysno]; - else - canonical->nargs = 0; - memset(&canonical->arg1, 0xfe, (char *)&canonical->indir_sysno - (char *)&canonical->arg1); - memcpy(&canonical->arg1, &argv[1], canonical->nargs * sizeof(UWord)); + /* + * Blindly copy 8 arguments from the stack. Valgrind checks + * for initialized-ness elsewhere. + */ + memcpy(&canonical->arg1, &argv[1], 8 * sizeof(UWord)); #else # error "getSyscallArgsFromGuestState: unknown arch" @@ -445,7 +436,6 @@ #elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) /* Nothing. Uses args passed out of band. */ -#endif #else # error "putSyscallArgsIntoGuestState: unknown arch" From owner-p4-projects@FreeBSD.ORG Tue Aug 21 00:56:02 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 479D716A41B; Tue, 21 Aug 2007 00:56:02 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E43916A417 for ; Tue, 21 Aug 2007 00:56:02 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F348013C483 for ; Tue, 21 Aug 2007 00:56:01 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L0u1TU024988 for ; Tue, 21 Aug 2007 00:56:01 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L0u1E9024985 for perforce@freebsd.org; Tue, 21 Aug 2007 00:56:01 GMT (envelope-from zec@FreeBSD.org) Date: Tue, 21 Aug 2007 00:56:01 GMT Message-Id: <200708210056.l7L0u1E9024985@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 125474 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 00:56:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=125474 Change 125474 by zec@zec_tpx32 on 2007/08/21 00:55:28 Welcome ng_pipe: a trafic shaping and delay emulation netgraph node. Traffic flows through ng_pipe upstream and downstream, through two queues in each direction. The first queue provides bandwidth emulation along with configurable queueing options selectable from FIFO, DRR and WFQ, with front or tail dropping, as well as duplicate packet generation. The second queue simply delays all traffic for preconfigured amount of time, while optionally dropping some packets based on BER setting. Except for propagation delay all settings are independently configurable on per-direction basis. ng_pipe originally appeared as a kernel module for 4.11, and this is a first-cut attempt at porting the code to -CURRENT. To simplify the initial debugging efforts the port has been stripped off of some goodies present in the original incarnation, namely support for XCP-compliant queuing and packet marking, and a few configurable variations of RED (GRED / ARED / WRED). Those might or might not reappear at some future time, after more experiences are gained about (future) interaction between ng_pipe and ALTQ as well as ng_car. As of now all ng_pipe state is protected by a single mutex lock, which as a locking strategy should be revised as throughput / performance comes more into the focus. Affected files ... .. //depot/projects/vimage/src/sys/conf/files#18 edit .. //depot/projects/vimage/src/sys/conf/options#18 edit .. //depot/projects/vimage/src/sys/modules/netgraph/Makefile#6 edit .. //depot/projects/vimage/src/sys/modules/netgraph/pipe/Makefile#1 add .. //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#1 add .. //depot/projects/vimage/src/sys/netgraph/ng_pipe.h#1 add Differences ... ==== //depot/projects/vimage/src/sys/conf/files#18 (text+ko) ==== @@ -1820,6 +1820,7 @@ netgraph/ng_nat.c optional netgraph_nat netgraph/ng_one2many.c optional netgraph_one2many netgraph/ng_parse.c optional netgraph +netgraph/ng_pipe.c optional netgraph_pipe netgraph/ng_ppp.c optional netgraph_ppp netgraph/ng_pppoe.c optional netgraph_pppoe netgraph/ng_pptpgre.c optional netgraph_pptpgre ==== //depot/projects/vimage/src/sys/conf/options#18 (text+ko) ==== @@ -452,6 +452,7 @@ NETGRAPH_NAT opt_netgraph.h NETGRAPH_NETFLOW opt_netgraph.h NETGRAPH_ONE2MANY opt_netgraph.h +NETGRAPH_PIPE opt_netgraph.h NETGRAPH_PPP opt_netgraph.h NETGRAPH_PPPOE opt_netgraph.h NETGRAPH_PPTPGRE opt_netgraph.h ==== //depot/projects/vimage/src/sys/modules/netgraph/Makefile#6 (text+ko) ==== @@ -34,6 +34,7 @@ netflow \ netgraph \ one2many \ + pipe \ ppp \ pppoe \ pptpgre \ From owner-p4-projects@FreeBSD.ORG Tue Aug 21 01:34:50 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6FF6316A46D; Tue, 21 Aug 2007 01:34:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2609616A419 for ; Tue, 21 Aug 2007 01:34:50 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 15C0313C47E for ; Tue, 21 Aug 2007 01:34:50 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L1YnaX028379 for ; Tue, 21 Aug 2007 01:34:49 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L1YnZe028374 for perforce@freebsd.org; Tue, 21 Aug 2007 01:34:49 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 21 Aug 2007 01:34:49 GMT Message-Id: <200708210134.l7L1YnZe028374@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125475 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 01:34:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=125475 Change 125475 by kmacy@kmacy_home:ethng on 2007/08/21 01:34:19 - track number of coalesced packets - make dequeue_packet and t3_encap take an array of mbufs and return / take a count - remove m_sanity call - free packet in multi-queue case if we hit ENOMEM Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#11 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#13 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#13 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#15 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#11 (text+ko) ==== @@ -273,6 +273,7 @@ struct mbuf_ring txq_mr; uint32_t txq_drops; uint32_t txq_skipped; + uint32_t txq_coalesced; unsigned long txq_frees; struct mtx lock; #define TXQ_NAME_LEN 32 @@ -523,7 +524,7 @@ void t3b_intr(void *data); void t3_intr_msi(void *data); void t3_intr_msix(void *data); -int t3_encap(struct sge_qset *, struct mbuf **); +int t3_encap(struct sge_qset *, struct mbuf **, int); int t3_sge_init_adapter(adapter_t *); int t3_sge_init_port(struct port_info *); @@ -590,7 +591,7 @@ #endif void t3_free_qset(adapter_t *sc, struct sge_qset *q); -struct mbuf *cxgb_dequeue_packet(struct ifnet *ifp, struct sge_txq *unused); +int cxgb_dequeue_packet(struct ifnet *, struct sge_txq *, struct mbuf **); void cxgb_start(struct ifnet *ifp); void refill_fl_service(adapter_t *adap, struct sge_fl *fl); ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#13 (text+ko) ==== @@ -1929,35 +1929,23 @@ cxgb_tx_common(struct ifnet *ifp, struct sge_qset *qs, uint32_t txmax) { struct sge_txq *txq; - struct mbuf *m0, *m = NULL; - int err, in_use_init; - + int err, in_use_init, count, i; + struct mbuf *m_vec[TX_WR_COUNT_MAX]; + txq = &qs->txq[TXQ_ETH]; in_use_init = txq->in_use; err = 0; while ((txq->in_use - in_use_init < txmax) && (txq->size > txq->in_use + TX_MAX_DESC)) { - m = cxgb_dequeue_packet(ifp, txq); - if (m == NULL) + count = cxgb_dequeue_packet(ifp, txq, m_vec); + if (count == 0) break; +#ifdef notyet /* * Convert chain to M_IOVEC */ KASSERT((m->m_flags & M_IOVEC) == 0, ("IOVEC set too early")); m0 = m; -#ifdef INVARIANTS - /* - * Clean up after net stack sloppiness - * before calling m_sanity - */ - m0 = m->m_next; - while (m0) { - m0->m_flags &= ~M_PKTHDR; - m0 = m0->m_next; - } - m_sanity(m0, 0); - m0 = m; -#endif if (collapse_mbufs && m->m_pkthdr.len > MCLBYTES && m_collapse(m, TX_MAX_SEGS, &m0) == EFBIG) { if ((m0 = m_defrag(m, M_NOWAIT)) != NULL) { @@ -1967,9 +1955,11 @@ break; } m = m0; - if ((err = t3_encap(qs, &m)) != 0) +#endif + if ((err = t3_encap(qs, m_vec, count)) != 0) break; - BPF_MTAP(ifp, m); + for (i = 0; i < count; i++) + BPF_MTAP(ifp, m_vec[i]); } #ifndef IFNET_MULTIQUEUE if (__predict_false(err)) { @@ -1993,6 +1983,13 @@ err = ENOSPC; setbit(&qs->txq_stopped, TXQ_ETH); } + if (err == ENOMEM) { + /* + * Sub-optimal :-/ + */ + for (i = 0; i < count; i++) + m_freem(m_vec[i]); + } #endif return (err); } @@ -2048,13 +2045,12 @@ } while (error == 0); } -struct mbuf * -cxgb_dequeue_packet(struct ifnet *ifp, struct sge_txq *unused) +int +cxgb_dequeue_packet(struct ifnet *ifp, struct sge_txq *unused, struct mbuf **m_vec) { - struct mbuf *m; - - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); - return (m); + + IFQ_DRV_DEQUEUE(&ifp->if_snd, m_vec[0]); + return (m_vec[0] ? 1 : 0); } void ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#13 (text+ko) ==== @@ -167,42 +167,40 @@ return (err); } -struct mbuf * -cxgb_dequeue_packet(struct ifnet *unused, struct sge_txq *txq) +int +cxgb_dequeue_packet(struct ifnet *unused, struct sge_txq *txq, struct mbuf **m_vec) { - struct mbuf *m, *tail, *head; + struct mbuf *m; struct sge_qset *qs; - int count, size; + int count, size, coalesced; struct mbuf_head *mbq; mbq = &txq->sendq; - count = size = 0; - tail = NULL; + coalesced = count = size = 0; qs = txq_to_qset(txq, TXQ_ETH); if (qs->qs_flags & QS_EXITING) - return (NULL); + return (0); - for (head = m = mbufq_dequeue(mbq); m != NULL; m = mbufq_dequeue(mbq)) { + for (m = mbufq_dequeue(mbq); m != NULL; m = mbufq_dequeue(mbq)) { size += m->m_pkthdr.len; - count++; - - if (tail) - tail->m_nextpkt = m; + m_vec[count++] = m; if (count == TX_WR_COUNT_MAX || cxgb_pcpu_tx_coalesce == 0) break; - tail = m; m = mbufq_peek(mbq); /* * We can't coalesce TSO packets or past 11K */ - if (m->m_pkthdr.tso_segsz > 0 || size + m->m_pkthdr.len > TX_WR_SIZE_MAX) + if (m->m_pkthdr.tso_segsz > 0 || size + m->m_pkthdr.len > TX_WR_SIZE_MAX || m->m_next != NULL) break; + + coalesced++; } - - return (head); + txq->txq_coalesced += coalesced; + + return (count); } int32_t ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#15 (text+ko) ==== @@ -1179,7 +1179,7 @@ #define TCPPKTHDRSIZE (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + 20 + 20) int -t3_encap(struct sge_qset *qs, struct mbuf **m) +t3_encap(struct sge_qset *qs, struct mbuf **m, int count) { adapter_t *sc; struct mbuf *m0; From owner-p4-projects@FreeBSD.ORG Tue Aug 21 01:59:26 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 990FC16A421; Tue, 21 Aug 2007 01:59:26 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 514C916A417 for ; Tue, 21 Aug 2007 01:59:26 +0000 (UTC) (envelope-from loafier@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3FBD913C45D for ; Tue, 21 Aug 2007 01:59:26 +0000 (UTC) (envelope-from loafier@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L1xQlM029584 for ; Tue, 21 Aug 2007 01:59:26 GMT (envelope-from loafier@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L1xL0G029581 for perforce@freebsd.org; Tue, 21 Aug 2007 01:59:21 GMT (envelope-from loafier@FreeBSD.org) Date: Tue, 21 Aug 2007 01:59:21 GMT Message-Id: <200708210159.l7L1xL0G029581@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to loafier@FreeBSD.org using -f From: Christopher Davis To: Perforce Change Reviews Cc: Subject: PERFORCE change 125476 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 01:59:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=125476 Change 125476 by loafier@chrisdsoc on 2007/08/21 01:58:53 integrate Affected files ... .. //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#5 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/articles/rc-scripting/article.sgml#2 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml#3 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml#2 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml#2 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/books/handbook/install/chapter.sgml#6 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/books/handbook/introduction/chapter.sgml#2 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/books/handbook/network-servers/chapter.sgml#3 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/hu_HU.ISO8859-2/articles/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/hu_HU.ISO8859-2/articles/explaining-bsd/Makefile#1 branch .. //depot/projects/soc2007/loafier_busalloc/doc/hu_HU.ISO8859-2/articles/explaining-bsd/article.sgml#1 branch .. //depot/projects/soc2007/loafier_busalloc/doc/mn_MN.UTF-8/books/handbook/bibliography/chapter.sgml#3 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/mn_MN.UTF-8/books/handbook/install/chapter.sgml#5 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/mn_MN.UTF-8/share/sgml/trademarks.ent#3 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/share/sgml/freebsd.ent#2 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/share/sgml/man-refs.ent#5 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/share/sgml/trademarks.ent#3 integrate .. //depot/projects/soc2007/loafier_busalloc/doc/zh_TW.Big5/books/handbook/install/chapter.sgml#3 integrate .. //depot/projects/soc2007/loafier_busalloc/ports/MOVED#6 integrate .. //depot/projects/soc2007/loafier_busalloc/ports/Mk/bsd.sites.mk#2 integrate .. //depot/projects/soc2007/loafier_busalloc/ports/Tools/scripts/README#2 integrate .. //depot/projects/soc2007/loafier_busalloc/ports/Tools/scripts/neededlibs.sh#1 branch .. //depot/projects/soc2007/loafier_busalloc/ports/Tools/scripts/resolveportsfromlibs.sh#1 branch .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/BASE-VER#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/DATESTAMP#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/Makefile.in#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/calls.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/combine.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/arm/arm.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/arm/cirrus.md#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/i386/i386.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/i386/i386.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/i386/i386.md#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/i386/sse.md#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/mips/iris6.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/rs6000/predicates.md#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/rs6000/rs6000.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/double.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/extended.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/floatundidf.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/floatundisf.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/floatunsidf.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/floatunsisf.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/op-2.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/op-4.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/op-common.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/soft-fp/quad.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/config/sparc/sparc.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/call.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/class.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/cp-tree.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/decl.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/decl2.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/init.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/parser.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/pt.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/semantics.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/typeck.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/cp/typeck2.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/doc/cpp.1#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/doc/gcc.1#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/doc/gcov.1#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/dwarf2out.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/except.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/fold-const.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/function.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/gimplify.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/gthr-posix.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/gthr-posix.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/loop-iv.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/objc/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/omp-low.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/pointer-set.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/pointer-set.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/reload.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/tree-if-conv.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/tree-ssa-loop-niter.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/tree-ssa-operands.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/tree-ssa-structalias.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/tree-vrp.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcc/version.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcclibs/include/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcclibs/libcpp/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcclibs/libdecnumber/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcclibs/libgomp/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcclibs/libgomp/config/posix/lock.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcclibs/libgomp/sections.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcclibs/libiberty/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcclibs/libmudflap/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/gcclibs/libssp/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/less/main.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libobjc/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/ChangeLog#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/acinclude.m4#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/config.h.in#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/configure#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/include/Makefile.am#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/include/Makefile.in#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/include/bits/ostream.tcc#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/include/bits/ostream_insert.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/include/ext/throw_allocator.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/include/std/std_fstream.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/libsupc++/exception#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/libsupc++/new#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/contrib/libstdc++/libsupc++/typeinfo#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/etc/etc.arm/ttys#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/etc/namedb/named.conf#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/etc/rc.d/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/etc/rc.d/lockd#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/etc/rc.d/nfslocking#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/etc/rc.d/statd#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/gnu/lib/libgcc/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/gnu/lib/libstdc++/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/lib/libarchive/archive_read_support_format_tar.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/lib/libarchive/archive_write_disk.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/lib/libarchive/test/test_read_format_gtar_sparse.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/lib/libarchive/test/test_write_disk_perms.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/release/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/hardware/common/hw.ent#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/hardware/common/intro.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/Makefile#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/Makefile.inc#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/amd64/Makefile#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/amd64/article.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/common/abstract.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/common/install.ent#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/common/install.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/common/layout.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/common/upgrade.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/i386/Makefile#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/i386/article.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/ia64/Makefile#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/ia64/article.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/pc98/Makefile#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/pc98/article.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/powerpc/Makefile#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/powerpc/article.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/sparc64/Makefile#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/sparc64/article.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/installation/sparc64/install.sgml#2 delete .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/readme/article.sgml#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#6 integrate .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/share/examples/Makefile.relnotesng#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/share/misc/dev.archlist.txt#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/release/doc/share/sgml/release.ent#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sbin/atacontrol/atacontrol.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sbin/reboot/boot_i386.8#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sbin/tunefs/tunefs.8#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/share/man/man4/mfi.4#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/share/man/man4/ng_fec.4#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/share/man/man5/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/share/man/man5/boot.config.5#1 branch .. //depot/projects/soc2007/loafier_busalloc/src/share/mk/sys.mk#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/amd64/conf/NOTES#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/amd64/include/specialreg.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/arm/arm/busdma_machdep.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/boot/arm/at91/boot2/boot2.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/compat/freebsd32/freebsd32_proto.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/compat/freebsd32/freebsd32_syscall.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/compat/freebsd32/freebsd32_syscalls.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/compat/freebsd32/freebsd32_sysent.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/compat/freebsd32/syscalls.master#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/conf/NOTES#5 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/conf/files.amd64#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/conf/files.i386#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/ata/ata-raid.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/cxgb/common/cxgb_t3_hw.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/cxgb/cxgb_adapter.h#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/cxgb/cxgb_ioctl.h#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/cxgb/cxgb_main.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/cxgb/cxgb_offload.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/cxgb/cxgb_offload.h#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/cxgb/cxgb_sge.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/dcons/dcons_os.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/ichwd/ichwd.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/mfi/mfi.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/mfi/mfi_disk.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/mfi/mfi_pci.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/mfi/mfireg.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/mfi/mfivar.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/mpt/mpt.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/mpt/mpt.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/mpt/mpt_cam.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/re/if_re.c#5 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/usb/ehci.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/fs/msdosfs/msdosfs_vfsops.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/fs/tmpfs/tmpfs_vnops.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/i386/conf/NOTES#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/i386/include/specialreg.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/init_sysent.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/kern_cpu.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/kern_switch.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/kern_thr.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/sched_ule.c#5 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/syscalls.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/syscalls.master#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/systrace_args.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/vfs_aio.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/vfs_mount.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/kern/vfs_subr.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/modules/Makefile#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/soc2007/loafier_busalloc/src/sys/modules/netgraph/bluetooth/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/net/bridgestp.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netgraph/ng_base.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netinet/sctp_asconf.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netinet/sctp_input.c#5 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netinet/sctp_output.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netinet/sctp_pcb.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netinet/sctp_timer.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netinet/sctp_usrreq.c#5 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netinet/sctputil.c#5 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/netinet/tcp_subr.c#4 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/include/intr_machdep.h#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/include/md_var.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/powerpc/interrupt.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/powerpc/nexus.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/sys/ata.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/sys/syscall.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/sys/syscall.mk#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/sys/sysproto.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/sys/thr.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/vm/device_pager.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/vm/phys_pager.c#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/vm/vm_map.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/vm/vm_map.h#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/sys/vm/vm_mmap.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/usr.sbin/freebsd-update/freebsd-update.sh#3 integrate .. //depot/projects/soc2007/loafier_busalloc/src/usr.sbin/rpc.statd/file.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/src/usr.sbin/sysinstall/menus.c#2 integrate .. //depot/projects/soc2007/loafier_busalloc/www/en/gnome/news.xml#2 integrate .. //depot/projects/soc2007/loafier_busalloc/www/en/relnotes.sgml#2 integrate .. //depot/projects/soc2007/loafier_busalloc/www/ru/Makefile#2 integrate .. //depot/projects/soc2007/loafier_busalloc/www/share/sgml/commercial.consult.xml#2 integrate .. //depot/projects/soc2007/loafier_busalloc/www/share/sgml/commercial.isp.xml#3 integrate .. //depot/projects/soc2007/loafier_busalloc/www/share/sgml/commercial.software.xml#2 integrate Differences ... ==== //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#5 (text+ko) ==== @@ -1,4 +1,4 @@ - + @@ -2771,6 +2771,91 @@ the full /24 address range can be allocated without subnetting. + + + SNMP Monitoring + + The bridge interface and STP parameters can be monitored + via the SNMP daemon which is included in the &os; base + system. The exported bridge MIBs conform to the IETF + standards so any SNMP client or monitoring package can be + used to retrieve the data. + + On the bridge machine uncomment the + begemotSnmpdModulePath."bridge" = + "/usr/lib/snmp_bridge.so" line from + /etc/snmp.config and start the + bsnmpd daemon. Other + configuration such as community names and access lists may + need to be modified. See &man.bsnmpd.1; and + &man.snmp.bridge.3; for more information. + + The following examples use the + Net-SNMP software (net-mgmt/net-snmp) to query a + bridge, the net-mgmt/bsnmptools port can also + be used. From the SNMP client host add to + $HOME/.snmp/snmp.conf the following + lines to import the bridge MIB definitions in to + Net-SNMP: + + mibdirs +/usr/share/snmp/mibs +mibs +BRIDGE-MIB:RSTP-MIB:BEGEMOT-MIB:BEGEMOT-BRIDGE-MIB + + To monitor a single bridge via the IETF BRIDGE-MIB + (RFC4188) do + + &prompt.user; snmpwalk -v 2c -c public bridge1.example.com mib-2.dot1dBridge +BRIDGE-MIB::dot1dBaseBridgeAddress.0 = STRING: 66:fb:9b:6e:5c:44 +BRIDGE-MIB::dot1dBaseNumPorts.0 = INTEGER: 1 ports +BRIDGE-MIB::dot1dStpTimeSinceTopologyChange.0 = Timeticks: (189959) 0:31:39.59 centi-seconds +BRIDGE-MIB::dot1dStpTopChanges.0 = Counter32: 2 +BRIDGE-MIB::dot1dStpDesignatedRoot.0 = Hex-STRING: 80 00 00 01 02 4B D4 50 +... +BRIDGE-MIB::dot1dStpPortState.3 = INTEGER: forwarding(5) +BRIDGE-MIB::dot1dStpPortEnable.3 = INTEGER: enabled(1) +BRIDGE-MIB::dot1dStpPortPathCost.3 = INTEGER: 200000 +BRIDGE-MIB::dot1dStpPortDesignatedRoot.3 = Hex-STRING: 80 00 00 01 02 4B D4 50 +BRIDGE-MIB::dot1dStpPortDesignatedCost.3 = INTEGER: 0 +BRIDGE-MIB::dot1dStpPortDesignatedBridge.3 = Hex-STRING: 80 00 00 01 02 4B D4 50 +BRIDGE-MIB::dot1dStpPortDesignatedPort.3 = Hex-STRING: 03 80 +BRIDGE-MIB::dot1dStpPortForwardTransitions.3 = Counter32: 1 +RSTP-MIB::dot1dStpVersion.0 = INTEGER: rstp(2) + + The dot1dStpTopChanges.0 value is two + which means that the STP bridge topology has changed twice, + a topology change means that one or more links in the + network have changed or failed and a new tree has been + calculated. The + dot1dStpTimeSinceTopologyChange.0 value + will show when this happened. + + To monitor multiple bridge interfaces one may use the + private BEGEMOT-BRIDGE-MIB: + + &prompt.user; snmpwalk -v 2c -c public bridge1.example.com +enterprises.fokus.begemot.begemotBridge +BEGEMOT-BRIDGE-MIB::begemotBridgeBaseName."bridge0" = STRING: bridge0 +BEGEMOT-BRIDGE-MIB::begemotBridgeBaseName."bridge2" = STRING: bridge2 +BEGEMOT-BRIDGE-MIB::begemotBridgeBaseAddress."bridge0" = STRING: e:ce:3b:5a:9e:13 +BEGEMOT-BRIDGE-MIB::begemotBridgeBaseAddress."bridge2" = STRING: 12:5e:4d:74:d:fc +BEGEMOT-BRIDGE-MIB::begemotBridgeBaseNumPorts."bridge0" = INTEGER: 1 +BEGEMOT-BRIDGE-MIB::begemotBridgeBaseNumPorts."bridge2" = INTEGER: 1 +... +BEGEMOT-BRIDGE-MIB::begemotBridgeStpTimeSinceTopologyChange."bridge0" = Timeticks: (116927) 0:19:29.27 centi-seconds +BEGEMOT-BRIDGE-MIB::begemotBridgeStpTimeSinceTopologyChange."bridge2" = Timeticks: (82773) 0:13:47.73 centi-seconds +BEGEMOT-BRIDGE-MIB::begemotBridgeStpTopChanges."bridge0" = Counter32: 1 +BEGEMOT-BRIDGE-MIB::begemotBridgeStpTopChanges."bridge2" = Counter32: 1 +BEGEMOT-BRIDGE-MIB::begemotBridgeStpDesignatedRoot."bridge0" = Hex-STRING: 80 00 00 40 95 30 5E 31 +BEGEMOT-BRIDGE-MIB::begemotBridgeStpDesignatedRoot."bridge2" = Hex-STRING: 80 00 00 50 8B B8 C6 A9 + + To change the bridge interface being monitored via the + mib-2.dot1dBridge subtree do: + + &prompt.user; snmpset -v 2c -c private bridge1.example.com +BEGEMOT-BRIDGE-MIB::begemotBridgeDefaultBridgeIf.0 s bridge2 + ==== //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml#2 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -2391,13 +2391,13 @@ To see the current number of vnodes in use: - &prompt.root; sysctl vfs.numvnodes -vfs.numvnodes: 91349 + &prompt.root; sysctl vfs.numvnodes +vfs.numvnodes: 91349 To see the maximum vnodes: - &prompt.root; sysctl kern.maxvnodes -kern.maxvnodes: 100000 + &prompt.root; sysctl kern.maxvnodes +kern.maxvnodes: 100000 If the current vnode usage is near the maximum, increasing kern.maxvnodes by a value of 1,000 is ==== //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml#2 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -3748,8 +3748,8 @@ provided. Arguments for this script can be passed via &man.rc.conf.5;, for example: - gbde_autoattach_all="YES" -gbde_devices="ad4s1c" + gbde_autoattach_all="YES" +gbde_devices="ad4s1c" This will require that the gbde passphrase be entered at boot time. After typing the correct @@ -3805,7 +3805,7 @@ A new cryptographic GEOM class is available as of &os; 6.0 - geli. It is currently being developed by - &a.pjd;. Geli is different to + &a.pjd;. The geli utility is different to gbde; it offers different features and uses a different scheme for doing cryptographic work. @@ -3851,9 +3851,7 @@ The next steps will describe how to enable support for geli in the &os; kernel and will explain how - to create a new geli encryption provider. At - the end it will be demonstrated how to create an encrypted swap - partition using features provided by geli. + to create and use a geli encryption provider. In order to use geli, you must be running &os; 6.0-RELEASE or later. Super-user privileges will be @@ -3861,14 +3859,13 @@ - Adding <command>geli</command> Support to the Kernel - Configuration File + Adding <command>geli</command> Support to the Kernel Add the following lines to the kernel configuration file: - options GEOM_ELI -device crypto + options GEOM_ELI +device crypto Rebuild the kernel as described in . @@ -3877,7 +3874,7 @@ be loaded at boot time. Add the following line to the /boot/loader.conf: - geom_eli_load="YES" + geom_eli_load="YES" &man.geli.8; should now be supported by the kernel. @@ -3943,7 +3940,7 @@ &prompt.root; mount /dev/da2.eli /private The encrypted file system should be visible to &man.df.1; - and be available for use now. + and be available for use now: &prompt.root; df -H Filesystem Size Used Avail Capacity Mounted on @@ -3981,8 +3978,8 @@ An example of configuring geli through &man.rc.conf.5; follows: - geli_devices="da2" -geli_da2_flags="-p -k /root/da2.key" + geli_devices="da2" +geli_da2_flags="-p -k /root/da2.key" This will configure /dev/da2 as a geli provider of which the Master Key file @@ -4067,10 +4064,10 @@ .bde suffix should be added to the device in the respective /etc/fstab swap line: - + # Device Mountpoint FStype Options Dump Pass# /dev/ad0s1b.bde none swap sw 0 0 - + For systems prior to &os; 6.0-RELEASE, the following line in /etc/rc.conf is also needed: @@ -4086,10 +4083,10 @@ .eli suffix should be added to the device in the respective /etc/fstab swap line: - + # Device Mountpoint FStype Options Dump Pass# /dev/ad0s1b.eli none swap sw 0 0 - + &man.geli.8; uses the AES algorithm with a key length of 256 bit by default. ==== //depot/projects/soc2007/loafier_busalloc/doc/en_US.ISO8859-1/books/handbook/install/chapter.sgml#6 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -104,9 +104,9 @@ linkend="install-floppies">. - &i386; and pc98 Architectures + &os;/&arch.i386; and &os;/&arch.pc98; - Both &os;/&i386 and &os;/pc98 versions require a 486 or + Both &os;/&arch.i386; and &os;/&arch.pc98; require a 486 or better processor and at least 24 MB of RAM. You will need at least 150 MB of free hard drive space for the most minimal installation. @@ -119,11 +119,11 @@ - Alpha Architecture + &os;/&arch.alpha; Alpha - To install &os;/alpha, you will need a supported + To install &os;/&arch.alpha;, you will need a supported platform (see ) and a dedicated disk for &os;. It is not possible to share a disk with another operating system at this time. This @@ -140,14 +140,32 @@ AlphaBIOS (or ARC) firmware and SRM. In others it will be necessary to download new firmware from the vendor's Web site. + + + Support for the Alpha was removed beginning with + &os; 7.0. The + &os; 6.X series of + releases is the last containing support for this + architecture. + + - amd64 Architecture + &os;/&arch.amd64; Architecture + + There are two classes of processors capable of running + &os;/&arch.amd64;. The first are AMD64 processors, + including the &amd.athlon;64, + &amd.athlon;64-FX, &amd.opteron; or better + processors. - &os;/amd64 requires an &amd.athlon;64, - &amd.athlon;64-FX, &amd.opteron; or better processor to - run. + The second class of processors that can use + &os;/&arch.amd64; includes those using the &intel; EM64T + architecture. Examples of these processors include the + &intel; &core; 2 Duo, Quad, and Extreme processor + families and the &intel; &xeon; 3000, 5000, and 7000 + sequences of processors. If you have a machine based on an nVidia nForce3 Pro-150, you must use the BIOS setup to @@ -158,13 +176,13 @@ - &sparc64; Architecture + &os;/&arch.sparc64; - To install &os;/&sparc64;, you will need a supported + To install &os;/&arch.sparc64;, you will need a supported platform (see ). - You will need a dedicated disk for &os;/&sparc64;. It + You will need a dedicated disk for &os;/&arch.sparc64;. It is not possible to share a disk with another operating system at this time. @@ -330,7 +348,7 @@ laid out on the disk, and how this affects you. - Disk Layouts for the &i386; + Disk Layouts for &os;/&arch.i386; A PC disk can be divided into discrete chunks. These chunks are called partitions. Since @@ -686,7 +704,7 @@ with the architecture and the version number which you want to install, respectively. For example, the boot floppy images for - &os; &rel.current;-RELEASE for &i386; are available + &os;/&arch.i386; &rel.current;-RELEASE are available from . The floppy images have a .flp extension. @@ -3143,264 +3161,6 @@ post-installation configuration. - - - - - Tom - Rhodes - Contributed by - - - - Configure Additional Network Services - - Configuring network services can be a daunting - task for new users if they lack previous - knowledge in this area. Networking, including the Internet, - is critical to all modern operating systems including &os;; - as a result, it is very useful to have some understanding - &os;'s extensive networking capabilities. Doing this - during the installation will ensure users have some - understanding of the various services available to them. - - Network services are programs that accept input from - anywhere on the network. Every effort is made to make sure - these programs will not do anything harmful. - Unfortunately, programmers are not perfect and through time - there have been cases where bugs in network services have been - exploited by attackers to do bad things. It is important that - you only enable the network services you know that you need. If - in doubt it is best if you do not enable a network service until - you find out that you do need it. You can always enable it - later by re-running sysinstall or by - using the features provided by the - /etc/rc.conf file. - - Selecting the Networking option will display - a menu similar to the one below: - -
- Network Configuration Upper-level - - - - - - -
- - The first option, Interfaces, was previously covered during - the , thus this option can - safely be ignored. - - Selecting the AMD option adds - support for the BSD automatic mount utility. - This is usually used in conjunction with the - NFS protocol (see below) - for automatically mounting remote file systems. - No special configuration is required here. - - Next in line is the AMD Flags - option. When selected, a menu will pop up for you - to enter specific AMD flags. - The menu already contains a set of default options: - - -a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map - - The option sets the default mount - location which is specified here as - /.amd_mnt. The - option specifies the default log file; - however, when syslogd is used all log - activity will be sent to the system log daemon. The - /host directory is used - to mount an exported file system from a remote - host, while /net - directory is used to mount an exported file system from an - IP address. The - /etc/amd.map file defines the default - options for AMD exports. - - - FTP - anonymous - - - The Anon FTP option permits anonymous - FTP connections. Select this option to - make this machine an anonymous FTP server. - Be aware of the security risks involved with this option. - Another menu will be displayed to explain the security risks - and configuration in depth. - - The Gateway configuration menu will set - the machine up to be a gateway as explained previously. This - can be used to unset the Gateway option if you accidentally - selected it during the installation process. - - The Inetd option can be used to configure - or completely disable the &man.inetd.8; daemon as discussed - above. - - The Mail option is used to configure the system's - default MTA or Mail Transfer Agent. - Selecting this option will bring up the following menu: - -
- Select a default MTA - - - - - - -
- - Here you are offered a choice as to which - MTA to install - and set as the default. An MTA is nothing - more than a mail server which delivers email to users on the - system or the Internet. - - Selecting Sendmail will install - the popular sendmail server which - is the &os; default. The Sendmail local option - will set sendmail to be the default - MTA, but disable its ability to receive - incoming email from the Internet. The other options here, - Postfix and - Exim act similar to - Sendmail. They both deliver - email; however, some users prefer these alternatives to the - sendmail - MTA. - - After selecting an MTA, or choosing - not to select an MTA, the network configuration menu will appear - with the next option being NFS client. - - The NFS client option will - configure the system to communicate with a server via - NFS. An NFS server - makes file systems available to other machines on the - network via the NFS protocol. If this is - a stand-alone machine, this option can remain unselected. - The system may require more configuration later; see - for more - information about client and server configuration. - - Below that option is the NFS server - option, permitting you to set the system up as an - NFS server. This adds the required - information to start up the RPC remote - procedure call services. RPC is used to - coordinate connections between hosts and programs. - - Next in line is the Ntpdate option, - which deals with time synchronization. When selected, a menu - like the one below shows up: - -
- Ntpdate Configuration - - - - - - -
- - From this menu, select the server which is the closest - to your location. Selecting a close one will make the time - synchronization more accurate as a server further from your - location may have more connection latency. - - The next option is the PCNFSD selection. - This option will install the - net/pcnfsd package from - the Ports Collection. This is a useful utility which provides - NFS authentication services for systems which - are unable to provide their own, such as Microsoft's - &ms-dos; operating system. - - Now you must scroll down a bit to see the other - options: - -
- Network Configuration Lower-level - - - - - - -
- - The &man.rpcbind.8;, &man.rpc.statd.8;, and - &man.rpc.lockd.8; utilities are all used for Remote Procedure - Calls (RPC). - The rpcbind utility manages communication - between NFS servers and clients, and is - required for NFS servers to operate - correctly. The rpc.statd daemon interacts - with the rpc.statd daemon on other hosts to - provide status monitoring. The reported status is usually held - in the /var/db/statd.status file. The - next option listed here is the rpc.lockd - option, which, when selected, will provide file locking - services. This is usually used with - rpc.statd to monitor what hosts are - requesting locks and how frequently they request them. - While these last two options are marvelous for debugging, they - are not required for NFS servers and clients - to operate correctly. - - As you progress down the list the next item here is - Routed, which is the routing daemon. The - &man.routed.8; utility manages network routing tables, - discovers multicast routers, and supplies a copy of the routing - tables to any physically connected host on the network upon - request. This is mainly used for machines which act as a - gateway for the local network. When selected, a menu will be - presented requesting the default location of the utility. - The default location is already defined for you and can be - selected with the Enter key. You will then - be presented with yet another menu, this time asking for the - flags you wish to pass on to routed. The - default is and it should already appear - on the screen. - - Next in line is the Rwhod option which, - when selected, will start the &man.rwhod.8; daemon - during system initialization. The rwhod - utility broadcasts system messages across the network - periodically, or collects them when in consumer - mode. More information can be found in the &man.ruptime.1; and - &man.rwho.1; manual pages. - - The next to the last option in the list is for the - &man.sshd.8; daemon. This is the secure shell server for - OpenSSH and it is highly recommended - over the standard telnet and - FTP servers. The sshd - server is used to create a secure connection from one host to - another by using encrypted connections. - - Finally there is the TCP Extensions - option. This enables the TCP Extensions - defined in RFC 1323 and - RFC 1644. While on many hosts this can - speed up connections, it can also cause some connections to be - dropped. It is not recommended for servers, but may be - beneficial for stand alone machines. - - Now that you have configured the network services, you can - scroll up to the very top item which is Exit - and continue on to the next configuration section. - -
- >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Aug 21 03:39:31 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7C04916A421; Tue, 21 Aug 2007 03:39:31 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C38316A420 for ; Tue, 21 Aug 2007 03:39:31 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2C4D113C45E for ; Tue, 21 Aug 2007 03:39:31 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L3dV85038045 for ; Tue, 21 Aug 2007 03:39:31 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L3dUX0038042 for perforce@freebsd.org; Tue, 21 Aug 2007 03:39:30 GMT (envelope-from cnst@FreeBSD.org) Date: Tue, 21 Aug 2007 03:39:30 GMT Message-Id: <200708210339.l7L3dUX0038042@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125477 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 03:39:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=125477 Change 125477 by cnst@dale on 2007/08/21 03:38:31 This is a complete `cvs diff` of cnst-sensors GSoC2007 project as of 2007-08-20. It includes the following components, listed below in the very same order as they are appearing in this diff: * sample configuration file for sensorsd * sysctl(3) doc fixes for CTL_HW tree * sysctl(3) documentation for hardware sensors * sysctl(8) doc fixes for hw tree * sysctl(8) documentation for hardware sensors * assorted KNF fixes for sysctl(8) * lm(4) documentation * sensor_attach(9) et al documentation * coretemp(4) conversion to hw.sensors framework * lm(4) isa driver ported from OpenBSD * /sys/kern/kern_sensors.c o sensor_attach(9) API for drivers to register sensors o sensor_task_register(9) API for the update task o sysctl(3) glue code * assorted KNF and bug-fixes for /sys/kern/kern_sysctl.c * lm(4) module for testing sensor_attach/detach et al * * assorted bug-fixes and HW_SENSORS definition for * sensors display for systat(1), including all documentation * sensorsd(8) and all applicable documentation The most noticeable component that this patch does not include is sysctl(8) support for hw.sensors, which is still in the works ATM. Everything else should compile and should be fully functioning. Please test. Sensor readings can be viewed with `systat -sensors` and logged with `sensorsd`. This patch is submitted partially due to the 2007-08-20 deadline, but mostly because no-one has ever reported running with this code on FreeBSD, although several people have contacted me personally and expressed their interest in this project -- I hope this unified diff should make things a bit easier for potential testers. ;) Submitted by: cnst@FreeBSD.org (Constantine A. Murenin) Obtained from: generated by sensors.cvsdiff.sh from //depot/projects/soc2007/cnst_sensors/ Sponsored by: Google Summer of Code 2007 Affected files ... .. //depot/projects/soc2007/cnst-sensors/cnst-sensors.2007-08-20.patch#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Tue Aug 21 06:37:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C953C16A41A; Tue, 21 Aug 2007 06:37:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B96F16A418 for ; Tue, 21 Aug 2007 06:37:14 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8DE4813C465 for ; Tue, 21 Aug 2007 06:37:14 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L6bEMd062413 for ; Tue, 21 Aug 2007 06:37:14 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L6bEIS062410 for perforce@freebsd.org; Tue, 21 Aug 2007 06:37:14 GMT (envelope-from peter@freebsd.org) Date: Tue, 21 Aug 2007 06:37:14 GMT Message-Id: <200708210637.l7L6bEIS062410@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 125482 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 06:37:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=125482 Change 125482 by peter@peter_daintree on 2007/08/21 06:36:35 Point to getpath_kern module location Affected files ... .. //depot/projects/valgrind/coregrind/m_main.c#3 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_main.c#3 (text+ko) ==== @@ -1092,6 +1092,8 @@ VG_(message)(Vg_UserMsg, "*** WARNING! Functionality SEVERELY LIMITED without getpath_kern module!! ***"); #if defined(for_yahoo) VG_(message)(Vg_UserMsg, "Please yinst install getpath_kern"); +#else + VG_(message)(Vg_UserMsg, "There is a copy in valgrind/getpath/*"); #endif VG_(message)(Vg_UserMsg, ""); VG_(nanosleep)(&ts); From owner-p4-projects@FreeBSD.ORG Tue Aug 21 06:38:16 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8B93416A419; Tue, 21 Aug 2007 06:38:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6947C16A417 for ; Tue, 21 Aug 2007 06:38:16 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5B12213C465 for ; Tue, 21 Aug 2007 06:38:16 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L6cGPM062451 for ; Tue, 21 Aug 2007 06:38:16 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L6cGGc062448 for perforce@freebsd.org; Tue, 21 Aug 2007 06:38:16 GMT (envelope-from peter@freebsd.org) Date: Tue, 21 Aug 2007 06:38:16 GMT Message-Id: <200708210638.l7L6cGGc062448@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 125483 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 06:38:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=125483 Change 125483 by peter@peter_daintree on 2007/08/21 06:37:39 The ! prefix was a note to myself. "This syscall is important, wrap it asap!" Affected files ... .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#7 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#7 (text+ko) ==== @@ -2708,11 +2708,6 @@ // extattr_delete_link 414 // __mac_execve 415 - //!sigaction 416 -/* - * XXX: not sure what peter indicates with the '!' - * but this call below seems to work /phk - */ BSDXY(__NR_sigaction6, sys_sigaction6), // 416 //!sigreturn 417 // __xstat 418 From owner-p4-projects@FreeBSD.ORG Tue Aug 21 07:11:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 973CD16A419; Tue, 21 Aug 2007 07:11:59 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46BF116A417 for ; Tue, 21 Aug 2007 07:11:59 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 377D413C457 for ; Tue, 21 Aug 2007 07:11:59 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L7BxBj066137 for ; Tue, 21 Aug 2007 07:11:59 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L7BwdE066134 for perforce@freebsd.org; Tue, 21 Aug 2007 07:11:58 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Tue, 21 Aug 2007 07:11:58 GMT Message-Id: <200708210711.l7L7BwdE066134@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 125484 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 07:11:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=125484 Change 125484 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/21 07:11:46 Test case for sysv shared memory Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.c#13 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/shmtest.c#2 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/misc.sh#17 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/sysvshm/00.t#1 add Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.c#13 (text+ko) ==== ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/shmtest.c#2 (text+ko) ==== @@ -192,7 +192,6 @@ if (sigaction(SIGCHLD, &sa, NULL) == -1) err(1, "sigaction SIGCHLD"); - if (sender_label) { mac_t label; @@ -210,12 +209,19 @@ } mac_free(label); } - if ((sender_shmid = shmget(shmkey, pgsize, SHM_W)) == -1) + + if ((sender_shmid = shmget(shmkey, pgsize, SHM_W)) == -1){ + close(logfd); err(1, "shmget"); + exit(1); + } - if (shmctl(sender_shmid, IPC_STAT, &s_ds) == -1) + if (shmctl(sender_shmid, IPC_STAT, &s_ds) == -1) { + close(logfd); err(1, "shmctl IPC_STAT"); + exit(1); + } print_shmid_ds(&s_ds, 0640); @@ -334,9 +340,7 @@ * If we're the sender, and it exists, remove the shared memory area. */ if (child_pid != 0 && sender_shmid != -1) { - if (shmdt(shm_buf)) - warn("shmdt"); - if (shmctl(sender_shmid, IPC_RMID, NULL) == -1) + if (shmctl(sender_shmid, IPC_RMID, NULL) == -1) warn("shmctl IPC_RMID"); close(logfd); machookmatch(macconf_file, getpid()); @@ -367,12 +371,13 @@ int shmid; void *shm_buf; - if ((shmid = shmget(shmkey, pgsize, 0)) == -1) + if ((shmid = shmget(shmkey, pgsize, SHM_R)) == -1) err(1, "receiver: shmget"); if ((shm_buf = shmat(shmid, NULL, SHM_RDONLY)) == (void *) -1) err(1, "receiver: shmat"); + *(char *)shm_buf = 1; /*can't write*/ if (strcmp((const char *)shm_buf, m_str) != 0) err(1, "receiver: data isn't correct"); ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/misc.sh#17 (text+ko) ==== @@ -21,6 +21,7 @@ fifo_io="${maindir}/fifo_io" pipe_io="${maindir}/pipe_io" macping="${maindir}/macping" +shmtest="${maindir}/shmtest" . ${maindir}/tests/conf From owner-p4-projects@FreeBSD.ORG Tue Aug 21 13:05:00 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 977FB16A46B; Tue, 21 Aug 2007 13:05:00 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CEB016A468 for ; Tue, 21 Aug 2007 13:05:00 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5961E13C465 for ; Tue, 21 Aug 2007 13:05:00 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LD50qi014903 for ; Tue, 21 Aug 2007 13:05:00 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7LD4xZt014900 for perforce@freebsd.org; Tue, 21 Aug 2007 13:04:59 GMT (envelope-from thioretic@FreeBSD.org) Date: Tue, 21 Aug 2007 13:04:59 GMT Message-Id: <200708211304.l7LD4xZt014900@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 125496 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 13:05:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=125496 Change 125496 by thioretic@thioretic_freebox on 2007/08/21 13:04:18 Just add "\n" to the file :) Affected files ... .. //depot/projects/soc2007/thioretic_gidl2/kern/subr_bus.c#6 edit Differences ... ==== //depot/projects/soc2007/thioretic_gidl2/kern/subr_bus.c#6 (text+ko) ==== @@ -1,5334 +1,5334 @@ -/*- - * Copyright (c) 1997,1998,2003 Doug Rabson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.184.2.5 2006/12/28 22:13:26 jhb Exp $"); - -#include "opt_bus.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -SYSCTL_NODE(_hw, OID_AUTO, bus, CTLFLAG_RW, NULL, NULL); -SYSCTL_NODE(, OID_AUTO, dev, CTLFLAG_RW, NULL, NULL); - -/* - * Used to attach drivers to devclasses. - */ -typedef struct driverlink *driverlink_t; -struct driverlink { - kobj_class_t driver; - TAILQ_ENTRY(driverlink) link; /* list of drivers in devclass */ -}; - -typedef struct driverinfo* driverinfo_t; -struct driverinfo { - kobj_class_t driver; /**< kobj class, implementing driver - & bus interface methods (from outer space)*/ - kobj_class_t drvops; /**< kobj class, implementing driverops - interface methods (from outer space)*/ - kobj_t topology_ops; /**< object of class implemented by driver - (deeply internal:))*/ - kobj_t functional_ops; /**< object of class implemented by driverops - (deeply internal:))*/ - uint32_t flags; /**< driver-specific flags (from outer space)*/ - TAILQ_ENTRY(driverinfo) link; -}; - -typedef struct driverinfolink* driverinfolink_t; -struct driverinfolink { - driverinfo_t pdriver; - void *ivars; - void *softc; -#define DF_EXTERNALSOFTC 1 /* softc not allocated by us */ - int flags; - device_state_t state; - TAILQ_ENTRY(driverinfolink) link; -}; - -/* - * Forward declarations - */ -typedef TAILQ_HEAD(devclass_list, devclass) devclass_list_t; -typedef TAILQ_HEAD(devclasslink_list, devclasslink) devclasslink_list_t; - -typedef TAILQ_HEAD(driver_list, driverlink) driver_list_t; - -typedef TAILQ_HEAD(device_list, device) device_list_t; -typedef TAILQ_HEAD(devicelink_list, devicelink) devicelink_list_t; - -typedef TAILQ_HEAD(driverinfo_list, driverinfo) driverinfo_list_t; -typedef TAILQ_HEAD(driverinfolink_list, driverinfolink) driverinfolink_list_t; - -typedef struct devclasslink* devclasslink_t; -struct devclasslink{ - devclass_t devclass_ptr; - TAILQ_ENTRY(devclasslink) link; -}; - -struct devclass { - TAILQ_ENTRY(devclass) link; - devclass_t parent; /* parent in devclass hierarchy */ - devclasslink_list_t filters; /* these are used to hold information, - used for non-DRL_LOWEST drivers' classes */ - driver_list_t drivers; /* bus devclasses store drivers for bus */ - char *name; - device_t *devices; /* array of devices indexed by unit */ - int maxunit; /* size of devices array */ - - struct sysctl_ctx_list sysctl_ctx; - struct sysctl_oid *sysctl_tree; -}; - -/** - * @brief Implementation of device. - */ -struct device { - /* - * A device is a kernel object. The first field must be the - * current ops table for the object. - */ - KOBJ_FIELDS; /**< !TRICK: will init it to drv_compat_ctrl_driver - which gonna work around stacked drivers*/ - - /* - * Device hierarchy. - */ - TAILQ_ENTRY(device) link; /**< list of devices in parent */ - TAILQ_ENTRY(device) devlink; /**< global device list membership */ - devicelink_list_t parents; - devicelink_list_t children; /**< list of child devices */ - - /* - * Details of this device. - */ - driverinfolink_t driver; /**< current driver to be probed/attached/...*/ - int driver_level; - driverinfolink_list_t drivers[DRL_LEVELS]; - int driverinfo_flags; - devclass_t devclass; /**< current device class */ - int unit; /**< current unit number */ - char* nameunit; /**< name+unit e.g. foodev0 */ - char* desc; /**< driver specific description */ - int busy; /**< count of calls to device_busy() */ - device_state_t state; /**< current device state */ - u_int32_t devflags; /**< api level flags for device_get_flags() */ - u_short flags; /**< internal device flags */ -#define DF_ENABLED 1 /* device should be probed/attached */ -#define DF_FIXEDCLASS 2 /* devclass specified at create time */ -#define DF_WILDCARD 4 /* unit was originally wildcard */ -#define DF_DESCMALLOCED 8 /* description was malloced */ -#define DF_QUIET 16 /* don't print verbose attach message */ -#define DF_DONENOMATCH 32 /* don't execute DEVICE_NOMATCH again */ -#define DF_REBID 128 /* Can rebid after attach */ -#define DF_PERSISTENT 256 /* Should not delete when refs == 0*/ - u_char order; /**< order from device_add_child_ordered() */ - u_char pad; - //void *ivars; /**< instance variables */ - //void *softc; /**< current driver's variables */ - u_long refs; - int raw; - - struct sysctl_ctx_list sysctl_ctx; /**< state for sysctl variables */ - struct sysctl_oid *sysctl_tree; /**< state for sysctl variables */ -}; - -typedef struct devicelink* devicelink_t; -struct devicelink { - device_t device_ptr; -#define DLF_ANCHOR 1 - int flags; - TAILQ(devicelink) link; -}; - -static MALLOC_DEFINE(M_BUS, "bus", "Bus data structures"); -static MALLOC_DEFINE(M_BUS_SC, "bus-sc", "Bus data structures, softc"); - -#ifdef BUS_DEBUG - -static int bus_debug = 1; -TUNABLE_INT("bus.debug", &bus_debug); -SYSCTL_INT(_debug, OID_AUTO, bus_debug, CTLFLAG_RW, &bus_debug, 0, - "Debug bus code"); - -#define PDEBUG(a) if (bus_debug) {printf("%s:%d: ", __func__, __LINE__), printf a; printf("\n");} -#define DEVICENAME(d) ((d)? device_get_name(d): "no device") -#define DRIVERNAME(d) ((d)? d->name : "no driver") -#define DEVCLANAME(d) ((d)? d->name : "no devclass") - -/** - * Produce the indenting, indent*2 spaces plus a '.' ahead of that to - * prevent syslog from deleting initial spaces - */ -#define indentprintf(p) do { int iJ; printf("."); for (iJ=0; iJparent ? dc->parent->name : ""; - break; - default: - return (EINVAL); - } - return (SYSCTL_OUT(req, value, strlen(value))); -} - -static void -devclass_sysctl_init(devclass_t dc) -{ - - if (dc->sysctl_tree != NULL) - return; - sysctl_ctx_init(&dc->sysctl_ctx); - dc->sysctl_tree = SYSCTL_ADD_NODE(&dc->sysctl_ctx, - SYSCTL_STATIC_CHILDREN(_dev), OID_AUTO, dc->name, - CTLFLAG_RD, 0, ""); - SYSCTL_ADD_PROC(&dc->sysctl_ctx, SYSCTL_CHILDREN(dc->sysctl_tree), - OID_AUTO, "%parent", CTLFLAG_RD, - dc, DEVCLASS_SYSCTL_PARENT, devclass_sysctl_handler, "A", - "parent class"); -} - -enum { - DEVICE_SYSCTL_DESC, - DEVICE_SYSCTL_DRIVER, - DEVICE_SYSCTL_LOCATION, - DEVICE_SYSCTL_PNPINFO, - DEVICE_SYSCTL_PARENT, -}; - -static int -device_sysctl_handler(SYSCTL_HANDLER_ARGS) -{ - device_t dev = (device_t)arg1; - const char *value; - char *buf; - int error; - int level; - driverinfolink_t dil; - - buf = NULL; - switch (arg2) { - case DEVICE_SYSCTL_DESC: - value = dev->desc ? dev->desc : ""; - break; - case DEVICE_SYSCTL_DRIVER: - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); - buf[0]='\0'; - for (level=DRL_LOWEST; level<=DRL_TOPMOST; level++){ - switch(level){ - case DRL_LOWEST: tmpbuf="LOWEST:"; break; - case DRL_LOWER: tmpbuf="LOWER:"; break; - case DRL_MIDDLE: tmpbuf="MIDDLE:"; break; - case DRL_UPPER: tmpbuf="UPPER:"; break; - case DRL_TOPMOST: tmpbuf="TOPMOST:"; break; - } - if (strlen(tmpbuf)+strlen(buf)>1023) break; - TAILQ_FOREACH(dil, &((dev->drivers)[level]), link){ - if(strlen(dil->pdriver->driver->name)+strlen(buf)>1022) - break; - strcat(buf,dil->pdriver->driver->name); - strcat(buf,","); - } - buf[strlen(buf)]='\0'; - strcat(buf,"\n"); - } - break; - case DEVICE_SYSCTL_LOCATION: - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); - bus_child_location_str(dev, buf, 1024); - break; - case DEVICE_SYSCTL_PNPINFO: - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); - bus_child_pnpinfo_str(dev, buf, 1024); - break; - case DEVICE_SYSCTL_PARENT: - value = dev->parent ? dev->parent->nameunit : ""; - break; - default: - return (EINVAL); - } - error = SYSCTL_OUT(req, value, strlen(value)); - if (buf != NULL) - free(buf, M_BUS); - return (error); -} - -static void -device_sysctl_init(device_t dev) -{ - devclass_t dc = dev->devclass; - - if (dev->sysctl_tree != NULL) - return; - devclass_sysctl_init(dc); - sysctl_ctx_init(&dev->sysctl_ctx); - dev->sysctl_tree = SYSCTL_ADD_NODE(&dev->sysctl_ctx, - SYSCTL_CHILDREN(dc->sysctl_tree), OID_AUTO, - dev->nameunit + strlen(dc->name), - CTLFLAG_RD, 0, ""); - SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), - OID_AUTO, "%desc", CTLFLAG_RD, - dev, DEVICE_SYSCTL_DESC, device_sysctl_handler, "A", - "device description"); - SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), - OID_AUTO, "%driver", CTLFLAG_RD, - dev, DEVICE_SYSCTL_DRIVER, device_sysctl_handler, "A", - "device drivers names"); - SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), - OID_AUTO, "%location", CTLFLAG_RD, - dev, DEVICE_SYSCTL_LOCATION, device_sysctl_handler, "A", - "device location relative to parent"); - SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), - OID_AUTO, "%pnpinfo", CTLFLAG_RD, - dev, DEVICE_SYSCTL_PNPINFO, device_sysctl_handler, "A", - "device identification"); - SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), - OID_AUTO, "%parent", CTLFLAG_RD, - dev, DEVICE_SYSCTL_PARENT, device_sysctl_handler, "A", - "parent device"); -} - -static void -device_sysctl_fini(device_t dev) -{ - if (dev->sysctl_tree == NULL) - return; - sysctl_ctx_free(&dev->sysctl_ctx); - dev->sysctl_tree = NULL; -} - -/* - * /dev/devctl implementation - */ - -/* - * This design allows only one reader for /dev/devctl. This is not desirable - * in the long run, but will get a lot of hair out of this implementation. - * Maybe we should make this device a clonable device. - * - * Also note: we specifically do not attach a device to the device_t tree - * to avoid potential chicken and egg problems. One could argue that all - * of this belongs to the root node. One could also further argue that the - * sysctl interface that we have not might more properly be an ioctl - * interface, but at this stage of the game, I'm not inclined to rock that - * boat. - * - * I'm also not sure that the SIGIO support is done correctly or not, as - * I copied it from a driver that had SIGIO support that likely hasn't been - * tested since 3.4 or 2.2.8! - */ - -static int sysctl_devctl_disable(SYSCTL_HANDLER_ARGS); -static int devctl_disable = 0; -TUNABLE_INT("hw.bus.devctl_disable", &devctl_disable); -SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW, 0, 0, - sysctl_devctl_disable, "I", "devctl disable"); - -static d_open_t devopen; -static d_close_t devclose; -static d_read_t devread; -static d_ioctl_t devioctl; -static d_poll_t devpoll; - -static struct cdevsw dev_cdevsw = { - .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, - .d_open = devopen, - .d_close = devclose, - .d_read = devread, - .d_ioctl = devioctl, - .d_poll = devpoll, - .d_name = "devctl", -}; - -struct dev_event_info -{ - char *dei_data; - TAILQ_ENTRY(dev_event_info) dei_link; -}; - -TAILQ_HEAD(devq, dev_event_info); - -static struct dev_softc -{ - int inuse; - int nonblock; - struct mtx mtx; - struct cv cv; - struct selinfo sel; - struct devq devq; - struct proc *async_proc; -} devsoftc; - -static struct cdev *devctl_dev; - -static void -devinit(void) -{ - devctl_dev = make_dev(&dev_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - "devctl"); - mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF); - cv_init(&devsoftc.cv, "dev cv"); - TAILQ_INIT(&devsoftc.devq); -} - -static int -devopen(struct cdev *dev, int oflags, int devtype, d_thread_t *td) -{ - if (devsoftc.inuse) - return (EBUSY); - /* move to init */ - devsoftc.inuse = 1; - devsoftc.nonblock = 0; - devsoftc.async_proc = NULL; - return (0); -} - -static int -devclose(struct cdev *dev, int fflag, int devtype, d_thread_t *td) -{ - devsoftc.inuse = 0; - mtx_lock(&devsoftc.mtx); - cv_broadcast(&devsoftc.cv); - mtx_unlock(&devsoftc.mtx); - - return (0); -} - -/* - * The read channel for this device is used to report changes to - * userland in realtime. We are required to free the data as well as - * the n1 object because we allocate them separately. Also note that - * we return one record at a time. If you try to read this device a - * character at a time, you will loose the rest of the data. Listening - * programs are expected to cope. - */ -static int -devread(struct cdev *dev, struct uio *uio, int ioflag) -{ - struct dev_event_info *n1; - int rv; - - mtx_lock(&devsoftc.mtx); - while (TAILQ_EMPTY(&devsoftc.devq)) { - if (devsoftc.nonblock) { - mtx_unlock(&devsoftc.mtx); - return (EAGAIN); - } - rv = cv_wait_sig(&devsoftc.cv, &devsoftc.mtx); - if (rv) { - /* - * Need to translate ERESTART to EINTR here? -- jake - */ - mtx_unlock(&devsoftc.mtx); - return (rv); - } - } - n1 = TAILQ_FIRST(&devsoftc.devq); - TAILQ_REMOVE(&devsoftc.devq, n1, dei_link); - mtx_unlock(&devsoftc.mtx); - rv = uiomove(n1->dei_data, strlen(n1->dei_data), uio); - free(n1->dei_data, M_BUS); - free(n1, M_BUS); - return (rv); -} - -static int -devioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td) -{ - switch (cmd) { - - case FIONBIO: - if (*(int*)data) - devsoftc.nonblock = 1; - else - devsoftc.nonblock = 0; - return (0); - case FIOASYNC: - if (*(int*)data) - devsoftc.async_proc = td->td_proc; - else - devsoftc.async_proc = NULL; - return (0); - - /* (un)Support for other fcntl() calls. */ - case FIOCLEX: - case FIONCLEX: - case FIONREAD: - case FIOSETOWN: - case FIOGETOWN: - default: - break; - } - return (ENOTTY); -} - -static int -devpoll(struct cdev *dev, int events, d_thread_t *td) -{ - int revents = 0; - - mtx_lock(&devsoftc.mtx); - if (events & (POLLIN | POLLRDNORM)) { - if (!TAILQ_EMPTY(&devsoftc.devq)) - revents = events & (POLLIN | POLLRDNORM); - else - selrecord(td, &devsoftc.sel); - } - mtx_unlock(&devsoftc.mtx); - - return (revents); -} - -/** - * @brief Queue data to be read from the devctl device - * - * Generic interface to queue data to the devctl device. It is - * assumed that @p data is properly formatted. It is further assumed - * that @p data is allocated using the M_BUS malloc type. - */ -void -devctl_queue_data(char *data) -{ - struct dev_event_info *n1 = NULL; - struct proc *p; - - n1 = malloc(sizeof(*n1), M_BUS, M_NOWAIT); - if (n1 == NULL) - return; - n1->dei_data = data; - mtx_lock(&devsoftc.mtx); - TAILQ_INSERT_TAIL(&devsoftc.devq, n1, dei_link); - cv_broadcast(&devsoftc.cv); - mtx_unlock(&devsoftc.mtx); - selwakeup(&devsoftc.sel); - p = devsoftc.async_proc; - if (p != NULL) { - PROC_LOCK(p); - psignal(p, SIGIO); - PROC_UNLOCK(p); - } -} - -/** - * @brief Send a 'notification' to userland, using standard ways - */ -void -devctl_notify(const char *system, const char *subsystem, const char *type, - const char *data) -{ - int len = 0; - char *msg; - - if (system == NULL) - return; /* BOGUS! Must specify system. */ - if (subsystem == NULL) - return; /* BOGUS! Must specify subsystem. */ - if (type == NULL) - return; /* BOGUS! Must specify type. */ - len += strlen(" system=") + strlen(system); - len += strlen(" subsystem=") + strlen(subsystem); - len += strlen(" type=") + strlen(type); - /* add in the data message plus newline. */ - if (data != NULL) - len += strlen(data); - len += 3; /* '!', '\n', and NUL */ - msg = malloc(len, M_BUS, M_NOWAIT); - if (msg == NULL) - return; /* Drop it on the floor */ - if (data != NULL) - snprintf(msg, len, "!system=%s subsystem=%s type=%s %s\n", - system, subsystem, type, data); - else - snprintf(msg, len, "!system=%s subsystem=%s type=%s\n", - system, subsystem, type); - devctl_queue_data(msg); -} - -/* - * Common routine that tries to make sending messages as easy as possible. - * We allocate memory for the data, copy strings into that, but do not - * free it unless there's an error. The dequeue part of the driver should - * free the data. We don't send data when the device is disabled. We do - * send data, even when we have no listeners, because we wish to avoid - * races relating to startup and restart of listening applications. - * - * devaddq is designed to string together the type of event, with the - * object of that event, plus the plug and play info and location info - * for that event. This is likely most useful for devices, but less - * useful for other consumers of this interface. Those should use - * the devctl_queue_data() interface instead. - */ -static void -devaddq(const char *type, const char *what, device_t dev) -{ - char *data = NULL; - char *loc = NULL; - char *pnp = NULL; - const char *parstr; - - if (devctl_disable) - return; - data = malloc(1024, M_BUS, M_NOWAIT); - if (data == NULL) - goto bad; - - /* get the bus specific location of this device */ - loc = malloc(1024, M_BUS, M_NOWAIT); - if (loc == NULL) - goto bad; - *loc = '\0'; - bus_child_location_str(dev, loc, 1024); - - /* Get the bus specific pnp info of this device */ - pnp = malloc(1024, M_BUS, M_NOWAIT); - if (pnp == NULL) - goto bad; - *pnp = '\0'; - bus_child_pnpinfo_str(dev, pnp, 1024); - - /* Get the parent of this device, or / if high enough in the tree. */ - if (device_get_parent(dev) == NULL) - parstr = "."; /* Or '/' ? */ - else - parstr = device_get_nameunit(device_get_parent(dev)); - /* String it all together. */ - snprintf(data, 1024, "%s%s at %s %s on %s\n", type, what, loc, pnp, - parstr); - free(loc, M_BUS); - free(pnp, M_BUS); - devctl_queue_data(data); - return; -bad: - free(pnp, M_BUS); - free(loc, M_BUS); - free(data, M_BUS); - return; -} - -/* - * A device was added to the tree. We are called just after it successfully - * attaches (that is, probe and attach success for this device). No call - * is made if a device is merely parented into the tree. See devnomatch - * if probe fails. If attach fails, no notification is sent (but maybe - * we should have a different message for this). - */ -static void -devadded(device_t dev) -{ - char *pnp = NULL; - char *tmp = NULL; - - pnp = malloc(1024, M_BUS, M_NOWAIT); - if (pnp == NULL) - goto fail; - tmp = malloc(1024, M_BUS, M_NOWAIT); - if (tmp == NULL) - goto fail; - *pnp = '\0'; - bus_child_pnpinfo_str(dev, pnp, 1024); - snprintf(tmp, 1024, "%s %s", device_get_nameunit(dev), pnp); - devaddq("+", tmp, dev); -fail: - if (pnp != NULL) - free(pnp, M_BUS); - if (tmp != NULL) - free(tmp, M_BUS); - return; -} - -/* - * A device was removed from the tree. We are called just before this - * happens. - */ -static void -devremoved(device_t dev) -{ - char *pnp = NULL; - char *tmp = NULL; - - pnp = malloc(1024, M_BUS, M_NOWAIT); - if (pnp == NULL) - goto fail; - tmp = malloc(1024, M_BUS, M_NOWAIT); - if (tmp == NULL) - goto fail; - *pnp = '\0'; - bus_child_pnpinfo_str(dev, pnp, 1024); - snprintf(tmp, 1024, "%s %s", device_get_nameunit(dev), pnp); - devaddq("-", tmp, dev); -fail: - if (pnp != NULL) - free(pnp, M_BUS); - if (tmp != NULL) - free(tmp, M_BUS); - return; -} - -/* - * Called when there's no match for this device. This is only called - * the first time that no match happens, so we don't keep getitng this - * message. Should that prove to be undesirable, we can change it. - * This is called when all drivers that can attach to a given bus - * decline to accept this device. Other errrors may not be detected. - */ -static void -devnomatch(device_t dev) -{ - devaddq("?", "", dev); -} - -static int -sysctl_devctl_disable(SYSCTL_HANDLER_ARGS) -{ - struct dev_event_info *n1; - int dis, error; - - dis = devctl_disable; - error = sysctl_handle_int(oidp, &dis, 0, req); - if (error || !req->newptr) - return (error); - mtx_lock(&devsoftc.mtx); - devctl_disable = dis; - if (dis) { - while (!TAILQ_EMPTY(&devsoftc.devq)) { - n1 = TAILQ_FIRST(&devsoftc.devq); - TAILQ_REMOVE(&devsoftc.devq, n1, dei_link); - free(n1->dei_data, M_BUS); - free(n1, M_BUS); - } - } - mtx_unlock(&devsoftc.mtx); - return (0); -} - -/* End of /dev/devctl code */ - -TAILQ_HEAD(,device) bus_data_devices; -static int bus_data_generation = 1; - -kobj_method_t null_methods[] = { - { 0, 0 } -}; - -DEFINE_CLASS(null, null_methods, 0); - -/* - * Driver compatibility layer implementation - */ - -static driverinfo_list_t driverinfos = TAILQ_HEAD_INITIALIZER(driverinfos); - -/** - * @internal - * - * Is used, when a driver s used in an API function, - * but is not in driverinfos. Eg. may happen, if - * device_set_driver is called by a bus with driver, set - * to kobj_class, which wasn't registered by DRIVER_MODULE(). - */ -static drv_internal_t -driverinfo_create_driver_drv_internal (driver_t *driver){ - drv_internal_t new_drv; - - new_drv = malloc (sizeof(struct drv_internal), M_TEMP, M_NOWAIT|M_ZERO); - if (new_drv){ - new_drv.devops = driver; - new_drv.flags = DR_LOWEST; - } - return (new_drv); -} -/** - * @internal - * @brief Find or add driver compatibility settings - * - * If a driver is already present in compatibility layer - * return it, else, if @p add non-zero, add it. - * - * @param driver the device class and flags - * @param add non-zero to add driver to layer - */ -static driverinfo_t -driverinfo_find_internal (drv_internal_t driver, int add) { - driverinfo_t di; - - PDEBUG(("looking for driver %s to compatibility layer", driver->devops->name)); - if (!driver) - return (NULL); - - TAILQ_FOREACH(di, &driverinfos, link){ - if (driver->devops == di->driver) - break; - } - - if (!di && add){ - PDEBUG(("adding driver %s to compatibility layer", driver->devops->name)); - di = malloc(sizeof(struct driverinfo), M_BUS, M_NOWAIT|M_ZERO); - if (!di) - return (NULL); - di->driver = driver->devops; - di->flags = driver->flags; - di->topology_ops = kobj_create (di->driver, M_BUS, M_NOWAIT|M_ZERO); - TAILQ_INSERT_TAIL(&driverinfos, di, link); - - bus_data_generation_update(); - } - return (di); -} - -/** - * @internal - * @brief find compatibility layer entry, associated - * with the driver - * - * @param driver device kobj_class pointer - */ -static driverinfo_t -driverinfo_find_driver (driver_t *driver) { - driverinfo_t di; - - TAILQ_FOREACH(di, &driverinfos, link){ - if (driver == di->driver) - break; - } - - return di; -} - -/** - * @internal - * @brief Add driver to compatibility layer - * - * If driver is already in compartibility layer - * return it, else add it - * - * @param driver devops plus flags - */ -static driverinfo_t -driverinfo_add_driver (drv_internal_t driver) { - return (driverinfo_find_internal(driver, TRUE)); +/*- + * Copyright (c) 1997,1998,2003 Doug Rabson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.184.2.5 2006/12/28 22:13:26 jhb Exp $"); + +#include "opt_bus.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +SYSCTL_NODE(_hw, OID_AUTO, bus, CTLFLAG_RW, NULL, NULL); +SYSCTL_NODE(, OID_AUTO, dev, CTLFLAG_RW, NULL, NULL); + +/* + * Used to attach drivers to devclasses. + */ +typedef struct driverlink *driverlink_t; +struct driverlink { + kobj_class_t driver; + TAILQ_ENTRY(driverlink) link; /* list of drivers in devclass */ +}; + +typedef struct driverinfo* driverinfo_t; +struct driverinfo { + kobj_class_t driver; /**< kobj class, implementing driver + & bus interface methods (from outer space)*/ + kobj_class_t drvops; /**< kobj class, implementing driverops + interface methods (from outer space)*/ + kobj_t topology_ops; /**< object of class implemented by driver + (deeply internal:))*/ + kobj_t functional_ops; /**< object of class implemented by driverops + (deeply internal:))*/ + uint32_t flags; /**< driver-specific flags (from outer space)*/ + TAILQ_ENTRY(driverinfo) link; +}; + +typedef struct driverinfolink* driverinfolink_t; +struct driverinfolink { + driverinfo_t pdriver; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Aug 21 13:16:18 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7028D16A41B; Tue, 21 Aug 2007 13:16:18 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F00516A417 for ; Tue, 21 Aug 2007 13:16:18 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EF9F713C458 for ; Tue, 21 Aug 2007 13:16:17 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LDGH78015579 for ; Tue, 21 Aug 2007 13:16:17 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7LDGF7G015576 for perforce@freebsd.org; Tue, 21 Aug 2007 13:16:15 GMT (envelope-from thioretic@FreeBSD.org) Date: Tue, 21 Aug 2007 13:16:15 GMT Message-Id: <200708211316.l7LDGF7G015576@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 125498 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 13:16:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=125498 Change 125498 by thioretic@thioretic_freebox on 2007/08/21 13:15:57 IFC Affected files ... .. //depot/projects/soc2007/thioretic_gidl/dev/bce/if_bce.c#3 integrate .. //depot/projects/soc2007/thioretic_gidl/dev/bce/if_bcereg.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl/modules/if_tap/Makefile#2 integrate Differences ... ==== //depot/projects/soc2007/thioretic_gidl/dev/bce/if_bce.c#3 (text) ==== @@ -1,3 +1,4 @@ +>>>> ORIGINAL if_bce.c#17 /*- * Copyright (c) 2006-2007 Broadcom Corporation * David Christensen . All rights reserved. @@ -7504,3 +7505,15136 @@ return; } #endif +==== THEIRS if_bce.c#18 +/*- + * Copyright (c) 2006-2007 Broadcom Corporation + * David Christensen . All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Broadcom Corporation nor the name of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written consent. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.2.2.20 2007/08/20 21:47:49 davidch Exp $"); + +/* + * The following controllers are supported by this driver: + * BCM5706C A2, A3 + * BCM5708C B1, B2 + * + * The following controllers are not supported by this driver: + * BCM5706C A0, A1 + * BCM5706S A0, A1, A2, A3 + * BCM5708C A0, B0 + * BCM5708S A0, B0, B1, B2 + */ + +#include "opt_bce.h" + +#include +#include + +/****************************************************************************/ +/* BCE Debug Options */ +/****************************************************************************/ +#ifdef BCE_DEBUG + u32 bce_debug = BCE_WARN; + + /* 0 = Never */ + /* 1 = 1 in 2,147,483,648 */ + /* 256 = 1 in 8,388,608 */ + /* 2048 = 1 in 1,048,576 */ + /* 65536 = 1 in 32,768 */ + /* 1048576 = 1 in 2,048 */ + /* 268435456 = 1 in 8 */ + /* 536870912 = 1 in 4 */ + /* 1073741824 = 1 in 2 */ + + /* Controls how often the l2_fhdr frame error check will fail. */ + int bce_debug_l2fhdr_status_check = 0; + + /* Controls how often the unexpected attention check will fail. */ + int bce_debug_unexpected_attention = 0; + + /* Controls how often to simulate an mbuf allocation failure. */ + int bce_debug_mbuf_allocation_failure = 0; + + /* Controls how often to simulate a DMA mapping failure. */ + int bce_debug_dma_map_addr_failure = 0; + + /* Controls how often to simulate a bootcode failure. */ + int bce_debug_bootcode_running_failure = 0; +#endif + + +/****************************************************************************/ +/* PCI Device ID Table */ +/* */ +/* Used by bce_probe() to identify the devices supported by this driver. */ +/****************************************************************************/ +#define BCE_DEVDESC_MAX 64 + +static struct bce_type bce_devs[] = { + /* BCM5706C Controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, HP_VENDORID, 0x3101, + "HP NC370T Multifunction Gigabit Server Adapter" }, + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, HP_VENDORID, 0x3106, + "HP NC370i Multifunction Gigabit Server Adapter" }, + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5706 1000Base-T" }, + + /* BCM5706S controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, HP_VENDORID, 0x3102, + "HP NC370F Multifunction Gigabit Server Adapter" }, + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5706 1000Base-SX" }, + + /* BCM5708C controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5708 1000Base-T" }, + + /* BCM5708S controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5708 1000Base-SX" }, + { 0, 0, 0, 0, NULL } +}; + + +/****************************************************************************/ +/* Supported Flash NVRAM device data. */ +/****************************************************************************/ +static struct flash_spec flash_table[] = +{ + /* Slow EEPROM */ + {0x00000000, 0x40830380, 0x009f0081, 0xa184a053, 0xaf000400, + 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, + "EEPROM - slow"}, + /* Expansion entry 0001 */ + {0x08000002, 0x4b808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 0001"}, + /* Saifun SA25F010 (non-buffered flash) */ + /* strap, cfg1, & write1 need updates */ + {0x04000001, 0x47808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*2, + "Non-buffered flash (128kB)"}, + /* Saifun SA25F020 (non-buffered flash) */ + /* strap, cfg1, & write1 need updates */ + {0x0c000003, 0x4f808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*4, + "Non-buffered flash (256kB)"}, + /* Expansion entry 0100 */ + {0x11000000, 0x53808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 0100"}, + /* Entry 0101: ST M45PE10 (non-buffered flash, TetonII B0) */ + {0x19000002, 0x5b808201, 0x000500db, 0x03840253, 0xaf020406, + 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*2, + "Entry 0101: ST M45PE10 (128kB non-bufferred)"}, + /* Entry 0110: ST M45PE20 (non-buffered flash)*/ + {0x15000001, 0x57808201, 0x000500db, 0x03840253, 0xaf020406, + 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*4, + "Entry 0110: ST M45PE20 (256kB non-bufferred)"}, + /* Saifun SA25F005 (non-buffered flash) */ + /* strap, cfg1, & write1 need updates */ + {0x1d000003, 0x5f808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE, + "Non-buffered flash (64kB)"}, + /* Fast EEPROM */ + {0x22000000, 0x62808380, 0x009f0081, 0xa184a053, 0xaf000400, + 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, + "EEPROM - fast"}, + /* Expansion entry 1001 */ + {0x2a000002, 0x6b808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1001"}, + /* Expansion entry 1010 */ + {0x26000001, 0x67808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1010"}, + /* ATMEL AT45DB011B (buffered flash) */ + {0x2e000003, 0x6e808273, 0x00570081, 0x68848353, 0xaf000400, + 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE, + "Buffered flash (128kB)"}, + /* Expansion entry 1100 */ + {0x33000000, 0x73808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1100"}, + /* Expansion entry 1101 */ + {0x3b000002, 0x7b808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1101"}, + /* Ateml Expansion entry 1110 */ + {0x37000001, 0x76808273, 0x00570081, 0x68848353, 0xaf000400, + 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1110 (Atmel)"}, + /* ATMEL AT45DB021B (buffered flash) */ + {0x3f000003, 0x7e808273, 0x00570081, 0x68848353, 0xaf000400, + 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE*2, + "Buffered flash (256kB)"}, +}; + + +/****************************************************************************/ +/* FreeBSD device entry points. */ +/****************************************************************************/ +static int bce_probe (device_t); +static int bce_attach (device_t); +static int bce_detach (device_t); +static void bce_shutdown (device_t); + + +/****************************************************************************/ +/* BCE Debug Data Structure Dump Routines */ +/****************************************************************************/ +#ifdef BCE_DEBUG +static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); +static void bce_dump_tx_mbuf_chain (struct bce_softc *, int, int); +static void bce_dump_rx_mbuf_chain (struct bce_softc *, int, int); +static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); +static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); +static void bce_dump_tx_chain (struct bce_softc *, int, int); +static void bce_dump_rx_chain (struct bce_softc *, int, int); +static void bce_dump_status_block (struct bce_softc *); +static void bce_dump_stats_block (struct bce_softc *); +static void bce_dump_driver_state (struct bce_softc *); +static void bce_dump_hw_state (struct bce_softc *); +static void bce_dump_bc_state (struct bce_softc *); +static void bce_breakpoint (struct bce_softc *); +#endif + + +/****************************************************************************/ +/* BCE Register/Memory Access Routines */ +/****************************************************************************/ +static u32 bce_reg_rd_ind (struct bce_softc *, u32); +static void bce_reg_wr_ind (struct bce_softc *, u32, u32); +static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); +static int bce_miibus_read_reg (device_t, int, int); +static int bce_miibus_write_reg (device_t, int, int, int); +static void bce_miibus_statchg (device_t); + + +/****************************************************************************/ +/* BCE NVRAM Access Routines */ +/****************************************************************************/ +static int bce_acquire_nvram_lock (struct bce_softc *); +static int bce_release_nvram_lock (struct bce_softc *); +static void bce_enable_nvram_access (struct bce_softc *); +static void bce_disable_nvram_access(struct bce_softc *); +static int bce_nvram_read_dword (struct bce_softc *, u32, u8 *, u32); +static int bce_init_nvram (struct bce_softc *); +static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_test (struct bce_softc *); +#ifdef BCE_NVRAM_WRITE_SUPPORT +static int bce_enable_nvram_write (struct bce_softc *); +static void bce_disable_nvram_write (struct bce_softc *); +static int bce_nvram_erase_page (struct bce_softc *, u32); +static int bce_nvram_write_dword (struct bce_softc *, u32, u8 *, u32); +static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); +#endif + +/****************************************************************************/ +/* */ +/****************************************************************************/ +static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); +static int bce_dma_alloc (device_t); +static void bce_dma_free (struct bce_softc *); +static void bce_release_resources (struct bce_softc *); + +/****************************************************************************/ +/* BCE Firmware Synchronization and Load */ +/****************************************************************************/ +static int bce_fw_sync (struct bce_softc *, u32); +static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); +static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); +static void bce_init_cpus (struct bce_softc *); + +static void bce_stop (struct bce_softc *); +static int bce_reset (struct bce_softc *, u32); +static int bce_chipinit (struct bce_softc *); +static int bce_blockinit (struct bce_softc *); +static int bce_get_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); + +static int bce_init_tx_chain (struct bce_softc *); +static void bce_fill_rx_chain (struct bce_softc *); +static int bce_init_rx_chain (struct bce_softc *); +static void bce_free_rx_chain (struct bce_softc *); +static void bce_free_tx_chain (struct bce_softc *); + +static int bce_tx_encap (struct bce_softc *, struct mbuf **); +static void bce_start_locked (struct ifnet *); +static void bce_start (struct ifnet *); +static int bce_ioctl (struct ifnet *, u_long, caddr_t); +static void bce_watchdog (struct bce_softc *); +static int bce_ifmedia_upd (struct ifnet *); +static void bce_ifmedia_upd_locked (struct ifnet *); +static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); +static void bce_init_locked (struct bce_softc *); +static void bce_init (void *); +static void bce_mgmt_init_locked (struct bce_softc *sc); + +static void bce_init_context (struct bce_softc *); +static void bce_get_mac_addr (struct bce_softc *); +static void bce_set_mac_addr (struct bce_softc *); +static void bce_phy_intr (struct bce_softc *); +static void bce_rx_intr (struct bce_softc *); +static void bce_tx_intr (struct bce_softc *); +static void bce_disable_intr (struct bce_softc *); +static void bce_enable_intr (struct bce_softc *); + +#ifdef DEVICE_POLLING +static void bce_poll_locked (struct ifnet *, enum poll_cmd, int); +static void bce_poll (struct ifnet *, enum poll_cmd, int); +#endif +static void bce_intr (void *); +static void bce_set_rx_mode (struct bce_softc *); +static void bce_stats_update (struct bce_softc *); +static void bce_tick (void *); +static void bce_pulse (void *); +static void bce_add_sysctls (struct bce_softc *); + + +/****************************************************************************/ +/* FreeBSD device dispatch table. */ +/****************************************************************************/ +static device_method_t bce_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, bce_probe), + DEVMETHOD(device_attach, bce_attach), + DEVMETHOD(device_detach, bce_detach), + DEVMETHOD(device_shutdown, bce_shutdown), + + /* bus interface */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + /* MII interface */ + DEVMETHOD(miibus_readreg, bce_miibus_read_reg), + DEVMETHOD(miibus_writereg, bce_miibus_write_reg), + DEVMETHOD(miibus_statchg, bce_miibus_statchg), + + { 0, 0 } +}; + +static driver_t bce_driver = { + "bce", + bce_methods, + sizeof(struct bce_softc) +}; + +static devclass_t bce_devclass; + +MODULE_DEPEND(bce, pci, 1, 1, 1); +MODULE_DEPEND(bce, ether, 1, 1, 1); +MODULE_DEPEND(bce, miibus, 1, 1, 1); + +DRIVER_MODULE(bce, pci, bce_driver, bce_devclass, 0, 0); +DRIVER_MODULE(miibus, bce, miibus_driver, miibus_devclass, 0, 0); + + +/****************************************************************************/ +/* Tunable device values */ +/****************************************************************************/ +static int bce_msi_enable = 1; + +/* Allowable values are 0 (IRQ only) and 1 (IRQ or MSI) */ +TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable); +SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_RD, 0, "bce driver parameters"); +SYSCTL_UINT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0, +"MSI | INTx selector"); + +/****************************************************************************/ +/* Device probe function. */ +/* */ +/* Compares the device to the driver's list of supported devices and */ +/* reports back to the OS whether this is the right driver for the device. */ +/* */ +/* Returns: */ +/* BUS_PROBE_DEFAULT on success, positive value on failure. */ +/****************************************************************************/ +static int +bce_probe(device_t dev) +{ + struct bce_type *t; + struct bce_softc *sc; + char *descbuf; + u16 vid = 0, did = 0, svid = 0, sdid = 0; + + t = bce_devs; + + sc = device_get_softc(dev); + bzero(sc, sizeof(struct bce_softc)); + sc->bce_unit = device_get_unit(dev); + sc->bce_dev = dev; + + /* Get the data for the device to be probed. */ + vid = pci_get_vendor(dev); + did = pci_get_device(dev); + svid = pci_get_subvendor(dev); + sdid = pci_get_subdevice(dev); + + DBPRINT(sc, BCE_VERBOSE_LOAD, + "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " + "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); + + /* Look through the list of known devices for a match. */ + while(t->bce_name != NULL) { + + if ((vid == t->bce_vid) && (did == t->bce_did) && + ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && + ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { + + descbuf = malloc(BCE_DEVDESC_MAX, M_TEMP, M_NOWAIT); + + if (descbuf == NULL) + return(ENOMEM); + + /* Print out the device identity. */ + snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", + t->bce_name, + (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); + + device_set_desc_copy(dev, descbuf); + free(descbuf, M_TEMP); + return(BUS_PROBE_DEFAULT); + } + t++; + } + + return(ENXIO); +} + + +/****************************************************************************/ +/* Device attach function. */ +/* */ +/* Allocates device resources, performs secondary chip identification, */ +/* resets and initializes the hardware, and initializes driver instance */ +/* variables. */ +/* */ +/* Returns: */ +/* 0 on success, positive value on failure. */ +/****************************************************************************/ +static int +bce_attach(device_t dev) +{ + struct bce_softc *sc; + struct ifnet *ifp; + u32 val; + int count, mbuf, rid, rc = 0; + + sc = device_get_softc(dev); + sc->bce_dev = dev; + + DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); + + mbuf = device_get_unit(dev); + + /* Set initial device and PHY flags */ + sc->bce_flags = 0; + sc->bce_phy_flags = 0; + + sc->bce_unit = mbuf; + + pci_enable_busmaster(dev); + + /* Allocate PCI memory resources. */ + rid = PCIR_BAR(0); + sc->bce_res_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &rid, RF_ACTIVE | PCI_RF_DENSE); + + if (sc->bce_res_mem == NULL) { + BCE_PRINTF("%s(%d): PCI memory allocation failed\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Get various resource handles. */ + sc->bce_btag = rman_get_bustag(sc->bce_res_mem); + sc->bce_bhandle = rman_get_bushandle(sc->bce_res_mem); + sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res_mem); + + /* If MSI is enabled in the driver, get the vector count. */ + count = bce_msi_enable ? pci_msi_count(dev) : 0; + + /* Allocate PCI IRQ resources. */ + if (count == 1 && pci_alloc_msi(dev, &count) == 0 && count == 1) { + rid = 1; + sc->bce_flags |= BCE_USING_MSI_FLAG; + DBPRINT(sc, BCE_VERBOSE_LOAD, + "Allocating %d MSI interrupt(s)\n", count); + } else { + rid = 0; + DBPRINT(sc, BCE_VERBOSE_LOAD, "Allocating IRQ interrupt\n"); + } + + sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); + + if (sc->bce_res_irq == NULL) { + BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Initialize mutex for the current device instance. */ + BCE_LOCK_INIT(sc, device_get_nameunit(dev)); + + /* + * Configure byte swap and enable indirect register access. + * Rely on CPU to do target byte swapping on big endian systems. + * Access to registers outside of PCI configurtion space are not + * valid until this is done. + */ + pci_write_config(dev, BCE_PCICFG_MISC_CONFIG, + BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | + BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); + + /* Save ASIC revsion info. */ + sc->bce_chipid = REG_RD(sc, BCE_MISC_ID); + + /* Weed out any non-production controller revisions. */ + switch(BCE_CHIP_ID(sc)) { + case BCE_CHIP_ID_5706_A0: + case BCE_CHIP_ID_5706_A1: + case BCE_CHIP_ID_5708_A0: + case BCE_CHIP_ID_5708_B0: + BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", + __FILE__, __LINE__, + (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); + rc = ENODEV; + goto bce_attach_fail; + } + + /* + * The embedded PCIe to PCI-X bridge (EPB) + * in the 5708 cannot address memory above + * 40 bits (E7_5708CB1_23043 & E6_5708SB1_23043). + */ + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708) + sc->max_bus_addr = BCE_BUS_SPACE_MAXADDR; + else + sc->max_bus_addr = BUS_SPACE_MAXADDR; + + /* + * Find the base address for shared memory access. + * Newer versions of bootcode use a signature and offset + * while older versions use a fixed address. + */ + val = REG_RD_IND(sc, BCE_SHM_HDR_SIGNATURE); + if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG) + sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0); + else + sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE; + + DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", + __FUNCTION__, sc->bce_shmem_base); + + sc->bce_fw_ver = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_DEV_INFO_BC_REV); + DBPRINT(sc, BCE_INFO_FIRMWARE, "%s(): bce_fw_ver = 0x%08X\n", + __FUNCTION__, sc->bce_fw_ver); + + /* Check if any management firmware is running. */ + val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_PORT_FEATURE); + if (val & (BCE_PORT_FEATURE_ASF_ENABLED | BCE_PORT_FEATURE_IMD_ENABLED)) { + sc->bce_flags |= BCE_MFW_ENABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "%s(): BCE_MFW_ENABLE_FLAG\n", + __FUNCTION__); + } + + /* Get PCI bus information (speed and type). */ + val = REG_RD(sc, BCE_PCICFG_MISC_STATUS); + if (val & BCE_PCICFG_MISC_STATUS_PCIX_DET) { + u32 clkreg; + + sc->bce_flags |= BCE_PCIX_FLAG; + + clkreg = REG_RD(sc, BCE_PCICFG_PCI_CLOCK_CONTROL_BITS); + + clkreg &= BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET; + switch (clkreg) { + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_133MHZ: + sc->bus_speed_mhz = 133; + break; + + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_95MHZ: + sc->bus_speed_mhz = 100; + break; + + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_66MHZ: + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_80MHZ: + sc->bus_speed_mhz = 66; + break; + + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_48MHZ: + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_55MHZ: + sc->bus_speed_mhz = 50; + break; + + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_LOW: + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_32MHZ: + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_38MHZ: + sc->bus_speed_mhz = 33; + break; + } + } else { + if (val & BCE_PCICFG_MISC_STATUS_M66EN) + sc->bus_speed_mhz = 66; + else + sc->bus_speed_mhz = 33; + } + + if (val & BCE_PCICFG_MISC_STATUS_32BIT_DET) + sc->bce_flags |= BCE_PCI_32BIT_FLAG; + + /* Reset the controller and announce to bootcode that driver is present. */ + if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) { + BCE_PRINTF("%s(%d): Controller reset failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Initialize the controller. */ + if (bce_chipinit(sc)) { + BCE_PRINTF("%s(%d): Controller initialization failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Perform NVRAM test. */ + if (bce_nvram_test(sc)) { + BCE_PRINTF("%s(%d): NVRAM test failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Fetch the permanent Ethernet MAC address. */ + bce_get_mac_addr(sc); + + /* + * Trip points control how many BDs + * should be ready before generating an + * interrupt while ticks control how long + * a BD can sit in the chain before + * generating an interrupt. Set the default + * values for the RX and TX chains. + */ + +#ifdef BCE_DEBUG + /* Force more frequent interrupts. */ + sc->bce_tx_quick_cons_trip_int = 1; + sc->bce_tx_quick_cons_trip = 1; + sc->bce_tx_ticks_int = 0; + sc->bce_tx_ticks = 0; + + sc->bce_rx_quick_cons_trip_int = 1; + sc->bce_rx_quick_cons_trip = 1; + sc->bce_rx_ticks_int = 0; + sc->bce_rx_ticks = 0; +#else + /* Improve throughput at the expense of increased latency. */ + sc->bce_tx_quick_cons_trip_int = 20; + sc->bce_tx_quick_cons_trip = 20; + sc->bce_tx_ticks_int = 80; + sc->bce_tx_ticks = 80; + + sc->bce_rx_quick_cons_trip_int = 6; + sc->bce_rx_quick_cons_trip = 6; + sc->bce_rx_ticks_int = 18; + sc->bce_rx_ticks = 18; +#endif + + /* Update statistics once every second. */ + sc->bce_stats_ticks = 1000000 & 0xffff00; + + /* + * The SerDes based NetXtreme II controllers + * that support 2.5Gb operation (currently + * 5708S) use a PHY at address 2, otherwise + * the PHY is present at address 1. + */ + sc->bce_phy_addr = 1; + + if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) { + sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + sc->bce_flags |= BCE_NO_WOL_FLAG; + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + sc->bce_phy_addr = 2; + val = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_SHARED_HW_CFG_CONFIG); + if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { + sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); + } + } + } + + /* Store data needed by PHY driver for backplane applications */ + sc->bce_shared_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_SHARED_HW_CFG_CONFIG); + sc->bce_port_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_SHARED_HW_CFG_CONFIG); + + /* Allocate DMA memory resources. */ + if (bce_dma_alloc(dev)) { + BCE_PRINTF("%s(%d): DMA resource allocation failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Allocate an ifnet structure. */ + ifp = sc->bce_ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) { + BCE_PRINTF("%s(%d): Interface allocation failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Initialize the ifnet interface. */ + ifp->if_softc = sc; + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_ioctl = bce_ioctl; + ifp->if_start = bce_start; + ifp->if_init = bce_init; + ifp->if_mtu = ETHERMTU; + ifp->if_hwassist = BCE_IF_HWASSIST; + ifp->if_capabilities = BCE_IF_CAPABILITIES; + ifp->if_capenable = ifp->if_capabilities; + + /* Assume a standard 1500 byte MTU size for mbuf allocations. */ + sc->mbuf_alloc_size = MCLBYTES; +#ifdef DEVICE_POLLING + ifp->if_capabilities |= IFCAP_POLLING; +#endif + + ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD; + IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); + IFQ_SET_READY(&ifp->if_snd); + + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + ifp->if_baudrate = IF_Mbps(2500ULL); + else + ifp->if_baudrate = IF_Mbps(1000); + + /* Check for an MII child bus by probing the PHY. */ + if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, + bce_ifmedia_sts)) { + BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Attach to the Ethernet interface list. */ + ether_ifattach(ifp, sc->eaddr); + +#if __FreeBSD_version < 500000 + callout_init(&sc->bce_tick_callout); + callout_init(&sc->bce_pulse_callout); +#else + callout_init_mtx(&sc->bce_tick_callout, &sc->bce_mtx, 0); + callout_init_mtx(&sc->bce_pulse_callout, &sc->bce_mtx, 0); +#endif + + /* Hookup IRQ last. */ +#if __FreeBSD_version > 700030 + rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE, + NULL, bce_intr, sc, &sc->bce_intrhand); +#else + rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE, + bce_intr, sc, &sc->bce_intrhand); +#endif + + if (rc) { + BCE_PRINTF("%s(%d): Failed to setup IRQ!\n", + __FILE__, __LINE__); + bce_detach(dev); + goto bce_attach_exit; + } + + /* + * At this point we've acquired all the resources + * we need to run so there's no turning back, we're + * cleared for launch. + */ + + /* Print some important debugging info. */ + DBRUN(BCE_INFO, bce_dump_driver_state(sc)); + + /* Add the supported sysctls to the kernel. */ + bce_add_sysctls(sc); + + BCE_LOCK(sc); + /* + * The chip reset earlier notified the bootcode that + * a driver is present. We now need to start our pulse + * routine so that the bootcode is reminded that we're + * still running. + */ + bce_pulse(sc); + + bce_mgmt_init_locked(sc); + BCE_UNLOCK(sc); + + /* Finally, print some useful adapter info */ + BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); + printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', + ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); + printf("Bus (PCI%s, %s, %dMHz); ", + ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), + ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), + sc->bus_speed_mhz); + printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver); + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) + printf("MFW "); + if (sc->bce_flags & BCE_USING_MSI_FLAG) + printf("MSI "); + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + printf("2.5G "); + printf(")\n"); + + goto bce_attach_exit; + +bce_attach_fail: + bce_release_resources(sc); + +bce_attach_exit: + + DBPRINT(sc, BCE_VERBOSE_RESET, "Exiting %s()\n", __FUNCTION__); + + return(rc); +} + + +/****************************************************************************/ +/* Device detach function. */ +/* */ +/* Stops the controller, resets the controller, and releases resources. */ +/* */ +/* Returns: */ +/* 0 on success, positive value on failure. */ +/****************************************************************************/ +static int +bce_detach(device_t dev) +{ + struct bce_softc *sc = device_get_softc(dev); + struct ifnet *ifp; + u32 msg; + + DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); + + ifp = sc->bce_ifp; + +#ifdef DEVICE_POLLING + if (ifp->if_capenable & IFCAP_POLLING) + ether_poll_deregister(ifp); +#endif + + /* Stop the pulse so the bootcode can go to driver absent state. */ + callout_stop(&sc->bce_pulse_callout); + + /* Stop and reset the controller. */ + BCE_LOCK(sc); + bce_stop(sc); + if (sc->bce_flags & BCE_NO_WOL_FLAG) + msg = BCE_DRV_MSG_CODE_UNLOAD_LNK_DN; + else + msg = BCE_DRV_MSG_CODE_UNLOAD; + bce_reset(sc, msg); + BCE_UNLOCK(sc); + + ether_ifdetach(ifp); + + /* If we have a child device on the MII bus remove it too. */ + bus_generic_detach(dev); + device_delete_child(dev, sc->bce_miibus); + + /* Release all remaining resources. */ + bce_release_resources(sc); + + DBPRINT(sc, BCE_VERBOSE_RESET, "Exiting %s()\n", __FUNCTION__); + + return(0); +} + + +/****************************************************************************/ +/* Device shutdown function. */ +/* */ +/* Stops and resets the controller. */ +/* */ +/* Returns: */ +/* Nothing */ +/****************************************************************************/ +static void +bce_shutdown(device_t dev) +{ + struct bce_softc *sc = device_get_softc(dev); + u32 msg; + + DBPRINT(sc, BCE_VERBOSE_SPECIAL, "Entering %s()\n", __FUNCTION__); + + BCE_LOCK(sc); + bce_stop(sc); + if (sc->bce_flags & BCE_NO_WOL_FLAG) + msg = BCE_DRV_MSG_CODE_UNLOAD_LNK_DN; + else + msg = BCE_DRV_MSG_CODE_UNLOAD; + bce_reset(sc, msg); + BCE_UNLOCK(sc); + + DBPRINT(sc, BCE_VERBOSE_SPECIAL, "Exiting %s()\n", __FUNCTION__); +} + + +/****************************************************************************/ +/* Indirect register read. */ +/* */ +/* Reads NetXtreme II registers using an index/data register pair in PCI */ +/* configuration space. Using this mechanism avoids issues with posted */ +/* reads but is much slower than memory-mapped I/O. */ +/* */ +/* Returns: */ +/* The value of the register. */ +/****************************************************************************/ +static u32 +bce_reg_rd_ind(struct bce_softc *sc, u32 offset) +{ + device_t dev; + dev = sc->bce_dev; + + pci_write_config(dev, BCE_PCICFG_REG_WINDOW_ADDRESS, offset, 4); +#ifdef BCE_DEBUG + { + u32 val; + val = pci_read_config(dev, BCE_PCICFG_REG_WINDOW, 4); + DBPRINT(sc, BCE_EXCESSIVE, "%s(); offset = 0x%08X, val = 0x%08X\n", + __FUNCTION__, offset, val); + return val; + } +#else + return pci_read_config(dev, BCE_PCICFG_REG_WINDOW, 4); +#endif +} + + +/****************************************************************************/ +/* Indirect register write. */ +/* */ +/* Writes NetXtreme II registers using an index/data register pair in PCI */ +/* configuration space. Using this mechanism avoids issues with posted */ +/* writes but is muchh slower than memory-mapped I/O. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_reg_wr_ind(struct bce_softc *sc, u32 offset, u32 val) +{ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Aug 21 13:20:27 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B85916A468; Tue, 21 Aug 2007 13:20:27 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD06516A418 for ; Tue, 21 Aug 2007 13:20:26 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BA31E13C457 for ; Tue, 21 Aug 2007 13:20:26 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LDKQXd015910 for ; Tue, 21 Aug 2007 13:20:26 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7LDKNT9015886 for perforce@freebsd.org; Tue, 21 Aug 2007 13:20:23 GMT (envelope-from thioretic@FreeBSD.org) Date: Tue, 21 Aug 2007 13:20:23 GMT Message-Id: <200708211320.l7LDKNT9015886@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 125499 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 13:20:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=125499 Change 125499 by thioretic@thioretic_freebox on 2007/08/21 13:19:53 IFC Affected files ... .. //depot/projects/soc2007/thioretic_gidl2/dev/bce/if_bce.c#3 integrate .. //depot/projects/soc2007/thioretic_gidl2/dev/bce/if_bcereg.h#2 integrate .. //depot/projects/soc2007/thioretic_gidl2/modules/if_tap/Makefile#2 integrate Differences ... ==== //depot/projects/soc2007/thioretic_gidl2/dev/bce/if_bce.c#3 (text) ==== @@ -1,3 +1,7511 @@ +>>>> ORIGINAL if_bce.c#17 +/*- + * Copyright (c) 2006-2007 Broadcom Corporation + * David Christensen . All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Broadcom Corporation nor the name of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written consent. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.2.2.19 2007/07/14 20:25:19 csjp Exp $"); + +/* + * The following controllers are supported by this driver: + * BCM5706C A2, A3 + * BCM5708C B1, B2 + * + * The following controllers are not supported by this driver: + * BCM5706C A0, A1 + * BCM5706S A0, A1, A2, A3 + * BCM5708C A0, B0 + * BCM5708S A0, B0, B1, B2 + */ + +#include "opt_bce.h" + +#include +#include + +/****************************************************************************/ +/* BCE Debug Options */ +/****************************************************************************/ +#ifdef BCE_DEBUG + u32 bce_debug = BCE_WARN; + + /* 0 = Never */ + /* 1 = 1 in 2,147,483,648 */ + /* 256 = 1 in 8,388,608 */ + /* 2048 = 1 in 1,048,576 */ + /* 65536 = 1 in 32,768 */ + /* 1048576 = 1 in 2,048 */ + /* 268435456 = 1 in 8 */ + /* 536870912 = 1 in 4 */ + /* 1073741824 = 1 in 2 */ + + /* Controls how often the l2_fhdr frame error check will fail. */ + int bce_debug_l2fhdr_status_check = 0; + + /* Controls how often the unexpected attention check will fail. */ + int bce_debug_unexpected_attention = 0; + + /* Controls how often to simulate an mbuf allocation failure. */ + int bce_debug_mbuf_allocation_failure = 0; + + /* Controls how often to simulate a DMA mapping failure. */ + int bce_debug_dma_map_addr_failure = 0; + + /* Controls how often to simulate a bootcode failure. */ + int bce_debug_bootcode_running_failure = 0; +#endif + + +/****************************************************************************/ +/* PCI Device ID Table */ +/* */ +/* Used by bce_probe() to identify the devices supported by this driver. */ +/****************************************************************************/ +#define BCE_DEVDESC_MAX 64 + +static struct bce_type bce_devs[] = { + /* BCM5706C Controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, HP_VENDORID, 0x3101, + "HP NC370T Multifunction Gigabit Server Adapter" }, + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, HP_VENDORID, 0x3106, + "HP NC370i Multifunction Gigabit Server Adapter" }, + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5706 1000Base-T" }, + + /* BCM5706S controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, HP_VENDORID, 0x3102, + "HP NC370F Multifunction Gigabit Server Adapter" }, + { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5706 1000Base-SX" }, + + /* BCM5708C controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5708 1000Base-T" }, + + /* BCM5708S controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5708 1000Base-SX" }, + { 0, 0, 0, 0, NULL } +}; + + +/****************************************************************************/ +/* Supported Flash NVRAM device data. */ +/****************************************************************************/ +static struct flash_spec flash_table[] = +{ + /* Slow EEPROM */ + {0x00000000, 0x40830380, 0x009f0081, 0xa184a053, 0xaf000400, + 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, + "EEPROM - slow"}, + /* Expansion entry 0001 */ + {0x08000002, 0x4b808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 0001"}, + /* Saifun SA25F010 (non-buffered flash) */ + /* strap, cfg1, & write1 need updates */ + {0x04000001, 0x47808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*2, + "Non-buffered flash (128kB)"}, + /* Saifun SA25F020 (non-buffered flash) */ + /* strap, cfg1, & write1 need updates */ + {0x0c000003, 0x4f808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*4, + "Non-buffered flash (256kB)"}, + /* Expansion entry 0100 */ + {0x11000000, 0x53808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 0100"}, + /* Entry 0101: ST M45PE10 (non-buffered flash, TetonII B0) */ + {0x19000002, 0x5b808201, 0x000500db, 0x03840253, 0xaf020406, + 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*2, + "Entry 0101: ST M45PE10 (128kB non-bufferred)"}, + /* Entry 0110: ST M45PE20 (non-buffered flash)*/ + {0x15000001, 0x57808201, 0x000500db, 0x03840253, 0xaf020406, + 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*4, + "Entry 0110: ST M45PE20 (256kB non-bufferred)"}, + /* Saifun SA25F005 (non-buffered flash) */ + /* strap, cfg1, & write1 need updates */ + {0x1d000003, 0x5f808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE, + "Non-buffered flash (64kB)"}, + /* Fast EEPROM */ + {0x22000000, 0x62808380, 0x009f0081, 0xa184a053, 0xaf000400, + 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, + "EEPROM - fast"}, + /* Expansion entry 1001 */ + {0x2a000002, 0x6b808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1001"}, + /* Expansion entry 1010 */ + {0x26000001, 0x67808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1010"}, + /* ATMEL AT45DB011B (buffered flash) */ + {0x2e000003, 0x6e808273, 0x00570081, 0x68848353, 0xaf000400, + 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE, + "Buffered flash (128kB)"}, + /* Expansion entry 1100 */ + {0x33000000, 0x73808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1100"}, + /* Expansion entry 1101 */ + {0x3b000002, 0x7b808201, 0x00050081, 0x03840253, 0xaf020406, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + SAIFUN_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1101"}, + /* Ateml Expansion entry 1110 */ + {0x37000001, 0x76808273, 0x00570081, 0x68848353, 0xaf000400, + 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLASH_BYTE_ADDR_MASK, 0, + "Entry 1110 (Atmel)"}, + /* ATMEL AT45DB021B (buffered flash) */ + {0x3f000003, 0x7e808273, 0x00570081, 0x68848353, 0xaf000400, + 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE*2, + "Buffered flash (256kB)"}, +}; + + +/****************************************************************************/ +/* FreeBSD device entry points. */ +/****************************************************************************/ +static int bce_probe (device_t); +static int bce_attach (device_t); +static int bce_detach (device_t); +static void bce_shutdown (device_t); + + +/****************************************************************************/ +/* BCE Debug Data Structure Dump Routines */ +/****************************************************************************/ +#ifdef BCE_DEBUG +static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); +static void bce_dump_tx_mbuf_chain (struct bce_softc *, int, int); +static void bce_dump_rx_mbuf_chain (struct bce_softc *, int, int); +static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); +static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); +static void bce_dump_tx_chain (struct bce_softc *, int, int); +static void bce_dump_rx_chain (struct bce_softc *, int, int); +static void bce_dump_status_block (struct bce_softc *); +static void bce_dump_stats_block (struct bce_softc *); +static void bce_dump_driver_state (struct bce_softc *); +static void bce_dump_hw_state (struct bce_softc *); +static void bce_dump_bc_state (struct bce_softc *); +static void bce_breakpoint (struct bce_softc *); +#endif + + +/****************************************************************************/ +/* BCE Register/Memory Access Routines */ +/****************************************************************************/ +static u32 bce_reg_rd_ind (struct bce_softc *, u32); +static void bce_reg_wr_ind (struct bce_softc *, u32, u32); +static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); +static int bce_miibus_read_reg (device_t, int, int); +static int bce_miibus_write_reg (device_t, int, int, int); +static void bce_miibus_statchg (device_t); + + +/****************************************************************************/ +/* BCE NVRAM Access Routines */ +/****************************************************************************/ +static int bce_acquire_nvram_lock (struct bce_softc *); +static int bce_release_nvram_lock (struct bce_softc *); +static void bce_enable_nvram_access (struct bce_softc *); +static void bce_disable_nvram_access(struct bce_softc *); +static int bce_nvram_read_dword (struct bce_softc *, u32, u8 *, u32); +static int bce_init_nvram (struct bce_softc *); +static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_test (struct bce_softc *); +#ifdef BCE_NVRAM_WRITE_SUPPORT +static int bce_enable_nvram_write (struct bce_softc *); +static void bce_disable_nvram_write (struct bce_softc *); +static int bce_nvram_erase_page (struct bce_softc *, u32); +static int bce_nvram_write_dword (struct bce_softc *, u32, u8 *, u32); +static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); +#endif + +/****************************************************************************/ +/* */ +/****************************************************************************/ +static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); +static int bce_dma_alloc (device_t); +static void bce_dma_free (struct bce_softc *); +static void bce_release_resources (struct bce_softc *); + +/****************************************************************************/ +/* BCE Firmware Synchronization and Load */ +/****************************************************************************/ +static int bce_fw_sync (struct bce_softc *, u32); +static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); +static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); +static void bce_init_cpus (struct bce_softc *); + +static void bce_stop (struct bce_softc *); +static int bce_reset (struct bce_softc *, u32); +static int bce_chipinit (struct bce_softc *); +static int bce_blockinit (struct bce_softc *); +static int bce_get_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); + +static int bce_init_tx_chain (struct bce_softc *); +static int bce_init_rx_chain (struct bce_softc *); +static void bce_free_rx_chain (struct bce_softc *); +static void bce_free_tx_chain (struct bce_softc *); + +static int bce_tx_encap (struct bce_softc *, struct mbuf **); +static void bce_start_locked (struct ifnet *); +static void bce_start (struct ifnet *); +static int bce_ioctl (struct ifnet *, u_long, caddr_t); +static void bce_watchdog (struct bce_softc *); +static int bce_ifmedia_upd (struct ifnet *); +static void bce_ifmedia_upd_locked (struct ifnet *); +static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); +static void bce_init_locked (struct bce_softc *); +static void bce_init (void *); +static void bce_mgmt_init_locked(struct bce_softc *sc); + +static void bce_init_context (struct bce_softc *); +static void bce_get_mac_addr (struct bce_softc *); +static void bce_set_mac_addr (struct bce_softc *); +static void bce_phy_intr (struct bce_softc *); +static void bce_rx_intr (struct bce_softc *); +static void bce_tx_intr (struct bce_softc *); +static void bce_disable_intr (struct bce_softc *); +static void bce_enable_intr (struct bce_softc *); + +#ifdef DEVICE_POLLING +static void bce_poll_locked (struct ifnet *, enum poll_cmd, int); +static void bce_poll (struct ifnet *, enum poll_cmd, int); +#endif +static void bce_intr (void *); +static void bce_set_rx_mode (struct bce_softc *); +static void bce_stats_update (struct bce_softc *); +static void bce_tick (void *); +static void bce_pulse (void *); +static void bce_add_sysctls (struct bce_softc *); + + +/****************************************************************************/ +/* FreeBSD device dispatch table. */ +/****************************************************************************/ +static device_method_t bce_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, bce_probe), + DEVMETHOD(device_attach, bce_attach), + DEVMETHOD(device_detach, bce_detach), + DEVMETHOD(device_shutdown, bce_shutdown), + + /* bus interface */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + /* MII interface */ + DEVMETHOD(miibus_readreg, bce_miibus_read_reg), + DEVMETHOD(miibus_writereg, bce_miibus_write_reg), + DEVMETHOD(miibus_statchg, bce_miibus_statchg), + + { 0, 0 } +}; + +static driver_t bce_driver = { + "bce", + bce_methods, + sizeof(struct bce_softc) +}; + +static devclass_t bce_devclass; + +MODULE_DEPEND(bce, pci, 1, 1, 1); +MODULE_DEPEND(bce, ether, 1, 1, 1); +MODULE_DEPEND(bce, miibus, 1, 1, 1); + +DRIVER_MODULE(bce, pci, bce_driver, bce_devclass, 0, 0); +DRIVER_MODULE(miibus, bce, miibus_driver, miibus_devclass, 0, 0); + + +/****************************************************************************/ +/* Tunable device values */ +/****************************************************************************/ +static int bce_msi_enable = 1; + +/* Allowable values are 0 (IRQ only) and 1 (IRQ or MSI) */ +TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable); +SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_RD, 0, "bce driver parameters"); +SYSCTL_UINT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0, +"MSI | INTx selector"); + +/****************************************************************************/ +/* Device probe function. */ +/* */ +/* Compares the device to the driver's list of supported devices and */ +/* reports back to the OS whether this is the right driver for the device. */ +/* */ +/* Returns: */ +/* BUS_PROBE_DEFAULT on success, positive value on failure. */ +/****************************************************************************/ +static int +bce_probe(device_t dev) +{ + struct bce_type *t; + struct bce_softc *sc; + char *descbuf; + u16 vid = 0, did = 0, svid = 0, sdid = 0; + + t = bce_devs; + + sc = device_get_softc(dev); + bzero(sc, sizeof(struct bce_softc)); + sc->bce_unit = device_get_unit(dev); + sc->bce_dev = dev; + + /* Get the data for the device to be probed. */ + vid = pci_get_vendor(dev); + did = pci_get_device(dev); + svid = pci_get_subvendor(dev); + sdid = pci_get_subdevice(dev); + + DBPRINT(sc, BCE_VERBOSE_LOAD, + "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " + "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); + + /* Look through the list of known devices for a match. */ + while(t->bce_name != NULL) { + + if ((vid == t->bce_vid) && (did == t->bce_did) && + ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && + ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { + + descbuf = malloc(BCE_DEVDESC_MAX, M_TEMP, M_NOWAIT); + + if (descbuf == NULL) + return(ENOMEM); + + /* Print out the device identity. */ + snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", + t->bce_name, + (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); + + device_set_desc_copy(dev, descbuf); + free(descbuf, M_TEMP); + return(BUS_PROBE_DEFAULT); + } + t++; + } + + return(ENXIO); +} + + +/****************************************************************************/ +/* Device attach function. */ +/* */ +/* Allocates device resources, performs secondary chip identification, */ +/* resets and initializes the hardware, and initializes driver instance */ +/* variables. */ +/* */ +/* Returns: */ +/* 0 on success, positive value on failure. */ +/****************************************************************************/ +static int +bce_attach(device_t dev) +{ + struct bce_softc *sc; + struct ifnet *ifp; + u32 val; + int count, mbuf, rid, rc = 0; + + sc = device_get_softc(dev); + sc->bce_dev = dev; + + DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); + + mbuf = device_get_unit(dev); + + /* Set initial device and PHY flags */ + sc->bce_flags = 0; + sc->bce_phy_flags = 0; + + sc->bce_unit = mbuf; + + pci_enable_busmaster(dev); + + /* Allocate PCI memory resources. */ + rid = PCIR_BAR(0); + sc->bce_res_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &rid, RF_ACTIVE | PCI_RF_DENSE); + + if (sc->bce_res_mem == NULL) { + BCE_PRINTF("%s(%d): PCI memory allocation failed\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Get various resource handles. */ + sc->bce_btag = rman_get_bustag(sc->bce_res_mem); + sc->bce_bhandle = rman_get_bushandle(sc->bce_res_mem); + sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res_mem); + + /* If MSI is enabled in the driver, get the vector count. */ + count = bce_msi_enable ? pci_msi_count(dev) : 0; + + /* Allocate PCI IRQ resources. */ + if (count == 1 && pci_alloc_msi(dev, &count) == 0 && count == 1) { + rid = 1; + sc->bce_flags |= BCE_USING_MSI_FLAG; + DBPRINT(sc, BCE_VERBOSE_LOAD, + "Allocating %d MSI interrupt(s)\n", count); + } else { + rid = 0; + DBPRINT(sc, BCE_VERBOSE_LOAD, "Allocating IRQ interrupt\n"); + } + + sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); + + if (sc->bce_res_irq == NULL) { + BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Initialize mutex for the current device instance. */ + BCE_LOCK_INIT(sc, device_get_nameunit(dev)); + + /* + * Configure byte swap and enable indirect register access. + * Rely on CPU to do target byte swapping on big endian systems. + * Access to registers outside of PCI configurtion space are not + * valid until this is done. + */ + pci_write_config(dev, BCE_PCICFG_MISC_CONFIG, + BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | + BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); + + /* Save ASIC revsion info. */ + sc->bce_chipid = REG_RD(sc, BCE_MISC_ID); + + /* Weed out any non-production controller revisions. */ + switch(BCE_CHIP_ID(sc)) { + case BCE_CHIP_ID_5706_A0: + case BCE_CHIP_ID_5706_A1: + case BCE_CHIP_ID_5708_A0: + case BCE_CHIP_ID_5708_B0: + BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", + __FILE__, __LINE__, + (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); + rc = ENODEV; + goto bce_attach_fail; + } + + /* + * The embedded PCIe to PCI-X bridge (EPB) + * in the 5708 cannot address memory above + * 40 bits (E7_5708CB1_23043 & E6_5708SB1_23043). + */ + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708) + sc->max_bus_addr = BCE_BUS_SPACE_MAXADDR; + else + sc->max_bus_addr = BUS_SPACE_MAXADDR; + + /* + * Find the base address for shared memory access. + * Newer versions of bootcode use a signature and offset + * while older versions use a fixed address. + */ + val = REG_RD_IND(sc, BCE_SHM_HDR_SIGNATURE); + if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG) + sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0); + else + sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE; + + DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", + __FUNCTION__, sc->bce_shmem_base); + + sc->bce_fw_ver = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_DEV_INFO_BC_REV); + DBPRINT(sc, BCE_INFO_FIRMWARE, "%s(): bce_fw_ver = 0x%08X\n", + __FUNCTION__, sc->bce_fw_ver); + + /* Check if any management firmware is running. */ + val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_PORT_FEATURE); + if (val & (BCE_PORT_FEATURE_ASF_ENABLED | BCE_PORT_FEATURE_IMD_ENABLED)) { + sc->bce_flags |= BCE_MFW_ENABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "%s(): BCE_MFW_ENABLE_FLAG\n", + __FUNCTION__); + } + + /* Get PCI bus information (speed and type). */ + val = REG_RD(sc, BCE_PCICFG_MISC_STATUS); + if (val & BCE_PCICFG_MISC_STATUS_PCIX_DET) { + u32 clkreg; + + sc->bce_flags |= BCE_PCIX_FLAG; + + clkreg = REG_RD(sc, BCE_PCICFG_PCI_CLOCK_CONTROL_BITS); + + clkreg &= BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET; + switch (clkreg) { + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_133MHZ: + sc->bus_speed_mhz = 133; + break; + + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_95MHZ: + sc->bus_speed_mhz = 100; + break; + + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_66MHZ: + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_80MHZ: + sc->bus_speed_mhz = 66; + break; + + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_48MHZ: + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_55MHZ: + sc->bus_speed_mhz = 50; + break; + + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_LOW: + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_32MHZ: + case BCE_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_38MHZ: + sc->bus_speed_mhz = 33; + break; + } + } else { + if (val & BCE_PCICFG_MISC_STATUS_M66EN) + sc->bus_speed_mhz = 66; + else + sc->bus_speed_mhz = 33; + } + + if (val & BCE_PCICFG_MISC_STATUS_32BIT_DET) + sc->bce_flags |= BCE_PCI_32BIT_FLAG; + + /* Reset the controller and announce to bootcde that driver is present. */ + if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) { + BCE_PRINTF("%s(%d): Controller reset failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Initialize the controller. */ + if (bce_chipinit(sc)) { + BCE_PRINTF("%s(%d): Controller initialization failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Perform NVRAM test. */ + if (bce_nvram_test(sc)) { + BCE_PRINTF("%s(%d): NVRAM test failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Fetch the permanent Ethernet MAC address. */ + bce_get_mac_addr(sc); + + /* + * Trip points control how many BDs + * should be ready before generating an + * interrupt while ticks control how long + * a BD can sit in the chain before + * generating an interrupt. Set the default + * values for the RX and TX chains. + */ + +#ifdef BCE_DEBUG + /* Force more frequent interrupts. */ + sc->bce_tx_quick_cons_trip_int = 1; + sc->bce_tx_quick_cons_trip = 1; + sc->bce_tx_ticks_int = 0; + sc->bce_tx_ticks = 0; + + sc->bce_rx_quick_cons_trip_int = 1; + sc->bce_rx_quick_cons_trip = 1; + sc->bce_rx_ticks_int = 0; + sc->bce_rx_ticks = 0; +#else + /* Improve throughput at the expense of increased latency. */ + sc->bce_tx_quick_cons_trip_int = 20; + sc->bce_tx_quick_cons_trip = 20; + sc->bce_tx_ticks_int = 80; + sc->bce_tx_ticks = 80; + + sc->bce_rx_quick_cons_trip_int = 6; + sc->bce_rx_quick_cons_trip = 6; + sc->bce_rx_ticks_int = 18; + sc->bce_rx_ticks = 18; +#endif + + /* Update statistics once every second. */ + sc->bce_stats_ticks = 1000000 & 0xffff00; + + /* + * The SerDes based NetXtreme II controllers + * that support 2.5Gb operation (currently + * 5708S) use a PHY at address 2, otherwise + * the PHY is present at address 1. + */ + sc->bce_phy_addr = 1; + + if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) { + sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + sc->bce_flags |= BCE_NO_WOL_FLAG; + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + sc->bce_phy_addr = 2; + val = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_SHARED_HW_CFG_CONFIG); + if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { + sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); + } + } + } + + /* Store data needed by PHY driver for backplane applications */ + sc->bce_shared_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_SHARED_HW_CFG_CONFIG); + sc->bce_port_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_SHARED_HW_CFG_CONFIG); + + /* Allocate DMA memory resources. */ + if (bce_dma_alloc(dev)) { + BCE_PRINTF("%s(%d): DMA resource allocation failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Allocate an ifnet structure. */ + ifp = sc->bce_ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) { + BCE_PRINTF("%s(%d): Interface allocation failed!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Initialize the ifnet interface. */ + ifp->if_softc = sc; + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_ioctl = bce_ioctl; + ifp->if_start = bce_start; + ifp->if_init = bce_init; + ifp->if_mtu = ETHERMTU; + ifp->if_hwassist = BCE_IF_HWASSIST; + ifp->if_capabilities = BCE_IF_CAPABILITIES; + ifp->if_capenable = ifp->if_capabilities; + + /* Assume a standard 1500 byte MTU size for mbuf allocations. */ + sc->mbuf_alloc_size = MCLBYTES; +#ifdef DEVICE_POLLING + ifp->if_capabilities |= IFCAP_POLLING; +#endif + + ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD; + IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); + IFQ_SET_READY(&ifp->if_snd); + + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + ifp->if_baudrate = IF_Mbps(2500ULL); + else + ifp->if_baudrate = IF_Mbps(1000); + + /* Check for an MII child bus by probing the PHY. */ + if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, + bce_ifmedia_sts)) { + BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", + __FILE__, __LINE__); + rc = ENXIO; + goto bce_attach_fail; + } + + /* Attach to the Ethernet interface list. */ + ether_ifattach(ifp, sc->eaddr); + +#if __FreeBSD_version < 500000 + callout_init(&sc->bce_tick_callout); + callout_init(&sc->bce_pulse_callout); +#else + callout_init_mtx(&sc->bce_tick_callout, &sc->bce_mtx, 0); + callout_init_mtx(&sc->bce_pulse_callout, &sc->bce_mtx, 0); +#endif + + /* Hookup IRQ last. */ + rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE, + bce_intr, sc, &sc->bce_intrhand); + + if (rc) { + BCE_PRINTF("%s(%d): Failed to setup IRQ!\n", + __FILE__, __LINE__); + bce_detach(dev); + goto bce_attach_exit; + } + + /* + * At this point we've acquired all the resources + * we need to run so there's no turning back, we're + * cleared for launch. + */ + + /* Print some important debugging info. */ + DBRUN(BCE_INFO, bce_dump_driver_state(sc)); + + /* Add the supported sysctls to the kernel. */ + bce_add_sysctls(sc); + + BCE_LOCK(sc); + /* + * The chip reset earlier notified the bootcode that + * a driver is present. We now need to start our pulse + * routine so that the bootcode is reminded that we're + * still running. + */ + bce_pulse(sc); + + bce_mgmt_init_locked(sc); + BCE_UNLOCK(sc); + + /* Finally, print some useful adapter info */ + BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); + printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', + ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); + printf("Bus (PCI%s, %s, %dMHz); ", + ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), + ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), + sc->bus_speed_mhz); + printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver); + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) + printf("MFW "); + if (sc->bce_flags & BCE_USING_MSI_FLAG) + printf("MSI "); + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + printf("2.5G "); + printf(")\n"); + + goto bce_attach_exit; + +bce_attach_fail: + bce_release_resources(sc); + +bce_attach_exit: + + DBPRINT(sc, BCE_VERBOSE_RESET, "Exiting %s()\n", __FUNCTION__); + + return(rc); +} + + +/****************************************************************************/ +/* Device detach function. */ +/* */ +/* Stops the controller, resets the controller, and releases resources. */ +/* */ +/* Returns: */ +/* 0 on success, positive value on failure. */ +/****************************************************************************/ +static int +bce_detach(device_t dev) +{ + struct bce_softc *sc = device_get_softc(dev); + struct ifnet *ifp; + u32 msg; + + DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); + + ifp = sc->bce_ifp; + +#ifdef DEVICE_POLLING + if (ifp->if_capenable & IFCAP_POLLING) + ether_poll_deregister(ifp); +#endif + + /* Stop the pulse so the bootcode can go to driver absent state. */ + callout_stop(&sc->bce_pulse_callout); + + /* Stop and reset the controller. */ + BCE_LOCK(sc); + bce_stop(sc); + if (sc->bce_flags & BCE_NO_WOL_FLAG) + msg = BCE_DRV_MSG_CODE_UNLOAD_LNK_DN; + else + msg = BCE_DRV_MSG_CODE_UNLOAD; + bce_reset(sc, msg); + BCE_UNLOCK(sc); + + ether_ifdetach(ifp); + + /* If we have a child device on the MII bus remove it too. */ + bus_generic_detach(dev); + device_delete_child(dev, sc->bce_miibus); + + /* Release all remaining resources. */ + bce_release_resources(sc); + + DBPRINT(sc, BCE_VERBOSE_RESET, "Exiting %s()\n", __FUNCTION__); + + return(0); +} + + +/****************************************************************************/ +/* Device shutdown function. */ +/* */ +/* Stops and resets the controller. */ +/* */ +/* Returns: */ +/* Nothing */ +/****************************************************************************/ +static void +bce_shutdown(device_t dev) +{ + struct bce_softc *sc = device_get_softc(dev); + u32 msg; + + DBPRINT(sc, BCE_VERBOSE_SPECIAL, "Entering %s()\n", __FUNCTION__); + + BCE_LOCK(sc); + bce_stop(sc); + if (sc->bce_flags & BCE_NO_WOL_FLAG) + msg = BCE_DRV_MSG_CODE_UNLOAD_LNK_DN; + else + msg = BCE_DRV_MSG_CODE_UNLOAD; + bce_reset(sc, msg); + BCE_UNLOCK(sc); + + DBPRINT(sc, BCE_VERBOSE_SPECIAL, "Exiting %s()\n", __FUNCTION__); +} + + +/****************************************************************************/ +/* Indirect register read. */ +/* */ +/* Reads NetXtreme II registers using an index/data register pair in PCI */ +/* configuration space. Using this mechanism avoids issues with posted */ +/* reads but is much slower than memory-mapped I/O. */ +/* */ +/* Returns: */ +/* The value of the register. */ +/****************************************************************************/ +static u32 +bce_reg_rd_ind(struct bce_softc *sc, u32 offset) +{ + device_t dev; + dev = sc->bce_dev; + + pci_write_config(dev, BCE_PCICFG_REG_WINDOW_ADDRESS, offset, 4); +#ifdef BCE_DEBUG + { + u32 val; + val = pci_read_config(dev, BCE_PCICFG_REG_WINDOW, 4); + DBPRINT(sc, BCE_EXCESSIVE, "%s(); offset = 0x%08X, val = 0x%08X\n", + __FUNCTION__, offset, val); + return val; + } +#else + return pci_read_config(dev, BCE_PCICFG_REG_WINDOW, 4); +#endif +} + + +/****************************************************************************/ +/* Indirect register write. */ +/* */ +/* Writes NetXtreme II registers using an index/data register pair in PCI */ +/* configuration space. Using this mechanism avoids issues with posted */ +/* writes but is muchh slower than memory-mapped I/O. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_reg_wr_ind(struct bce_softc *sc, u32 offset, u32 val) +{ + device_t dev; + dev = sc->bce_dev; + + DBPRINT(sc, BCE_EXCESSIVE, "%s(); offset = 0x%08X, val = 0x%08X\n", + __FUNCTION__, offset, val); + + pci_write_config(dev, BCE_PCICFG_REG_WINDOW_ADDRESS, offset, 4); + pci_write_config(dev, BCE_PCICFG_REG_WINDOW, val, 4); +} + + +/****************************************************************************/ +/* Context memory write. */ +/* */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Aug 21 17:23:30 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ED7A016A41A; Tue, 21 Aug 2007 17:23:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9390316A417 for ; Tue, 21 Aug 2007 17:23:29 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 814D013C4A6 for ; Tue, 21 Aug 2007 17:23:29 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LHNTxZ063273 for ; Tue, 21 Aug 2007 17:23:29 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7LHNTGB063270 for perforce@freebsd.org; Tue, 21 Aug 2007 17:23:29 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 21 Aug 2007 17:23:29 GMT Message-Id: <200708211723.l7LHNTGB063270@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125506 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 17:23:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=125506 Change 125506 by kmacy@kmacy_home:ethng on 2007/08/21 17:23:15 IFC Affected files ... .. //depot/projects/ethng/src/share/man/man4/umodem.4#2 integrate .. //depot/projects/ethng/src/sys/dev/drm/i915_dma.c#2 integrate .. //depot/projects/ethng/src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#2 integrate .. //depot/projects/ethng/src/sys/i386/i386/pmap.c#2 integrate .. //depot/projects/ethng/src/sys/kern/kern_cpu.c#3 integrate .. //depot/projects/ethng/src/sys/kern/kern_switch.c#2 integrate .. //depot/projects/ethng/src/sys/kern/sched_ule.c#2 integrate .. //depot/projects/ethng/src/sys/kern/vfs_aio.c#2 integrate .. //depot/projects/ethng/src/sys/vm/vm_map.c#2 integrate .. //depot/projects/ethng/src/sys/vm/vm_map.h#2 integrate .. //depot/projects/ethng/src/sys/vm/vm_mmap.c#2 integrate Differences ... ==== //depot/projects/ethng/src/share/man/man4/umodem.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/umodem.4,v 1.9 2006/11/22 21:30:02 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/umodem.4,v 1.10 2007/08/21 13:20:13 sanpei Exp $ .\" .Dd November 22, 2006 .Dt UMODEM 4 @@ -85,6 +85,10 @@ .It Curitel PC5740 Wireless Modem .It +Kyocera AH-K3001V Mobile Phone(WILLCOM) +.It +Kyocera WX320K Mobile Phone(WILLCOM) +.It Metricom Ricochet GS USB wireless modem .It Sierra MC5720 Wireless Modem ==== //depot/projects/ethng/src/sys/dev/drm/i915_dma.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/drm/i915_dma.c,v 1.5 2007/07/12 09:02:31 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/drm/i915_dma.c,v 1.6 2007/08/21 12:52:57 kib Exp $"); #include "dev/drm/drmP.h" #include "dev/drm/drm.h" @@ -125,18 +125,17 @@ drm_dma_handle_t *dmah; DRM_UNLOCK(); + memset(dev_priv, 0, sizeof(drm_i915_private_t)); dmah = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, 0xffffffff); + DRM_LOCK(); if (!dmah) { dev->dev_private = (void *)dev_priv; i915_dma_cleanup(dev); DRM_ERROR("Can not allocate hardware status page\n"); - DRM_LOCK(); return DRM_ERR(ENOMEM); } - DRM_LOCK(); - memset(dev_priv, 0, sizeof(drm_i915_private_t)); dev_priv->status_page_dmah = dmah; DRM_GETSAREA(); ==== //depot/projects/ethng/src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#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/gnu/fs/xfs/FreeBSD/xfs_mountops.c,v 1.9 2007/05/30 03:03:05 kan Exp $ + * $FreeBSD: src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c,v 1.10 2007/08/20 15:33:22 cognet Exp $ */ #include @@ -131,25 +131,25 @@ args->logbufsize = -1; parse_int(mp, "flags", &args->flags, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; args->flags |= XFSMNT_32BITINODES; parse_int(mp, "sunit", &args->sunit, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; parse_int(mp, "swidth", &args->swidth, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; parse_int(mp, "logbufs", &args->logbufs, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; parse_int(mp, "logbufsize", &args->logbufsize, &error); - if (error != 0) + if (error != 0 && error != ENOENT) return error; fsname = vfs_getopts(mp->mnt_optnew, "from", &error); ==== //depot/projects/ethng/src/sys/i386/i386/pmap.c#2 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.593 2007/07/01 07:08:26 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.594 2007/08/21 04:59:34 alc Exp $"); /* * Manages physical address maps. @@ -1795,7 +1795,7 @@ static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; static vm_pindex_t colour; - int bit, field, page_req; + int bit, field; pv_entry_t pv; struct pv_chunk *pc; vm_page_t m; @@ -1830,8 +1830,7 @@ } } pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); - page_req = try ? VM_ALLOC_NORMAL : VM_ALLOC_SYSTEM; - m = vm_page_alloc(NULL, colour, page_req | + m = vm_page_alloc(NULL, colour, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL || pc == NULL) { if (try) { @@ -1860,7 +1859,7 @@ PV_STAT(pmap_collect_inactive++); pmap_collect(pmap, &vm_page_queues[PQ_INACTIVE]); if (m == NULL) - m = vm_page_alloc(NULL, colour, VM_ALLOC_SYSTEM | + m = vm_page_alloc(NULL, colour, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (pc == NULL) pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); ==== //depot/projects/ethng/src/sys/kern/kern_cpu.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_cpu.c,v 1.26 2007/08/19 20:34:13 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_cpu.c,v 1.27 2007/08/20 06:28:26 njl Exp $"); #include #include @@ -227,7 +227,7 @@ const struct cf_setting *set; struct cf_saved_freq *saved_freq, *curr_freq; struct pcpu *pc; - int cpu_id, error, i; + int error, i; sc = device_get_softc(dev); error = 0; @@ -294,22 +294,17 @@ goto out; } - /* Bind to the target CPU before switching, if necessary. */ - cpu_id = PCPU_GET(cpuid); + /* Bind to the target CPU before switching. */ pc = cpu_get_pcpu(set->dev); - if (cpu_id != pc->pc_cpuid) { - thread_lock(curthread); - sched_bind(curthread, pc->pc_cpuid); - thread_unlock(curthread); - } + thread_lock(curthread); + sched_bind(curthread, pc->pc_cpuid); + thread_unlock(curthread); CF_DEBUG("setting abs freq %d on %s (cpu %d)\n", set->freq, device_get_nameunit(set->dev), PCPU_GET(cpuid)); error = CPUFREQ_DRV_SET(set->dev, set); - if (cpu_id != pc->pc_cpuid) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); if (error) { goto out; } @@ -323,22 +318,17 @@ goto out; } - /* Bind to the target CPU before switching, if necessary. */ - cpu_id = PCPU_GET(cpuid); + /* Bind to the target CPU before switching. */ pc = cpu_get_pcpu(set->dev); - if (cpu_id != pc->pc_cpuid) { - thread_lock(curthread); - sched_bind(curthread, pc->pc_cpuid); - thread_unlock(curthread); - } + thread_lock(curthread); + sched_bind(curthread, pc->pc_cpuid); + thread_unlock(curthread); CF_DEBUG("setting rel freq %d on %s (cpu %d)\n", set->freq, device_get_nameunit(set->dev), PCPU_GET(cpuid)); error = CPUFREQ_DRV_SET(set->dev, set); - if (cpu_id != pc->pc_cpuid) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); if (error) { /* XXX Back out any successful setting? */ goto out; ==== //depot/projects/ethng/src/sys/kern/kern_switch.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.133 2007/08/03 23:35:35 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.134 2007/08/20 06:36:12 jeff Exp $"); #include "opt_sched.h" @@ -360,45 +360,35 @@ } static __inline int -runq_findbit_from(struct runq *rq, u_char start) +runq_findbit_from(struct runq *rq, u_char pri) { struct rqbits *rqb; - int bit; - int pri; + rqb_word_t mask; int i; + /* + * Set the mask for the first word so we ignore priorities before 'pri'. + */ + mask = (rqb_word_t)-1 << (pri & (RQB_BPW - 1)); rqb = &rq->rq_status; - bit = start & (RQB_BPW -1); - pri = 0; - CTR1(KTR_RUNQ, "runq_findbit_from: start %d", start); again: - for (i = RQB_WORD(start); i < RQB_LEN; i++) { - CTR3(KTR_RUNQ, "runq_findbit_from: bits %d = %#x bit = %d", - i, rqb->rqb_bits[i], bit); - if (rqb->rqb_bits[i]) { - if (bit != 0) { - for (pri = bit; pri < RQB_BPW; pri++) - if (rqb->rqb_bits[i] & (1ul << pri)) - break; - bit = 0; - if (pri >= RQB_BPW) - continue; - } else - pri = RQB_FFS(rqb->rqb_bits[i]); - pri += (i << RQB_L2BPW); - CTR3(KTR_RUNQ, "runq_findbit_from: bits=%#x i=%d pri=%d", - rqb->rqb_bits[i], i, pri); - return (pri); - } - bit = 0; + for (i = RQB_WORD(pri); i < RQB_LEN; mask = -1, i++) { + mask = rqb->rqb_bits[i] & mask; + if (mask == 0) + continue; + pri = RQB_FFS(mask) + (i << RQB_L2BPW); + CTR3(KTR_RUNQ, "runq_findbit_from: bits=%#x i=%d pri=%d", + mask, i, pri); + return (pri); } - if (start != 0) { - CTR0(KTR_RUNQ, "runq_findbit_from: restarting"); - start = 0; - goto again; - } - - return (-1); + if (pri == 0) + return (-1); + /* + * Wrap back around to the beginning of the list just once so we + * scan the whole thing. + */ + pri = 0; + goto again; } /* ==== //depot/projects/ethng/src/sys/kern/sched_ule.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.204 2007/08/04 01:21:28 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.205 2007/08/20 06:34:20 jeff Exp $"); #include "opt_hwpmc_hooks.h" #include "opt_sched.h" @@ -1328,6 +1328,12 @@ incr = 1; tickincr = incr; #ifdef SMP + /* + * Set steal thresh to log2(mp_ncpu) but no greater than 4. This + * prevents excess thrashing on large machines and excess idle on + * smaller machines. + */ + steal_thresh = min(ffs(mp_ncpus) - 1, 4); affinity = SCHED_AFFINITY_DEFAULT; #endif } ==== //depot/projects/ethng/src/sys/kern/vfs_aio.c#2 (text+ko) ==== @@ -19,7 +19,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.232 2007/06/10 01:50:05 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.233 2007/08/20 11:53:26 kib Exp $"); #include #include @@ -719,6 +719,7 @@ } AIO_UNLOCK(ki); taskqueue_drain(taskqueue_aiod_bio, &ki->kaio_task); + mtx_destroy(&ki->kaio_mtx); uma_zfree(kaio_zone, ki); p->p_aioinfo = NULL; } @@ -837,7 +838,10 @@ */ if (cb->aio_lio_opcode == LIO_READ) { auio.uio_rw = UIO_READ; - error = fo_read(fp, &auio, fp->f_cred, FOF_OFFSET, td); + if (auio.uio_resid == 0) + error = 0; + else + error = fo_read(fp, &auio, fp->f_cred, FOF_OFFSET, td); } else { if (fp->f_type == DTYPE_VNODE) bwillwrite(); ==== //depot/projects/ethng/src/sys/vm/vm_map.c#2 (text+ko) ==== @@ -63,7 +63,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.386 2007/05/31 22:52:15 attilio Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.387 2007/08/20 12:05:45 kib Exp $"); #include #include @@ -155,6 +155,22 @@ #define PROC_VMSPACE_LOCK(p) do { } while (0) #define PROC_VMSPACE_UNLOCK(p) do { } while (0) +/* + * VM_MAP_RANGE_CHECK: [ internal use only ] + * + * Asserts that the starting and ending region + * addresses fall within the valid range of the map. + */ +#define VM_MAP_RANGE_CHECK(map, start, end) \ + { \ + if (start < vm_map_min(map)) \ + start = vm_map_min(map); \ + if (end > vm_map_max(map)) \ + end = vm_map_max(map); \ + if (start > end) \ + start = end; \ + } + void vm_map_startup(void) { @@ -1145,6 +1161,25 @@ return (0); } +int +vm_map_fixed(vm_map_t map, vm_object_t object, vm_ooffset_t offset, + vm_offset_t *addr /* IN/OUT */, vm_size_t length, vm_prot_t prot, + vm_prot_t max, int cow) +{ + vm_offset_t start, end; + int result; + + start = *addr; + vm_map_lock(map); + end = start + length; + VM_MAP_RANGE_CHECK(map, start, end); + (void) vm_map_delete(map, start, end); + result = vm_map_insert(map, object, offset, start, end, prot, + max, cow); + vm_map_unlock(map); + return (result); +} + /* * vm_map_find finds an unallocated region in the target address * map with the given length. The search is defined to be @@ -1355,22 +1390,6 @@ } /* - * VM_MAP_RANGE_CHECK: [ internal use only ] - * - * Asserts that the starting and ending region - * addresses fall within the valid range of the map. - */ -#define VM_MAP_RANGE_CHECK(map, start, end) \ - { \ - if (start < vm_map_min(map)) \ - start = vm_map_min(map); \ - if (end > vm_map_max(map)) \ - end = vm_map_max(map); \ - if (start > end) \ - start = end; \ - } - -/* * vm_map_submap: [ kernel use only ] * * Mark the given range as handled by a subordinate map. ==== //depot/projects/ethng/src/sys/vm/vm_map.h#2 (text+ko) ==== @@ -57,7 +57,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $FreeBSD: src/sys/vm/vm_map.h,v 1.119 2006/05/29 21:28:56 tegge Exp $ + * $FreeBSD: src/sys/vm/vm_map.h,v 1.120 2007/08/20 12:05:45 kib Exp $ */ /* @@ -333,6 +333,7 @@ vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); int vm_map_delete (vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, boolean_t, vm_prot_t, vm_prot_t, int); +int vm_map_fixed (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int); int vm_map_findspace (vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *); int vm_map_inherit (vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); void vm_map_init (struct vm_map *, vm_offset_t, vm_offset_t); ==== //depot/projects/ethng/src/sys/vm/vm_mmap.c#2 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_mmap.c,v 1.212 2007/07/04 22:57:21 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_mmap.c,v 1.213 2007/08/20 12:05:45 kib Exp $"); #include "opt_compat.h" #include "opt_hwpmc_hooks.h" @@ -1341,7 +1341,6 @@ if (*addr != trunc_page(*addr)) return (EINVAL); fitit = FALSE; - (void) vm_map_remove(map, *addr, *addr + size); } /* * Lookup/allocate object. @@ -1400,8 +1399,11 @@ if (flags & MAP_STACK) rv = vm_map_stack(map, *addr, size, prot, maxprot, docow | MAP_STACK_GROWS_DOWN); + else if (fitit) + rv = vm_map_find(map, object, foff, addr, size, TRUE, + prot, maxprot, docow); else - rv = vm_map_find(map, object, foff, addr, size, fitit, + rv = vm_map_fixed(map, object, foff, addr, size, prot, maxprot, docow); if (rv != KERN_SUCCESS) { From owner-p4-projects@FreeBSD.ORG Tue Aug 21 17:32:46 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7AACC16A420; Tue, 21 Aug 2007 17:32:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 514E016A41A for ; Tue, 21 Aug 2007 17:32:46 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3E1AE13C467 for ; Tue, 21 Aug 2007 17:32:46 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LHWkic063795 for ; Tue, 21 Aug 2007 17:32:46 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7LHWfmi063792 for perforce@freebsd.org; Tue, 21 Aug 2007 17:32:41 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 21 Aug 2007 17:32:41 GMT Message-Id: <200708211732.l7LHWfmi063792@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125507 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 17:32:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=125507 Change 125507 by kmacy@kmacy_home:opentoe on 2007/08/21 17:31:47 IFC Affected files ... .. //depot/projects/opentoe/contrib/gcc/BASE-VER#2 integrate .. //depot/projects/opentoe/contrib/gcc/ChangeLog#3 integrate .. //depot/projects/opentoe/contrib/gcc/DATESTAMP#2 integrate .. //depot/projects/opentoe/contrib/gcc/Makefile.in#3 integrate .. //depot/projects/opentoe/contrib/gcc/calls.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/combine.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/config/arm/arm.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/config/arm/cirrus.md#3 integrate .. //depot/projects/opentoe/contrib/gcc/config/i386/i386.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/config/i386/i386.h#3 integrate .. //depot/projects/opentoe/contrib/gcc/config/i386/i386.md#3 integrate .. //depot/projects/opentoe/contrib/gcc/config/i386/sse.md#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/mips/iris6.h#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/rs6000/predicates.md#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/rs6000/rs6000.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/double.h#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/extended.h#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/floatundidf.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/floatundisf.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/floatunsidf.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/floatunsisf.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/op-2.h#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/op-4.h#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/op-common.h#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/soft-fp/quad.h#2 integrate .. //depot/projects/opentoe/contrib/gcc/config/sparc/sparc.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/ChangeLog#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/call.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/class.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/cp-tree.h#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/decl.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/decl2.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/init.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/parser.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/pt.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/semantics.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/typeck.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/cp/typeck2.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/doc/cpp.1#2 integrate .. //depot/projects/opentoe/contrib/gcc/doc/gcc.1#2 integrate .. //depot/projects/opentoe/contrib/gcc/doc/gcov.1#2 integrate .. //depot/projects/opentoe/contrib/gcc/dwarf2out.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/except.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/fold-const.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/function.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/gimplify.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/gthr-posix.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/gthr-posix.h#3 integrate .. //depot/projects/opentoe/contrib/gcc/loop-iv.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/objc/ChangeLog#2 integrate .. //depot/projects/opentoe/contrib/gcc/omp-low.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/pointer-set.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/pointer-set.h#2 integrate .. //depot/projects/opentoe/contrib/gcc/reload.c#3 integrate .. //depot/projects/opentoe/contrib/gcc/tree-if-conv.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/tree-ssa-loop-niter.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/tree-ssa-operands.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/tree-ssa-structalias.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/tree-vrp.c#2 integrate .. //depot/projects/opentoe/contrib/gcc/version.c#3 integrate .. //depot/projects/opentoe/contrib/gcclibs/include/ChangeLog#2 integrate .. //depot/projects/opentoe/contrib/gcclibs/libcpp/ChangeLog#2 integrate .. //depot/projects/opentoe/contrib/gcclibs/libdecnumber/ChangeLog#2 integrate .. //depot/projects/opentoe/contrib/gcclibs/libgomp/ChangeLog#2 integrate .. //depot/projects/opentoe/contrib/gcclibs/libgomp/config/posix/lock.c#2 integrate .. //depot/projects/opentoe/contrib/gcclibs/libgomp/sections.c#2 integrate .. //depot/projects/opentoe/contrib/gcclibs/libiberty/ChangeLog#2 integrate .. //depot/projects/opentoe/contrib/gcclibs/libmudflap/ChangeLog#2 integrate .. //depot/projects/opentoe/contrib/gcclibs/libssp/ChangeLog#2 integrate .. //depot/projects/opentoe/contrib/libobjc/ChangeLog#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/ChangeLog#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/acinclude.m4#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/config.h.in#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/configure#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/include/Makefile.am#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/include/Makefile.in#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/include/bits/ostream.tcc#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/include/bits/ostream_insert.h#2 integrate .. //depot/projects/opentoe/contrib/libstdc++/include/ext/throw_allocator.h#2 integrate .. //depot/projects/opentoe/contrib/libstdc++/include/std/std_fstream.h#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/libsupc++/exception#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/libsupc++/new#3 integrate .. //depot/projects/opentoe/contrib/libstdc++/libsupc++/typeinfo#3 integrate .. //depot/projects/opentoe/etc/namedb/named.conf#4 integrate .. //depot/projects/opentoe/etc/rc.d/Makefile#4 integrate .. //depot/projects/opentoe/etc/rc.d/lockd#2 integrate .. //depot/projects/opentoe/etc/rc.d/nfslocking#5 integrate .. //depot/projects/opentoe/etc/rc.d/statd#2 integrate .. //depot/projects/opentoe/gnu/lib/libgcc/Makefile#3 integrate .. //depot/projects/opentoe/gnu/lib/libstdc++/Makefile#3 integrate .. //depot/projects/opentoe/lib/libarchive/archive_read_support_format_tar.c#9 integrate .. //depot/projects/opentoe/lib/libarchive/test/test_read_format_gtar_sparse.c#4 integrate .. //depot/projects/opentoe/release/Makefile#3 integrate .. //depot/projects/opentoe/release/doc/Makefile#2 integrate .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/Makefile#2 integrate .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/hardware/article.sgml#5 integrate .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#3 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/hardware/common/hw.ent#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/hardware/common/intro.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/Makefile#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/Makefile.inc#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/amd64/Makefile#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/amd64/article.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/common/abstract.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/common/install.ent#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/common/install.sgml#4 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/common/layout.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/common/upgrade.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/i386/Makefile#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/i386/article.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/ia64/Makefile#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/ia64/article.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/pc98/Makefile#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/pc98/article.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/powerpc/Makefile#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/powerpc/article.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/sparc64/Makefile#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/sparc64/article.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/installation/sparc64/install.sgml#2 delete .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/readme/article.sgml#2 integrate .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/relnotes/article.sgml#14 integrate .. //depot/projects/opentoe/release/doc/share/examples/Makefile.relnotesng#2 integrate .. //depot/projects/opentoe/release/doc/share/misc/dev.archlist.txt#4 integrate .. //depot/projects/opentoe/release/doc/share/sgml/release.ent#3 integrate .. //depot/projects/opentoe/sbin/reboot/boot_i386.8#2 integrate .. //depot/projects/opentoe/share/man/man4/umodem.4#2 integrate .. //depot/projects/opentoe/share/man/man5/Makefile#3 integrate .. //depot/projects/opentoe/share/man/man5/boot.config.5#1 branch .. //depot/projects/opentoe/share/mk/sys.mk#4 integrate .. //depot/projects/opentoe/sys/amd64/amd64/pmap.c#9 integrate .. //depot/projects/opentoe/sys/amd64/conf/NOTES#5 integrate .. //depot/projects/opentoe/sys/amd64/include/specialreg.h#4 integrate .. //depot/projects/opentoe/sys/arm/arm/busdma_machdep.c#6 integrate .. //depot/projects/opentoe/sys/boot/arm/at91/boot2/boot2.c#5 integrate .. //depot/projects/opentoe/sys/compat/freebsd32/freebsd32_proto.h#3 integrate .. //depot/projects/opentoe/sys/compat/freebsd32/freebsd32_syscall.h#3 integrate .. //depot/projects/opentoe/sys/compat/freebsd32/freebsd32_syscalls.c#3 integrate .. //depot/projects/opentoe/sys/compat/freebsd32/freebsd32_sysent.c#3 integrate .. //depot/projects/opentoe/sys/compat/freebsd32/syscalls.master#4 integrate .. //depot/projects/opentoe/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/opentoe/sys/conf/files.amd64#7 integrate .. //depot/projects/opentoe/sys/conf/files.i386#7 integrate .. //depot/projects/opentoe/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_t3_hw.c#8 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_adapter.h#23 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_ioctl.h#6 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_l2t.c#7 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_l2t.h#8 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_main.c#17 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_offload.c#15 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_offload.h#12 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_sge.c#28 integrate .. //depot/projects/opentoe/sys/dev/dcons/dcons_os.c#5 integrate .. //depot/projects/opentoe/sys/dev/drm/i915_dma.c#3 integrate .. //depot/projects/opentoe/sys/dev/mpt/mpt.c#5 integrate .. //depot/projects/opentoe/sys/dev/mpt/mpt.h#4 integrate .. //depot/projects/opentoe/sys/dev/mpt/mpt_cam.c#6 integrate .. //depot/projects/opentoe/sys/dev/re/if_re.c#7 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_vfsops.c#5 integrate .. //depot/projects/opentoe/sys/fs/tmpfs/tmpfs_vnops.c#6 integrate .. //depot/projects/opentoe/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/opentoe/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#3 integrate .. //depot/projects/opentoe/sys/i386/conf/NOTES#5 integrate .. //depot/projects/opentoe/sys/i386/i386/pmap.c#9 integrate .. //depot/projects/opentoe/sys/i386/include/specialreg.h#5 integrate .. //depot/projects/opentoe/sys/kern/init_sysent.c#3 integrate .. //depot/projects/opentoe/sys/kern/kern_cpu.c#4 integrate .. //depot/projects/opentoe/sys/kern/kern_switch.c#4 integrate .. //depot/projects/opentoe/sys/kern/kern_thr.c#3 integrate .. //depot/projects/opentoe/sys/kern/sched_ule.c#6 integrate .. //depot/projects/opentoe/sys/kern/syscalls.c#3 integrate .. //depot/projects/opentoe/sys/kern/syscalls.master#3 integrate .. //depot/projects/opentoe/sys/kern/systrace_args.c#3 integrate .. //depot/projects/opentoe/sys/kern/vfs_aio.c#4 integrate .. //depot/projects/opentoe/sys/kern/vfs_mount.c#8 integrate .. //depot/projects/opentoe/sys/modules/Makefile#8 integrate .. //depot/projects/opentoe/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/opentoe/sys/net/bridgestp.c#4 integrate .. //depot/projects/opentoe/sys/netgraph/ng_base.c#7 integrate .. //depot/projects/opentoe/sys/netinet/sctp_asconf.c#7 integrate .. //depot/projects/opentoe/sys/netinet/sctp_input.c#15 integrate .. //depot/projects/opentoe/sys/netinet/sctp_output.c#14 integrate .. //depot/projects/opentoe/sys/netinet/sctp_pcb.c#14 integrate .. //depot/projects/opentoe/sys/netinet/sctp_timer.c#10 integrate .. //depot/projects/opentoe/sys/netinet/sctp_usrreq.c#14 integrate .. //depot/projects/opentoe/sys/netinet/sctputil.c#16 integrate .. //depot/projects/opentoe/sys/netinet/tcp_subr.c#11 integrate .. //depot/projects/opentoe/sys/sys/syscall.h#3 integrate .. //depot/projects/opentoe/sys/sys/syscall.mk#3 integrate .. //depot/projects/opentoe/sys/sys/sysproto.h#3 integrate .. //depot/projects/opentoe/sys/sys/thr.h#3 integrate .. //depot/projects/opentoe/sys/vm/device_pager.c#3 integrate .. //depot/projects/opentoe/sys/vm/phys_pager.c#4 integrate .. //depot/projects/opentoe/sys/vm/vm_map.c#6 integrate .. //depot/projects/opentoe/sys/vm/vm_map.h#2 integrate .. //depot/projects/opentoe/sys/vm/vm_mmap.c#6 integrate .. //depot/projects/opentoe/usr.sbin/freebsd-update/freebsd-update.sh#4 integrate .. //depot/projects/opentoe/usr.sbin/sysinstall/menus.c#4 integrate Differences ... ==== //depot/projects/opentoe/contrib/gcc/BASE-VER#2 (text+ko) ==== @@ -1,1 +1,1 @@ -4.2.0 +4.2.1 ==== //depot/projects/opentoe/contrib/gcc/ChangeLog#3 (text+ko) ==== @@ -1,3 +1,441 @@ +2007-07-19 Release Manager + + * GCC 4.2.1 released. + +2007-07-18 Paolo Bonzini + + Revert: + + 2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + + 2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-16 Paul Brook + + PR target/32753 + gcc/ + * config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn. + +2007-07-10 Rainer Orth + + PR target/32538 + * config/mips/iris6.h (LIBGCC_SPEC): Add libm. + +2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + +2007-07-09 Uros Bizjak + + PR tree-optimization/32681 + * tree-if-conv.c (find_phi_replacement_condition): Use the condition + saved in second_edge->aux when first_bb is a loop header. + +2007-07-07 Anatoly Sokolov + + PR target/31331 + * config/avr/avr.c (avr_naked_function_p): Handle receiving a type + rather than a decl. + (avr_attribute_table): Make "naked" attribute apply to function types + rather than to decls. + (avr_handle_fntype_attribute): New function. + +2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-06 Uros Bizjak + + PR rtl-optimization/32450 + * function.c (thread_prologue_and_epilogue_insns): Emit blockage insn + to ensure that instructions are not moved into the prologue when + profiling is on. + +2007-07-04 Richard Guenther + + PR tree-optimization/32500 + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): + Only use basic blocks that are always executed to infer loop bounds. + +2007-07-04 Uros Bizjak + + PR tree-optimization/31966 + PR tree-optimization/32533 + * tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not + "basic_block" description as its third argument. Update function + calls to get destination bb from "edge" argument. Save "cond" into + aux field of the edge. Update prototype for changed arguments. + (if_convertible_loop_p): Clear aux field of incoming edges if bb + contains phi node. + (find_phi_replacement_condition): Operate on incoming edges, not + on predecessor blocks. If there is a condition saved in the + incoming edge aux field, AND it with incoming bb predicate. + Return source bb of the first edge. + (clean_predicate_lists): Clean aux field of outgoing node edges. + (tree_if_conversion): Do not initialize cond variable. Move + variable declaration into the loop. + (replace_phi_with_cond_gimple_modify_stmt): Remove unneded + initializations of new_stmt, arg0 and arg1 variables. + +2007-07-04 Kaz Kojima + + PR target/32506 + Backport from mainline. + * config/sh/sh.md (udivsi3_i1_media): Use target_reg_operand + predicate instead of target_operand. + (divsi3_i1_media, divsi3_media_2): Likewise. + +2007-07-03 Richard Guenther + + Backport from mainline: + 2006-12-11 Zdenek Dvorak + + PR rtl-optimization/30113 + * loop-iv.c (implies_p): Require the mode of the operands to be + scalar. + +2007-07-03 Rainer Orth + + PR target/28307 + * gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK] + (__gthrw_pragma): Provide default definition. + (__gthrw2): Use it. + * gthr-posix.c (__gthrw_pragma): Define. + +2007-07-02 Jakub Jelinek + + PR libgomp/32468 + * omp-low.c (check_combined_parallel): New function. + (lower_omp_parallel): Call it via walk_stmts, set + OMP_PARALLEL_COMBINED if appropriate. + (determine_parallel_type): If OMP_FOR resp. OMP_SECTIONS + isn't the only statement in WS_ENTRY_BB or OMP_RETURN + the only one in PAR_EXIT_BB and not OMP_PARALLEL_COMBINED, + don't consider it as combined parallel. + +2007-06-30 Alexandre Oliva + + * dwarf2out.c (dwarf2out_finish): Accept namespaces as context of + limbo die nodes. + +2007-06-28 Seongbae Park + + * config/arm/arm.c (arm_get_frame_offsets): Set + offsets->locals_base to avoid negative stack size. + (thumb_expand_prologue): Assert on negative stack size. + +2007-06-28 Jakub Jelinek + + * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure + decl is non-external for AIX ABI. + +2007-06-28 David Edelsohn + + * config/rs6000/predicates.md (current_file_function_operand): + Ensure the symbol is non-external for AIX ABI. + +2007-06-21 H.J. Lu + + * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_VEC_EXT_V16QI. + (ix86_init_mmx_sse_builtins): Add __builtin_ia32_vec_ext_v16qi. + (ix86_expand_builtin): Handle IX86_BUILTIN_VEC_EXT_V16QI. + +2007-06-21 Jakub Jelinek + + PR middle-end/32362 + * omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL, + but decl is a global var, instead return decl. + * gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses + even for is_global_var decls, if they are private in some outer + context. + +2007-06-21 Uros Bizjak + + PR target/32389 + * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL. + * config/i386/i386.c (assign_386_stack_local): Assert that + SLOT_VIRTUAL is valid only before virtual regs are instantiated. + (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]: + Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP. + * config/i386/i386.md (truncdfsf2, truncxfsf2, truncxfdf2): Ditto. + +2007-06-20 Jakub Jelinek + + PR inline-asm/32109 + * gimplify.c (gimplify_asm_expr): Issue error if type is addressable + and !allows_mem. + + PR middle-end/32285 + * calls.c (precompute_arguments): Also precompute CALL_EXPR arguments + if ACCUMULATE_OUTGOING_ARGS. + +2007-06-20 Kaz Kojima + + PR rtl-optimization/28011 + Backport from mainline. + * reload.c (push_reload): Set dont_share if IN appears in OUT + also when IN is a PLUS rtx. + (reg_overlap_mentioned_for_reload_p): Return true if X and IN + are same PLUS rtx. + +2007-06-19 Richard Guenther + Michael Matz + + PR tree-optimization/30252 + * tree-ssa-structalias.c (solution_set_add): Make sure to + preserve all relevant vars. + (handle_ptr_arith): Make sure to only handle positive + offsets. + (push_fields_onto_fieldstack): Create fields for empty + bases. + +2007-06-19 Jakub Jelinek + + PR tree-optimization/32353 + * tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL. + +2007-06-17 Eric Botcazou + + * config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the + return mode from the builtin itself. + (sparc_fold_builtin): Fix cast of zero constant. + +2007-06-15 Diego Novillo + + PR 32327 + * tree-ssa-operands.c (build_ssa_operands): Initially assume + that the statement does not take any addresses. + +2007-06-13 Eric Botcazou + + * config/sparc/sparc.c (sparc_override_options): Initialize + fpu mask correctly. + +2007-06-09 Ian Lance Taylor + + PR tree-optimization/32169 + * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and + CONVERT_EXPR, check whether min and max both converted to an + overflow infinity representation. + +2007-06-08 Kaz Kojima + + PR target/32163 + Backport from mainline. + * config/sh/sh.md (symGOT_load): Don't schedule insns when + the symbol is generated with the stack protector. + +2007-06-06 Ian Lance Taylor + + * fold-const.c (merge_ranges): If range_successor or + range_predecessor fail, just return 0. + +2007-06-05 Ian Lance Taylor + + * tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a + PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p. + (extract_range_from_assert): Set TREE_NO_WARNING when creating an + expression. + (test_for_singularity): Likewise. + +2007-06-04 Ian Lance Taylor + + * tree-vrp.c (adjust_range_with_scev): When loop is not expected + to overflow, reduce overflow infinity to regular infinity. + (vrp_var_may_overflow): New static function. + (vrp_visit_phi_node): Check vrp_var_may_overflow. + +2007-05-31 H.J. Lu + + Backport from mainline: + 2007-05-25 H.J. Lu + + * config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it + with MASK_SSE2. + (__builtin_ia32_vec_ext_v2di): Likewise. + (__builtin_ia32_vec_ext_v4si): Likewise. + (__builtin_ia32_vec_ext_v8hi): Likewise. + (__builtin_ia32_vec_set_v8hi): Likewise. + +2007-05-31 John David Anglin + + Backport from mainline: + 2007-05-05 Aurelien Jarno + + * config/pa/pa.md: Split tgd_load, tld_load and tie_load + into pic and non-pic versions. Mark r19 as used for + tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used + for tgd_load, tld_load and tie_load . + * config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic + version of tgd_load, tld_load and tie_load depending on the + value of flag_pic. + +2007-05-27 Daniel Berlin + + Fix PR/30052 + Backport PTA solver from mainline + + * pointer-set.c: Copy from mainline + * pointer-set.h: Ditto. + * tree-ssa-structalias.c: Copy solver portions from mainline. + * Makefile.in (tree-ssa-structalias.o): Update dependencies + +2007-05-30 Ralf Wildenhues + + * tree-vrp.c (compare_names): Initialize sop. + +2007-05-30 Jakub Jelinek + + PR tree-optimization/31769 + * except.c (duplicate_eh_regions): Clear prev_try if + ERT_MUST_NOT_THROW region is inside of ERT_TRY region. + +2007-05-28 Andrew Pinski + + PR tree-opt/32100 + * fold-const.c (tree_expr_nonnegative_warnv_p): Don't + return true when truth_value_p is true and the type + is of signed:1. + +2007-05-27 H.J. Lu + + Backport from mainline: + 2007-05-25 Uros Bizjak + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate + "memory" attribute for "sseishft" type insn without operands[2]. + + 2007-05-25 H.J. Lu + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift. + +2007-05-22 Ian Lance Taylor + + * tree-vrp.c (avoid_overflow_infinity): New static function, + broken out of set_value_range_to_value. + (set_value_range_to_value): Call avoid_overflow_infinity. + (extract_range_from_assert): Likewise. + +2007-05-23 Chen Liqin + + PR target/30987 + * config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove. + * config/score/predicate.md (const_pow2, const_npow2): remove. + * config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef. + PR target/30474 + * config/score/score.c (score_print_operand): makes sure that only lower + bits are used. + +2007-05-21 Uros Bizjak + + PR target/31167 + Backport from mainline. + * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use + x86_64_general_operand as operand[2] predicate. Remove "iF" + from operand constraints and use "e" constraint instead. + (*subti3_1, *subti3_1 splitter): Ditto. + (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as + operand[1] predicate. + +2007-05-21 Uros Bizjak + + PR target/30041 + Backport from mainline. + * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and + operands[1] in insn constraint. Correct type attribute to sselog1. + +2007-05-20 Kaz Kojima + + PR target/31701 + Backport from mainline. + * config/sh/sh.c (output_stack_adjust): Avoid using the frame + register itself to hold the offset constant. Tell flow the use + of r4 and r5 when they are used. + +2007-05-20 Kaz Kojima + + PR target/31480 + Backport from mainline. + * config/sh/sh.md (length): Check if prev_nonnote_insn (insn) + is null. + +2007-05-20 Kaz Kojima + + PR target/31022 + Backport from mainline. + * config/sh/sh.c (sh_adjust_cost): Use the result of single_set + instead of PATTERN. + +2007-05-20 Kaz Kojima + + PR target/27405 + Backport from mainline. + * config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove. + (cmpsi{eq,gt,gtu}{si,di}_media): Rename to + cmp{eq,gt,gtu}{si,di}_media. + (*cmpne0si_media): Remove. + (*movsicc_umin): Adjust gen_cmp*_media call. + (unordered): Change the mode of unordered and operands[1] to + SImode. + (seq): Adjust gen_cmp*_media calls. Make the mode of + a temporary result of compare SImode if needed. If the mode + of operands[0] is DImode, extend the temporary result to DImode. + (slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise. + (sunorderd): Change the mode of match_operand and unorderd to + SImode. + (cmpeq{sf,df}_media): Remove. + (cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media. + (cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand + and compare operation to SImode. + +2007-05-18 Joseph Myers + + * config/soft-fp/double.h, config/soft-fp/extended.h, + config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c, + config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c, + config/soft-fp/op-2.h, config/soft-fp/op-4.h, + config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from + glibc CVS. + +2007-05-17 Ian Lance Taylor + + PR tree-optimization/31953 + * tree-vrp.c (set_value_range_to_value): Add equiv parameter. + Change all callers. + (set_value_range_to_null): Call set_value_range_to_value. + (extract_range_from_comparison): Likewise. + +2007-05-17 Eric Botcazou + + PR rtl-optimization/31691 + * combine.c (simplify_set): Build a new src pattern instead of + substituting its operands in the COMPARE case. + +2007-05-14 Mark Mitchell + + * BASE-VER: Set to 4.2.1. + * DEV-PHASE: Set to prerelease. + 2007-05-13 Release Manager * GCC 4.2.0 released. @@ -307,7 +745,8 @@ 2007-04-03 Stuart Hastings PR 31281 - * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl. + * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile + from rethrow decl. * cse.c (record_jump_equiv): Bail out on CCmode comparisons. 2007-04-03 Jakub Jelinek ==== //depot/projects/opentoe/contrib/gcc/DATESTAMP#2 (text+ko) ==== @@ -1,1 +1,1 @@ -20070514 +20070719 ==== //depot/projects/opentoe/contrib/gcc/Makefile.in#3 (text+ko) ==== @@ -1839,7 +1839,7 @@ tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \ $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \ $(TM_H) coretypes.h $(CGRAPH_H) tree-pass.h $(TIMEVAR_H) \ - gt-tree-ssa-structalias.h $(PARAMS_H) + gt-tree-ssa-structalias.h $(PARAMS_H) pointer-set.h tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ ==== //depot/projects/opentoe/contrib/gcc/calls.c#3 (text+ko) ==== @@ -1238,13 +1238,25 @@ /* If this is a libcall, then precompute all arguments so that we do not get extraneous instructions emitted as part of the libcall sequence. */ - if ((flags & ECF_LIBCALL_BLOCK) == 0) + + /* If we preallocated the stack space, and some arguments must be passed + on the stack, then we must precompute any parameter which contains a + function call which will store arguments on the stack. + Otherwise, evaluating the parameter may clobber previous parameters + which have already been stored into the stack. (we have code to avoid + such case by saving the outgoing stack arguments, but it results in + worse code) */ + if ((flags & ECF_LIBCALL_BLOCK) == 0 && !ACCUMULATE_OUTGOING_ARGS) return; for (i = 0; i < num_actuals; i++) { enum machine_mode mode; + if ((flags & ECF_LIBCALL_BLOCK) == 0 + && TREE_CODE (args[i].tree_value) != CALL_EXPR) + continue; + /* If this is an addressable type, we cannot pre-evaluate it. */ gcc_assert (!TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value))); ==== //depot/projects/opentoe/contrib/gcc/combine.c#3 (text+ko) ==== @@ -5341,14 +5341,14 @@ } else if (GET_MODE (op0) == compare_mode && op1 == const0_rtx) { - SUBST(SET_SRC (x), op0); + SUBST (SET_SRC (x), op0); src = SET_SRC (x); } - else + /* Otherwise, update the COMPARE if needed. */ + else if (XEXP (src, 0) != op0 || XEXP (src, 1) != op1) { - /* Otherwise, update the COMPARE if needed. */ - SUBST (XEXP (src, 0), op0); - SUBST (XEXP (src, 1), op1); + SUBST (SET_SRC (x), gen_rtx_COMPARE (compare_mode, op0, op1)); + src = SET_SRC (x); } } else ==== //depot/projects/opentoe/contrib/gcc/config/arm/arm.c#3 (text+ko) ==== @@ -10555,6 +10555,7 @@ if (leaf && frame_size == 0) { offsets->outgoing_args = offsets->soft_frame; + offsets->locals_base = offsets->soft_frame; return offsets; } @@ -13874,6 +13875,7 @@ amount = offsets->locals_base - offsets->saved_regs; } + gcc_assert (amount >= 0); if (amount) { if (amount < 512) ==== //depot/projects/opentoe/contrib/gcc/config/arm/cirrus.md#3 (text+ko) ==== @@ -404,28 +404,6 @@ ;; Cirrus SI values have been outlawed. Look in arm.h for the comment ;; on HARD_REGNO_MODE_OK. -(define_insn "*cirrus_arm_movsi_insn" - [(set (match_operand:SI 0 "general_operand" "=r,r,r,m,*v,r,*v,T,*v") - (match_operand:SI 1 "general_operand" "rI,K,mi,r,r,*v,T,*v,*v"))] - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0 - && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "@ - mov%?\\t%0, %1 - mvn%?\\t%0, #%B1 - ldr%?\\t%0, %1 - str%?\\t%1, %0 - cfmv64lr%?\\t%Z0, %1 - cfmvr64l%?\\t%0, %Z1 - cfldr32%?\\t%V0, %1 - cfstr32%?\\t%V1, %0 - cfsh32%?\\t%V0, %V1, #0" - [(set_attr "type" "*, *, load1,store1, *, *, load1,store1, *") - (set_attr "pool_range" "*, *, 4096, *, *, *, 1024, *, *") - (set_attr "neg_pool_range" "*, *, 4084, *, *, *, 1012, *, *") - (set_attr "cirrus" "not,not, not, not,move,normal,normal,normal,normal")] -) - (define_insn "*cirrus_movsf_hard_insn" [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m") (match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))] ==== //depot/projects/opentoe/contrib/gcc/config/i386/i386.c#3 (text+ko) ==== @@ -19,7 +19,7 @@ the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.24 2007/05/19 02:26:26 kan Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.25 2007/08/14 03:04:42 kan Exp $ */ #include "config.h" #include "system.h" @@ -13480,6 +13480,9 @@ gcc_assert (n < MAX_386_STACK_LOCALS); + /* Virtual slot is valid only before vregs are instantiated. */ + gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated); + for (s = ix86_stack_locals; s; s = s->next) if (s->mode == mode && s->n == n) return s->rtl; @@ -14570,6 +14573,7 @@ IX86_BUILTIN_VEC_EXT_V4SF, IX86_BUILTIN_VEC_EXT_V4SI, IX86_BUILTIN_VEC_EXT_V8HI, + IX86_BUILTIN_VEC_EXT_V16QI, IX86_BUILTIN_VEC_EXT_V2SI, IX86_BUILTIN_VEC_EXT_V4HI, IX86_BUILTIN_VEC_SET_V8HI, @@ -15542,13 +15546,13 @@ /* Access to the vec_extract patterns. */ ftype = build_function_type_list (double_type_node, V2DF_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2df", ftype, IX86_BUILTIN_VEC_EXT_V2DF); ftype = build_function_type_list (long_long_integer_type_node, V2DI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2di", ftype, IX86_BUILTIN_VEC_EXT_V2DI); ftype = build_function_type_list (float_type_node, V4SF_type_node, @@ -15558,12 +15562,12 @@ ftype = build_function_type_list (intSI_type_node, V4SI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v4si", ftype, IX86_BUILTIN_VEC_EXT_V4SI); ftype = build_function_type_list (intHI_type_node, V8HI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v8hi", ftype, IX86_BUILTIN_VEC_EXT_V8HI); ftype = build_function_type_list (intHI_type_node, V4HI_type_node, @@ -15576,11 +15580,15 @@ def_builtin (MASK_MMX, "__builtin_ia32_vec_ext_v2si", ftype, IX86_BUILTIN_VEC_EXT_V2SI); + ftype = build_function_type_list (intQI_type_node, V16QI_type_node, + integer_type_node, NULL_TREE); + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v16qi", ftype, IX86_BUILTIN_VEC_EXT_V16QI); + /* Access to the vec_set patterns. */ ftype = build_function_type_list (V8HI_type_node, V8HI_type_node, intHI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_set_v8hi", ftype, IX86_BUILTIN_VEC_SET_V8HI); ftype = build_function_type_list (V4HI_type_node, V4HI_type_node, @@ -16124,13 +16132,13 @@ case IX86_BUILTIN_LDMXCSR: op0 = expand_normal (TREE_VALUE (arglist)); - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_move_insn (target, op0); emit_insn (gen_sse_ldmxcsr (target)); return 0; case IX86_BUILTIN_STMXCSR: - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_insn (gen_sse_stmxcsr (target)); return copy_to_mode_reg (SImode, target); @@ -16492,6 +16500,7 @@ case IX86_BUILTIN_VEC_EXT_V4SF: case IX86_BUILTIN_VEC_EXT_V4SI: case IX86_BUILTIN_VEC_EXT_V8HI: + case IX86_BUILTIN_VEC_EXT_V16QI: case IX86_BUILTIN_VEC_EXT_V2SI: case IX86_BUILTIN_VEC_EXT_V4HI: return ix86_expand_vec_ext_builtin (arglist, target); ==== //depot/projects/opentoe/contrib/gcc/config/i386/i386.h#3 (text+ko) ==== @@ -2166,7 +2166,8 @@ enum ix86_stack_slot { - SLOT_TEMP = 0, + SLOT_VIRTUAL = 0, + SLOT_TEMP, SLOT_CW_STORED, SLOT_CW_TRUNC, SLOT_CW_FLOOR, ==== //depot/projects/opentoe/contrib/gcc/config/i386/i386.md#3 (text+ko) ==== @@ -3716,7 +3716,7 @@ ; else { - rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP); + rtx temp = assign_386_stack_local (SFmode, SLOT_VIRTUAL); emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp)); DONE; } @@ -3868,7 +3868,7 @@ DONE; } else - operands[2] = assign_386_stack_local (SFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (SFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfsf2_mixed" @@ -3966,7 +3966,7 @@ DONE; } else - operands[2] = assign_386_stack_local (DFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (DFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfdf2_mixed" @@ -4749,7 +4749,7 @@ (define_insn "*addti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "%0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (PLUS, TImode, operands)" "#") @@ -4757,7 +4757,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (unspec:CC [(match_dup 1) (match_dup 2)] @@ -6483,7 +6483,7 @@ (define_insn "*subti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (MINUS, TImode, operands)" "#") @@ -6491,7 +6491,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (match_dup 2))) @@ -9326,7 +9326,7 @@ (define_insn "*negti2_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=ro") - (neg:TI (match_operand:TI 1 "general_operand" "0"))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" "0"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_unary_operator_ok (NEG, TImode, operands)" @@ -9334,7 +9334,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") - (neg:TI (match_operand:TI 1 "general_operand" ""))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel ==== //depot/projects/opentoe/contrib/gcc/config/i386/sse.md#2 (text+ko) ==== @@ -2055,11 +2055,11 @@ (match_dup 1)) (parallel [(const_int 0) (const_int 2)])))] - "TARGET_SSE3 && !(MEM_P (operands[1]) && MEM_P (operands[2]))" + "TARGET_SSE3 && !(MEM_P (operands[0]) && MEM_P (operands[1]))" >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Aug 21 22:41:18 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1754D16A420; Tue, 21 Aug 2007 22:41:18 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3EA616A418 for ; Tue, 21 Aug 2007 22:41:17 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D349313C46B for ; Tue, 21 Aug 2007 22:41:17 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LMfHAQ000282 for ; Tue, 21 Aug 2007 22:41:17 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7LMfHkK000279 for perforce@freebsd.org; Tue, 21 Aug 2007 22:41:17 GMT (envelope-from cnst@FreeBSD.org) Date: Tue, 21 Aug 2007 22:41:17 GMT Message-Id: <200708212241.l7LMfHkK000279@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125518 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 22:41:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=125518 Change 125518 by cnst@dale on 2007/08/21 22:41:08 move CAVEATS section up, and rename it as COMPATIBILITY; no other changes in text yet Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#4 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#4 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $P4: //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#3 $ +.\" $P4: //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#4 $ .\" $FreeBSD$ .\" $OpenBSD: sensor_attach.9,v 1.4 2007/03/22 16:55:31 deraadt Exp $ .\" @@ -104,6 +104,25 @@ .Fn sensor_task_register with an argument of .Fa arg . +.Sh COMPATIBILITY +The +.Fn sensor_task_register +and +.Fn sensor_task_unregister +functions that are included in +.Ox 4.2 +and later +are not compatible with +.Fx . +.Fx +includes an implementation that is similar and compatible +with an earlier version of +these +.Va sensor_task +functions that was available from +.Ox 3.9 +until +.Ox 4.1 . .Sh SEE ALSO .Xr systat 1 , .Xr sysctl 3 , @@ -126,22 +145,3 @@ by .An Constantine A. Murenin as a Google Summer of Code 2007 project. -.Sh CAVEATS -The -.Fn sensor_task_register -and -.Fn sensor_task_unregister -functions that are included in -.Ox 4.2 -and later -are not compatible with -.Fx . -.Fx -includes an implementation that is similar and compatible -with an earlier version of -these -.Va sensor_task -functions that was available from -.Ox 3.9 -until -.Ox 4.1 . From owner-p4-projects@FreeBSD.ORG Tue Aug 21 22:46:25 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6D2A716A419; Tue, 21 Aug 2007 22:46:25 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2949016A417 for ; Tue, 21 Aug 2007 22:46:25 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 19EB213C45E for ; Tue, 21 Aug 2007 22:46:25 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LMkONw000549 for ; Tue, 21 Aug 2007 22:46:24 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7LMkOKO000546 for perforce@freebsd.org; Tue, 21 Aug 2007 22:46:24 GMT (envelope-from cnst@FreeBSD.org) Date: Tue, 21 Aug 2007 22:46:24 GMT Message-Id: <200708212246.l7LMkOKO000546@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125519 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 22:46:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=125519 Change 125519 by cnst@dale on 2007/08/21 22:45:30 say one more paragraph about sensor_task compatibility Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#5 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#5 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $P4: //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#4 $ +.\" $P4: //depot/projects/soc2007/cnst-sensors/share.man.man9/sensor_attach.9#5 $ .\" $FreeBSD$ .\" $OpenBSD: sensor_attach.9,v 1.4 2007/03/22 16:55:31 deraadt Exp $ .\" @@ -105,6 +105,7 @@ with an argument of .Fa arg . .Sh COMPATIBILITY +.Ss sensor_task The .Fn sensor_task_register and @@ -123,6 +124,12 @@ .Ox 3.9 until .Ox 4.1 . +.Pp +Drivers that only call +.Fn sensor_task_register +and don't check its return value are not affected by this +.Va sensor_task +compatibility notice. .Sh SEE ALSO .Xr systat 1 , .Xr sysctl 3 , From owner-p4-projects@FreeBSD.ORG Tue Aug 21 23:51:45 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1032E16A469; Tue, 21 Aug 2007 23:51:45 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D950B16A418 for ; Tue, 21 Aug 2007 23:51:44 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C677513C4CB for ; Tue, 21 Aug 2007 23:51:44 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LNpism006483 for ; Tue, 21 Aug 2007 23:51:44 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7LNpi6Q006480 for perforce@freebsd.org; Tue, 21 Aug 2007 23:51:44 GMT (envelope-from zec@FreeBSD.org) Date: Tue, 21 Aug 2007 23:51:44 GMT Message-Id: <200708212351.l7LNpi6Q006480@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 125520 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 23:51:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=125520 Change 125520 by zec@zec_tpx32 on 2007/08/21 23:51:39 Given that ng_pipe nodes can be connected into arbitrary topologies, and therefore it is possible for ngp_rcvdata() to be recursively called from a single thread, it is necessary to explicitly allow for the ng_pipe_giant mutex to be recursively acquireable. Affected files ... .. //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 edit Differences ... ==== //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 (text+ko) ==== @@ -1028,7 +1028,7 @@ error = EEXIST; else { mtx_init(&ng_pipe_giant, "ng_pipe_giant", NULL, - MTX_DEF); + MTX_DEF | MTX_RECURSE); LIST_INIT(&node_head); LIST_INIT(&hook_head); ds_handle = timeout((timeout_t *) &pipe_scheduler, From owner-p4-projects@FreeBSD.ORG Wed Aug 22 00:57:06 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 045CC16A41B; Wed, 22 Aug 2007 00:57:06 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE29F16A418 for ; Wed, 22 Aug 2007 00:57:05 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BED7013C428 for ; Wed, 22 Aug 2007 00:57:05 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7M0v5h9020533 for ; Wed, 22 Aug 2007 00:57:05 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7M0v5QU020530 for perforce@freebsd.org; Wed, 22 Aug 2007 00:57:05 GMT (envelope-from jbr@FreeBSD.org) Date: Wed, 22 Aug 2007 00:57:05 GMT Message-Id: <200708220057.l7M0v5QU020530@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125521 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 00:57:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=125521 Change 125521 by jbr@jbr_bob on 2007/08/22 00:56:56 * Moved things around a bit * Removed dead and redundant code * Added rfork(RFPROC | RFMEM) (which fails) TODO: * fix RFMEM problem * fix some unmaping of the sysshm Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#19 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#7 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_proc.c#2 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#7 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/types.h#4 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#6 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#14 edit .. //depot/projects/soc2007/jbr-syscall/tests/fork.c#4 edit .. //depot/projects/soc2007/jbr-syscall/tests/mlibc/mlibc.c#3 edit .. //depot/projects/soc2007/jbr-syscall/tests/mlibc/mlibc.h#2 edit .. //depot/projects/soc2007/jbr-syscall/tests/rfork.c#1 add Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#19 (text+ko) ==== @@ -445,8 +445,6 @@ goto exec_fail_dealloc; } - exec_map_sysshm(imgp); - /* * Special interpreter operation, cleanup and loop up to try to * activate the interpreter. @@ -739,6 +737,8 @@ vfs_mark_atime(imgp->vp, td); done1: + exec_map_sysshm(imgp); + /* * Free any resources malloc'd earlier that we didn't use. */ @@ -910,15 +910,10 @@ { int error = 0; struct proc *p = imgp->proc; - struct sysshm outsysshm; error = vm_map_sysshm(p); - PROC_LOCK(p); - outsysshm.pid = p->p_pid; - copyout(&outsysshm, (vm_offset_t *) p->p_usrsysshm, - sizeof(struct sysshm)); - PROC_UNLOCK(p); + proc_sysshm_out(p); return(error); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_fork.c#7 (text+ko) ==== @@ -822,6 +822,7 @@ struct thread *td; struct trapframe *frame; { + proc_sysshm_out(td->td_proc); userret(td, frame); #ifdef KTRACE ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_proc.c#2 (text+ko) ==== @@ -1150,6 +1150,16 @@ pargs_free(pa); } +void proc_sysshm_out(struct proc *p) +{ + struct sysshm outsysshm; + + PROC_LOCK(p); + outsysshm.pid = p->p_pid; + PROC_UNLOCK(p); + copyout(&outsysshm, (vm_offset_t *) p->p_usrsysshm, + sizeof(struct sysshm)); +} /* * This sysctl allows a process to retrieve the argument list or process * title for another process without groping around in the address space ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#7 (text+ko) ==== @@ -473,6 +473,10 @@ u_int64_t rux_tu; /* (c) Previous total time in usec. */ }; +struct sysshm { + pid_t pid; +}; + /* * The old fashionned process. May have multiple threads. * Starts off with a single embedded THREAD. @@ -824,7 +828,8 @@ void faultin(struct proc *p); void fixjobc(struct proc *p, struct pgrp *pgrp, int entering); int fork1(struct thread *, int, int, struct proc **); -void fork_map_sysshm(struct proc *, struct proc *, int); +void fork_map_sysshm(struct proc *, int); +void proc_sysshm_out(struct proc *); void fork_exit(void (*)(void *, struct trapframe *), void *, struct trapframe *); void fork_return(struct thread *, struct trapframe *); ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/types.h#4 (text+ko) ==== @@ -372,12 +372,6 @@ __END_DECLS #endif /* !_KERNEL */ -struct sysshm { - pid_t pid; - char progtitle[20]; - char proctitle[2048]; -}; - #endif /* __BSD_VISIBLE */ #endif /* !_SYS_TYPES_H_ */ ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#6 (text+ko) ==== @@ -523,7 +523,7 @@ vmspace_unshare(p1); } } - fork_map_sysshm(p1, p2, flags); + fork_map_sysshm(p2, flags); cpu_fork(td, p2, td2, flags); return; } @@ -547,25 +547,14 @@ * cpu_fork will copy and update the pcb, set up the kernel stack, * and make the child ready to run. */ - fork_map_sysshm(p1, p2, flags); + fork_map_sysshm(p2, flags); cpu_fork(td, p2, td2, flags); } void -fork_map_sysshm(struct proc *old, struct proc *new, int flags) +fork_map_sysshm(struct proc *new, int flags) { - struct sysshm outsysshm; - - new->p_usrsysshm = (vm_offset_t) old->p_vmspace->vm_taddr - - old->p_usrsysshm + (vm_offset_t) new->p_vmspace->vm_taddr; - vm_map_sysshm(new); - - PROC_LOCK(new); - outsysshm.pid = new->p_pid; - PROC_UNLOCK(new); - copyout(&outsysshm, (vm_offset_t *) new->p_usrsysshm, - sizeof(struct sysshm)); } /* ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#14 (text+ko) ==== @@ -3026,27 +3026,6 @@ != KERN_SUCCESS) panic("vm_map_sysshm: cannot wire page."); - vm_map_t tmap = map; - vm_map_entry_t entry; - vm_object_t object; - vm_pindex_t pindex; - vm_prot_t prot; - boolean_t wired; - vm_page_t page; - - if (vm_map_lookup(&tmap, addr, VM_PROT_READ|VM_PROT_WRITE, &entry, - &object, &pindex, &prot, &wired)) - panic("vm_map_sysshm: cannot lookup vm_object."); - - VM_OBJECT_LOCK(object); - if(!(page = vm_page_lookup(object, pindex))) - panic("vm_map_sysshm: cannot wire page."); - vm_page_lock_queues(); - vm_page_wire(page); - vm_page_unlock_queues(); - VM_OBJECT_UNLOCK(object); - vm_map_lookup_done(tmap, entry); - p->p_usrsysshm = addr; return (addr); ==== //depot/projects/soc2007/jbr-syscall/tests/fork.c#4 (text+ko) ==== @@ -9,7 +9,7 @@ pid_t child; printf("Parent -- getpid(): %d\tgetpid2(): %d\n", getpid(), getpid2()); - if(!(child = fork())) { + if(!(child = fork2())) { printf("Child -- getpid(): %d\tgetpid2(): %d\n", getpid(), getpid2()); } else { ==== //depot/projects/soc2007/jbr-syscall/tests/mlibc/mlibc.c#3 (text+ko) ==== @@ -1,5 +1,8 @@ #include "mlibc.h" #include +#include +#include +#include struct sysshm * sysshm = NULL; @@ -12,11 +15,29 @@ sysctlbyname("kern.usrsysshm", &addr, &size, NULL, 0); sysshm = (struct sysshm * ) addr; - printf("%d\n", addr); +} + +pid_t fork2(void) +{ + pid_t pid = fork(); + + if (!pid) + __mlibc_init(); + + return (pid); +} + +pid_t rfork2(int flags) +{ + pid_t pid = rfork(flags); + + if (!pid) + __mlibc_init(); + + return (pid); } pid_t getpid2(void) { - __mlibc_init(); return(sysshm->pid); } ==== //depot/projects/soc2007/jbr-syscall/tests/mlibc/mlibc.h#2 (text+ko) ==== @@ -1,15 +1,13 @@ #ifndef _MLIBC_H_ #define _MLIBC_H_ -#include #include -#include struct sysshm { pid_t pid; - char progtitle[20]; - char proctitle[2048]; }; +pid_t fork2(void); +pid_t rfork2(int flags); pid_t getpid2(void); #endif /* _MLIBC_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Aug 22 00:59:09 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5090816A421; Wed, 22 Aug 2007 00:59:09 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25B9516A417 for ; Wed, 22 Aug 2007 00:59:09 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 16C0D13C494 for ; Wed, 22 Aug 2007 00:59:09 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7M0x8I3020714 for ; Wed, 22 Aug 2007 00:59:08 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7M0x8nA020709 for perforce@freebsd.org; Wed, 22 Aug 2007 00:59:08 GMT (envelope-from jbr@FreeBSD.org) Date: Wed, 22 Aug 2007 00:59:08 GMT Message-Id: <200708220059.l7M0x8nA020709@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125522 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 00:59:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=125522 Change 125522 by jbr@jbr_bob on 2007/08/22 00:58:29 sync Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/amd64/amd64/pmap.c#2 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/dev/drm/i915_dma.c#3 integrate .. //depot/projects/soc2007/jbr-syscall/src/sys/i386/i386/pmap.c#2 integrate Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/amd64/amd64/pmap.c#2 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.589 2007/07/01 07:08:25 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.590 2007/08/21 04:59:33 alc Exp $"); /* * Manages physical address maps. @@ -1722,7 +1722,7 @@ static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; static vm_pindex_t colour; - int bit, field, page_req; + int bit, field; pv_entry_t pv; struct pv_chunk *pc; vm_page_t m; @@ -1755,8 +1755,7 @@ } } /* No free items, allocate another chunk */ - page_req = try ? VM_ALLOC_NORMAL : VM_ALLOC_SYSTEM; - m = vm_page_alloc(NULL, colour, page_req | VM_ALLOC_NOOBJ); + m = vm_page_alloc(NULL, colour, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ); if (m == NULL) { if (try) { pv_entry_count--; @@ -1775,7 +1774,7 @@ PV_STAT(pmap_collect_inactive++); pmap_collect(pmap, &vm_page_queues[PQ_INACTIVE]); m = vm_page_alloc(NULL, colour, - VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ); + VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ); if (m == NULL) { PV_STAT(pmap_collect_active++); pmap_collect(pmap, &vm_page_queues[PQ_ACTIVE]); ==== //depot/projects/soc2007/jbr-syscall/src/sys/dev/drm/i915_dma.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/drm/i915_dma.c,v 1.5 2007/07/12 09:02:31 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/drm/i915_dma.c,v 1.6 2007/08/21 12:52:57 kib Exp $"); #include "dev/drm/drmP.h" #include "dev/drm/drm.h" @@ -125,18 +125,17 @@ drm_dma_handle_t *dmah; DRM_UNLOCK(); + memset(dev_priv, 0, sizeof(drm_i915_private_t)); dmah = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, 0xffffffff); + DRM_LOCK(); if (!dmah) { dev->dev_private = (void *)dev_priv; i915_dma_cleanup(dev); DRM_ERROR("Can not allocate hardware status page\n"); - DRM_LOCK(); return DRM_ERR(ENOMEM); } - DRM_LOCK(); - memset(dev_priv, 0, sizeof(drm_i915_private_t)); dev_priv->status_page_dmah = dmah; DRM_GETSAREA(); ==== //depot/projects/soc2007/jbr-syscall/src/sys/i386/i386/pmap.c#2 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.593 2007/07/01 07:08:26 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.594 2007/08/21 04:59:34 alc Exp $"); /* * Manages physical address maps. @@ -1795,7 +1795,7 @@ static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; static vm_pindex_t colour; - int bit, field, page_req; + int bit, field; pv_entry_t pv; struct pv_chunk *pc; vm_page_t m; @@ -1830,8 +1830,7 @@ } } pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); - page_req = try ? VM_ALLOC_NORMAL : VM_ALLOC_SYSTEM; - m = vm_page_alloc(NULL, colour, page_req | + m = vm_page_alloc(NULL, colour, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL || pc == NULL) { if (try) { @@ -1860,7 +1859,7 @@ PV_STAT(pmap_collect_inactive++); pmap_collect(pmap, &vm_page_queues[PQ_INACTIVE]); if (m == NULL) - m = vm_page_alloc(NULL, colour, VM_ALLOC_SYSTEM | + m = vm_page_alloc(NULL, colour, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (pc == NULL) pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); From owner-p4-projects@FreeBSD.ORG Wed Aug 22 01:32:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C81D16A468; Wed, 22 Aug 2007 01:32:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1348A16A418 for ; Wed, 22 Aug 2007 01:32:51 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 04E0613C458 for ; Wed, 22 Aug 2007 01:32:51 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7M1WoCv024302 for ; Wed, 22 Aug 2007 01:32:50 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7M1WotG024299 for perforce@freebsd.org; Wed, 22 Aug 2007 01:32:50 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 22 Aug 2007 01:32:50 GMT Message-Id: <200708220132.l7M1WotG024299@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125524 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 01:32:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=125524 Change 125524 by kmacy@kmacy_home:ethng on 2007/08/22 01:32:45 add "batch" CPL packet descriptor for CPL message supporting 7 packets per WR Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/common/cxgb_t3_cpl.h#2 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/common/cxgb_t3_cpl.h#2 (text+ko) ==== @@ -1131,6 +1131,18 @@ __be32 lso_info; }; +struct cpl_tx_pkt_batch_entry { + __be32 cntrl; + __be32 len; + __be64 addr; +}; + +struct cpl_tx_pkt_batch { + WR_HDR; + struct cpl_tx_pkt_batch_entry pkt_entry[7]; +}; + + /* cpl_tx_pkt*.cntrl fields */ #define S_TXPKT_VLAN 0 #define M_TXPKT_VLAN 0xFFFF From owner-p4-projects@FreeBSD.ORG Wed Aug 22 01:40:00 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AEDBF16A41B; Wed, 22 Aug 2007 01:40:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A76916A417 for ; Wed, 22 Aug 2007 01:40:00 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5A83D13C46C for ; Wed, 22 Aug 2007 01:40:00 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7M1e0H9024702 for ; Wed, 22 Aug 2007 01:40:00 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7M1dxDZ024699 for perforce@freebsd.org; Wed, 22 Aug 2007 01:39:59 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 22 Aug 2007 01:39:59 GMT Message-Id: <200708220139.l7M1dxDZ024699@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 125525 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 01:40:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=125525 Change 125525 by kmacy@kmacy_home:ethng on 2007/08/22 01:39:39 - change the interface to t3_free_tx_desc to account for the fact that we may be freeing more mbuf chains than descriptors reclaimed - genericize fetching the VLAN tag since we can't just grab it once - add encapsulation of "batch" packet when t3_encap is given more than one mbuf (still untested with coalescing enabled) Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#12 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#14 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#16 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#12 (text+ko) ==== @@ -529,7 +529,7 @@ int t3_sge_init_adapter(adapter_t *); int t3_sge_init_port(struct port_info *); void t3_sge_deinit_sw(adapter_t *); -int t3_free_tx_desc(struct sge_txq *q, int n, struct mbuf **m_vec); +int t3_free_tx_desc(struct sge_txq *q, int n, struct mbuf **m_vec, int m_vec_size, int *desc_reclaimed); void t3_rx_eth_lro(adapter_t *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad, uint32_t rss_hash, uint32_t rss_csum, int lro); ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#14 (text+ko) ==== @@ -389,19 +389,19 @@ static int cxgb_pcpu_reclaim_tx(struct sge_txq *txq) { - int reclaimable, reclaimed, freed, i, j, n; + int reclaimable, total_reclaimed, reclaimed, freed, i, j, n; struct mbuf *m_vec[TX_CLEAN_MAX_DESC]; struct sge_qset *qs = txq_to_qset(txq, TXQ_ETH); KASSERT(qs->qs_cpuid == curcpu, ("cpu qset mismatch cpuid=%d curcpu=%d", qs->qs_cpuid, curcpu)); - freed = reclaimed = j = 0; - reclaimable = min(desc_reclaimable(txq), TX_CLEAN_MAX_DESC); - while (reclaimable > 0) { - n = t3_free_tx_desc(txq, reclaimable, m_vec); + freed = total_reclaimed = j = 0; + + while ((reclaimable = desc_reclaimable(txq)) > 0) { + n = t3_free_tx_desc(txq, reclaimable, m_vec, TX_CLEAN_MAX_DESC, &reclaimed); - reclaimed += reclaimable; + total_reclaimed += reclaimed; if (j > 10 || cxgb_debug) printf("n=%d reclaimable=%d txq->processed=%d txq->cleaned=%d txq->in_use=%d\n", @@ -412,11 +412,10 @@ freed += n; j++; - txq->cleaned += reclaimable; - txq->in_use -= reclaimable; + txq->cleaned += reclaimed; + txq->in_use -= reclaimed; if (isset(&qs->txq_stopped, TXQ_ETH)) clrbit(&qs->txq_stopped, TXQ_ETH); - reclaimable = min(desc_reclaimable(txq), TX_CLEAN_MAX_DESC); } txq->txq_frees += freed; ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#16 (text+ko) ==== @@ -64,6 +64,12 @@ #include #endif +#include +#include + + + + uint32_t collapse_free = 0; uint32_t mb_free_vec_free = 0; int txq_fills = 0; @@ -207,8 +213,7 @@ mtx_assert(&q->lock, MA_OWNED); if (reclaim > 0) { - n = t3_free_tx_desc(q, min(reclaim, nbufs), mvec); - reclaimed = min(reclaim, nbufs); + n = t3_free_tx_desc(q, reclaim, mvec, nbufs, &reclaimed); q->cleaned += reclaimed; q->in_use -= reclaimed; } @@ -1178,13 +1183,23 @@ /* sizeof(*eh) + sizeof(*vhdr) + sizeof(*ip) + sizeof(*tcp) */ #define TCPPKTHDRSIZE (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + 20 + 20) +#ifdef VLAN_SUPPORTED +#define GET_VTAG(cntrl, m) \ +do { \ + if ((m)->m_flags & M_VLANTAG) \ + cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN((m)->m_pkthdr.ether_vtag); \ +} while (0) +#else +#define GET_VTAG(cntrl, m) +#endif + + int t3_encap(struct sge_qset *qs, struct mbuf **m, int count) { adapter_t *sc; struct mbuf *m0; struct sge_txq *txq; - struct tx_sw_desc *stx; struct txq_state txqs; struct port_info *p; unsigned int ndesc, flits, cntrl, mlen; @@ -1197,23 +1212,18 @@ uint32_t wr_hi, wr_lo, sgl_flits; struct tx_desc *txd; - struct cpl_tx_pkt *cpl; #if defined(IFNET_MULTIQUEUE) && defined(STRICT_AFFINITY) KASSERT(qs->qs_cpuid == curcpu, ("cpu qset mismatch cpuid=%d curcpu=%d", qs->qs_cpuid, curcpu)); #endif DPRINTF("t3_encap cpu=%d ", curcpu); - m0 = *m; + p = qs->port; sc = p->adapter; txq = &qs->txq[TXQ_ETH]; - stx = &txq->sdesc[txq->pidx]; + txsd = &txq->sdesc[txq->pidx]; txd = &txq->desc[txq->pidx]; - cpl = (struct cpl_tx_pkt *)txd; - mlen = m0->m_pkthdr.len; - cpl->len = htonl(mlen | 0x80000000); - DPRINTF("mlen=%d\n", mlen); /* * XXX handle checksum, TSO, and VLAN here * @@ -1224,22 +1234,60 @@ * XXX need to add VLAN support for 6.x */ #ifdef VLAN_SUPPORTED - if (m0->m_flags & M_VLANTAG) - cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(m0->m_pkthdr.ether_vtag); - if (m0->m_pkthdr.csum_flags & (CSUM_TSO)) - tso_info = V_LSO_MSS(m0->m_pkthdr.tso_segsz); -#endif - if (tso_info) { + if (m[0]->m_pkthdr.csum_flags & (CSUM_TSO)) + tso_info = V_LSO_MSS(m[0]->m_pkthdr.tso_segsz); +#endif + txsd->count = count; + + if (count > 1) { + struct cpl_tx_pkt_batch *cpl_batch = (struct cpl_tx_pkt_batch *)txd; + int i; + + wrp = (struct work_request_hdr *)txd; + + flits = count*2 + 1; + txq_prod(txq, 1, &txqs); + + for (i = 0; i < count; i++) { + struct cpl_tx_pkt_batch_entry *cbe = &cpl_batch->pkt_entry[i]; + + cntrl = V_TXPKT_INTF(p->port_id); + GET_VTAG(cntrl, m[i]); + cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT) | (1 << 24); + cbe->cntrl = htonl(cntrl); + cbe->len = htonl(m[i]->m_pkthdr.len | 0x80000000); + m_set_priority(m[i], txqs.pidx); + txsd->m[i] = m[i]; + /* + * XXX - NOT PORTABLE outside of x86 + */ + cbe->addr = htobe64(pmap_kextract(mtod(m[i], vm_offset_t))); + } + + wrp->wr_hi = htonl(F_WR_SOP | F_WR_EOP | V_WR_DATATYPE(1) | + V_WR_SGLSFLT(flits)) | htonl(V_WR_OP(FW_WROPCODE_TUNNEL_TX_PKT) | txqs.compl); + wmb(); + wrp->wr_lo = htonl(V_WR_LEN(flits) | + V_WR_GEN(txqs.gen)) | htonl(V_WR_TID(txq->token)); + /* XXX gen? */ + wr_gen2(txd, txqs.gen); + + return (0); + } else if (tso_info) { int eth_type; - struct cpl_tx_pkt_lso *hdr = (struct cpl_tx_pkt_lso *) cpl; + struct cpl_tx_pkt_lso *hdr = (struct cpl_tx_pkt_lso *)txd; struct ip *ip; struct tcphdr *tcp; char *pkthdr, tmp[TCPPKTHDRSIZE]; /* is this too large for the stack? */ txd->flit[2] = 0; + m0 = m[0]; + GET_VTAG(cntrl, m0); cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT_LSO); hdr->cntrl = htonl(cntrl); - + mlen = m0->m_pkthdr.len; + hdr->len = htonl(mlen | 0x80000000); + if (__predict_false(m0->m_len < TCPPKTHDRSIZE)) { pkthdr = &tmp[0]; m_copydata(m0, 0, TCPPKTHDRSIZE, pkthdr); @@ -1264,20 +1312,25 @@ hdr->lso_info = htonl(tso_info); flits = 3; } else { + struct cpl_tx_pkt *cpl = (struct cpl_tx_pkt *)txd; + + m0 = m[0]; + GET_VTAG(cntrl, m0); cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT); cpl->cntrl = htonl(cntrl); - + mlen = m0->m_pkthdr.len; + cpl->len = htonl(mlen | 0x80000000); + if (mlen <= WR_LEN - sizeof(*cpl)) { txq_prod(txq, 1, &txqs); - txq->sdesc[txqs.pidx].m[0] = m0; - txq->sdesc[txqs.pidx].count = 1; - m_set_priority(m0, txqs.pidx); + txq->sdesc[txqs.pidx].count = 0; if (m0->m_len == m0->m_pkthdr.len) memcpy(&txd->flit[2], mtod(m0, uint8_t *), mlen); else m_copydata(m0, 0, mlen, (caddr_t)&txd->flit[2]); + m_freem(m0); flits = (mlen + 7) / 8 + 2; cpl->wr.wr_hi = htonl(V_WR_BCNTLFLT(mlen & 7) | V_WR_OP(FW_WROPCODE_TUNNEL_TX_PKT) | @@ -1292,10 +1345,9 @@ } flits = 2; } - wrp = (struct work_request_hdr *)txd; - if ((err = busdma_map_mbufs(m, txq, stx, segs, &nsegs)) != 0) { + if ((err = busdma_map_mbufs(m, txq, txsd, segs, &nsegs)) != 0) { return (err); } m0 = *m; @@ -1311,8 +1363,8 @@ txsd = &txq->sdesc[txqs.pidx]; wr_hi = htonl(V_WR_OP(FW_WROPCODE_TUNNEL_TX_PKT) | txqs.compl); wr_lo = htonl(V_WR_TID(txq->token)); + txsd->count = count; txsd->m[0] = m0; - txsd->count = 1; m_set_priority(m0, txqs.pidx); write_wr_hdr_sgl(ndesc, txd, &txqs, txq, sgl, flits, sgl_flits, wr_hi, wr_lo); @@ -1671,37 +1723,44 @@ * t3_free_tx_desc - reclaims Tx descriptors and their buffers * @adapter: the adapter * @q: the Tx queue to reclaim descriptors from - * @n: the number of descriptors to reclaim + * @reclaimable: the number of descriptors to reclaim + * @m_vec_size: maximum number of buffers to reclaim + * @desc_reclaimed: returns the number of descriptors reclaimed * * Reclaims Tx descriptors from an SGE Tx queue and frees the associated * Tx buffers. Called with the Tx queue lock held. + * + * Returns number of buffers of reclaimed */ int -t3_free_tx_desc(struct sge_txq *q, int n, struct mbuf **m_vec) +t3_free_tx_desc(struct sge_txq *q, int reclaimable, struct mbuf **m_vec, + int m_vec_size, int *desc_reclaimed) { struct tx_sw_desc *txsd; unsigned int cidx; - int nbufs = 0; + int i, reclaimed, nbufs; #ifdef T3_TRACE T3_TRACE2(sc->tb[q->cntxt_id & 7], - "reclaiming %u Tx descriptors at cidx %u", n, cidx); + "reclaiming %u Tx descriptors at cidx %u", reclaimable, cidx); #endif cidx = q->cidx; txsd = &q->sdesc[cidx]; + reclaimed = nbufs = 0; - while (n-- > 0) { + for (reclaimed = 0; reclaimed < reclaimable;) { DPRINTF("cidx=%d d=%p\n", cidx, d); if (txsd->count > 0) { + if (nbufs + txsd->count > m_vec_size) + break; if (txsd->flags & TX_SW_DESC_MAPPED) { bus_dmamap_unload(q->entry_tag, txsd->map); txsd->flags &= ~TX_SW_DESC_MAPPED; } if (m_get_priority(txsd->m[0]) == cidx) { - m_vec[nbufs] = txsd->m[0]; - txsd->m[0] = NULL; + for (i = 0; i < txsd->count; i++, nbufs++) + m_vec[nbufs] = txsd->m[i]; txsd->count = 0; - nbufs++; } else { printf("pri=%d cidx=%d\n", (int)m_get_priority(txsd->m[0]), cidx); } @@ -1713,7 +1772,9 @@ cidx = 0; txsd = q->sdesc; } + reclaimed++; } + *desc_reclaimed = reclaimed; q->cidx = cidx; return (nbufs); From owner-p4-projects@FreeBSD.ORG Wed Aug 22 02:43:24 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9963816A41B; Wed, 22 Aug 2007 02:43:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B44916A419 for ; Wed, 22 Aug 2007 02:43:24 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5B2E113C45E for ; Wed, 22 Aug 2007 02:43:24 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7M2hO44030099 for ; Wed, 22 Aug 2007 02:43:24 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7M2hMFG030096 for perforce@freebsd.org; Wed, 22 Aug 2007 02:43:22 GMT (envelope-from peter@freebsd.org) Date: Wed, 22 Aug 2007 02:43:22 GMT Message-Id: <200708220243.l7M2hMFG030096@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 125530 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 02:43:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=125530 Change 125530 by peter@peter_overcee on 2007/08/22 02:42:39 IFC @125529 Affected files ... .. //depot/projects/hammer/etc/namedb/named.conf#12 integrate .. //depot/projects/hammer/etc/rc.d/Makefile#53 integrate .. //depot/projects/hammer/etc/rc.d/lockd#2 integrate .. //depot/projects/hammer/etc/rc.d/nfslocking#10 integrate .. //depot/projects/hammer/etc/rc.d/statd#2 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_format_tar.c#36 integrate .. //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse.c#5 integrate .. //depot/projects/hammer/release/Makefile#93 integrate .. //depot/projects/hammer/release/doc/Makefile#3 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/article.sgml#5 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/readme/article.sgml#17 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/relnotes/article.sgml#16 integrate .. //depot/projects/hammer/release/doc/share/sgml/release.ent#20 integrate .. //depot/projects/hammer/sbin/reboot/boot_i386.8#19 integrate .. //depot/projects/hammer/share/man/man4/umodem.4#8 integrate .. //depot/projects/hammer/sys/amd64/amd64/pmap.c#162 integrate .. //depot/projects/hammer/sys/arm/arm/busdma_machdep.c#25 integrate .. //depot/projects/hammer/sys/boot/arm/at91/boot2/boot2.c#5 integrate .. //depot/projects/hammer/sys/dev/cxgb/common/cxgb_t3_hw.c#5 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_adapter.h#8 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_ioctl.h#4 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_main.c#8 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_offload.c#5 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_offload.h#4 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_sge.c#9 integrate .. //depot/projects/hammer/sys/dev/dcons/dcons_os.c#13 integrate .. //depot/projects/hammer/sys/dev/drm/i915_dma.c#6 integrate .. //depot/projects/hammer/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#7 integrate .. //depot/projects/hammer/sys/i386/i386/pmap.c#94 integrate .. //depot/projects/hammer/sys/kern/kern_cpu.c#15 integrate .. //depot/projects/hammer/sys/kern/kern_switch.c#55 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#80 integrate .. //depot/projects/hammer/sys/kern/vfs_aio.c#50 integrate .. //depot/projects/hammer/sys/net/bridgestp.c#16 integrate .. //depot/projects/hammer/sys/netgraph/ng_base.c#48 integrate .. //depot/projects/hammer/sys/vm/device_pager.c#17 integrate .. //depot/projects/hammer/sys/vm/phys_pager.c#13 integrate .. //depot/projects/hammer/sys/vm/vm_map.c#61 integrate .. //depot/projects/hammer/sys/vm/vm_map.h#20 integrate .. //depot/projects/hammer/sys/vm/vm_mmap.c#46 integrate Differences ... ==== //depot/projects/hammer/etc/namedb/named.conf#12 (text+ko) ==== @@ -1,4 +1,4 @@ -// $FreeBSD: src/etc/namedb/named.conf,v 1.25 2007/08/02 09:18:53 dougb Exp $ +// $FreeBSD: src/etc/namedb/named.conf,v 1.26 2007/08/17 04:37:02 dougb Exp $ // // Refer to the named.conf(5) and named(8) man pages, and the documentation // in /usr/share/doc/bind9 for more details. @@ -68,6 +68,12 @@ 2. No spurious traffic will be sent from your network to the roots 3. Greater resilience to any potential root server failure/DDoS + On the other hand, this method requires more monitoring than the + hints file to be sure that an unexpected failure mode has not + incapacitated your server. Name servers that are serving a lot + of clients will benefit more from this approach than individual + hosts. Use with caution. + To use this mechanism, uncomment the entries below, and comment the hint zone above. */ @@ -76,9 +82,7 @@ type slave; file "slave/root.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -86,9 +90,7 @@ type slave; file "slave/arpa.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -96,9 +98,7 @@ type slave; file "slave/in-addr.arpa.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -155,9 +155,9 @@ // TEST-NET for Documentation (RFC 3330) zone "2.0.192.in-addr.arpa" { type master; file "master/empty.db"; }; -// Router Benchmark Testing (RFC 2544) -zone "18.192.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "19.192.in-addr.arpa" { type master; file "master/empty.db"; }; +// Router Benchmark Testing (RFC 3330) +zone "18.198.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "19.198.in-addr.arpa" { type master; file "master/empty.db"; }; // IANA Reserved - Old Class E Space zone "240.in-addr.arpa" { type master; file "master/empty.db"; }; ==== //depot/projects/hammer/etc/rc.d/Makefile#53 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.81 2007/04/09 19:21:27 pjd Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.82 2007/08/17 07:58:26 mtm Exp $ .include @@ -20,7 +20,7 @@ ipnat ipsec ipxrouted isdnd \ jail \ kadmind kerberos kernel keyserv kldxref kpasswdd \ - ldconfig local localpkg lpd \ + ldconfig local localpkg lockd lpd \ mixer motd mountcritlocal mountcritremote mountlate \ mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \ named natd netif netoptions \ @@ -33,7 +33,7 @@ random rarpd resolv root \ route6d routed routing rpcbind rtadvd rwho \ savecore sdpd securelevel sendmail \ - serial sppp swap1 \ + serial sppp statd swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ ==== //depot/projects/hammer/etc/rc.d/lockd#2 (text+ko) ==== @@ -1,22 +1,28 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/lockd,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm +# $FreeBSD: src/etc/rc.d/lockd,v 1.17 2007/08/18 04:08:53 mtm Exp $ # -# PROVIDE: nfslocking +# PROVIDE: lockd # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr -# Save the (one) commandline argument in case it gets clobbered. -arg=$1 +name="lockd" +rcvar=rpc_lockd_enable +command="/usr/sbin/rpc.${name}" +start_precmd='lockd_precmd' +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' +status_precmd=$stop_precmd -# Either NFS client or server must be enabled and rpcbind(8) must be started. +# Make sure that we are either an NFS client or server, and that we get +# the correct flags from rc.conf(5). # -nfslocking_precmd() +lockd_precmd() { local ret ret=0 @@ -30,34 +36,9 @@ then force_depend rpcbind || ret=1 fi - - if [ $name = "statd" ] - then - rc_flags=${rpc_statd_flags} - elif [ $name = "lockd" ] - then - rc_flags=${rpc_lockd_flags} - fi - + rc_flags=${rpc_lockd_flags} return ${ret} } -start_precmd="nfslocking_precmd" -stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' -status_precmd=$stop_precmd - -# rpc.statd -# -name="statd" -rcvar=rpc_statd_enable -command="/usr/sbin/rpc.${name}" load_rc_config $name -run_rc_command "$arg" - -# rpc.lockd -# -name="lockd" -rcvar=rpc_lockd_enable -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" +run_rc_command $1 ==== //depot/projects/hammer/etc/rc.d/nfslocking#10 (text+ko) ==== @@ -1,13 +1,13 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/nfslocking,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# $FreeBSD: src/etc/rc.d/nfslocking,v 1.15 2007/08/17 07:58:26 mtm Exp $ # # PROVIDE: nfslocking # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON -# KEYWORD: nojail +# KEYWORD: nojail nostart . /etc/rc.subr ==== //depot/projects/hammer/etc/rc.d/statd#2 (text+ko) ==== @@ -1,22 +1,28 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/statd,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp +# $FreeBSD: src/etc/rc.d/statd,v 1.17 2007/08/18 04:08:53 mtm Exp $ # -# PROVIDE: nfslocking +# PROVIDE: statd # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr -# Save the (one) commandline argument in case it gets clobbered. -arg=$1 +name="statd" +rcvar=rpc_statd_enable +command="/usr/sbin/rpc.${name}" +start_precmd='statd_precmd' +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' +status_precmd=$stop_precmd -# Either NFS client or server must be enabled and rpcbind(8) must be started. +# Make sure that we are either an NFS client or server, and that we get +# the correct flags from rc.conf(5). # -nfslocking_precmd() +statd_precmd() { local ret ret=0 @@ -30,34 +36,9 @@ then force_depend rpcbind || ret=1 fi - - if [ $name = "statd" ] - then - rc_flags=${rpc_statd_flags} - elif [ $name = "lockd" ] - then - rc_flags=${rpc_lockd_flags} - fi - + rc_flags=${rpc_statd_flags} return ${ret} } -start_precmd="nfslocking_precmd" -stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' -status_precmd=$stop_precmd - -# rpc.statd -# -name="statd" -rcvar=rpc_statd_enable -command="/usr/sbin/rpc.${name}" load_rc_config $name -run_rc_command "$arg" - -# rpc.lockd -# -name="lockd" -rcvar=rpc_lockd_enable -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" +run_rc_command $1 ==== //depot/projects/hammer/lib/libarchive/archive_read_support_format_tar.c#36 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.60 2007/07/15 19:13:59 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.61 2007/08/18 21:53:25 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include @@ -72,6 +72,8 @@ #include "archive_private.h" #include "archive_read_private.h" +#define tar_min(a,b) ((a) < (b) ? (a) : (b)) + /* * Layout of POSIX 'ustar' tar header. */ @@ -172,6 +174,7 @@ static char *base64_decode(const wchar_t *, size_t, size_t *); static void gnu_add_sparse_entry(struct tar *, off_t offset, off_t remaining); +static void gnu_clear_sparse_list(struct tar *); static int gnu_sparse_old_read(struct archive_read *, struct tar *, const struct archive_entry_header_gnutar *header); static void gnu_sparse_old_parse(struct tar *, @@ -211,7 +214,8 @@ static int pax_header(struct archive_read *, struct tar *, struct archive_entry *, char *attr); static void pax_time(const wchar_t *, int64_t *sec, long *nanos); -static ssize_t readline(struct archive_read *, struct tar *, const char **); +static ssize_t readline(struct archive_read *, struct tar *, const char **, + ssize_t limit); static int read_body_to_string(struct archive_read *, struct tar *, struct archive_string *, const void *h); static int64_t tar_atol(const char *, unsigned); @@ -263,14 +267,9 @@ archive_read_format_tar_cleanup(struct archive_read *a) { struct tar *tar; - struct sparse_block *p; tar = (struct tar *)(a->format->data); - while (tar->sparse_list != NULL) { - p = tar->sparse_list; - tar->sparse_list = p->next; - free(p); - } + gnu_clear_sparse_list(tar); archive_string_free(&tar->acl_text); archive_string_free(&tar->entry_name); archive_string_free(&tar->entry_linkname); @@ -423,7 +422,6 @@ const char *p; int r; size_t l; - ssize_t size; /* Assign default device/inode values. */ archive_entry_set_dev(entry, 1 + default_dev); /* Don't use zero. */ @@ -446,22 +444,6 @@ r = tar_read_header(a, tar, entry); /* - * Yuck. See comments for gnu_sparse_10_read for why this - * is here and not in _read_data where it "should" go. - */ - if (tar->sparse_gnu_pending - && tar->sparse_gnu_major == 1 - && tar->sparse_gnu_minor == 0) { - tar->sparse_gnu_pending = 0; - /* Read initial sparse map. */ - size = gnu_sparse_10_read(a, tar); - if (size < 0) - return (size); - tar->entry_bytes_remaining -= size; - tar->entry_padding += size; - } - - /* * "non-sparse" files are really just sparse files with * a single block. */ @@ -497,11 +479,12 @@ if (tar->sparse_gnu_pending) { if (tar->sparse_gnu_major == 1 && tar->sparse_gnu_minor == 0) { - /* - * We should parse the sparse data - * here, but have to parse it as part of the - * header because of a bug in GNU tar 1.16.1. - */ + tar->sparse_gnu_pending = 0; + /* Read initial sparse map. */ + bytes_read = gnu_sparse_10_read(a, tar); + tar->entry_bytes_remaining -= bytes_read; + if (bytes_read < 0) + return (bytes_read); } else { *size = 0; *offset = 0; @@ -559,7 +542,6 @@ { off_t bytes_skipped; struct tar* tar; - struct sparse_block *p; tar = (struct tar *)(a->format->data); @@ -577,12 +559,7 @@ tar->entry_padding = 0; /* Free the sparse list. */ - while (tar->sparse_list != NULL) { - p = tar->sparse_list; - tar->sparse_list = p->next; - free(p); - } - tar->sparse_last = NULL; + gnu_clear_sparse_list(tar); return (ARCHIVE_OK); } @@ -1650,6 +1627,19 @@ p->remaining = remaining; } +static void +gnu_clear_sparse_list(struct tar *tar) +{ + struct sparse_block *p; + + while (tar->sparse_list != NULL) { + p = tar->sparse_list; + tar->sparse_list = p->next; + free(p); + } + tar->sparse_last = NULL; +} + /* * GNU tar old-format sparse data. * @@ -1793,7 +1783,7 @@ */ static int64_t gnu_sparse_10_atol(struct archive_read *a, struct tar *tar, - ssize_t *total_read) + ssize_t *remaining) { int64_t l, limit, last_digit_limit; const char *p; @@ -1804,10 +1794,16 @@ limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; - bytes_read = readline(a, tar, &p); - if (bytes_read <= 0) - return (ARCHIVE_FATAL); - *total_read += bytes_read; + /* + * Skip any lines starting with '#'; GNU tar specs + * don't require this, but they should. + */ + do { + bytes_read = readline(a, tar, &p, tar_min(*remaining, 100)); + if (bytes_read <= 0) + return (ARCHIVE_FATAL); + *remaining -= bytes_read; + } while (p[0] == '#'); l = 0; while (bytes_read > 0) { @@ -1828,32 +1824,39 @@ } /* - * Returns number of bytes consumed to read the sparse block data. + * Returns length (in bytes) of the sparse data description + * that was read. */ static ssize_t gnu_sparse_10_read(struct archive_read *a, struct tar *tar) { - ssize_t bytes_read = 0; + ssize_t remaining, bytes_read; int entries; off_t offset, size, to_skip; + /* Clear out the existing sparse list. */ + gnu_clear_sparse_list(tar); + + remaining = tar->entry_bytes_remaining; + /* Parse entries. */ - entries = gnu_sparse_10_atol(a, tar, &bytes_read); + entries = gnu_sparse_10_atol(a, tar, &remaining); if (entries < 0) return (ARCHIVE_FATAL); /* Parse the individual entries. */ while (entries-- > 0) { /* Parse offset/size */ - offset = gnu_sparse_10_atol(a, tar, &bytes_read); + offset = gnu_sparse_10_atol(a, tar, &remaining); if (offset < 0) return (ARCHIVE_FATAL); - size = gnu_sparse_10_atol(a, tar, &bytes_read); + size = gnu_sparse_10_atol(a, tar, &remaining); if (size < 0) return (ARCHIVE_FATAL); /* Add a new sparse entry. */ gnu_add_sparse_entry(tar, offset, size); } /* Skip rest of block... */ + bytes_read = tar->entry_bytes_remaining - remaining; to_skip = 0x1ff & -bytes_read; if (to_skip != (a->decompressor->skip)(a, to_skip)) return (ARCHIVE_FATAL); @@ -2004,7 +2007,8 @@ * when possible. */ static ssize_t -readline(struct archive_read *a, struct tar *tar, const char **start) +readline(struct archive_read *a, struct tar *tar, const char **start, + ssize_t limit) { ssize_t bytes_read; ssize_t total_size = 0; @@ -2020,12 +2024,24 @@ /* If we found '\n' in the read buffer, return pointer to that. */ if (p != NULL) { bytes_read = 1 + ((const char *)p) - s; + if (bytes_read > limit) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Line too long"); + return (ARCHIVE_FATAL); + } (a->decompressor->consume)(a, bytes_read); *start = s; return (bytes_read); } /* Otherwise, we need to accumulate in a line buffer. */ for (;;) { + if (total_size + bytes_read > limit) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Line too long"); + return (ARCHIVE_FATAL); + } if (archive_string_ensure(&tar->line, total_size + bytes_read) == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate working buffer"); ==== //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse.c#5 (text+ko) ==== @@ -23,107 +23,466 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_gtar_sparse.c,v 1.5 2007/08/12 01:16:19 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_gtar_sparse.c,v 1.6 2007/08/18 21:53:25 kientzle Exp $"); + + +struct contents { + off_t o; + size_t s; + char *d; +}; + +struct contents archive_contents_sparse[] = { + { 1000000, 1, "a" }, + { 2000000, 1, "a" }, + { 3145728, 0, NULL } +}; + +struct contents archive_contents_sparse2[] = { + { 1000000, 1, "a" }, + { 2000000, 1, "a" }, + { 3000000, 1, "a" }, + { 4000000, 1, "a" }, + { 5000000, 1, "a" }, + { 6000000, 1, "a" }, + { 7000000, 1, "a" }, + { 8000000, 1, "a" }, + { 9000000, 1, "a" }, + { 10000000, 1, "a" }, + { 11000000, 1, "a" }, + { 12000000, 1, "a" }, + { 13000000, 1, "a" }, + { 14000000, 1, "a" }, + { 15000000, 1, "a" }, + { 16000000, 1, "a" }, + { 17000000, 1, "a" }, + { 18000000, 1, "a" }, + { 19000000, 1, "a" }, + { 20000000, 1, "a" }, + { 21000000, 1, "a" }, + { 22000000, 1, "a" }, + { 23000000, 1, "a" }, + { 24000000, 1, "a" }, + { 25000000, 1, "a" }, + { 26000000, 1, "a" }, + { 27000000, 1, "a" }, + { 28000000, 1, "a" }, + { 29000000, 1, "a" }, + { 30000000, 1, "a" }, + { 31000000, 1, "a" }, + { 32000000, 1, "a" }, + { 33000000, 1, "a" }, + { 34000000, 1, "a" }, + { 35000000, 1, "a" }, + { 36000000, 1, "a" }, + { 37000000, 1, "a" }, + { 38000000, 1, "a" }, + { 39000000, 1, "a" }, + { 40000000, 1, "a" }, + { 41000000, 1, "a" }, + { 42000000, 1, "a" }, + { 43000000, 1, "a" }, + { 44000000, 1, "a" }, + { 45000000, 1, "a" }, + { 46000000, 1, "a" }, + { 47000000, 1, "a" }, + { 48000000, 1, "a" }, + { 49000000, 1, "a" }, + { 50000000, 1, "a" }, + { 51000000, 1, "a" }, + { 52000000, 1, "a" }, + { 53000000, 1, "a" }, + { 54000000, 1, "a" }, + { 55000000, 1, "a" }, + { 56000000, 1, "a" }, + { 57000000, 1, "a" }, + { 58000000, 1, "a" }, + { 59000000, 1, "a" }, + { 60000000, 1, "a" }, + { 61000000, 1, "a" }, + { 62000000, 1, "a" }, + { 63000000, 1, "a" }, + { 64000000, 1, "a" }, + { 65000000, 1, "a" }, + { 66000000, 1, "a" }, + { 67000000, 1, "a" }, + { 68000000, 1, "a" }, + { 69000000, 1, "a" }, + { 70000000, 1, "a" }, + { 71000000, 1, "a" }, + { 72000000, 1, "a" }, + { 73000000, 1, "a" }, + { 74000000, 1, "a" }, + { 75000000, 1, "a" }, + { 76000000, 1, "a" }, + { 77000000, 1, "a" }, + { 78000000, 1, "a" }, + { 79000000, 1, "a" }, + { 80000000, 1, "a" }, + { 81000000, 1, "a" }, + { 82000000, 1, "a" }, + { 83000000, 1, "a" }, + { 84000000, 1, "a" }, + { 85000000, 1, "a" }, + { 86000000, 1, "a" }, + { 87000000, 1, "a" }, + { 88000000, 1, "a" }, + { 89000000, 1, "a" }, + { 90000000, 1, "a" }, + { 91000000, 1, "a" }, + { 92000000, 1, "a" }, + { 93000000, 1, "a" }, + { 94000000, 1, "a" }, + { 95000000, 1, "a" }, + { 96000000, 1, "a" }, + { 97000000, 1, "a" }, + { 98000000, 1, "a" }, + { 99000000, 1, "a" }, + { 99000001, 0, NULL } +}; + +struct contents archive_contents_nonsparse[] = { + { 0, 1, "a" }, + { 1, 0, NULL } +}; /* - * Each of the following is an archive containing the following - * entries: + * Describe an archive with three entries: * * File 1: named "sparse" * * a length of 3145728 bytes (3MiB) * * a single 'a' byte at offset 1000000 * * a single 'a' byte at offset 2000000 - * File 2: named 'non-sparse' + * File 2: named "sparse2" + * * a single 'a' byte at offset 1,000,000, 2,000,000, ..., 99,000,000 + * * length of 99,000,001 + * File 3: named 'non-sparse' * * length of 1 byte * * contains a single byte 'a' */ -static struct contents { - off_t o; - size_t s; - char *d; -} archive_contents[] = { - { 1000000, 1, "a" }, - { 2000000, 1, "a" }, - { 3145728, 0, NULL } +struct archive_contents { + const char *filename; + struct contents *contents; +} files[] = { + { "sparse", archive_contents_sparse }, + { "sparse2", archive_contents_sparse2 }, + { "non-sparse", archive_contents_nonsparse }, + { NULL, NULL } }; -/* Old GNU tar sparse format. */ -static unsigned char archive_old[] = { -31,139,8,0,215,'[',190,'F',0,3,237,213,223,10,130,'0',20,199,241,'=',202, -'^',' ',216,'q',211,'=','H','O',224,'E',23,']','d',225,236,253,243,'d','i', -'P','(',132,'C',162,239,7,'d',219,241,'/',7,253,153,'.','u',155,14,'&','+', -215,171,'B',208,'Q','b',233,'^','G','U',244,155,17,'W',149,'1',148,193,'i', -']','b',244,222,216,'}',222,199,26,'\\','S','W',183,214,154,238,'x',154,'=', -'n','i',255,215,180,5,190,10,162,']','x','t','d',156,247,']','*','>',212, -'%',12,235,'g',253,'>',159,187,193,'x',194,234,234,245,'/',137,'?',194,251, -179,173,230,220,236,'R',230,127,192,'B',254,235,'r',202,255,168,249,'/',133, -23,'c','3',196,213,187,205,243,127,'[','|',127,0,0,0,0,0,0,0,0,0,0,0,252, -190,27,'H',10,',',253,0,'(',0,0}; + +/* Old GNU tar sparse format, as created by gtar 1.13 */ +static unsigned char archive_old_gtar_1_13[] = { +31,139,8,0,30,'%',193,'F',0,3,237,215,'K','n',219,'H',20,133,'a',246,'N', +180,129,6,170,'n',189,22,210,'+',208,' ',131,12,146,14,',','g',255,'}',201, +192,142,17,29,'(','A',159,24,'l',160,255,207,3,219,'e',193,186,'$',127,241, +'q',251,'r','}',186,'}',216,222,'U',169,165,204,222,183,'R','J',']',163,188, +253,190,139,252,'u',171,'e',206,18,17,189,205,'m','_',')',177,']',254,'z', +223,177,190,249,'z','{',190,'>',']','.',219,243,199,'O',15,'_',247,179,191, +255,'k',251,'.','h',179,231,'>','z',221,'#',175,'?',231,'^',10,177,'^',219, +':',188,172,239,'K',15,223,160,246,'o',175,250,253,211,'_',127,255,191,196, +255,8,253,0,231,185,29,215,255,'x',215,247,'x','x',253,175,'=',218,221,245, +'?','j',31,'\\',255,31,'\\',255,'[','o','j','}','E',233,'?',174,255,'Q',202, +'X','u',212,213,212,'M',194,'~',167,213,'J',31,226,191,197,'\\','e',138,245, +22,163,'/',181,158,27,161,182,162,'G',12,181,21,'}',214,170,182,'"','G',29, +'w','[',177,175,143,'Y',213,156,'3','c','Q','s',206,209,170,154,'s',213,':', +139,'Z',207,157,'-',230,220,227,157,'b',206,154,'{','-',196,156,185,15,218, +20,'s',214,',','=',196,156,'5',223,'s',138,'9','k',180,213,196,156,'5','V', +30,'O',177,190,'G',161,230,'l','+',214,'}',21,175,199,191,246,'V',155,154, +183,207,181,212,188,'#','f','S',243,142,'c',171,239,215,'g','4','U','w',157, +'3','T',221,'G',196,'j',191,230,'f',23,'1','g',228,';','w','1','g',148,172, +'H',204,25,181,198,16,'s','F','~','F','T',191,217,196,'R',253,230,185,'j', +170,'~',143,143,147,154,'3',15,'O','U','s',246,220,0,'5','g',238,132,'P', +'s',246,'5',167,154,'s',180,161,250,141,177,218,'}',191,223,143,127,30,205, +'P',29,31,31,127,'5',239,218,191,212,250,'<','6',227,199,245,150,19,'7','1', +'o','+','3',255,145,'X',175,'Q','U',199,'-',247,210,'}',199,251,233,168,'N', +213,239,'q',154,18,'s',182,204,189,171,'9','s',247,21,'5','g',198,219,213, +156,'=',207,130,'j',206,145,225,169,'9',247,'U','5','g','^',247,'T',191,'/', +167,211,251,245,181,134,154,'3',15,'s','U','s',230,'^',27,15,142,127,223, +247,136,152,'7','?','<','U','u',220,'3','z',213,'q',207,15,180,234,248,'8', +253,139,'y','{',134,'7',197,188,'=','s',12,177,'_',243,206,' ',239,'"',196, +'z',207,'3',134,154,'3','?',133,170,223,'>',242,'D',172,230,28,'#','T',191, +199,'e','J',205,'9','3','/','5','g','~','l',154,154,'s','e','0','b',206,177, +167,'\'',230,28,185,'G','U',191,251,177,'W',253,142,'<',209,171,'~',143,203, +233,131,227,'?',242,196,'t',127,215,176,175,175,'P',247,5,'#','s','Q',247, +5,'#',195,'T',247,5,'#',15,180,234,'8','O',218,']','u',156,135,161,169,142, +143,203,191,154,'s',238,'W',0,181,190,127,137,245,227,'f',232,205,'z',145, +'7','F',248,'%','<',191,195,'A','?','p',208,15,28,244,3,7,253,192,'A','?', +'p',184,253,208,31,28,244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,227,249,252,247,231,'?','o','_', +174,'O',183,15,239,247,30,165,150,'2','{',223,'J',')','u',141,242,246,251, +139,173,150,'9','K','D',244,'6',243,245,'5',127,218,'.',229,253,'F',250,238, +235,237,249,250,'t',185,'l',207,31,'?','=','|',221,207,254,14,0,0,0,0,0,0, +0,255,'1',255,0,178,'s',140,'2',0,240,0,0}; + +/* Old GNU tar sparse format, as created by gtar 1.17 */ +static unsigned char archive_old_gtar_1_17[] = { +31,139,8,0,30,'%',193,'F',0,3,237,215,']','r',19,'G',20,134,'a','e','\'', +218,'@',170,186,'O',255,'-','$','+',208,5,23,'\\','@','(',203,236,'?','g', +134,216,'8',232,139,160,248,'P','M',170,242,'>',20,'%',211,'6',214,153,158, +'W','#',205,245,211,229,233,250,238,244,'P','%',205,222,183,199,186,'F','y', +251,184,137,252,'{',170,'e',206,18,17,189,205,'S','~','w',197,'<',157,255, +'x',236,'X','_','|',190,'>','_',158,206,231,211,243,251,15,'w',127,238,'{', +223,255,'i',219,22,180,217,235,182,11,127,239,200,235,215,185,'K','!',214, +'k',255,242,239,151,245,253,235,'{','O',240,250,31,'~',185,203,175,255,149, +248,31,161,159,'c',']',247,235,127,'<',244,'9',238,'^',255,'k',143,'V',234, +'?',175,255,17,'5',127,156,235,255,191,'^',255,'[',235,'M',173,175,'(',253, +219,245,223,'J',25,171,142,186,182,'m','V',207,158,251,223,135,248,'m','1', +'W',153,'b',189,197,232,'K',173,231,'A',168,163,232,17,'C',29,'E',159,181, +170,163,200,'Q',199,205,'Q','l',235,'c','V','5',231,172,'}',168,'9',231,'h', +'U',205,185,'j',157,'E',173,231,'f',139,'9',243,'a','N','1','g',205,']',11, +'1','g',238,'A',155,'b',206,154,165,135,152,179,230,'s','N','1','g',141,182, +154,152,179,198,202,243,')',214,183,'(',212,156,'m',197,186,173,226,245,252, +215,222,'j','S',243,246,185,150,154,'w',196,'l','j',222,177,31,245,237,250, +140,166,234,174,'s',134,170,'{',143,'X',237,'k',30,'v',17,'s','F','>','s', +23,'s','F',201,138,196,156,'Q','k',12,'1','g',228,'k','D',245,155,'M',',', +213,'o','^',171,166,234,'w',127,'9',169,'9',243,244,'T','5','g',207,3,'P', +'s',230,'&',132,154,179,175,'9',213,156,163,13,213,'o',140,213,'n',251,253, +'z',254,243,'l',134,234,'x',127,249,171,'y',215,246,'G',173,207,253,'0',190, +']','o','9','q',19,243,182,'2',243,23,137,245,26,'U','u',220,'r',151,'n', +';',222,'.','G','u',170,'~',247,203,148,152,179,'e',238,']',205,153,219,'W', +212,156,25,'o','W','s',246,188,10,170,'9','G',134,167,230,220,'V',213,156, +249,190,167,250,'}',185,156,222,174,175,'5',212,156,'y',154,171,154,'3','w', +'m',220,'9',255,'}',219,17,'1','o',190,'x',170,234,184,'g',244,170,227,158, +'/','h',213,241,'~',249,23,243,246,12,'o',138,'y','{',230,24,'b','_',243, +147,'A','~',138,16,235,'=',175,24,'j',206,'|',21,170,'~',251,200,11,177,154, +'s',140,'P',253,238,'o','S','j',206,153,'y',169,'9',243,'e',211,212,156,'+', +131,17,'s',142,'-','=','1',231,200,29,'U',253,'n',231,'^',245,';',242,'B', +175,250,221,223,'N',239,156,255,145,23,166,219,'O',13,219,250,10,245,185, +'`','d','.',234,'s',193,200,'0',213,231,130,145,'\'','Z','u',156,23,237,174, +':',206,211,208,'T',199,251,219,191,154,'s','n',239,0,'j','}',251,'#',214, +247,15,'C','o',214,139,252,'`',132,31,194,253,27,28,244,3,7,253,192,'A','?', +'p',208,15,28,244,3,135,219,15,253,193,'A','?','p',208,15,28,244,3,7,253, +192,'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208, +15,28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?',158,143,127, +'~',252,253,250,233,242,'t','}',247,184,231,'(','i',246,190,'=',214,'5',202, +219,199,23,167,'Z',230,',',17,209,219,'<',149,'Z','#',234,233,'\\',30,'7', +210,'W',159,175,207,151,167,243,249,244,252,254,195,221,159,251,222,247,1, +0,0,0,0,0,0,0,248,15,249,11,162,'$',218,227,0,240,0,0}; #if ARCHIVE_VERSION_STAMP >= 1009000 -/* libarchive < 1.9 doesn't support these. */ +/* libarchive < 1.9 does not support this. */ +/* GNU tar "posix" sparse format 0.0, as created by gtar 1.17 */ +static unsigned char archive_0_0_gtar_1_17[] = { +31,139,8,0,31,'%',193,'F',0,3,237,217,207,'n',218,'X',20,199,'q',214,'<', +5,'/','0',228,222,'s','}',255,'x',193,'z',186,26,'u',211,7,240,164,174,20, +205,'$',169,'0',145,'2',243,244,'5','%',205,144,200,193,'p',14,141,203,232, +251,217,'P','A',14,'8','9',191,'[',253,',',150,'W',31,155,199,15,'m',243, +185,']','w',203,232,156,148,171,238,'k',179,238,218,217,249,184,'^',170,170, +237,163,207,209,237,'?','~','W','9',153,'y',151,146,19,145,'*',228,153,243, +161,'J','2','[','<',158,241,26,222,244,208,'m',154,'u',127,')',214,247,'y', +250,']',158,31,'/',132,228,197,239,127,'|','Z',238,'v',190,236,'n',254,'m', +'W',193,'W','1','K',153,'K',218,127,233,238,225,246,207,191,239,175,255,234, +'V','a','.','e',255,149,251,'/','_',186,'v',179,170,'{','!',205,'_',190,225, +'v',234,159,'M',219,173,162,151,185,212,3,'c',190,31,'+','Y','N',158,'{', +190,202,'8','8',231,230,226,22,205,230,230,182,']','y','_',178,'K',193,'e', +191,'}',238,250,229,'s','n','>',245,6,166,'u',246,195,'>','`',228,252,203, +246,184,252,'w',254,'S',127,254,'}',14,'a',182,'x',151,'C',244,227,252,247, +177,'8',248,'s','c',175,'_',232,249,183,'j',166,190,0,'\\','4',242,'3',173, +229,'[',253,'O',206,247,25,135,255,255,247,193,247,157,239,'U',255,139,'1', +210,255,222,195,203,'*',247,189,255,213,245,'n','/',3,149,'l','W',0,235,250, +151,'h',128,178,157,'s',229,244,230,216,207,229,170,':','y',174,234,231,'R', +'q','\'',207,197,237,156,'?',253,239,146,250,185,24,'O',255,187,148,']',2, +'O',159,'S',238,175,30,223,'_','p','C','{','w',227,11,28,30,244,227,27,28, +30,148,241,21,14,15,134,241,29,14,15,'V',227,'K',28,30,'L',227,'[','|','c', +'p','|',141,195,131,'Y',187,199,162,221,'c',173,220,163,'8',229,30,197,'+', +247,'(',162,220,163,'T',202,'=','J',165,220,163,'D',229,30,'%',')',247,'(', +'Y',187,199,162,221,'c',173,220,'c','p',202,'=',6,'Q',238,'1',136,'r',143, +'!','(',247,24,'*',229,30,'C','T',238,'1','$',229,30,'C',214,238,177,'(', +247,248,'t',28,'O',191,212,202,')',247,'X',29,209,'o',134,7,143,'(','8',195, +131,'G','4',156,225,193,'#','*',206,240,224,17,29,'g','x',240,136,146,'3', +'<','x','D',203,'y','c','P',187,'G','m',207,137,218,158,19,181,'=','\'','j', +'{','N',212,246,156,168,237,'9','Q',219,'s',162,182,231,'D','m',207,137,218, +158,19,181,'=','\'','i','{','N',210,246,156,164,237,'9','I',219,'s',146,182, +231,'$','m',207,'I',218,158,147,180,'=','\'','i','{','N',210,246,156,172, +237,'9','Y',219,'s',178,182,231,'d','m',207,201,218,158,147,181,'=','\'', +'k','{','N',214,246,156,172,237,'9','E',219,'s',138,182,231,20,'m',207,')', +218,158,'S',180,'=',167,'h','{','N',209,246,156,162,237,'9','E',219,'s',138, +182,231,20,'m',207,169,181,'=',167,214,246,156,'Z',219,'s','j','m',207,169, +181,'=',167,214,246,156,'Z',219,'s','j','m',207,169,'G','z',142,175,3,'_', +174,255,'_',236,150,'{',198,'/','{',6,28,252,254,199,'W',18,156,127,245,253, +191,'8','I','|',255,127,9,248,254,22,22,228,7,22,228,7,22,228,7,22,228,7, +22,228,7,22,214,252,144,'?','X',144,31,'X',144,31,'X',144,31,'X',144,31,'X', +144,31,'X',144,31,'X','p',255,143,')',145,31,'X',144,31,'X',144,31,'X',144, +31,'X',144,31,'X',144,31,'X','p',255,143,')',145,31,'X',144,31,'X',144,31, +'X',144,31,'X',144,31,'X',144,31,'X','p',255,143,')',145,31,'X',144,31,'X', +144,31,'X',144,31,'X',144,31,'X',144,31,'X','p',255,143,')',145,31,'X',144, +31,'X',144,31,'X',144,31,'X',144,31,'X',144,31,'X','p',255,143,')',145,31, +'X',144,31,'X',144,31,'X',144,31,'X',144,31,'X',144,31,'X','p',255,143,')', +145,31,'X',144,31,'X',144,31,'X',144,31,'X',144,31,'X',144,31,'X','p',255, +143,')',145,31,'X',144,31,'X',144,31,'X',144,31,'X',144,31,'X',144,31,'X', +'p',255,143,')',145,31,'X',144,31,'X',144,31,'X',144,31,'X',144,31,'X',144, +31,'X','p',255,143,')',145,31,'X',144,31,'X',144,31,'X',144,31,'X',144,31, +'X',144,31,'X','p',255,143,')',145,31,'X',144,31,'X',144,31,'X',144,31,'X', +144,31,'X',144,31,'X','p',255,143,')',145,31,'X',144,31,'X',144,31,155,229, +213,199,230,241,'C',219,'|','n',215,221,'2',':','\'',229,234,238,254,238, +183,238,'k',179,238,218,'3','}',134,235,165,170,218,'>',250,28,221,254,227, +'N',255,'o',239,'R','r','"','R',133,'<','s',190,146,232,'g',139,199,'3','}', +254,'A',15,221,166,'Y',247,151,'b','}',159,167,'_',229,249,241,'B',136,'[', +'4',155,155,219,'v',229,'}',201,'.',5,151,221,188,127,238,250,245,'s','S', +'_','\'','~',142,179,31,246,1,163,231,223,237,159,255,212,159,127,137,210, +159,255,'w','9','D','?',206,127,31,248,131,'?','7',246,250,133,158,127,0, +0,0,0,0,0,0,0,0,0,0,0,0,192,'e',250,6,'X',180,13,'8',0,24,1,0}; +#endif -/* GNU tar "0.0" posix format, as written by GNU tar 1.15. */ -static unsigned char archive_0_0[] = { -31,139,8,0,155,'X',190,'F',0,3,237,214,209,'N',131,'0',20,6,'`',174,'y',10, -'^','@',214,'s',218,'R',184,224,'Z',175,140,'7','>',0,206,'.','Y','t',155, -'Y','Y','2','}','z','[','u',147,'e','S','4','#','#','l',255,'w',211,164,229, -'4','%','p',224,'O','G','w',213,250,198,'V',143,'v',233,'R',163,'Y',142,220, -'K',181,'t','6',234,144,240,'2',165,194,'H','F',139,230,248,'A',9,142,'H', -'d',218,'(',173,'X',202,'H',144,'T','$',163,'d',221,229,'!','~',178,'r','u', -181,244,'G','9','v',159,175,'{',217,142,3,193,'&',185,190,189,'O','?',31, -'z',234,166,'o',182,148,164,180,225,'<',230,172,185,'4','_',205,30,158,23, -227,'\'','W',202,152,243,230,202,'b','2','q',182,'.',11,'O','f',241,238,134, -161,234,181,182,174,212,196,'1',23,7,202,200,151,229,134,255,']',183,'=', -165,'>','X','\'','b',22,'I','U','O','g',182,'$',202,179,220,20,25,153,'0', -'7','n',206,'i',191,'A',223,'O',160,'_',221,'w',251,190,150,254,231,208,'.', -155,254,23,'a',158,200,'(',17,'%','\'','i',162,'M',255,251,215,226,215,235, -218,214,7,218,255,199,170,250,'>',0,12,26,222,159,'~',165,'{',249,'o',190, -152,'_','u',251,'W','h',203,127,225,155,191,155,255,20,251,'H',136,252,'w', -2,127,'J','I','J',']','x','J',':','_',221,'w',251,190,214,254,23,244,157, -255,'L',200,127,172,'%','!',255,157,2,254,191,0,0,0,0,0,0,0,0,0,0,0,231,231, -29,157,135,'u','Z',0,'(',0,0}; +#if ARCHIVE_VERSION_STAMP >= 1009000 +/* libarchive < 1.9 does not support this. */ +/* GNU tar "posix" sparse format 0.1, as created by gtar 1.17 */ +static unsigned char archive_0_1_gtar_1_17[] = { +31,139,8,0,31,'%',193,'F',0,3,237,215,205,'n',26,'W',24,135,'q',214,'\\', +5,23,224,194,249,'>','3',11,182,'m','V','U',164,170,23,'0','u','f','a','%', +'v',',',198,150,172,'^','}',135,15,'\'',127,187,9,'T','z',137,167,'D',207, +'o',195,4,'l','^','0',207,'!',231,',','W',239,187,167,'w','}',247,161,223, +12,203,236,'\\',244,171,225,190,219,12,253,236,'|',220,168,164,180,189,245, +'5',';',189,221,9,'9',204,188,'+',197,133,16,'R',172,'3',231,'c',202,'u', +182,'x',':',227,'k',248,174,199,225,161,219,140,'/',197,250,'<',135,247,242, +229,246,'B',132,186,248,237,247,'?',151,251,207,'|','9',220,252,221,175,163, +31,255,250,161,153,135,162,15,221,'=',222,254,245,233,243,245,199,'a',29, +'_','?',210,221,246,235,253,245,'<','{','}',228,182,187,'_',183,163,'X',174, +178,15,'W','~',188,'l','j',216,']',31,134,'\\',185,'y','p',139,238,225,'f', +'|',10,239,155,234,'J','t',213,'o',239,187,'~','y',159,155,'O',253,151,250, +'9','-','W',227,231,245,199,238,227,250,245,230,'S',255,'C',190,2,'N',172, +255,176,']','.','_',215,127,25,215,127,246,169,204,22,'o',178,136,158,215, +255,152,219,209,159,';',245,248,133,174,127,171,'n',234,23,128,139,'F','?', +211,'Z','~','o',255,23,206,'7',227,212,247,127,241,178,255,'K','n',187,255, +203,'1',179,255,'{',11,161,249,215,254,175,'m','w',239,'`',220,133,213,'o', +'o',0,219,246,245,'C','_','w',128,'a',238,'C','[',254,227,'&','0','l',175, +']',179,223,16,142,215,'5',165,221,'u',26,175,'K',227,'v',215,'y','{',237, +247,191,'[',198,235,156,247,191,219,236,255,206,251,'k','y',254,'V',158,223, +';',25,224,189,'L',240,'A','F',248,'(','3','|',146,'!',190,200,20,'_',244, +'m','T',157,211,232,156,'V',230,4,'\'','s',130,151,'9','!',200,156,144,'d', +'N','H','2','\'','d',253,'{',21,153,19,170,206,'i','t','N','+','s',162,147, +'9','1',200,156,24,'d','N',140,186,'9','O',250,193,'d',153,19,139,204,137, +'U',231,'4','2',231,240,'v',220,225,31,'2','\'',233,231,159,'4',128,244,162, +0,'M',' ','i',3,'I','#','H','Z','A',210,12,146,'v',144,181,131,172,29,'d', +237,' ','k',7,'Y',';',200,218,'A',214,14,178,'v',144,181,131,172,29,20,237, +160,'h',7,'E',';','(',218,'A',209,14,138,'v','P',180,131,162,29,20,237,160, +'h',7,'U',';',168,218,'A',213,14,170,'v','P',181,131,170,29,'T',237,160,'j', +7,'U',';','h',180,131,'F',';','h',180,131,'F',';','h',180,131,'F',';','h', +180,131,230,197,151,193,139,'o',3,237,160,209,14,'Z',237,160,213,14,'Z',237, +160,213,14,'Z',237,160,213,14,'Z',237,160,213,14,218,231,14,'|',27,255,231, +231,219,'c',231,191,'s','m',1,142,254,255,239,'S',136,206,191,'>',255,133, +228,'9',255,']',2,246,239,176,160,31,'X',208,15,',',232,7,22,244,3,11,250, +129,133,181,31,250,131,5,253,192,130,'~','`','A','?',176,160,31,'X',208,15, +',',232,7,22,156,255,'1','%',250,129,5,253,192,130,'~','`','A','?',176,160, +31,'X',208,15,',','8',255,'c','J',244,3,11,250,129,5,253,192,130,'~','`', +'A','?',176,160,31,'X','p',254,199,148,232,7,22,244,3,11,250,129,5,253,192, +130,'~','`','A','?',176,224,252,143,')',209,15,',',232,7,22,244,3,11,250, +129,5,253,192,130,'~','`',193,249,31,'S',162,31,'X',208,15,',',232,7,22,244, +3,11,250,129,5,253,192,130,243,'?',166,'D','?',176,160,31,'X',208,15,',', +232,7,22,244,3,11,250,129,5,231,127,'L',137,'~','`','A','?',176,160,31,'X', +208,15,',',232,7,22,244,3,11,206,255,152,18,253,192,130,'~','`','A','?',176, +160,31,'X',208,15,',',232,7,22,156,255,'1','%',250,129,5,253,192,130,'~', +'`','A','?',176,160,31,'X',208,15,',','8',255,'c','J',244,3,11,250,129,5, +253,192,130,'~','`','A','?',176,160,31,'X','p',254,199,148,232,7,22,244,3, +11,250,177,'Y',174,222,'w','O',239,250,238,'C',191,25,150,217,185,232,'W', +'w',159,239,'~',25,238,187,205,208,159,'i',134,27,149,148,182,183,190,'f', +167,183,'{',227,181,'w',165,184,16,'B','J',227,253,'>',133,152,'g',139,167, +'3',205,'?',234,'q','x',232,'6',227,'K',177,'>',207,225,173,'|',185,189,16, +193,'-',186,135,155,219,'~',237,'}','S',']',137,174,186,249,'x',223,245,235, >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Aug 22 06:28:05 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E6B8C16A420; Wed, 22 Aug 2007 06:28:04 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC63116A418 for ; Wed, 22 Aug 2007 06:28:04 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9D4CB13C478 for ; Wed, 22 Aug 2007 06:28:04 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7M6S44b057626 for ; Wed, 22 Aug 2007 06:28:04 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7M6S4Zd057623 for perforce@freebsd.org; Wed, 22 Aug 2007 06:28:04 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Wed, 22 Aug 2007 06:28:04 GMT Message-Id: <200708220628.l7M6S4Zd057623@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 125539 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 06:28:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=125539 Change 125539 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/22 06:27:59 Test case for sysvshm for biba also Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/shmtest.c#3 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/sysvshm/00.t#2 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/shmtest.c#3 (text+ko) ==== @@ -377,7 +377,7 @@ if ((shm_buf = shmat(shmid, NULL, SHM_RDONLY)) == (void *) -1) err(1, "receiver: shmat"); - *(char *)shm_buf = 1; /*can't write*/ +// *(char *)shm_buf = 1; /*can't write*/ if (strcmp((const char *)shm_buf, m_str) != 0) err(1, "receiver: data isn't correct"); ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/sysvshm/00.t#2 (text+ko) ==== @@ -7,7 +7,7 @@ dir=`dirname $0` . ${dir}/../misc.sh -echo "1..1" +echo "1..2" #turn off all the switches @@ -34,18 +34,24 @@ ############################################################# t=`sysctl security.mac.mls.enabled=1` echo "enforcing mac/mls!" + t=`sysctl security.mac.biba.enabled=1` + echo "enforcing mac/biba!" t=`sysctl security.mac.mls.revocation_enabled=1` + t=`sysctl security.mac.biba.revocation_enabled=1` echo "enabling revoking" -#case 1: check mls no read low +#case 1: check mls no read high bizarretestexpect ${shmtest} "" "" -c "mls/5" -s "mls/5" \ -r "mls/9" -f ${mactest_conf} -#case 2: +#case 2: check biba no read low + bizarretestexpect ${shmtest} "" "" -c "biba/5" -s "biba/5" \ + -r "biba/3" -f ${mactest_conf} #cleanup: t=`sysctl security.mac.mls.enabled=0` echo "disabling mac/mls!" - + t=`sysctl security.mac.biba.enabled=0` + echo "disabling mac/biba!" rm ${mactest_conf} fi From owner-p4-projects@FreeBSD.ORG Wed Aug 22 18:17:37 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D81C16A421; Wed, 22 Aug 2007 18:17:37 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 056AC16A417 for ; Wed, 22 Aug 2007 18:17:37 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outF.internet-mail-service.net (outF.internet-mail-service.net [216.240.47.229]) by mx1.freebsd.org (Postfix) with ESMTP id DF06613C459 for ; Wed, 22 Aug 2007 18:17:35 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Wed, 22 Aug 2007 11:17:29 -0700 Received: from julian-mac.elischer.org (fibhost-122-174.fibernet.bacs-net.hu [85.66.122.174]) by idiom.com (Postfix) with ESMTP id E8BA31260F7; Wed, 22 Aug 2007 11:17:28 -0700 (PDT) Message-ID: <46CC7DB4.3020103@elischer.org> Date: Wed, 22 Aug 2007 11:17:24 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Marko Zec References: <200708212351.l7LNpi6Q006480@repoman.freebsd.org> In-Reply-To: <200708212351.l7LNpi6Q006480@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Perforce Change Reviews Subject: Re: PERFORCE change 125520 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 18:17:37 -0000 Marko Zec wrote: > http://perforce.freebsd.org/chv.cgi?CH=125520 > > Change 125520 by zec@zec_tpx32 on 2007/08/21 23:51:39 > > Given that ng_pipe nodes can be connected into arbitrary > topologies, and therefore it is possible for ngp_rcvdata() > to be recursively called from a single thread, it is > necessary to explicitly allow for the ng_pipe_giant mutex > to be recursively acquireable. > > Affected files ... > > .. //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 edit > > Differences ... > > ==== //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 (text+ko) ==== > > @@ -1028,7 +1028,7 @@ > error = EEXIST; > else { > mtx_init(&ng_pipe_giant, "ng_pipe_giant", NULL, > - MTX_DEF); > + MTX_DEF | MTX_RECURSE); > LIST_INIT(&node_head); > LIST_INIT(&hook_head); > ds_handle = timeout((timeout_t *) &pipe_scheduler, OR make it queue data on entry.. p.s I'm only acoupel hundred km to your north east at Siofok.. considered making a run south west to Zagreb but can't work it onto the schedule. From owner-p4-projects@FreeBSD.ORG Wed Aug 22 22:32:09 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BA1FB16A41A; Wed, 22 Aug 2007 22:32:09 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E91616A418 for ; Wed, 22 Aug 2007 22:32:09 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3D19E13C457 for ; Wed, 22 Aug 2007 22:32:09 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7MMW8EH090880 for ; Wed, 22 Aug 2007 22:32:09 GMT (envelope-from ivoras@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7MMW8TN090877 for perforce@freebsd.org; Wed, 22 Aug 2007 22:32:08 GMT (envelope-from ivoras@FreeBSD.org) Date: Wed, 22 Aug 2007 22:32:08 GMT Message-Id: <200708222232.l7MMW8TN090877@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ivoras@FreeBSD.org using -f From: Ivan Voras To: Perforce Change Reviews Cc: Subject: PERFORCE change 125568 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 22:32:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=125568 Change 125568 by ivoras@ivoras_finstall on 2007/08/22 22:31:40 Started work on post-install system configuration Affected files ... .. //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#13 edit .. //depot/projects/soc2007/ivoras_finstall/installer/glade/createuser.glade#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/glade/hostroot.glade#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/text/createuser.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/text/hostroot.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/pybackend/freebsd.py#8 edit .. //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#11 edit Differences ... ==== //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#13 (text+ko) ==== @@ -23,7 +23,7 @@ # finstall Installer import os,sys,time -import logging +import logging, base64, random from types import MethodType from xmlrpclib import ServerProxy import gobject, gtk, gtk.gdk, gtk.glade @@ -45,7 +45,13 @@ { "tile" : "nparts" }, { "tile" : "ndefaultfs" }, { "tile" : "nverify" }, - { "tile" : "ninstall", "glade" : "installprogress.glade" } + { "tile" : "ninstall", "glade" : "installprogress.glade" }, + { "tile" : "hostroot" }, + { "tile" : "createuser" }, + { "tile" : "netconf" }, + { "tile" : "x11conf" }, + { "tile" : "soundconf" }, + { "tile" : "nfinish" } ] @@ -93,7 +99,7 @@ if "on_load" in self.tile_handlers: try: if not self.tile_handlers["on_load"](): - logging.error("On_Load refused by %s, but it's not implemented" % tile_name) + logging.error("On_Load refused by %s, but it's ignored (not implemented yet)" % tile_name) except: logging.exception("Error executing on_load handler for %s" % tile_name) @@ -317,8 +323,6 @@ /var /home and a symlink from /usr/ports to /usr/local/ports. - We'll not use the traditional BSD layout of bsdlabels (a=root, b=swap), except - for the unfortunately special "c" label. """ if self["radio_ufs"].get_active(): @@ -359,7 +363,7 @@ # Calculate the partitioning scheme var_size = min(2048, int(self.trackdata["drive_size"] * 0.1)) - usr_size = min(15*1024, int(self.trackdata["drive_size"] * 0.3)) + usr_size = min(10*1024, int(self.trackdata["drive_size"] * 0.5)) if fs in ("UFS+SU", "UFS+GJ", "Ext2"): # "Normal" file systems, unix-like @@ -527,6 +531,7 @@ self.next_progress_advert() self.trackdata["part_job"] = self.server.StartPartitionJob(self.trackdata["new_parts"]) gobject.timeout_add(500, self.part_progress) + return True def add_install_list(self, msg): @@ -559,7 +564,7 @@ self._show_message(result[-1000:], "Error during backend function (part_job)") return False self["progressbar"].set_fraction(float(pcnt) / 100) - if pcnt == 100: + if pcnt == 100 and self.server.QueryIsJobFinished(self.trackdata["part_job"]): result = self.server.QueryJobResult(self.trackdata["part_job"]) self.server.DismantleJob(self.trackdata["part_job"]) del self.trackdata["part_job"] @@ -567,7 +572,7 @@ self.trackdata["install_job"] = self.server.StartInstallJob(self.trackdata["new_parts"]) self["progressbar"].set_fraction(0) self.add_install_list("Installing FreeBSD base system...") - gobject.timeout_add(1000, self.install_progress) + gobject.timeout_add(2000, self.install_progress) self.next_progress_advert() return False return True @@ -582,13 +587,119 @@ self._show_message(result[-1000:], "Error during backend function (install_job)") return False self["progressbar"].set_fraction(float(pcnt) / 100) - if pcnt > 0 and pcnt % 15 == 0: + if pcnt > 0 and pcnt % 25 == 0: + self.next_progress_advert() + if pcnt == 100 and self.server.QueryIsJobFinished(self.trackdata["install_job"]): + self.server.DismantleJob(self.trackdata["install_job"]) + del self.trackdata["install_job"] + # Start a new job - install packages + self.trackdata["pkginstall_job"] = self.server.StartPkgInstallJob(self.trackdata["new_parts"]) + self["progressbar"].set_fraction(0) + self.add_install_list("Installing packages...") + gobject.timeout_add(2000, self.pkginstall_progress) + self.next_progress_advert() + return False + return True + + + def pkginstall_progress(self): + try: + pcnt = self.server.QueryJobProgress(self.trackdata["pkginstall_job"]) + except Exception, e: + code, result = self.server.QueryJobError(self.trackdata["pkginstall_job"]) + print code, result + self._show_message(result[-1000:], "Error during backend function (install_job)") + return False + self["progressbar"].set_fraction(float(pcnt) / 100) + if pcnt > 0 and pcnt % 25 == 0: self.next_progress_advert() - if pcnt == 100: + if pcnt == 100 and self.server.QueryIsJobFinished(self.trackdata["pkginstall_job"]): + self.server.DismantleJob(self.trackdata["pkginstall_job"]) + del self.trackdata["pkginstall_job"] + logging.info("PkgInstall finished") + self._load_tile("hostusername") + return False + return True + + + def hostroot_on_load(self): + self._load_label(self["label2"], "hostroot.txt") + return True + + + def on_button_generate_clicked(self, evt): + seq = "" + for x in xrange(8): + seq += chr(random.randint(0, 255)) + str = base64.b64encode(seq) + password = str[0:8] + self._show_message("Your generated password is:\n\n"+password+"\n\nPLEASE REMEMBER IT. DO NOT WRITE DOWN YOUR PASSWORDS.", "Generated random password") + self["entry_password"].set_text(password) + self["entry_confirm_password"].set_text(password) + + + def hostroot_on_next(self): + if self["entry_password"].get_text() != self["entry_confirm_password"].get_text(): + self._show_message("Passwords do not match! Please enter the same password\nin the Password and Confirm password fields", "Password mismatch") + return False + code, result = self.server.SetHostName(self["entry_hostname"].get_text()) + if code != 0: + self._show_message(result, "Error") + return False + code, result = self.server.SetUserPassword("root", self["entry_password"].get_text()) + return True + + + def createuser_on_load(self): + self._load_label(self["label2"], "createuser.txt") + return True + + + def createuser_on_next(self): + if self["entry_password"].get_text() != self["entry_confirm_password"].get_text(): + self._show_message("Passwords do not match! Please enter the same password\nin the Password and Confirm password fields", "Password mismatch") + return False + username = self["entry_username"].get_text() + if username.find(" ") == -1: + self._show_message("Invalid username. No whitespace, please.", "Error") + return False + code, result = self.server.AddUser(username, self["entry_user"].get_text(), self["entry_password"].get_text()) + if code != 0: + self._show_message(result, "Error") return False return True + def netconf_on_load(self): + pass + + + def netconf_on_next(self): + pass + + + def x11conf_on_load(self): + pass + + + def x11conf_on_next(self): + pass + + + def soundconf_on_load(self): + pass + + + def soundconf_on_next(self): + pass + + + def nfinish_on_load(self): + pass + + + def nfinish_on_next(self): + pass my_dir = os.path.split(sys.argv[0])[0] ==== //depot/projects/soc2007/ivoras_finstall/pybackend/freebsd.py#8 (text+ko) ==== @@ -26,6 +26,8 @@ import re import xmldict +live_root = "/" + cmd_sysctl = "/sbin/sysctl" cmd_geom = "/sbin/geom" cmd_mount = "/sbin/mount" @@ -39,6 +41,7 @@ cmd_kldload = "/sbin/kldload" cmd_mke2fs = "/usr/local/sbin/mke2fs" cmd_boot0cfg = "/usr/sbin/boot0cfg" +cmd_pw = "/usr/sbin/pw" file_dmesg = "/var/run/dmesg.boot" @@ -62,15 +65,18 @@ def get_cmd_output(name): + """Executes a command and returns its output.""" return os.popen(name).read().strip() def get_dmesg(): + """Return the contents of the dmesg file.""" global file_dmesg return [x.strip() for x in file(file_dmesg, "r").readlines()] def get_geom_xml(): + """Returns XMLDict object containing the GEOM XML tree.""" return xmldict.buildxmldict(get_sysctl("kern.geom.confxml", True)) @@ -102,6 +108,10 @@ def guess_fs_last_mount(dev, fs_type="UFS"): + """ + Guess where the file system (device) was last mounted on in the + file system tree. + """ global cmd_file if not fs_type in ("UFS2", "UFS"): # For now, we only know how to handle UFS return None @@ -129,6 +139,7 @@ def geom_sector_size(dev): + """Find out sector size of the device.""" xml = get_geom_xml() for cls in xml["mesh"]["class"]: if "geom" in cls: @@ -144,9 +155,13 @@ """ Convenience function that executes the command specified by the cmd argument and returns its exit status and its output from both stdout - and stderr. Optionally, a simple string can be send to the process' - stdin. + and stderr. Optionally, a simple string can be send to the process' stdin. + If the cmd starts with "/" (as it should), it will be prepended with + global variable live_root, which should point to a FreeBSD live tree. """ + global live_root + if cmd.startswith("/") and live_root != "/": + cmd = "%s/%d" % (live_root, cmd) logging.info("Executing %s" %cmd) p = popen2.Popen4(cmd) if input != None: @@ -163,6 +178,9 @@ def create_fdisk_partition(dev, index, offset_sectors, size_sectors, flags=[]): + """ + Create a fdisk partition on the device. + """ global cmd_fdisk, cmd_boot0cfg temp_fname, f = make_temp_script() # Create the script @@ -199,6 +217,7 @@ def create_bsdlabel_partition(dev, index, offset_sectors, size_sectors, flags=[], fs_type="4.2BSD"): + """Create a bsdlabel partition on the device.""" global cmd_bsdlabel, bsdlabel_map output = "" if "init" in flags: @@ -238,7 +257,7 @@ f.write("\n") f.close() code, output = exec_cmd("%s -R %s %s" % (cmd_bsdlabel, dev, script_fname)) - #os.unlink(script_fname) + os.unlink(script_fname) if code != 0: return (code, output, None) # Verify the result & fetch the last_offset @@ -286,6 +305,7 @@ def mount(dev, mount, fs_type, mkdir_mount=True): + """Mounts a file system / device on a directory.""" global cmd_mount if not dev.startswith("/dev/"): dev = "/dev/"+dev @@ -303,9 +323,56 @@ def umount(mount): + """Umounts a mount point""" global cmd_umount return exec_cmd("%s %s" % (cmd_umount, mount)) + +def fstab_line(dev, mount, fs_type): + """Generates a line for the fstab file""" + if fs_type == "ZFS": + return None + if fs_type == "swap": + mount = "none" + opt = "sw" + dump = fpass = 0 + else: + opt = "rw" + if mount == "/": + dump = fpass = 1 + else: + dump = fpass = 2 + if fs_type in ("UFS", "UFS+SU"): + fs_type = "ufs" + elif fs_type == "UFS+GJ": + fs_type = "ufs" + dev = dev + ".journal" + opt += ",async" + elif fs_type == "Ext2": + fs_type = "ext2fs" + + return "%s\t\%s\t%s\t%s\t%s\t%s" % (dev, mount, fs_type, opt, dump, fpass) + + +def chpasswd(user_name, password, etc_dir="/etc"): + """Changes the user's password. The user must exist.""" + global cmd_pw + return exec_cmd("%s -V %s usermod %s -h 0" % (cmd_pw, etc_dir, user_name), password) + + +def useradd(user_name, user, password, shell, groups=[], etc_dir="/etc"): + """Adds a user and sets his default shell and member groups""" + global cmd_pw + guess_root = os.path.split(etc_dir)[0] + if guess_root == "/": + guess_root = "" + guess_home = "%s/home" % guess_root + if len(groups) != 0: + return exec_cmd("%s -V %s useradd %s -m -s %s -G %s -c \"%s\" -b %s" % (cmd_pw, etc_dir, user_name, shell, ",".join(groups), user, guess_home)) + else: + return exec_cmd("%s -V %s useradd %s -m -s %s -c \"%s\" -b %s" % (cmd_pw, etc_dir, user_name, shell, user, guess_home)) + + if __name__ == "__main__": xml = get_geom_xml() for cls in xml["mesh"]["class"]: ==== //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#11 (text+ko) ==== @@ -22,7 +22,7 @@ # SysToolD Engine: implements SysToolD XML-RPC methods import os, sys, shutil -import re +import re, time import logging, warnings from threading import Thread, Lock from StringIO import StringIO @@ -33,8 +33,10 @@ def logexception(func): - """Method call decorator that routes exceptions to the logger - before passing them on""" + """ + Method call decorator that routes exceptions to the logger + before passing them on. + """ def call(*args, **kwds): try: return func(*args, **kwds) @@ -45,8 +47,10 @@ def tolist(e): - """Coalesce argument to list (if the argument is not list, - wrap it in a list of one element).""" + """ + Coalesce argument to list (if the argument is not list, + wrap it in a list of one element). + """ if type(e) == type([]): return e else: @@ -54,11 +58,17 @@ class SysToolJobException(Exception): + """Error in a SysToolJob""" pass class SysToolJob(Thread): - """A generic asynchronous SysTool job""" + """A generic asynchronous SysTool job, with common methods""" + + INSTALL_ROOT = "/dist" + BASE_MAPTREE_FILE = "/install/base.maptree" + USRLOCAL_MAPTREE_FILE = "/install/usrlocal.maptree" + VARDBPKG_MAPTREE_FILE = "/install/vardbpkg.maptree" def __init__(self): Thread.__init__(self) @@ -70,7 +80,93 @@ def _calc_percent(self, i, total): return int((float(i+1) / total) * 100) + def MountPartitions(self, part_spec, install_root): + """ + Mount partitions from part_spec. Returnes a (code, result) tuple. + """ + for part in part_spec: + if part["fs"] == None or part["fs"] == "swap": + continue + if part["mount"] == "/": + mount = install_root + else: + mount = "%s/%s" % (install_root, part["mount"]) + code, result = freebsd.mount(part["name"], mount, part["fs"]) + if code != 0: + return (code, result) + return (0, None) + def UmountPartitions(self, part_spec, install_root, force=False): + """ + Unmount partitions from part_spec. If force parameter is True, errors + from umount are ignored, otherwise, a (code,result) pair is returned. + """ + for part in reversed(part_spec): + if part["fs"] == None or part["fs"] == "swap": + continue + if part["mount"] == "/": + mount = install_root + else: + mount = "%s/%s" % (install_root, part["mount"]) + code, result = freebsd.umount(mount) + if code != 0 and not force: + return (code, result) + return (0, None) + + def InstallFromMapTree(self, maptree_filename, install_root, from_root): + """ + The method will process the records in maptree and copy the files found + there from from_root to install_root. Since this operation normally takes + a long time, the method updates self.percent_complete. + """ + if from_root == "/": + from_root = "" + maptree_size = os.path.getsize(maptree_filename) + f = file(maptree_filename, "r") + for line in f: + self.percent_complete = self._calc_percent(f.tell(), maptree_size) + rec = line.strip().split("|") + rec_file = rec[-1] + dest_file = "%s/%s" % (install_root, rec_file) + src_file = "%s/%s" % (from_root, rec_file) + if rec[0] == "F": + if not os.path.exists(src_file): + logging.info("File not found: "+src_file) + continue + logging.info("copy %s to %s" % (src_file, dest_file)) + shutil.copyfile(src_file, dest_file) + shutil.copystat(src_file, dest_file) + elif rec[0] == "D": + if not os.path.exists(dest_file): + os.mkdir(dest_file) + elif rec[0] == "H": + if os.path.exists(dest_file): + os.unlink(dest_file) + try: + os.link("%s/%s" % (install_root, rec[1]), dest_file) + except: + logging.error("Cannot hardlink '%s/%s' to '%s'" % (from_root, rec[1], dest_file)) + try: + shutil.copyfile("/%s" % rec[1], dest_file) + except: + logging.error("Cannot replace hardlink from '%s/%s' to '%s' with file copy" % (from_root, rec[1], dest_file)) + elif rec[0] == "L": + # symlinks are a special case - they don't need to exist and they can be + # embarrasingly relative + if os.path.exists(dest_file): + if os.path.islink(dest_file): + os.unlink(dest_file) + os.symlink("%s" % rec[1], dest_file) + else: + os.symlink("%s" % rec[1], dest_file) + else: + self.error = 1 + self.result = "Unknown record type: "+line + break + f.close() + + + class PartitionJob(SysToolJob): """ A partitioning SysTool job. This one accept a list of partitions @@ -163,6 +259,15 @@ break if self.result == None: self.result = buf.getvalue() + if self.error == None: + # mount partitions now + install_root = self.INSTALL_ROOT + if not os.path.exists(install_root): + os.mkdir(install_root) + code, result = self.MountPartitions(self.part_spec, install_root) + if code != 0: + self.error = code + self.result = result self.finished = True del self.part_spec @@ -170,104 +275,113 @@ class InstallJob(SysToolJob): """ The install job. The job progress is: - - Mount partitions to a temporary tree - - Parse mtree record and use it as a list of files to install + - Mount partitions from part_spec to the temporary tree + - Parse maptree record and use it as a list of files to install + - Generate /etc/fstab from the part_spec + """ + def __init__(self, part_spec): + SysToolJob.__init__(self) + self.part_spec = part_spec + + def run(self): + install_root = self.INSTALL_ROOT + maptree_filename = self.BASE_MAPTREE_FILE + if not os.path.exists(maptree_filename): + self.error = 1 + self.result = "No "+maptree_filename + self.finished = True + return + try: + self.InstallFromMapTree(maptree_filename, install_root, "/") + except Exception, e: + self.error = 1 + self.result = str(e) + if self.error == None: + # create fstab + f = file("%s/etc/fstab" % install_root, "w+") + f.write("# Generated by finstall on %s\n" % time.strftime("%c")) + f.write("# Device\tMountpoint\tFStype\tOptions\tDump\tPass\n") + for part in self.part_spec: + if part["mount"] != None: + line = freebsd.fstab_line(part["name"], part["mount"], part["fs"]) + if line != None: + f.write("%s\n" % line) + f.close() + + self.finished = True + + +class PkgInstallJob(SysToolJob): + """ + This job simply copies /usr/local and /var/pkg trees to the install + destination tree. Thus, it's not suitable for all types of packages (those + with post-install scripts that do non-trivial stuff) but will work ok + for most. + The main benefit of this is that it's way faster than going through + pkg_create -b + pkg_install sequence. """ def __init__(self, part_spec): SysToolJob.__init__(self) self.part_spec = part_spec def run(self): - install_root = "/dist" - if not os.path.exists(install_root): - os.mkdir(install_root) - buf = StringIO() - # mount partitions - for part in self.part_spec: - if part["fs"] == None or part["fs"] == "swap": - continue - if part["mount"] == "/": - mount = install_root - else: - mount = "%s/%s" % (install_root, part["mount"]) - code, result = freebsd.mount(part["name"], mount, part["fs"]) - buf.write(result) - if code != 0: - self.error = code - self.result = buf.getvalue() - self.finished = True - return - maptree_filename = "/maptree.txt" + install_root = self.INSTALL_ROOT + maptree_filename = self.VARDBPKG_MAPTREE_FILE + if not os.path.exists(maptree_filename): + self.error = 1 + self.result = "No "+maptree_filename + self.finished = True + return + try: + self.InstallFromMapTree(maptree_filename, "%s/var/db/pkg" % install_root, "/var/db/pkg") + except Exception, e: + self.error = 1 + self.result = str(e) + self.finished = True + return + maptree_filename = self.USRLOCAL_MAPTREE_FILE if not os.path.exists(maptree_filename): self.error = 1 self.result = "No "+maptree_filename self.finished = True return - maptree_size = os.path.getsize(maptree_filename) - f = file(maptree_filename, "r") - for line in f: - self.percent_complete = self._calc_percent(f.tell(), maptree_size) - rec = line.strip().split("|") - rec_file = rec[-1] - dest_file = "%s/%s" % (install_root, rec_file) - src_file = "/%s" % rec_file - if rec[0] == "F": - if not os.path.exists(src_file): - logging.info("File not found: "+src_file) - continue - shutil.copyfile(src_file, dest_file) - shutil.copystat(src_file, dest_file) - logging.info("copy %s to %s" % (src_file, dest_file)) - elif rec[0] == "D": - if not os.path.exists(dest_file): - os.mkdir(dest_file) - elif rec[0] == "H": - if os.path.exists(dest_file): - os.unlink(dest_file) - try: - os.link("%s/%s" % (install_root, rec[1]), dest_file) - except: - logging.error("Cannot hardlink '/%s' to '%s'" % (rec[1], dest_file)) - try: - shutil.copyfile("/%s" % rec[1], dest_file) - except: - logging.error("Cannot replace hardlink from '/%s' to '%s' with file copy" % (rec[1], dest_file)) - elif rec[0] == "L": - if os.path.exists(dest_file): - if os.path.islink(dest_file): - os.unlink(dest_file) - os.symlink("/%s" % rec[1], dest_file) - else: - os.symlink("/%s" % rec[1], dest_file) - else: - self.error = 1 - self.result = "Unknown record type: "+line - break - for part in reversed(self.part_spec): - if part["fs"] == None or part["fs"] == "swap": - continue - if part["mount"] == "/": - mount = install_root - else: - mount = "%s/%s" % (install_root, part["mount"]) - code, result = freebsd.umount(mount) - if code != 0: - self.error = 1 - if self.result != None: - self.result += "\n"+result - else: - self.result = result + try: + self.InstallFromMapTree(maptree_filename, "%s/usr/local" % install_root, "/usr/local") + except Exception, e: + self.error = 1 + self.result = str(e) + self.finished = True + return + self.finished = True + + +class PostInstallJob(SysToolJob): + """ + This job finishes the installation - unmounts the temporary tree, etc. + """ + def __init__(self, part_spec, force): + SysToolJob.__init__(self) + self.part_spec = part_spec + self.force = force + + def run(self): + code, result = self.UmountPartitions(self.part_spec, self.INSTALL_ROOT, force) + if code != 0: + self.error = code + self.result = result self.finished = True - + class SysToolEngine: def __init__(self): - self.root_dest = "" # Config file / "new" root, sans final slash + self.root_dest = "" # "new" root, sans final slash self.root_live = "" # Live file system root (for binaries!) self.job_list = [] self.job_list_lock = Lock() warnings.simplefilter('ignore', RuntimeWarning) + self.SetDestRoot("/dist") + self.SetLiveRoot("/") def GetId(self): @@ -281,35 +395,44 @@ def SetDestRoot(self, root_dir): - """Sets internal root directory for installation and config tasks - (so Get/SetConf can be used with alternative root)""" + """ + Sets internal root directory for installation and config tasks + (so Get/SetConf can be used with alternative root) + """ self.root_conf = root_dir + SysToolJob.INSTALL_ROOT = root_dir return True def SetLiveRoot(self, root_dir): """Notifies SysTool Engine where to expect utility binaries.""" self.root_live = root_dir + freebsd.live_root = root_dir return True - def GetConf(self, name): + def GetConf(self, name, default=None): """Returns configuration variable from /etc/rc.conf""" cf = ConfFile("%s/etc/rc.conf" % self.root_dest) - val = cf.GetConf(name, None) - return val + return cf.GetConf(name, default) def SetConf(self, name, value, description): """Sets configuration variable to /etc/rc.conf""" cf = ConfFile("%s/etc/rc.conf" % self.root_dest) - cf.SetConf(name, value, description) - return True + return cf.SetConf(name, value, description) + + + @logexception + def GetShells(self): + """Returns a list of acceptable shells""" + return [x.strip() for x in file("%s/etc/shells" % self.root_dest, "r") if len(x) > 1 and x[0] == "/"] @logexception def GetDrives(self): - """Returns information on drives the kernel knows about. + """ + Returns information on drives the kernel knows about. Examines "kern.drives" sysctl. This is NOT the list of valid GEOM leaves which can be mounted, but a list of found hardware. @@ -323,7 +446,8 @@ "name": "ACME MegaDrive", "mediasize": 300000 # (MB) } - }""" + } + """ drive_list = freebsd.get_sysctl("kern.disks", True).split(" ") dmesg = freebsd.get_dmesg() drive_dict = {} @@ -360,7 +484,8 @@ @logexception def GetDrivePartitions(self, drive): - """Returns a list of leaf partitions created on the drive. + """ + Returns a list of leaf partitions created on the drive. ARGUMENTS: drive : The drive to inspect RETURN VALUE: @@ -377,7 +502,8 @@ "fs_type" : "UFS2", "fs_last_mount", "/usr" } - }""" + } + """ parts = {} used_parts = [] geomxml = freebsd.get_geom_xml() @@ -438,8 +564,10 @@ def GetMountPoints(self): - """Returns a list of dictionaries containing information - about currently mounted file systems""" + """ + Returns a list of dictionaries containing information + about currently mounted file systems + """ raw_mounts = freebsd.get_cmd_output("%s -p" % freebsd.cmd_mount).split("\n") mounts = [] for m in raw_mounts: @@ -461,6 +589,7 @@ physmem = int(freebsd.get_sysctl("hw.realmem")) return int(physmem / (1024*1024)) + # Jobs ####################################################################### @logexception def StartPartitionJob(self, part_spec): @@ -492,6 +621,20 @@ @logexception + def StartPkgInstallJob(self, part_spec): + """ + Starts the install job. Returns an integer job_id. + """ + self.job_list_lock.acquire() + job = PkgInstallJob(part_spec) + self.job_list.append(job) + job_id = len(self.job_list) + job.start() + self.job_list_lock.release() + return job_id + + + @logexception def QueryJobProgress(self, job_id): """ Queries the progress of a job, returns percent complete or None @@ -509,6 +652,18 @@ @logexception + def QueryIsJobFinished(self, job_id): + """ + Queries whether the job has finished. Testing for job progress percent == 100 + is not enough. + """ + self.job_list_lock.acquire() + job = self.job_list[job_id-1] + self.job_list_lock.release() + return job.finished + + + @logexception def QueryJobResult(self, job_id): """ Queries the result of a job, if the job is finished. Returns @@ -545,4 +700,32 @@ self.job_list_lock.release() return True +# System configuration ######################################################## + + @logexception + def SetHostName(self, host_name): + if self.SetConf("hostname", host_name, "Host name"): + return (0, None) + else: + return (1, "Cannot set host name") + + + @logexception + def GetHostName(self): + host_name = self.GetConf("hostname") + if host_name == None: + return "amnesiac" + else: + return host_name + + + @logexception + def SetUserPassword(self, user_name, password): + return freebsd.chpasswd(user_name, password, "%s/etc" % self.root_dest) + + + @logexception + def AddUser(self, user_name, user, password, shell, groups): + return freebsd.useradd(user_name, user, password, shell, groups, "%s/etc" % self.root_dest) + From owner-p4-projects@FreeBSD.ORG Wed Aug 22 22:33:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6E86616A468; Wed, 22 Aug 2007 22:33:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3116F16A420 for ; Wed, 22 Aug 2007 22:33:11 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2152013C457 for ; Wed, 22 Aug 2007 22:33:11 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7MMXBtj091018 for ; Wed, 22 Aug 2007 22:33:11 GMT (envelope-from ivoras@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7MMXAQR091014 for perforce@freebsd.org; Wed, 22 Aug 2007 22:33:10 GMT (envelope-from ivoras@FreeBSD.org) Date: Wed, 22 Aug 2007 22:33:10 GMT Message-Id: <200708222233.l7MMXAQR091014@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ivoras@FreeBSD.org using -f From: Ivan Voras To: Perforce Change Reviews Cc: Subject: PERFORCE change 125569 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 22:33:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=125569 Change 125569 by ivoras@ivoras_finstall on 2007/08/22 22:32:24 Added a "config-only" option, disabled nonimplemented choices Affected files ... .. //depot/projects/soc2007/ivoras_finstall/installer/glade/intro.glade#2 edit Differences ... ==== //depot/projects/soc2007/ivoras_finstall/installer/glade/intro.glade#2 (text+ko) ==== @@ -1,6 +1,6 @@ - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -68,7 +68,8 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 - Novice + Novice (minimum interaction) + 0 True True @@ -79,10 +80,12 @@ True + False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 - Standard + Standard (allows advanced pre-install configuration, including RAID) + 0 True True radio_novice @@ -95,10 +98,12 @@ True + False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 - Expert + Expert (only if you know what you are doing) + 0 True True radio_novice @@ -108,6 +113,24 @@ 2
+ + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + Configuration only (skip install) + 0 + True + True + radio_novice + + + False + False + 3 + + 3 From owner-p4-projects@FreeBSD.ORG Wed Aug 22 22:36:16 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2A28216A41A; Wed, 22 Aug 2007 22:36:16 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C061116A418 for ; Wed, 22 Aug 2007 22:36:15 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B019113C46A for ; Wed, 22 Aug 2007 22:36:15 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7MMaFcq092823 for ; Wed, 22 Aug 2007 22:36:15 GMT (envelope-from ivoras@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7MMaFOf092820 for perforce@freebsd.org; Wed, 22 Aug 2007 22:36:15 GMT (envelope-from ivoras@FreeBSD.org) Date: Wed, 22 Aug 2007 22:36:15 GMT Message-Id: <200708222236.l7MMaFOf092820@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ivoras@FreeBSD.org using -f From: Ivan Voras To: Perforce Change Reviews Cc: Subject: PERFORCE change 125570 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 22:36:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=125570 Change 125570 by ivoras@ivoras_finstall on 2007/08/22 22:35:59 Implement tiles: root password change, user add Affected files ... .. //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#14 edit Differences ... ==== //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#14 (text+ko) ==== @@ -54,6 +54,16 @@ { "tile" : "nfinish" } ] + Steps_Config = [ + { "tile" : "intro" }, # "intro" must appear everywhere + { "tile" : "hostroot" }, + { "tile" : "createuser" }, + { "tile" : "netconf" }, + { "tile" : "x11conf" }, + { "tile" : "soundconf" }, + { "tile" : "nfinish" } + ] + def __init__(self): BaseWin.__init__(self, "mainwin") @@ -62,17 +72,15 @@ self["img_logo"].set_from_file("img/logo.jpg") # img_logo stretches the window vertically, so calling window.set_position() has no affect self._center_window(self.window) - self.step_current = -1 - self.step_next = 0 - self.step_track = MainWin.Steps_Novice - self._load_tile_nr(self.step_next) - self.backtrack = [] + self._load_track(self.Steps_Novice) def __getitem__(self, key): - """Make convenient shortcut to window widgets. This is actually not + """ + Make convenient shortcut to window widgets. This is actually not easy as it seems, since we use different Glade XML files for different - tiles of the wizard dialog.""" + tiles of the wizard dialog. + """ if self.tile_xml: w = self.tile_xml.get_widget(key) if w == None: @@ -83,6 +91,14 @@ return self.xml.get_widget(key) + def _load_track(self, track): + self.step_current = -1 + self.step_next = 0 + self.step_track = track + self._load_tile_nr(self.step_next) + self.backtrack = [] + + def _load_tile(self, tile_name): """Loads a tile by it's name and integrates it in the wizard window""" glade_name = "glade/%s.glade" % tile_name @@ -91,11 +107,11 @@ glade_name = "glade/%s" % t["glade"] self._clear_container(self.xml.get_widget("vbox_container")) self.tile_xml = gtk.glade.XML(glade_name) - self.tile_handlers = self._get_event_handlers(tile_name) - self.tile_xml.signal_autoconnect(self.tile_handlers) w = self.tile_xml.get_widget("vbox_container").get_children()[0] w.reparent(self.xml.get_widget("vbox_container")) self.xml.get_widget("vbox_container").resize_children() + self.tile_handlers = self._get_event_handlers(tile_name) + self.tile_xml.signal_autoconnect(self.tile_handlers) if "on_load" in self.tile_handlers: try: if not self.tile_handlers["on_load"](): @@ -224,11 +240,16 @@ def intro_on_next(self): if self["radio_novice"].get_active(): logging.info("track=Novice") + self._load_track(self.Steps_Novice) pass # The default track is Novice elif self["radio_standard"].get_active(): print "standard" elif self["radio_expert"].get_active(): print "expert" + elif self["radio_config"].get_active(): + logging.info("track=config") + self._load_track(self.Steps_Config) + self.server.SetDestRoot("/") self.trackdata = {} return True @@ -617,17 +638,21 @@ self.server.DismantleJob(self.trackdata["pkginstall_job"]) del self.trackdata["pkginstall_job"] logging.info("PkgInstall finished") - self._load_tile("hostusername") + self["button_cancel"].set_sensitive(True) + self["button_previous"].set_sensitive(True) + self["button_next"].set_sensitive(True) + self._load_tile("hostroot") return False return True def hostroot_on_load(self): self._load_label(self["label2"], "hostroot.txt") + self["entry_hostname"].set_text(self.server.GetHostName()) return True - def on_button_generate_clicked(self, evt): + def hostroot_on_button_generate_password_clicked(self, evt): seq = "" for x in xrange(8): seq += chr(random.randint(0, 255)) @@ -652,6 +677,12 @@ def createuser_on_load(self): self._load_label(self["label2"], "createuser.txt") + shells = self.server.GetShells() + ls = gtk.ListStore(gobject.TYPE_STRING) + for sh in shells: + ls.append([sh]) + self["combo_shell"].set_model(ls) + self["combo_shell"].set_active(1) return True @@ -660,10 +691,15 @@ self._show_message("Passwords do not match! Please enter the same password\nin the Password and Confirm password fields", "Password mismatch") return False username = self["entry_username"].get_text() - if username.find(" ") == -1: + if username.find(" ") != -1: self._show_message("Invalid username. No whitespace, please.", "Error") return False - code, result = self.server.AddUser(username, self["entry_user"].get_text(), self["entry_password"].get_text()) + if self["cb_wheel"].get_active(): + groups = ["wheel"] + else: + groups = [] + shell = self["combo_shell"].get_active_text() + code, result = self.server.AddUser(username, self["entry_user"].get_text(), self["entry_password"].get_text(), shell, groups) if code != 0: self._show_message(result, "Error") return False From owner-p4-projects@FreeBSD.ORG Wed Aug 22 22:39:21 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 16AC816A419; Wed, 22 Aug 2007 22:39:21 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61C8716A417 for ; Wed, 22 Aug 2007 22:39:20 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5245013C45B for ; Wed, 22 Aug 2007 22:39:20 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7MMdKpq092913 for ; Wed, 22 Aug 2007 22:39:20 GMT (envelope-from ivoras@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7MMdKXJ092910 for perforce@freebsd.org; Wed, 22 Aug 2007 22:39:20 GMT (envelope-from ivoras@FreeBSD.org) Date: Wed, 22 Aug 2007 22:39:20 GMT Message-Id: <200708222239.l7MMdKXJ092910@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ivoras@FreeBSD.org using -f From: Ivan Voras To: Perforce Change Reviews Cc: Subject: PERFORCE change 125571 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 22:39:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=125571 Change 125571 by ivoras@ivoras_finstall on 2007/08/22 22:38:42 Make createuser and hostroot tiles nicer, start working on netconf tile. Affected files ... .. //depot/projects/soc2007/ivoras_finstall/installer/glade/createuser.glade#2 edit .. //depot/projects/soc2007/ivoras_finstall/installer/glade/hostroot.glade#2 edit .. //depot/projects/soc2007/ivoras_finstall/installer/glade/netconf.glade#1 add Differences ... ==== //depot/projects/soc2007/ivoras_finstall/installer/glade/createuser.glade#2 (text+ko) ==== ==== //depot/projects/soc2007/ivoras_finstall/installer/glade/hostroot.glade#2 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Thu Aug 23 16:06:05 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7DD3E16A475; Thu, 23 Aug 2007 16:06:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A18016A417 for ; Thu, 23 Aug 2007 16:06:05 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 186C713C442 for ; Thu, 23 Aug 2007 16:06:05 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7NG65TD025600 for ; Thu, 23 Aug 2007 16:06:05 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7NG64uk025597 for perforce@freebsd.org; Thu, 23 Aug 2007 16:06:04 GMT (envelope-from sam@freebsd.org) Date: Thu, 23 Aug 2007 16:06:04 GMT Message-Id: <200708231606.l7NG64uk025597@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 125586 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2007 16:06:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=125586 Change 125586 by sam@sam_ebb on 2007/08/23 16:05:44 checkpoint changes to convert ni_txrate from an index into the rate set to an IEEE rate; amrr is likely broken, untested Affected files ... .. //depot/projects/wifi/sys/dev/ath/ath_rate/amrr/amrr.c#21 edit .. //depot/projects/wifi/sys/dev/ath/ath_rate/onoe/onoe.c#22 edit .. //depot/projects/wifi/sys/dev/ath/ath_rate/sample/sample.c#14 edit .. //depot/projects/wifi/sys/dev/awi/awi.c#18 edit .. //depot/projects/wifi/sys/dev/if_ndis/if_ndis.c#33 edit .. //depot/projects/wifi/sys/dev/ral/rt2560.c#25 edit .. //depot/projects/wifi/sys/dev/usb/if_rum.c#7 edit .. //depot/projects/wifi/sys/dev/usb/if_ural.c#34 edit .. //depot/projects/wifi/sys/dev/wi/if_wi.c#42 edit .. //depot/projects/wifi/sys/net80211/ieee80211.c#56 edit .. //depot/projects/wifi/sys/net80211/ieee80211_amrr.c#6 edit .. //depot/projects/wifi/sys/net80211/ieee80211_amrr.h#3 edit .. //depot/projects/wifi/sys/net80211/ieee80211_node.h#49 edit .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#61 edit .. //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#26 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/ath_rate/amrr/amrr.c#21 (text+ko) ==== @@ -210,7 +210,6 @@ ni->ni_rates.rs_nrates > 0 ? (ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL) / 2 : 0); - ni->ni_txrate = rate; /* * Before associating a node has no rate set setup * so we can't calculate any transmit codes to use. @@ -219,8 +218,8 @@ * lowest hardware rate. */ if (ni->ni_rates.rs_nrates > 0) { - amn->amn_tx_rix0 = sc->sc_rixmap[ - ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL]; + ni->ni_txrate = ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL; + amn->amn_tx_rix0 = sc->sc_rixmap[ni->ni_txrate]; amn->amn_tx_rate0 = rt->info[amn->amn_tx_rix0].rateCode; amn->amn_tx_rate0sp = amn->amn_tx_rate0 | rt->info[amn->amn_tx_rix0].shortPreamble; @@ -387,7 +386,7 @@ { struct ath_softc *sc = arg; struct amrr_node *amn = ATH_NODE_AMRR(ATH_NODE (ni)); - int old_rate; + int new_rate; #define is_success(amn) \ (amn->amn_tx_try1_cnt < (amn->amn_tx_try0_cnt/10)) @@ -395,12 +394,12 @@ (amn->amn_tx_try0_cnt > 10) #define is_failure(amn) \ (amn->amn_tx_try1_cnt > (amn->amn_tx_try0_cnt/3)) -#define is_max_rate(ni) \ -((ni->ni_txrate + 1) >= ni->ni_rates.rs_nrates) -#define is_min_rate(ni) \ -(ni->ni_txrate == 0) +#define is_max_rate(rix, ni) \ +((rix + 1) >= ni->ni_rates.rs_nrates) +#define is_min_rate(rix, ni) \ +(rix == 0) - old_rate = ni->ni_txrate; + rix = sc->sc_rixmap[ni->ni_txrate]; DPRINTF (sc, "cnt0: %d cnt1: %d cnt2: %d cnt3: %d -- threshold: %d\n", amn->amn_tx_try0_cnt, @@ -411,17 +410,17 @@ if (is_success (amn) && is_enough (amn)) { amn->amn_success++; if (amn->amn_success == amn->amn_success_threshold && - !is_max_rate (ni)) { + !is_max_rate (rix, ni)) { amn->amn_recovery = 1; amn->amn_success = 0; - ni->ni_txrate++; - DPRINTF (sc, "increase rate to %d\n", ni->ni_txrate); + rix++; + DPRINTF (sc, "increase rate to %d\n", rix); } else { amn->amn_recovery = 0; } } else if (is_failure (amn)) { amn->amn_success = 0; - if (!is_min_rate (ni)) { + if (!is_min_rate (rix, ni)) { if (amn->amn_recovery) { /* recovery failure. */ amn->amn_success_threshold *= 2; @@ -434,7 +433,7 @@ DPRINTF (sc, "decrease rate normal thr: %d\n", amn->amn_success_threshold); } amn->amn_recovery = 0; - ni->ni_txrate--; + rix--; } else { amn->amn_recovery = 0; } @@ -448,8 +447,9 @@ amn->amn_tx_try3_cnt = 0; amn->amn_tx_failure_cnt = 0; } - if (old_rate != ni->ni_txrate) { - ath_rate_update(sc, ni, ni->ni_txrate); + new_rate = ni->ni_rates.rs_rates[rix] & IEEE80211_RATE_VAL; + if (new_rate != ni->ni_txrate) { + ath_rate_update(sc, ni, new_rate); } } ==== //depot/projects/wifi/sys/dev/ath/ath_rate/onoe/onoe.c#22 (text+ko) ==== @@ -187,7 +187,6 @@ ni->ni_rates.rs_nrates > 0 ? (ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL) / 2 : 0); - ni->ni_txrate = rate; /* * Before associating a node has no rate set setup * so we can't calculate any transmit codes to use. @@ -197,8 +196,8 @@ */ if (ni->ni_rates.rs_nrates == 0) goto done; - on->on_tx_rix0 = sc->sc_rixmap[ - ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL]; + ni->ni_txrate = ni->ni_rates[rate] & IEEE80211_RATE_VAL; + on->on_tx_rix0 = sc->sc_rixmap[ni->ni_txrate]; on->on_tx_rate0 = rt->info[on->on_tx_rix0].rateCode; on->on_tx_rate0sp = on->on_tx_rate0 | @@ -365,7 +364,7 @@ struct ath_softc *sc = arg; struct onoe_node *on = ATH_NODE_ONOE(ATH_NODE(ni)); struct ieee80211_rateset *rs = &ni->ni_rates; - int dir = 0, nrate, enough; + int dir = 0, nrix, nrate, enough; /* * Rate control @@ -392,14 +391,15 @@ on->on_tx_upper, dir); nrate = ni->ni_txrate; + nrix = sc->sc_rixmap[nrate]; switch (dir) { case 0: if (enough && on->on_tx_upper > 0) on->on_tx_upper--; break; case -1: - if (nrate > 0) { - nrate--; + if (nrix > 0) { + nrate = rs->rs_rates[nrix-1] & IEEE80211_RATE_VAL; sc->sc_stats.ast_rate_drop++; } on->on_tx_upper = 0; @@ -409,8 +409,8 @@ if (++on->on_tx_upper < ath_rate_raise_threshold) break; on->on_tx_upper = 0; - if (nrate + 1 < rs->rs_nrates) { - nrate++; + if (nrix + 1 < rs->rs_nrates) { + nrate = rs->rs_rates[nrix+1] & IEEE80211_RATE_VAL; sc->sc_stats.ast_rate_raise++; } break; @@ -419,10 +419,9 @@ if (nrate != ni->ni_txrate) { DPRINTF(sc, "%s: %dM -> %dM (%d ok, %d err, %d retr)\n", __func__, - (rs->rs_rates[ni->ni_txrate] & IEEE80211_RATE_VAL) / 2, - (rs->rs_rates[nrate] & IEEE80211_RATE_VAL) / 2, + ni->ni_ntxrate / 2, nrate / 2, on->on_tx_ok, on->on_tx_err, on->on_tx_retr); - ath_rate_update(sc, ni, nrate); + ath_rate_update(sc, ni, nrix); } else if (enough) on->on_tx_ok = on->on_tx_err = on->on_tx_retr = 0; } ==== //depot/projects/wifi/sys/dev/ath/ath_rate/sample/sample.c#14 (text+ko) ==== @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include @@ -348,7 +348,7 @@ * set the visible txrate for this node * to the rate of small packets */ - an->an_node.ni_txrate = ndx; + an->an_node.ni_txrate = sn->rates[ndx].rate; } } } @@ -723,7 +723,7 @@ DPRINTF(sc, ATH_DEBUG_RATE, "%s\n", ""); /* set the visible bit-rate to the lowest one available */ - ni->ni_txrate = 0; + ni->ni_txrate = ni->ni_rates.rs_rates[0] & IEEE80211_RATE_VAL; sn->num_rates = ni->ni_rates.rs_nrates; for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { @@ -768,9 +768,9 @@ ); if (sn->static_rate_ndx != -1) - ni->ni_txrate = sn->static_rate_ndx; + ni->ni_txrate = sn->rates[sn->static_rate_ndx].rate; else - ni->ni_txrate = sn->current_rate[0]; + ni->ni_txrate = sn->rates[sn->current_rate[0]].rate; #undef RATE } ==== //depot/projects/wifi/sys/dev/awi/awi.c#18 (text+ko) ==== @@ -868,9 +868,7 @@ if ((ifp->if_flags & IFF_DEBUG) && (ifp->if_flags & IFF_LINK2)) ieee80211_dump_pkt(ic, m0->m_data, m0->m_len, - ic->ic_bss->ni_rates. - rs_rates[ic->ic_bss->ni_txrate] & - IEEE80211_RATE_VAL, -1); + ic->ic_bss->ni_rates. ic->ic_bss->ni_txrate, -1); for (m = m0, len = 0; m != NULL; m = m->m_next) { awi_write_bytes(sc, frame + len, mtod(m, u_int8_t *), @@ -878,8 +876,7 @@ len += m->m_len; } m_freem(m0); - rate = (ic->ic_bss->ni_rates.rs_rates[ic->ic_bss->ni_txrate] & - IEEE80211_RATE_VAL) * 5; + rate = ic->ic_bss->ni_txrate * 5; awi_write_1(sc, ntxd + AWI_TXD_STATE, 0); awi_write_4(sc, txd + AWI_TXD_START, frame); awi_write_4(sc, txd + AWI_TXD_NEXT, ntxd); @@ -1094,8 +1091,7 @@ else mode = IEEE80211_MODE_11B; if (ic->ic_state == IEEE80211_S_RUN) { - rate = ic->ic_bss->ni_rates.rs_rates[ic->ic_bss->ni_txrate] & - IEEE80211_RATE_VAL; + rate = ic->ic_bss->ni_txrate; } else { if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) rate = 0; ==== //depot/projects/wifi/sys/dev/if_ndis/if_ndis.c#33 (text+ko) ==== @@ -2568,13 +2568,13 @@ ni = ic->ic_bss; /* calculate rate subtype */ imr->ifm_active |= ieee80211_rate2media(ic, - ni->ni_rates.rs_rates[ni->ni_txrate], ic->ic_curmode); + ni->ni_txrate, ic->ic_curmode); break; case IEEE80211_M_IBSS: ni = ic->ic_bss; /* calculate rate subtype */ imr->ifm_active |= ieee80211_rate2media(ic, - ni->ni_rates.rs_rates[ni->ni_txrate], ic->ic_curmode); + ni->ni_txrate, ic->ic_curmode); imr->ifm_active |= IFM_IEEE80211_ADHOC; break; case IEEE80211_M_AHDEMO: @@ -2697,30 +2697,11 @@ device_printf (sc->ndis_dev, "get link speed failed: %d\n", rval); - if (isset(ic->ic_modecaps, IEEE80211_MODE_11B)) { - ic->ic_bss->ni_rates = ic->ic_sup_rates[IEEE80211_MODE_11B]; - for (i = 0; i < ic->ic_bss->ni_rates.rs_nrates; i++) { - if ((ic->ic_bss->ni_rates.rs_rates[i] & - IEEE80211_RATE_VAL) == arg / 5000) - break; - } - } - - if (i == ic->ic_bss->ni_rates.rs_nrates && - isset(ic->ic_modecaps, IEEE80211_MODE_11G)) { + if (isset(ic->ic_modecaps, IEEE80211_MODE_11G)) ic->ic_bss->ni_rates = ic->ic_sup_rates[IEEE80211_MODE_11G]; - for (i = 0; i < ic->ic_bss->ni_rates.rs_nrates; i++) { - if ((ic->ic_bss->ni_rates.rs_rates[i] & - IEEE80211_RATE_VAL) == arg / 5000) - break; - } - } - - if (i == ic->ic_bss->ni_rates.rs_nrates) - device_printf(sc->ndis_dev, "no matching rate for: %d\n", - arg / 5000); else - ic->ic_bss->ni_txrate = i; + ic->ic_bss->ni_rates = ic->ic_sup_rates[IEEE80211_MODE_11B]; + ic->ic_bss->ni_txrate = arg / 5000; if (ic->ic_caps & IEEE80211_C_PMGT) { len = sizeof(arg); ==== //depot/projects/wifi/sys/dev/ral/rt2560.c#25 (text) ==== @@ -1796,7 +1796,7 @@ rn = (struct rt2560_node *)ni; ni->ni_txrate = ral_rssadapt_choose(&rn->rssadapt, rs, wh, m0->m_pkthdr.len, NULL, 0); - rate = rs->rs_rates[ni->ni_txrate]; + rate = ni->ni_txrate; } rate &= IEEE80211_RATE_VAL; ==== //depot/projects/wifi/sys/dev/usb/if_rum.c#7 (text+ko) ==== @@ -1293,7 +1293,7 @@ if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) rate = ic->ic_fixed_rate; else - rate = ni->ni_rates.rs_rates[ni->ni_txrate]; + rate = ni->ni_txrate; rate &= IEEE80211_RATE_VAL; @@ -2360,7 +2360,7 @@ for (i = ni->ni_rates.rs_nrates - 1; i > 0 && (ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL) > 72; i--); - ni->ni_txrate = i; + ni->ni_txrate = ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL; callout_reset(&sc->amrr_ch, hz, rum_amrr_timeout, sc); } ==== //depot/projects/wifi/sys/dev/usb/if_ural.c#34 (text+ko) ==== @@ -1358,7 +1358,7 @@ if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) rate = ic->ic_fixed_rate; else - rate = ni->ni_rates.rs_rates[ni->ni_txrate]; + rate = ni->ni_txrate; rate &= IEEE80211_RATE_VAL; @@ -2448,7 +2448,7 @@ i > 0 && (ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL) > 72; i--); - ni->ni_txrate = i; + ni->ni_txrate = ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL; callout_reset(&sc->amrr_ch, hz, ural_amrr_timeout, sc); } ==== //depot/projects/wifi/sys/dev/wi/if_wi.c#42 (text+ko) ==== @@ -1014,8 +1014,7 @@ } #if NBPFILTER > 0 if (bpf_peers_present(sc->sc_drvbpf)) { - sc->sc_tx_th.wt_rate = - ni->ni_rates.rs_rates[ni->ni_txrate]; + sc->sc_tx_th.wt_rate = ni->ni_txrate; bpf_mtap2(sc->sc_drvbpf, &sc->sc_tx_th, sc->sc_tx_th_len, m0); } @@ -1132,8 +1131,7 @@ } #if NBPFILTER > 0 if (bpf_peers_present(sc->sc_drvbpf)) { - sc->sc_tx_th.wt_rate = - ni->ni_rates.rs_rates[ni->ni_txrate]; + sc->sc_tx_th.wt_rate = ni->ni_txrate; bpf_mtap2(sc->sc_drvbpf, &sc->sc_tx_th, sc->sc_tx_th_len, m0); } @@ -3153,8 +3151,7 @@ if (ni != NULL) ieee80211_dump_pkt(ni->ni_ic, (u_int8_t *) &wh->wi_whdr, sizeof(wh->wi_whdr), - ni->ni_rates.rs_rates[ni->ni_txrate] & IEEE80211_RATE_VAL, - rssi); + ni->ni_txrate, rssi); printf(" status 0x%x rx_tstamp1 %u rx_tstamp0 0x%u rx_silence %u\n", le16toh(wh->wi_status), le16toh(wh->wi_rx_tstamp1), le16toh(wh->wi_rx_tstamp0), wh->wi_rx_silence); ==== //depot/projects/wifi/sys/net80211/ieee80211.c#56 (text+ko) ==== @@ -944,7 +944,6 @@ { struct ieee80211com *ic; enum ieee80211_phymode mode; - const struct ieee80211_rateset *rs; ic = ieee80211_find_instance(ifp); if (!ic) { @@ -975,11 +974,9 @@ } else if (ic->ic_opmode == IEEE80211_M_STA) { /* * In station mode report the current transmit rate. - * XXX HT rate */ - rs = &ic->ic_bss->ni_rates; imr->ifm_active |= ieee80211_rate2media(ic, - rs->rs_rates[ic->ic_bss->ni_txrate], mode); + ic->ic_bss->ni_txrate, mode); } else imr->ifm_active |= IFM_AUTO; } ==== //depot/projects/wifi/sys/net80211/ieee80211_amrr.c#6 (text+ko) ==== @@ -51,17 +51,22 @@ ((amn)->amn_retrycnt > (amn)->amn_txcnt / 3) #define is_enough(amn) \ ((amn)->amn_txcnt > 10) -#define is_min_rate(ni) \ - ((ni)->ni_txrate == 0) -#define is_max_rate(ni) \ - ((ni)->ni_txrate == (ni)->ni_rates.rs_nrates - 1) -#define increase_rate(ni) \ - ((ni)->ni_txrate++) -#define decrease_rate(ni) \ - ((ni)->ni_txrate--) #define reset_cnt(amn) \ do { (amn)->amn_txcnt = (amn)->amn_retrycnt = 0; } while (0) +static __inline void +increase_rate(struct ieee80211_amrr *amrr, struct ieee80211_node *ni) +{ + int rix = amrr->amrr_rixmap[ni->ni_txrate]; + ni->ni_txrate = ni->ni_rates.rs_rates[rix+1] & IEEE80211_RATE_VAL; +} +static __inline void +decrease_rate(struct ieee80211_amrr *amrr, struct ieee80211_node *ni) +{ + int rix = amrr->amrr_rixmap[ni->ni_txrate]; + ni->ni_txrate = ni->ni_rates.rs_rates[rix-1] & IEEE80211_RATE_VAL; +} + void ieee80211_amrr_init(struct ieee80211_amrr *amrr, struct ieee80211com *ic, int amin, int amax) @@ -73,6 +78,19 @@ } void +ieee80211_amrr_setrates(struct ieee80211_amrr *amrr, + const struct ieee80211_rateset *rs) +{ + int i; + + memset(amrr->amrr_rixmap, 0xff, sizeof(amrr->amrr_rixmap)); + for (i = 0; i < rs->rs_nrates; i++) + amrr->amrr_rixmap[rs->rs_rates[i] & IEEE80211_RATE_VAL] = i; + amrr->amrr_minrate = rs->rs_rates[0] & IEEE80211_RATE_VAL; + amrr->amrr_maxrate = rs->rs_rates[rs->rs_nrates-1] & IEEE80211_RATE_VAL; +} + +void ieee80211_amrr_node_init(struct ieee80211_amrr *amrr, struct ieee80211_amrr_node *amn) { @@ -94,23 +112,20 @@ if (is_success(amn) && is_enough(amn)) { amn->amn_success++; if (amn->amn_success >= amn->amn_success_threshold && - !is_max_rate(ni)) { + ni->ni_txrate != amrr->amrr_maxrate) { amn->amn_recovery = 1; amn->amn_success = 0; - increase_rate(ni); + increase_rate(amrr, ni); IEEE80211_DPRINTF(amrr->amrr_ic, IEEE80211_MSG_RATECTL, - "AMRR increasing rate %d (txcnt=%d " - "retrycnt=%d)\n", - ni->ni_rates.rs_rates[ni->ni_txrate] & - IEEE80211_RATE_VAL, - amn->amn_txcnt, amn->amn_retrycnt); + "AMRR increasing rate %d (txcnt=%d retrycnt=%d)\n", + ni->ni_txrate, amn->amn_txcnt, amn->amn_retrycnt); need_change = 1; } else { amn->amn_recovery = 0; } } else if (is_failure(amn)) { amn->amn_success = 0; - if (!is_min_rate(ni)) { + if (ni->ni_txrate != amrr->amrr_minrate) { if (amn->amn_recovery) { amn->amn_success_threshold *= 2; if (amn->amn_success_threshold > @@ -121,13 +136,10 @@ amn->amn_success_threshold = amrr->amrr_min_success_threshold; } - decrease_rate(ni); + decrease_rate(amrr, ni); IEEE80211_DPRINTF(amrr->amrr_ic, IEEE80211_MSG_RATECTL, - "AMRR decreasing rate %d (txcnt=%d " - "retrycnt=%d)\n", - ni->ni_rates.rs_rates[ni->ni_txrate] & - IEEE80211_RATE_VAL, - amn->amn_txcnt, amn->amn_retrycnt); + "AMRR decreasing rate %d (txcnt=%d retrycnt=%d)\n", + ni->ni_txrate, amn->amn_txcnt, amn->amn_retrycnt); need_change = 1; } amn->amn_recovery = 0; ==== //depot/projects/wifi/sys/net80211/ieee80211_amrr.h#3 (text+ko) ==== @@ -37,6 +37,8 @@ struct ieee80211_amrr { u_int amrr_min_success_threshold; u_int amrr_max_success_threshold; + uint8_t amrr_rixmap[256]; /* IEEE to h/w rate table ix */ + uint8_t amrr_minrate, amrr_maxrate; struct ieee80211com *amrr_ic; }; @@ -56,6 +58,8 @@ void ieee80211_amrr_init(struct ieee80211_amrr *, struct ieee80211com *ic, int, int); +void ieee80211_amrr_setrates(struct ieee80211_amrr *, + const struct ieee80211_rateset *); void ieee80211_amrr_node_init(struct ieee80211_amrr *, struct ieee80211_amrr_node *); void ieee80211_amrr_choose(struct ieee80211_amrr *, struct ieee80211_node *, ==== //depot/projects/wifi/sys/net80211/ieee80211_node.h#49 (text+ko) ==== @@ -169,7 +169,7 @@ int ni_fails; /* failure count to associate */ short ni_inact; /* inactivity mark count */ short ni_inact_reload;/* inactivity reload value */ - int ni_txrate; /* index to ni_rates[] */ + int ni_txrate; /* legacy RATE/MC */ struct ifqueue ni_savedq; /* ps-poll queue */ struct ieee80211_nodestats ni_stats; /* per-node statistics */ }; ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#61 (text+ko) ==== @@ -1311,9 +1311,6 @@ break; case IEEE80211_S_SCAN: /* adhoc/hostap mode */ case IEEE80211_S_ASSOC: /* infra mode */ - KASSERT(ni->ni_txrate < ni->ni_rates.rs_nrates, - ("%s: bogus xmit rate %u setup\n", __func__, - ni->ni_txrate)); #ifdef IEEE80211_DEBUG if (ieee80211_msg_debug(ic)) { if (ic->ic_opmode == IEEE80211_M_STA) @@ -1326,7 +1323,7 @@ ni->ni_esslen); printf(" channel %d start %uMb\n", ieee80211_chan2ieee(ic, ic->ic_curchan), - IEEE80211_RATE2MBS(ni->ni_rates.rs_rates[ni->ni_txrate])); + IEEE80211_RATE2MBS(ni->ni_txrate)); } #endif if (ic->ic_opmode == IEEE80211_M_STA) { ==== //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#26 (text+ko) ==== @@ -1013,7 +1013,7 @@ /* NB: the most up to date rssi is in the node, not the scan cache */ curRssi = ic->ic_node_getrssi(ni); if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) { - curRate = ni->ni_rates.rs_rates[ni->ni_txrate] & IEEE80211_RATE_VAL; + curRate = ni->ni_txrate; IEEE80211_DPRINTF(ic, IEEE80211_MSG_ROAM, "%s: currssi %d currate %u roamrssi %d roamrate %u\n", __func__, curRssi, curRate, roamRssi, roamRate); From owner-p4-projects@FreeBSD.ORG Thu Aug 23 19:27:31 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7536416A469; Thu, 23 Aug 2007 19:27:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C4B116A420 for ; Thu, 23 Aug 2007 19:27:31 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 07E7113C494 for ; Thu, 23 Aug 2007 19:27:31 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7NJRUeE054121 for ; Thu, 23 Aug 2007 19:27:30 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7NJRUuU054118 for perforce@freebsd.org; Thu, 23 Aug 2007 19:27:30 GMT (envelope-from peter@freebsd.org) Date: Thu, 23 Aug 2007 19:27:30 GMT Message-Id: <200708231927.l7NJRUuU054118@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 125593 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2007 19:27:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=125593 Change 125593 by peter@peter_overcee on 2007/08/23 19:27:17 Actually change the PLX register to the good value. Affected files ... .. //depot/projects/hammer/sys/dev/si/si_pci.c#9 edit Differences ... ==== //depot/projects/hammer/sys/dev/si/si_pci.c#9 (text+ko) ==== @@ -106,16 +106,24 @@ } if (pci_get_devid(dev) == 0x200011cb) { + int rid; + struct resource *plx_res; + uint32_t *addr; + uint32_t oldvalue; + /* Perform a PLX control register fixup */ - int rid = PCIR_BAR(0); - plx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &rid, RF_ACTIVE); + rid = PCIR_BAR(0); + plx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); if (plx_res == NULL) { device_printf(dev, "couldn't map plx registers\n"); } else { - uint32_t *maddr; addr = rman_get_virtual(plx_res); - device_printf(dev, "PLX register 0x50: 0x%08x\n", addr[0x50 / 4]); + oldvalue = addr[0x50 / 4]; + if (oldvalue != 0x18260000) { + device_printf(dev, "PLX register 0x50: 0x%08x changed to 0x%08x\n", oldvalue, 0x18260000); + addr[0x50 / 4] = 0x18260000; + } bus_release_resource(dev, SYS_RES_MEMORY, rid, plx_res); } } From owner-p4-projects@FreeBSD.ORG Fri Aug 24 06:24:15 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AE5AC16A418; Fri, 24 Aug 2007 06:24:15 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6136A16A468 for ; Fri, 24 Aug 2007 06:24:15 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4F2C513C465 for ; Fri, 24 Aug 2007 06:24:15 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7O6OFl7037794 for ; Fri, 24 Aug 2007 06:24:15 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7O6OETU037791 for perforce@freebsd.org; Fri, 24 Aug 2007 06:24:14 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Fri, 24 Aug 2007 06:24:14 GMT Message-Id: <200708240624.l7O6OETU037791@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 125607 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 06:24:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=125607 Change 125607 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/24 06:23:15 add test cases for shmctl for IPC_STAT and IPC_SET respectively Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/shmtest.c#4 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/sysvshm/00.t#3 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/shmtest.c#4 (text+ko) ==== @@ -80,6 +80,7 @@ char *shm_buf; int logfd; const char *macconf_file = NULL; +const char *creator_label = NULL; int main(argc, argv) @@ -87,16 +88,17 @@ char *argv[]; { int ch; - const char *creator_label = NULL; const char *sender_label = NULL; const char *receiver_label = NULL; + const char *ipcstat_label = NULL; + const char *ipcset_label = NULL; struct sigaction sa; struct shmid_ds s_ds; sigset_t sigmask; int error; - while ((ch = getopt(argc, argv, "c:f:r:s:")) != -1) { + while ((ch = getopt(argc, argv, "c:f:r:s:t:e:")) != -1) { switch (ch) { case 'c': creator_label = optarg; @@ -110,6 +112,12 @@ case 'r': receiver_label = optarg; break; + case 't': + ipcstat_label = optarg; + break; + case 'e': + ipcset_label = optarg; + break; default: usage(); } @@ -182,34 +190,8 @@ if (waitpid(child_pid, 0, 0) == -1) err(1, "error create"); - /* - * Install and SIGCHLD handler to deal with all possible exit - * conditions of the receiver. - */ - sa.sa_handler = sigchld_handler; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - if (sigaction(SIGCHLD, &sa, NULL) == -1) - err(1, "sigaction SIGCHLD"); - if (sender_label) { - mac_t label; - - if (mac_from_text(&label, sender_label) == -1) { - exit(-1); - } - if (mac_set_proc(label) == -1) - error = errno; - else - error = 0; - if (error){ - printf("error relabelling proc!\n"); - close(logfd); - exit(1); - } - mac_free(label); - } - +/* if ((sender_shmid = shmget(shmkey, pgsize, SHM_W)) == -1){ close(logfd); err(1, "shmget"); @@ -243,10 +225,154 @@ if ((shm_buf = shmat(sender_shmid, NULL, 0)) == (void *) -1) err(1, "sender: shmat"); +*/ + /* * Write the test pattern into the shared memory buffer. */ - strcpy(shm_buf, m_str); + switch ((child_pid = fork())) { + case -1: + err(1, "fork"); + /* NOTREACHED */ + + case 0: + if (sender_label) { + mac_t label; + + if (mac_from_text(&label, sender_label) == -1) { + exit(-1); + } + if (mac_set_proc(label) == -1) + error = errno; + else + error = 0; + if (error){ + printf("error relabelling proc!\n"); + close(logfd); + exit(1); + } + mac_free(label); + } + if ((sender_shmid = shmget(shmkey, pgsize, SHM_W)) == -1){ + close(logfd); + err(1, "shmget"); + exit(1); + } + if ((shm_buf = shmat(sender_shmid, NULL, 0)) == (void *) -1) + err(1, "sender: shmat"); + + strcpy(shm_buf, m_str); + + exit(0); + default: + break; + } + + + if (waitpid(child_pid, 0, 0) == -1) + err(1, "error send"); + + + + /*check for ipcstat */ + switch ((child_pid = fork())) { + case -1: + err(1, "fork"); + /* NOTREACHED */ + + case 0: + if (ipcstat_label) { + mac_t label; + + if (mac_from_text(&label, ipcstat_label) == -1) { + exit(-1); + } + if (mac_set_proc(label) == -1) + error = errno; + else + error = 0; + if (error){ + printf("error relabelling proc!\n"); + close(logfd); + exit(1); + } + mac_free(label); + } + if ((sender_shmid = shmget(shmkey, pgsize, SHM_R)) == -1){ + err(1, "shmget"); + exit(1); + } + + if (shmctl(sender_shmid, IPC_STAT, &s_ds) == -1) { + err(1, "shmctl IPC_STAT"); + exit(1); + } + print_shmid_ds(&s_ds, 0640); + exit(0); + default: + break; + } + + + if (waitpid(child_pid, 0, 0) == -1) + err(1, "error send"); + +/*check for ipc_set */ + switch ((child_pid = fork())) { + case -1: + err(1, "fork"); + /* NOTREACHED */ + + case 0: + if (ipcset_label) { + mac_t label; + + if (mac_from_text(&label, ipcset_label) == -1) { + exit(-1); + } + if (mac_set_proc(label) == -1) + error = errno; + else + error = 0; + if (error){ + printf("error relabelling proc!\n"); + close(logfd); + exit(1); + } + mac_free(label); + } + if ((sender_shmid = shmget(shmkey, pgsize, SHM_R)) == -1){ + err(1, "shmget"); + exit(1); + } + + memset(&s_ds, 0, sizeof(s_ds)); + + if (shmctl(sender_shmid, IPC_SET, &s_ds) == -1) { + err(1, "shmctl IPC_SET"); + exit(1); + } + exit(0); + default: + break; + } + + + if (waitpid(child_pid, 0, 0) == -1) + err(1, "error send"); + + + /* + * Install and SIGCHLD handler to deal with all possible exit + * conditions of the receiver. + */ + sa.sa_handler = sigchld_handler; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + if (sigaction(SIGCHLD, &sa, NULL) == -1) + err(1, "sigaction SIGCHLD"); + + switch ((child_pid = fork())) { case -1: @@ -266,7 +392,6 @@ error = 0; if (error){ printf("error relabelling proc!\n"); - close(logfd); exit(1); } mac_free(label); @@ -324,11 +449,12 @@ * the final stats for the message queue. */ - +/* if (shmctl(sender_shmid, IPC_STAT, &s_ds) == -1) err(1, "shmctl IPC_STAT"); print_shmid_ds(&s_ds, 0600); +*/ exit(0); } @@ -339,7 +465,28 @@ /* * If we're the sender, and it exists, remove the shared memory area. */ - if (child_pid != 0 && sender_shmid != -1) { + int error; + + if (child_pid != 0 /*&& sender_shmid != -1*/) { + if (creator_label) { + mac_t label; + + if (mac_from_text(&label, creator_label) == -1) { + exit(-1); + } + if (mac_set_proc(label) == -1) + error = errno; + else + error = 0; + if (error){ + printf("error relabelling proc!\n"); + close(logfd); + exit(1); + } + mac_free(label); + } + if ((sender_shmid = shmget(shmkey, pgsize, 0)) == -1) + err(1, "shmget"); if (shmctl(sender_shmid, IPC_RMID, NULL) == -1) warn("shmctl IPC_RMID"); close(logfd); @@ -361,7 +508,7 @@ { fprintf(stderr, "usage: -s sender_label -r receiver_label" - " -f macconf_file -c creator_label\n"); + " -f macconf_file -c creator_label -t IPC_STAT label -e IPC_SET label\n"); exit(1); } ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/sysvshm/00.t#3 (text+ko) ==== @@ -7,7 +7,7 @@ dir=`dirname $0` . ${dir}/../misc.sh -echo "1..2" +echo "1..4" #turn off all the switches @@ -39,14 +39,29 @@ t=`sysctl security.mac.mls.revocation_enabled=1` t=`sysctl security.mac.biba.revocation_enabled=1` echo "enabling revoking" +#option -c creator's label, option -s sender's label +#option -r receiver's label, option -t ipc stat label +#options -e ipc set label #case 1: check mls no read high + echo -n "pid = -2 mac_test_check_sysv_shmget:" > ${mactest_conf} + echo "biba/high(low-high),mls/9(low-high) biba/high,mls/5" >> ${mactest_conf} bizarretestexpect ${shmtest} "" "" -c "mls/5" -s "mls/5" \ - -r "mls/9" -f ${mactest_conf} + -r "mls/9" -t "mls/5" -e "mls/5" -f ${mactest_conf} #case 2: check biba no read low + echo -n "pid = -2 mac_test_check_sysv_shmat#SHM_RDONLY:" > ${mactest_conf} + echo "biba/3(low-high),mls/low(low-high) biba/5,mls/low" >> ${mactest_conf} bizarretestexpect ${shmtest} "" "" -c "biba/5" -s "biba/5" \ - -r "biba/3" -f ${mactest_conf} - - + -r "biba/3" -t "biba/5" -e "biba/5" -f ${mactest_conf} +#case 3: ipc stat biba no stat low + echo -n "pid = -2 mac_test_check_sysv_shmctl#IPC_STAT:" > ${mactest_conf} + echo "biba/3(low-high),mls/low(low-high) biba/5,mls/low" >> ${mactest_conf} + bizarretestexpect ${shmtest} "" "" -c "biba/5" -s "biba/5" \ + -r "biba/5" -t "biba/3" -e "biba/5" -f ${mactest_conf} +#case 4: ipc set biba no set high + echo -n "pid = -2 mac_test_check_sysv_shmctl#IPC_SET:" > ${mactest_conf} + echo "biba/3(low-high),mls/low(low-high) biba/5,mls/low" >> ${mactest_conf} + bizarretestexpect ${shmtest} "*shmctl.IPC_SET:.Permission.denied" "" -c "biba/5" -s "biba/5" \ + -r "biba/5" -t "biba/5" -e "biba/3" -f ${mactest_conf} #cleanup: t=`sysctl security.mac.mls.enabled=0` echo "disabling mac/mls!" From owner-p4-projects@FreeBSD.ORG Fri Aug 24 07:51:03 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 437F216A420; Fri, 24 Aug 2007 07:51:03 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17D4116A418 for ; Fri, 24 Aug 2007 07:51:03 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0771313C47E for ; Fri, 24 Aug 2007 07:51:03 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7O7p2co044019 for ; Fri, 24 Aug 2007 07:51:02 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7O7p2Wv044015 for perforce@freebsd.org; Fri, 24 Aug 2007 07:51:02 GMT (envelope-from mharvan@FreeBSD.org) Date: Fri, 24 Aug 2007 07:51:02 GMT Message-Id: <200708240751.l7O7p2Wv044015@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125608 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 07:51:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=125608 Change 125608 by mharvan@mharvan_bike-planet on 2007/08/24 07:50:34 ICMP plugin - initialization was incomplete Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_icmp.c#13 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_icmp.c#13 (text+ko) ==== @@ -234,7 +234,7 @@ plugin_initialize(struct plugin *pl, char *host, char *port) { struct addrinfo hints, *ai; - int n; + int i, n; int new_sysctl = 1; int fd_flags; @@ -243,6 +243,9 @@ conn_init(data->conns); data->conn = data->conns; if (server) { + for (i = 0; i < MAXCLIENTS; i++) + conn_init(&data->conns[i]); + data->conns->id = 0; data->conns->seq = 0; } else { @@ -576,7 +579,8 @@ conn->used = 1; } conn->clid = clid; - memcpy(&conn->addr, &data->conn->addr, data->conn->addrlen); + //memcpy(&conn->addr, &data->conn->addr, data->conn->addrlen); + memcpy(&conn->addr, &data->conn->addr, sizeof(conn->addr)); conn->addrlen = data->conn->addrlen; conn->id = data->conn->id; conn->seq = data->conn->seq; From owner-p4-projects@FreeBSD.ORG Fri Aug 24 11:39:02 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2848116A421; Fri, 24 Aug 2007 11:39:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBED616A417 for ; Fri, 24 Aug 2007 11:39:01 +0000 (UTC) (envelope-from delphij@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D96C113C467 for ; Fri, 24 Aug 2007 11:39:01 +0000 (UTC) (envelope-from delphij@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OBd1IH070984 for ; Fri, 24 Aug 2007 11:39:01 GMT (envelope-from delphij@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OBcjNp070974 for perforce@freebsd.org; Fri, 24 Aug 2007 11:38:45 GMT (envelope-from delphij@freebsd.org) Date: Fri, 24 Aug 2007 11:38:45 GMT Message-Id: <200708241138.l7OBcjNp070974@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to delphij@freebsd.org using -f From: Xin LI To: Perforce Change Reviews Cc: Subject: PERFORCE change 125610 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 11:39:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=125610 Change 125610 by delphij@charlie on 2007/08/24 11:38:42 IFC Affected files ... .. //depot/projects/delphij_fork/etc/namedb/named.conf#3 integrate .. //depot/projects/delphij_fork/etc/rc.d/Makefile#2 integrate .. //depot/projects/delphij_fork/etc/rc.d/lockd#2 integrate .. //depot/projects/delphij_fork/etc/rc.d/nfslocking#2 integrate .. //depot/projects/delphij_fork/etc/rc.d/statd#2 integrate .. //depot/projects/delphij_fork/gnu/lib/libstdc++/Makefile#2 integrate .. //depot/projects/delphij_fork/gnu/usr.bin/gdb/kgdb/trgt_amd64.c#2 integrate .. //depot/projects/delphij_fork/lib/libarchive/archive_read_support_format_tar.c#4 integrate .. //depot/projects/delphij_fork/lib/libarchive/test/test_read_format_gtar_sparse.c#6 integrate .. //depot/projects/delphij_fork/lib/libc/gen/fts-compat.c#1 branch .. //depot/projects/delphij_fork/lib/libc/gen/fts-compat.h#1 branch .. //depot/projects/delphij_fork/lib/libc/sys/Symbol.map#2 integrate .. //depot/projects/delphij_fork/release/Makefile#3 integrate .. //depot/projects/delphij_fork/release/doc/Makefile#2 integrate .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/hardware/article.sgml#3 integrate .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/hardware/common/hw.ent#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/hardware/common/intro.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/readme/article.sgml#2 integrate .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/relnotes/article.sgml#10 integrate .. //depot/projects/delphij_fork/release/doc/share/sgml/release.ent#2 integrate .. //depot/projects/delphij_fork/sbin/reboot/boot_i386.8#2 integrate .. //depot/projects/delphij_fork/share/man/man4/Makefile#4 integrate .. //depot/projects/delphij_fork/share/man/man4/aac.4#2 integrate .. //depot/projects/delphij_fork/share/man/man4/coretemp.4#1 branch .. //depot/projects/delphij_fork/share/man/man4/ichwd.4#1 branch .. //depot/projects/delphij_fork/share/man/man4/nfe.4#2 integrate .. //depot/projects/delphij_fork/share/man/man4/umodem.4#2 integrate .. //depot/projects/delphij_fork/share/man/man5/msdosfs.5#2 integrate .. //depot/projects/delphij_fork/share/man/man7/ports.7#4 integrate .. //depot/projects/delphij_fork/sys/amd64/amd64/cpu_switch.S#3 integrate .. //depot/projects/delphij_fork/sys/amd64/amd64/pmap.c#2 integrate .. //depot/projects/delphij_fork/sys/amd64/amd64/support.S#2 integrate .. //depot/projects/delphij_fork/sys/amd64/include/asm.h#2 integrate .. //depot/projects/delphij_fork/sys/amd64/include/asmacros.h#2 integrate .. //depot/projects/delphij_fork/sys/arm/arm/busdma_machdep.c#3 integrate .. //depot/projects/delphij_fork/sys/boot/arm/at91/boot2/boot2.c#3 integrate .. //depot/projects/delphij_fork/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/delphij_fork/sys/contrib/pf/net/pf.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/aac/aac_pci.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/coretemp/coretemp.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/common/cxgb_t3_hw.c#3 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_adapter.h#5 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_ioctl.h#3 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_main.c#5 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_offload.c#4 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_offload.h#3 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_sge.c#5 integrate .. //depot/projects/delphij_fork/sys/dev/dcons/dcons_os.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/drm/i915_dma.c#3 integrate .. //depot/projects/delphij_fork/sys/dev/isp/isp_freebsd.c#3 integrate .. //depot/projects/delphij_fork/sys/dev/mxge/eth_z8e.h#2 integrate .. //depot/projects/delphij_fork/sys/dev/mxge/ethp_z8e.h#2 integrate .. //depot/projects/delphij_fork/sys/dev/mxge/if_mxge.c#4 integrate .. //depot/projects/delphij_fork/sys/dev/mxge/if_mxge_var.h#3 integrate .. //depot/projects/delphij_fork/sys/dev/mxge/mxge_mcp.h#3 integrate .. //depot/projects/delphij_fork/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#2 integrate .. //depot/projects/delphij_fork/sys/i386/i386/pmap.c#2 integrate .. //depot/projects/delphij_fork/sys/i386/i386/support.s#2 integrate .. //depot/projects/delphij_fork/sys/i386/i386/swtch.s#3 integrate .. //depot/projects/delphij_fork/sys/i386/include/asm.h#2 integrate .. //depot/projects/delphij_fork/sys/i386/include/asmacros.h#2 integrate .. //depot/projects/delphij_fork/sys/kern/kern_cpu.c#2 integrate .. //depot/projects/delphij_fork/sys/kern/kern_switch.c#4 integrate .. //depot/projects/delphij_fork/sys/kern/sched_ule.c#5 integrate .. //depot/projects/delphij_fork/sys/kern/vfs_aio.c#2 integrate .. //depot/projects/delphij_fork/sys/net/bridgestp.c#3 integrate .. //depot/projects/delphij_fork/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#2 integrate .. //depot/projects/delphij_fork/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#2 integrate .. //depot/projects/delphij_fork/sys/netgraph/ng_base.c#2 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp.h#4 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_asconf.c#7 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_auth.c#2 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_constants.h#5 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_header.h#2 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_indata.c#5 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_input.c#8 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_os.h#3 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_os_bsd.h#4 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_output.c#7 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_pcb.c#7 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_pcb.h#6 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_peeloff.c#3 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_structs.h#5 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_sysctl.c#3 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_sysctl.h#3 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_timer.c#6 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_usrreq.c#8 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_var.h#4 integrate .. //depot/projects/delphij_fork/sys/netinet/sctputil.c#7 integrate .. //depot/projects/delphij_fork/sys/netinet/sctputil.h#4 integrate .. //depot/projects/delphij_fork/sys/netinet6/sctp6_usrreq.c#7 integrate .. //depot/projects/delphij_fork/sys/sys/mbuf.h#2 integrate .. //depot/projects/delphij_fork/sys/vm/device_pager.c#4 integrate .. //depot/projects/delphij_fork/sys/vm/phys_pager.c#3 integrate .. //depot/projects/delphij_fork/sys/vm/vm_map.c#2 integrate .. //depot/projects/delphij_fork/sys/vm/vm_map.h#2 integrate .. //depot/projects/delphij_fork/sys/vm/vm_mmap.c#3 integrate .. //depot/projects/delphij_fork/tools/tools/tinybsd/conf/bridge/TINYBSD#2 integrate .. //depot/projects/delphij_fork/tools/tools/tinybsd/conf/default/TINYBSD#2 integrate .. //depot/projects/delphij_fork/tools/tools/tinybsd/conf/firewall/TINYBSD#2 integrate .. //depot/projects/delphij_fork/tools/tools/tinybsd/conf/minimal/TINYBSD#2 integrate .. //depot/projects/delphij_fork/tools/tools/tinybsd/conf/vpn/TINYBSD#2 integrate .. //depot/projects/delphij_fork/tools/tools/tinybsd/conf/wireless/TINYBSD#2 integrate .. //depot/projects/delphij_fork/tools/tools/tinybsd/conf/wrap/TINYBSD#2 integrate .. //depot/projects/delphij_fork/tools/tools/tinybsd/tinybsd#2 integrate .. //depot/projects/delphij_fork/usr.bin/netstat/sctp.c#3 integrate .. //depot/projects/delphij_fork/usr.bin/rpcgen/rpc_main.c#2 integrate .. //depot/projects/delphij_fork/usr.bin/rpcgen/rpc_svcout.c#2 integrate .. //depot/projects/delphij_fork/usr.sbin/pkg_install/add/extract.c#2 integrate Differences ... ==== //depot/projects/delphij_fork/etc/namedb/named.conf#3 (text+ko) ==== @@ -1,4 +1,4 @@ -// $FreeBSD: src/etc/namedb/named.conf,v 1.25 2007/08/02 09:18:53 dougb Exp $ +// $FreeBSD: src/etc/namedb/named.conf,v 1.26 2007/08/17 04:37:02 dougb Exp $ // // Refer to the named.conf(5) and named(8) man pages, and the documentation // in /usr/share/doc/bind9 for more details. @@ -68,6 +68,12 @@ 2. No spurious traffic will be sent from your network to the roots 3. Greater resilience to any potential root server failure/DDoS + On the other hand, this method requires more monitoring than the + hints file to be sure that an unexpected failure mode has not + incapacitated your server. Name servers that are serving a lot + of clients will benefit more from this approach than individual + hosts. Use with caution. + To use this mechanism, uncomment the entries below, and comment the hint zone above. */ @@ -76,9 +82,7 @@ type slave; file "slave/root.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -86,9 +90,7 @@ type slave; file "slave/arpa.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -96,9 +98,7 @@ type slave; file "slave/in-addr.arpa.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -155,9 +155,9 @@ // TEST-NET for Documentation (RFC 3330) zone "2.0.192.in-addr.arpa" { type master; file "master/empty.db"; }; -// Router Benchmark Testing (RFC 2544) -zone "18.192.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "19.192.in-addr.arpa" { type master; file "master/empty.db"; }; +// Router Benchmark Testing (RFC 3330) +zone "18.198.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "19.198.in-addr.arpa" { type master; file "master/empty.db"; }; // IANA Reserved - Old Class E Space zone "240.in-addr.arpa" { type master; file "master/empty.db"; }; ==== //depot/projects/delphij_fork/etc/rc.d/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.81 2007/04/09 19:21:27 pjd Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.82 2007/08/17 07:58:26 mtm Exp $ .include @@ -20,7 +20,7 @@ ipnat ipsec ipxrouted isdnd \ jail \ kadmind kerberos kernel keyserv kldxref kpasswdd \ - ldconfig local localpkg lpd \ + ldconfig local localpkg lockd lpd \ mixer motd mountcritlocal mountcritremote mountlate \ mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \ named natd netif netoptions \ @@ -33,7 +33,7 @@ random rarpd resolv root \ route6d routed routing rpcbind rtadvd rwho \ savecore sdpd securelevel sendmail \ - serial sppp swap1 \ + serial sppp statd swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ ==== //depot/projects/delphij_fork/etc/rc.d/lockd#2 (text+ko) ==== @@ -1,22 +1,28 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/lockd,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm +# $FreeBSD: src/etc/rc.d/lockd,v 1.17 2007/08/18 04:08:53 mtm Exp $ # -# PROVIDE: nfslocking +# PROVIDE: lockd # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr -# Save the (one) commandline argument in case it gets clobbered. -arg=$1 +name="lockd" +rcvar=rpc_lockd_enable +command="/usr/sbin/rpc.${name}" +start_precmd='lockd_precmd' +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' +status_precmd=$stop_precmd -# Either NFS client or server must be enabled and rpcbind(8) must be started. +# Make sure that we are either an NFS client or server, and that we get +# the correct flags from rc.conf(5). # -nfslocking_precmd() +lockd_precmd() { local ret ret=0 @@ -30,34 +36,9 @@ then force_depend rpcbind || ret=1 fi - - if [ $name = "statd" ] - then - rc_flags=${rpc_statd_flags} - elif [ $name = "lockd" ] - then - rc_flags=${rpc_lockd_flags} - fi - + rc_flags=${rpc_lockd_flags} return ${ret} } -start_precmd="nfslocking_precmd" -stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' -status_precmd=$stop_precmd - -# rpc.statd -# -name="statd" -rcvar=rpc_statd_enable -command="/usr/sbin/rpc.${name}" load_rc_config $name -run_rc_command "$arg" - -# rpc.lockd -# -name="lockd" -rcvar=rpc_lockd_enable -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" +run_rc_command $1 ==== //depot/projects/delphij_fork/etc/rc.d/nfslocking#2 (text+ko) ==== @@ -1,13 +1,13 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/nfslocking,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# $FreeBSD: src/etc/rc.d/nfslocking,v 1.15 2007/08/17 07:58:26 mtm Exp $ # # PROVIDE: nfslocking # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON -# KEYWORD: nojail +# KEYWORD: nojail nostart . /etc/rc.subr ==== //depot/projects/delphij_fork/etc/rc.d/statd#2 (text+ko) ==== @@ -1,22 +1,28 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/statd,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp +# $FreeBSD: src/etc/rc.d/statd,v 1.17 2007/08/18 04:08:53 mtm Exp $ # -# PROVIDE: nfslocking +# PROVIDE: statd # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr -# Save the (one) commandline argument in case it gets clobbered. -arg=$1 +name="statd" +rcvar=rpc_statd_enable +command="/usr/sbin/rpc.${name}" +start_precmd='statd_precmd' +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' +status_precmd=$stop_precmd -# Either NFS client or server must be enabled and rpcbind(8) must be started. +# Make sure that we are either an NFS client or server, and that we get +# the correct flags from rc.conf(5). # -nfslocking_precmd() +statd_precmd() { local ret ret=0 @@ -30,34 +36,9 @@ then force_depend rpcbind || ret=1 fi - - if [ $name = "statd" ] - then - rc_flags=${rpc_statd_flags} - elif [ $name = "lockd" ] - then - rc_flags=${rpc_lockd_flags} - fi - + rc_flags=${rpc_statd_flags} return ${ret} } -start_precmd="nfslocking_precmd" -stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' -status_precmd=$stop_precmd - -# rpc.statd -# -name="statd" -rcvar=rpc_statd_enable -command="/usr/sbin/rpc.${name}" load_rc_config $name -run_rc_command "$arg" - -# rpc.lockd -# -name="lockd" -rcvar=rpc_lockd_enable -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" +run_rc_command $1 ==== //depot/projects/delphij_fork/gnu/lib/libstdc++/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.60 2007/05/19 15:41:01 kan Exp $ +# $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.61 2007/08/16 23:02:00 kan Exp $ GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs @@ -143,10 +143,10 @@ stdio_filebuf.h stdio_sync_filebuf.h functional \ hash_map hash_set hash_fun.h hashtable.h iterator \ malloc_allocator.h memory mt_allocator.h new_allocator.h \ - numeric pod_char_traits.h pool_allocator.h rb_tree rope \ - ropeimpl.h slist throw_allocator.h typelist.h type_traits.h \ - rc_string_base.h sso_string_base.h vstring.h vstring.tcc \ - vstring_fwd.h vstring_util.h + numeric numeric_traits.h pod_char_traits.h pool_allocator.h \ + rb_tree rope ropeimpl.h slist throw_allocator.h typelist.h \ + type_traits.h rc_string_base.h sso_string_base.h vstring.h \ + vstring.tcc vstring_fwd.h vstring_util.h EXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;} EXTHDRSDIR= ${CXXINCLUDEDIR}/ext ==== //depot/projects/delphij_fork/gnu/usr.bin/gdb/kgdb/trgt_amd64.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_amd64.c,v 1.7 2006/08/23 19:16:17 jhb Exp $"); +__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_amd64.c,v 1.8 2007/08/22 20:28:13 jhb Exp $"); #include #include @@ -178,6 +178,7 @@ if (pname == NULL) return (NULL); if (strcmp(pname, "calltrap") == 0 || + strcmp(pname, "nmi_calltrap") == 0 || (pname[0] == 'X' && pname[1] != '_')) return (&kgdb_trgt_trapframe_unwind); /* printf("%s: %lx =%s\n", __func__, pc, pname); */ ==== //depot/projects/delphij_fork/lib/libarchive/archive_read_support_format_tar.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.60 2007/07/15 19:13:59 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.61 2007/08/18 21:53:25 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include @@ -72,6 +72,8 @@ #include "archive_private.h" #include "archive_read_private.h" +#define tar_min(a,b) ((a) < (b) ? (a) : (b)) + /* * Layout of POSIX 'ustar' tar header. */ @@ -172,6 +174,7 @@ static char *base64_decode(const wchar_t *, size_t, size_t *); static void gnu_add_sparse_entry(struct tar *, off_t offset, off_t remaining); +static void gnu_clear_sparse_list(struct tar *); static int gnu_sparse_old_read(struct archive_read *, struct tar *, const struct archive_entry_header_gnutar *header); static void gnu_sparse_old_parse(struct tar *, @@ -211,7 +214,8 @@ static int pax_header(struct archive_read *, struct tar *, struct archive_entry *, char *attr); static void pax_time(const wchar_t *, int64_t *sec, long *nanos); -static ssize_t readline(struct archive_read *, struct tar *, const char **); +static ssize_t readline(struct archive_read *, struct tar *, const char **, + ssize_t limit); static int read_body_to_string(struct archive_read *, struct tar *, struct archive_string *, const void *h); static int64_t tar_atol(const char *, unsigned); @@ -263,14 +267,9 @@ archive_read_format_tar_cleanup(struct archive_read *a) { struct tar *tar; - struct sparse_block *p; tar = (struct tar *)(a->format->data); - while (tar->sparse_list != NULL) { - p = tar->sparse_list; - tar->sparse_list = p->next; - free(p); - } + gnu_clear_sparse_list(tar); archive_string_free(&tar->acl_text); archive_string_free(&tar->entry_name); archive_string_free(&tar->entry_linkname); @@ -423,7 +422,6 @@ const char *p; int r; size_t l; - ssize_t size; /* Assign default device/inode values. */ archive_entry_set_dev(entry, 1 + default_dev); /* Don't use zero. */ @@ -446,22 +444,6 @@ r = tar_read_header(a, tar, entry); /* - * Yuck. See comments for gnu_sparse_10_read for why this - * is here and not in _read_data where it "should" go. - */ - if (tar->sparse_gnu_pending - && tar->sparse_gnu_major == 1 - && tar->sparse_gnu_minor == 0) { - tar->sparse_gnu_pending = 0; - /* Read initial sparse map. */ - size = gnu_sparse_10_read(a, tar); - if (size < 0) - return (size); - tar->entry_bytes_remaining -= size; - tar->entry_padding += size; - } - - /* * "non-sparse" files are really just sparse files with * a single block. */ @@ -497,11 +479,12 @@ if (tar->sparse_gnu_pending) { if (tar->sparse_gnu_major == 1 && tar->sparse_gnu_minor == 0) { - /* - * We should parse the sparse data - * here, but have to parse it as part of the - * header because of a bug in GNU tar 1.16.1. - */ + tar->sparse_gnu_pending = 0; + /* Read initial sparse map. */ + bytes_read = gnu_sparse_10_read(a, tar); + tar->entry_bytes_remaining -= bytes_read; + if (bytes_read < 0) + return (bytes_read); } else { *size = 0; *offset = 0; @@ -559,7 +542,6 @@ { off_t bytes_skipped; struct tar* tar; - struct sparse_block *p; tar = (struct tar *)(a->format->data); @@ -577,12 +559,7 @@ tar->entry_padding = 0; /* Free the sparse list. */ - while (tar->sparse_list != NULL) { - p = tar->sparse_list; - tar->sparse_list = p->next; - free(p); - } - tar->sparse_last = NULL; + gnu_clear_sparse_list(tar); return (ARCHIVE_OK); } @@ -1650,6 +1627,19 @@ p->remaining = remaining; } +static void +gnu_clear_sparse_list(struct tar *tar) +{ + struct sparse_block *p; + + while (tar->sparse_list != NULL) { + p = tar->sparse_list; + tar->sparse_list = p->next; + free(p); + } + tar->sparse_last = NULL; +} + /* * GNU tar old-format sparse data. * @@ -1793,7 +1783,7 @@ */ static int64_t gnu_sparse_10_atol(struct archive_read *a, struct tar *tar, - ssize_t *total_read) + ssize_t *remaining) { int64_t l, limit, last_digit_limit; const char *p; @@ -1804,10 +1794,16 @@ limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; - bytes_read = readline(a, tar, &p); - if (bytes_read <= 0) - return (ARCHIVE_FATAL); - *total_read += bytes_read; + /* + * Skip any lines starting with '#'; GNU tar specs + * don't require this, but they should. + */ + do { + bytes_read = readline(a, tar, &p, tar_min(*remaining, 100)); + if (bytes_read <= 0) + return (ARCHIVE_FATAL); + *remaining -= bytes_read; + } while (p[0] == '#'); l = 0; while (bytes_read > 0) { @@ -1828,32 +1824,39 @@ } /* - * Returns number of bytes consumed to read the sparse block data. + * Returns length (in bytes) of the sparse data description + * that was read. */ static ssize_t gnu_sparse_10_read(struct archive_read *a, struct tar *tar) { - ssize_t bytes_read = 0; + ssize_t remaining, bytes_read; int entries; off_t offset, size, to_skip; + /* Clear out the existing sparse list. */ + gnu_clear_sparse_list(tar); + + remaining = tar->entry_bytes_remaining; + /* Parse entries. */ - entries = gnu_sparse_10_atol(a, tar, &bytes_read); + entries = gnu_sparse_10_atol(a, tar, &remaining); if (entries < 0) return (ARCHIVE_FATAL); /* Parse the individual entries. */ while (entries-- > 0) { /* Parse offset/size */ - offset = gnu_sparse_10_atol(a, tar, &bytes_read); + offset = gnu_sparse_10_atol(a, tar, &remaining); if (offset < 0) return (ARCHIVE_FATAL); - size = gnu_sparse_10_atol(a, tar, &bytes_read); + size = gnu_sparse_10_atol(a, tar, &remaining); if (size < 0) return (ARCHIVE_FATAL); /* Add a new sparse entry. */ gnu_add_sparse_entry(tar, offset, size); } /* Skip rest of block... */ + bytes_read = tar->entry_bytes_remaining - remaining; to_skip = 0x1ff & -bytes_read; if (to_skip != (a->decompressor->skip)(a, to_skip)) return (ARCHIVE_FATAL); @@ -2004,7 +2007,8 @@ * when possible. */ static ssize_t -readline(struct archive_read *a, struct tar *tar, const char **start) +readline(struct archive_read *a, struct tar *tar, const char **start, + ssize_t limit) { ssize_t bytes_read; ssize_t total_size = 0; @@ -2020,12 +2024,24 @@ /* If we found '\n' in the read buffer, return pointer to that. */ if (p != NULL) { bytes_read = 1 + ((const char *)p) - s; + if (bytes_read > limit) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Line too long"); + return (ARCHIVE_FATAL); + } (a->decompressor->consume)(a, bytes_read); *start = s; return (bytes_read); } /* Otherwise, we need to accumulate in a line buffer. */ for (;;) { + if (total_size + bytes_read > limit) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Line too long"); + return (ARCHIVE_FATAL); + } if (archive_string_ensure(&tar->line, total_size + bytes_read) == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate working buffer"); ==== //depot/projects/delphij_fork/lib/libarchive/test/test_read_format_gtar_sparse.c#6 (text+ko) ==== @@ -23,107 +23,466 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_gtar_sparse.c,v 1.5 2007/08/12 01:16:19 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_gtar_sparse.c,v 1.6 2007/08/18 21:53:25 kientzle Exp $"); + + +struct contents { + off_t o; + size_t s; + char *d; +}; + +struct contents archive_contents_sparse[] = { + { 1000000, 1, "a" }, + { 2000000, 1, "a" }, + { 3145728, 0, NULL } +}; + +struct contents archive_contents_sparse2[] = { + { 1000000, 1, "a" }, + { 2000000, 1, "a" }, + { 3000000, 1, "a" }, + { 4000000, 1, "a" }, + { 5000000, 1, "a" }, + { 6000000, 1, "a" }, + { 7000000, 1, "a" }, + { 8000000, 1, "a" }, + { 9000000, 1, "a" }, + { 10000000, 1, "a" }, + { 11000000, 1, "a" }, + { 12000000, 1, "a" }, + { 13000000, 1, "a" }, + { 14000000, 1, "a" }, + { 15000000, 1, "a" }, + { 16000000, 1, "a" }, + { 17000000, 1, "a" }, + { 18000000, 1, "a" }, + { 19000000, 1, "a" }, + { 20000000, 1, "a" }, + { 21000000, 1, "a" }, + { 22000000, 1, "a" }, + { 23000000, 1, "a" }, + { 24000000, 1, "a" }, + { 25000000, 1, "a" }, + { 26000000, 1, "a" }, + { 27000000, 1, "a" }, + { 28000000, 1, "a" }, + { 29000000, 1, "a" }, + { 30000000, 1, "a" }, + { 31000000, 1, "a" }, + { 32000000, 1, "a" }, + { 33000000, 1, "a" }, + { 34000000, 1, "a" }, + { 35000000, 1, "a" }, + { 36000000, 1, "a" }, + { 37000000, 1, "a" }, + { 38000000, 1, "a" }, + { 39000000, 1, "a" }, + { 40000000, 1, "a" }, + { 41000000, 1, "a" }, + { 42000000, 1, "a" }, + { 43000000, 1, "a" }, + { 44000000, 1, "a" }, + { 45000000, 1, "a" }, + { 46000000, 1, "a" }, + { 47000000, 1, "a" }, + { 48000000, 1, "a" }, + { 49000000, 1, "a" }, + { 50000000, 1, "a" }, + { 51000000, 1, "a" }, + { 52000000, 1, "a" }, + { 53000000, 1, "a" }, + { 54000000, 1, "a" }, + { 55000000, 1, "a" }, + { 56000000, 1, "a" }, + { 57000000, 1, "a" }, + { 58000000, 1, "a" }, + { 59000000, 1, "a" }, + { 60000000, 1, "a" }, + { 61000000, 1, "a" }, + { 62000000, 1, "a" }, + { 63000000, 1, "a" }, + { 64000000, 1, "a" }, + { 65000000, 1, "a" }, + { 66000000, 1, "a" }, + { 67000000, 1, "a" }, + { 68000000, 1, "a" }, + { 69000000, 1, "a" }, + { 70000000, 1, "a" }, + { 71000000, 1, "a" }, + { 72000000, 1, "a" }, + { 73000000, 1, "a" }, + { 74000000, 1, "a" }, + { 75000000, 1, "a" }, + { 76000000, 1, "a" }, + { 77000000, 1, "a" }, + { 78000000, 1, "a" }, + { 79000000, 1, "a" }, + { 80000000, 1, "a" }, + { 81000000, 1, "a" }, + { 82000000, 1, "a" }, + { 83000000, 1, "a" }, + { 84000000, 1, "a" }, + { 85000000, 1, "a" }, + { 86000000, 1, "a" }, + { 87000000, 1, "a" }, + { 88000000, 1, "a" }, + { 89000000, 1, "a" }, + { 90000000, 1, "a" }, + { 91000000, 1, "a" }, + { 92000000, 1, "a" }, + { 93000000, 1, "a" }, + { 94000000, 1, "a" }, + { 95000000, 1, "a" }, + { 96000000, 1, "a" }, + { 97000000, 1, "a" }, + { 98000000, 1, "a" }, + { 99000000, 1, "a" }, + { 99000001, 0, NULL } +}; + +struct contents archive_contents_nonsparse[] = { + { 0, 1, "a" }, + { 1, 0, NULL } +}; /* - * Each of the following is an archive containing the following - * entries: + * Describe an archive with three entries: * * File 1: named "sparse" * * a length of 3145728 bytes (3MiB) * * a single 'a' byte at offset 1000000 * * a single 'a' byte at offset 2000000 - * File 2: named 'non-sparse' + * File 2: named "sparse2" + * * a single 'a' byte at offset 1,000,000, 2,000,000, ..., 99,000,000 + * * length of 99,000,001 + * File 3: named 'non-sparse' * * length of 1 byte * * contains a single byte 'a' */ -static struct contents { - off_t o; - size_t s; - char *d; -} archive_contents[] = { - { 1000000, 1, "a" }, - { 2000000, 1, "a" }, - { 3145728, 0, NULL } +struct archive_contents { + const char *filename; + struct contents *contents; +} files[] = { + { "sparse", archive_contents_sparse }, + { "sparse2", archive_contents_sparse2 }, + { "non-sparse", archive_contents_nonsparse }, + { NULL, NULL } }; -/* Old GNU tar sparse format. */ -static unsigned char archive_old[] = { -31,139,8,0,215,'[',190,'F',0,3,237,213,223,10,130,'0',20,199,241,'=',202, -'^',' ',216,'q',211,'=','H','O',224,'E',23,']','d',225,236,253,243,'d','i', -'P','(',132,'C',162,239,7,'d',219,241,'/',7,253,153,'.','u',155,14,'&','+', -215,171,'B',208,'Q','b',233,'^','G','U',244,155,17,'W',149,'1',148,193,'i', -']','b',244,222,216,'}',222,199,26,'\\','S','W',183,214,154,238,'x',154,'=', -'n','i',255,215,180,5,190,10,162,']','x','t','d',156,247,']','*','>',212, -'%',12,235,'g',253,'>',159,187,193,'x',194,234,234,245,'/',137,'?',194,251, -179,173,230,220,236,'R',230,127,192,'B',254,235,'r',202,255,168,249,'/',133, -23,'c','3',196,213,187,205,243,127,'[','|',127,0,0,0,0,0,0,0,0,0,0,0,252, -190,27,'H',10,',',253,0,'(',0,0}; + +/* Old GNU tar sparse format, as created by gtar 1.13 */ +static unsigned char archive_old_gtar_1_13[] = { +31,139,8,0,30,'%',193,'F',0,3,237,215,'K','n',219,'H',20,133,'a',246,'N', +180,129,6,170,'n',189,22,210,'+',208,' ',131,12,146,14,',','g',255,'}',201, +192,142,17,29,'(','A',159,24,'l',160,255,207,3,219,'e',193,186,'$',127,241, +'q',251,'r','}',186,'}',216,222,'U',169,165,204,222,183,'R','J',']',163,188, +253,190,139,252,'u',171,'e',206,18,17,189,205,'m','_',')',177,']',254,'z', +223,177,190,249,'z','{',190,'>',']','.',219,243,199,'O',15,'_',247,179,191, +255,'k',251,'.','h',179,231,'>','z',221,'#',175,'?',231,'^',10,177,'^',219, +':',188,172,239,'K',15,223,160,246,'o',175,250,253,211,'_',127,255,191,196, +255,8,253,0,231,185,29,215,255,'x',215,247,'x','x',253,175,'=',218,221,245, +'?','j',31,'\\',255,31,'\\',255,'[','o','j','}','E',233,'?',174,255,'Q',202, +'X','u',212,213,212,'M',194,'~',167,213,'J',31,226,191,197,'\\','e',138,245, +22,163,'/',181,158,27,161,182,162,'G',12,181,21,'}',214,170,182,'"','G',29, +'w','[',177,175,143,'Y',213,156,'3','c','Q','s',206,209,170,154,'s',213,':', +139,'Z',207,157,'-',230,220,227,157,'b',206,154,'{','-',196,156,185,15,218, +20,'s',214,',','=',196,156,'5',223,'s',138,'9','k',180,213,196,156,'5','V', +30,'O',177,190,'G',161,230,'l','+',214,'}',21,175,199,191,246,'V',155,154, +183,207,181,212,188,'#','f','S',243,142,'c',171,239,215,'g','4','U','w',157, +'3','T',221,'G',196,'j',191,230,'f',23,'1','g',228,';','w','1','g',148,172, +'H',204,25,181,198,16,'s','F','~','F','T',191,217,196,'R',253,230,185,'j', +170,'~',143,143,147,154,'3',15,'O','U','s',246,220,0,'5','g',238,132,'P', +'s',246,'5',167,154,'s',180,161,250,141,177,218,'}',191,223,143,127,30,205, +'P',29,31,31,127,'5',239,218,191,212,250,'<','6',227,199,245,150,19,'7','1', +'o','+','3',255,145,'X',175,'Q','U',199,'-',247,210,'}',199,251,233,168,'N', +213,239,'q',154,18,'s',182,204,189,171,'9','s',247,21,'5','g',198,219,213, +156,'=',207,130,'j',206,145,225,169,'9',247,'U','5','g','^',247,'T',191,'/', +167,211,251,245,181,134,154,'3',15,'s','U','s',230,'^',27,15,142,127,223, +247,136,152,'7','?','<','U','u',220,'3','z',213,'q',207,15,180,234,248,'8', +253,139,'y','{',134,'7',197,188,'=','s',12,177,'_',243,206,' ',239,'"',196, +'z',207,'3',134,154,'3','?',133,170,223,'>',242,'D',172,230,28,'#','T',191, +199,'e','J',205,'9','3','/','5','g','~','l',154,154,'s','e','0','b',206,177, +167,'\'',230,28,185,'G','U',191,251,177,'W',253,142,'<',209,171,'~',143,203, +233,131,227,'?',242,196,'t',127,215,176,175,175,'P',247,5,'#','s','Q',247, +5,'#',195,'T',247,5,'#',15,180,234,'8','O',218,']','u',156,135,161,169,142, +143,203,191,154,'s',238,'W',0,181,190,127,137,245,227,'f',232,205,'z',145, +'7','F',248,'%','<',191,195,'A','?','p',208,15,28,244,3,7,253,192,'A','?', +'p',184,253,208,31,28,244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,3,7,253,192,'A','?','p',208,15, +28,'<',255,227,'L',244,3,7,253,192,'A','?','p',208,15,28,244,3,7,253,192, +193,243,'?',206,'D','?','p',208,15,28,244,227,249,252,247,231,'?','o','_', +174,'O',183,15,239,247,30,165,150,'2','{',223,'J',')','u',141,242,246,251, +139,173,150,'9','K','D',244,'6',243,245,'5',127,218,'.',229,253,'F',250,238, +235,237,249,250,'t',185,'l',207,31,'?','=','|',221,207,254,14,0,0,0,0,0,0, +0,255,'1',255,0,178,'s',140,'2',0,240,0,0}; + +/* Old GNU tar sparse format, as created by gtar 1.17 */ +static unsigned char archive_old_gtar_1_17[] = { +31,139,8,0,30,'%',193,'F',0,3,237,215,']','r',19,'G',20,134,'a','e','\'', +218,'@',170,186,'O',255,'-','$','+',208,5,23,'\\','@','(',203,236,'?','g', +134,216,'8',232,139,160,248,'P','M',170,242,'>',20,'%',211,'6',214,153,158, +'W','#',205,245,211,229,233,250,238,244,'P','%',205,222,183,199,186,'F','y', +251,184,137,252,'{',170,'e',206,18,17,189,205,'S','~','w',197,'<',157,255, +'x',236,'X','_','|',190,'>','_',158,206,231,211,243,251,15,'w',127,238,'{', +223,255,'i',219,22,180,217,235,182,11,127,239,200,235,215,185,'K','!',214, +'k',255,242,239,151,245,253,235,'{','O',240,250,31,'~',185,203,175,255,149, +248,31,161,159,'c',']',247,235,127,'<',244,'9',238,'^',255,'k',143,'V',234, +'?',175,255,17,'5',127,156,235,255,191,'^',255,'[',235,'M',173,175,'(',253, +219,245,223,'J',25,171,142,186,182,'m','V',207,158,251,223,135,248,'m','1', +'W',153,'b',189,197,232,'K',173,231,'A',168,163,232,17,'C',29,'E',159,181, +170,163,200,'Q',199,205,'Q','l',235,'c','V','5',231,172,'}',168,'9',231,'h', +'U',205,185,'j',157,'E',173,231,'f',139,'9',243,'a','N','1','g',205,']',11, +'1','g',238,'A',155,'b',206,154,165,135,152,179,230,'s','N','1','g',141,182, +154,152,179,198,202,243,')',214,183,'(',212,156,'m',197,186,173,226,245,252, +215,222,'j','S',243,246,185,150,154,'w',196,'l','j',222,177,31,245,237,250, +140,166,234,174,'s',134,170,'{',143,'X',237,'k',30,'v',17,'s','F','>','s', +23,'s','F',201,138,196,156,'Q','k',12,'1','g',228,'k','D',245,155,'M',',', +213,'o','^',171,166,234,'w',127,'9',169,'9',243,244,'T','5','g',207,3,'P', +'s',230,'&',132,154,179,175,'9',213,156,163,13,213,'o',140,213,'n',251,253, +'z',254,243,'l',134,234,'x',127,249,171,'y',215,246,'G',173,207,253,'0',190, +']','o','9','q',19,243,182,'2',243,23,137,245,26,'U','u',220,'r',151,'n', +';',222,'.','G','u',170,'~',247,203,148,152,179,'e',238,']',205,153,219,'W', +212,156,25,'o','W','s',246,188,10,170,'9','G',134,167,230,220,'V',213,156, +249,190,167,250,'}',185,156,222,174,175,'5',212,156,'y',154,171,154,'3','w', +'m',220,'9',255,'}',219,17,'1','o',190,'x',170,234,184,'g',244,170,227,158, +'/','h',213,241,'~',249,23,243,246,12,'o',138,'y','{',230,24,'b','_',243, +147,'A','~',138,16,235,'=',175,24,'j',206,'|',21,170,'~',251,200,11,177,154, +'s',140,'P',253,238,'o','S','j',206,153,'y',169,'9',243,'e',211,212,156,'+', +131,17,'s',142,'-','=','1',231,200,29,'U',253,'n',231,'^',245,';',242,'B', +175,250,221,223,'N',239,156,255,145,23,166,219,'O',13,219,250,10,245,185, +'`','d','.',234,'s',193,200,'0',213,231,130,145,'\'','Z','u',156,23,237,174, +':',206,211,208,'T',199,251,219,191,154,'s','n',239,0,'j','}',251,'#',214, +247,15,'C','o',214,139,252,'`',132,31,194,253,27,28,244,3,7,253,192,'A','?', +'p',208,15,28,244,3,135,219,15,253,193,'A','?','p',208,15,28,244,3,7,253, +192,'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208, +15,28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?','p',208,15, +28,244,3,7,253,192,193,253,'?',142,'D','?','p',208,15,28,244,3,7,253,192, +'A','?','p',208,15,28,220,255,227,'H',244,3,7,253,192,'A','?',158,143,127, +'~',252,253,250,233,242,'t','}',247,184,231,'(','i',246,190,'=',214,'5',202, +219,199,23,167,'Z',230,',',17,209,219,'<',149,'Z','#',234,233,'\\',30,'7', +210,'W',159,175,207,151,167,243,249,244,252,254,195,221,159,251,222,247,1, +0,0,0,0,0,0,0,248,15,249,11,162,'$',218,227,0,240,0,0}; #if ARCHIVE_VERSION_STAMP >= 1009000 -/* libarchive < 1.9 doesn't support these. */ +/* libarchive < 1.9 does not support this. */ +/* GNU tar "posix" sparse format 0.0, as created by gtar 1.17 */ +static unsigned char archive_0_0_gtar_1_17[] = { +31,139,8,0,31,'%',193,'F',0,3,237,217,207,'n',218,'X',20,199,'q',214,'<', +5,'/','0',228,222,'s','}',255,'x',193,'z',186,26,'u',211,7,240,164,174,20, +205,'$',169,'0',145,'2',243,244,'5','%',205,144,200,193,'p',14,141,203,232, +251,217,'P','A',14,'8','9',191,'[',253,',',150,'W',31,155,199,15,'m',243, +185,']','w',203,232,156,148,171,238,'k',179,238,218,217,249,184,'^',170,170, +237,163,207,209,237,'?','~','W','9',153,'y',151,146,19,145,'*',228,153,243, +161,'J','2','[','<',158,241,26,222,244,208,'m',154,'u',127,')',214,247,'y', +250,']',158,31,'/',132,228,197,239,127,'|','Z',238,'v',190,236,'n',254,'m', +'W',193,'W','1','K',153,'K',218,127,233,238,225,246,207,191,239,175,255,234, +'V','a','.','e',255,149,251,'/','_',186,'v',179,170,'{','!',205,'_',190,225, +'v',234,159,'M',219,173,162,151,185,212,3,'c',190,31,'+','Y','N',158,'{', +190,202,'8','8',231,230,226,22,205,230,230,182,']','y','_',178,'K',193,'e', +191,'}',238,250,229,'s','n','>',245,6,166,'u',246,195,'>','`',228,252,203, +246,184,252,'w',254,'S',127,254,'}',14,'a',182,'x',151,'C',244,227,252,247, +177,'8',248,'s','c',175,'_',232,249,183,'j',166,190,0,'\\','4',242,'3',173, +229,'[',253,'O',206,247,25,135,255,255,247,193,247,157,239,'U',255,139,'1', +210,255,222,195,203,'*',247,189,255,213,245,'n','/',3,149,'l','W',0,235,250, +151,'h',128,178,157,'s',229,244,230,216,207,229,170,':','y',174,234,231,'R', +'q','\'',207,197,237,156,'?',253,239,146,250,185,24,'O',255,187,148,']',2, +'O',159,'S',238,175,30,223,'_','p','C','{','w',227,11,28,30,244,227,27,28, +30,148,241,21,14,15,134,241,29,14,15,'V',227,'K',28,30,'L',227,'[','|','c', >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Aug 24 15:47:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1690716A46D; Fri, 24 Aug 2007 15:47:14 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7B6216A46B for ; Fri, 24 Aug 2007 15:47:13 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C0C3813C480 for ; Fri, 24 Aug 2007 15:47:13 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OFlDaN099266 for ; Fri, 24 Aug 2007 15:47:13 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OFlDCr099262 for perforce@freebsd.org; Fri, 24 Aug 2007 15:47:13 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 24 Aug 2007 15:47:13 GMT Message-Id: <200708241547.l7OFlDCr099262@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 125619 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 15:47:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=125619 Change 125619 by gonzo@gonzo_jeeves on 2007/08/24 15:46:38 o Properly reset device. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips32/idt/idt_machdep.c#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips32/idt/idt_machdep.c#2 (text+ko) ==== @@ -128,7 +128,12 @@ void platform_reset(void) { + volatile unsigned int * p = (void *)0xb8008000; + /* Write 0x8000_0001 to the Reset register */ + *p = 0x80000001; + __asm __volatile("li $25, 0xbfc00000"); + __asm __volatile("j $25"); } void From owner-p4-projects@FreeBSD.ORG Fri Aug 24 15:49:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8437C16A46D; Fri, 24 Aug 2007 15:49:17 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61E1316A417 for ; Fri, 24 Aug 2007 15:49:17 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3B3CA13C46B for ; Fri, 24 Aug 2007 15:49:17 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OFnHkQ099367 for ; Fri, 24 Aug 2007 15:49:17 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OFnGAN099363 for perforce@freebsd.org; Fri, 24 Aug 2007 15:49:16 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 24 Aug 2007 15:49:16 GMT Message-Id: <200708241549.l7OFnGAN099363@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 125621 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 15:49:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=125621 Change 125621 by gonzo@gonzo_jeeves on 2007/08/24 15:49:04 o Add obio pseudo-device Affected files ... .. //depot/projects/mips2/src/sys/mips/mips32/idt/obio.c#1 add .. //depot/projects/mips2/src/sys/mips/mips32/idt/obiovar.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Aug 24 15:51:20 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ABE9C16A420; Fri, 24 Aug 2007 15:51:20 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C8C616A417 for ; Fri, 24 Aug 2007 15:51:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5603013C467 for ; Fri, 24 Aug 2007 15:51:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OFpKwD099611 for ; Fri, 24 Aug 2007 15:51:20 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OFpKeo099608 for perforce@freebsd.org; Fri, 24 Aug 2007 15:51:20 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 24 Aug 2007 15:51:20 GMT Message-Id: <200708241551.l7OFpKeo099608@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 125622 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 15:51:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=125622 Change 125622 by gonzo@gonzo_jeeves on 2007/08/24 15:50:54 o Add support for PCI bridge, no resource handling yet. Only reading/writing config, scanning PCI bus, etc... Affected files ... .. //depot/projects/mips2/src/sys/mips/mips32/idt/idtpci.c#1 add .. //depot/projects/mips2/src/sys/mips/mips32/idt/idtreg.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Aug 24 15:52:22 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6FC7C16A46B; Fri, 24 Aug 2007 15:52:22 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C60A16A418 for ; Fri, 24 Aug 2007 15:52:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 259BA13C46E for ; Fri, 24 Aug 2007 15:52:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OFqM9P099770 for ; Fri, 24 Aug 2007 15:52:22 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OFqLMP099767 for perforce@freebsd.org; Fri, 24 Aug 2007 15:52:21 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 24 Aug 2007 15:52:21 GMT Message-Id: <200708241552.l7OFqLMP099767@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 125623 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 15:52:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=125623 Change 125623 by gonzo@gonzo_jeeves on 2007/08/24 15:52:18 o Add obio and PCI-related files Affected files ... .. //depot/projects/mips2/src/sys/mips/mips32/idt/files.idt#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips32/idt/files.idt#2 (text+ko) ==== @@ -1,4 +1,6 @@ # $FreeBSD$ +mips/mips32/idt/console.c standard mips/mips32/idt/idt_machdep.c standard -mips/mips32/idt/console.c standard +mips/mips32/idt/obio.c standard +mips/mips32/idt/idtpci.c optional pci From owner-p4-projects@FreeBSD.ORG Fri Aug 24 15:54:25 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9EB1616A41A; Fri, 24 Aug 2007 15:54:25 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5858716A417 for ; Fri, 24 Aug 2007 15:54:25 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 31B6813C467 for ; Fri, 24 Aug 2007 15:54:25 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OFsP84099879 for ; Fri, 24 Aug 2007 15:54:25 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OFsOPV099876 for perforce@freebsd.org; Fri, 24 Aug 2007 15:54:24 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 24 Aug 2007 15:54:24 GMT Message-Id: <200708241554.l7OFsOPV099876@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 125624 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 15:54:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=125624 Change 125624 by gonzo@gonzo_jeeves on 2007/08/24 15:53:59 o Add pcib devices to hints Affected files ... .. //depot/projects/mips2/src/sys/mips/conf/IDT.hints#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/conf/IDT.hints#2 (text+ko) ==== @@ -2,3 +2,10 @@ hint.obio.0.at="nexus0" hint.obio.0.maddr=0x0 hint.obio.0.msize=0x1fffffff + +# host-to-pci bridge +hint.pcib.0.at="obio0" +# hint.pcib.0.maddr=0x11400000 +# hint.pcib.0.msize=0x100000 +# hint.pcib.0.io=0x11500000 +# hint.pcib.0.iosize=0x100000 From owner-p4-projects@FreeBSD.ORG Fri Aug 24 15:55:27 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5065B16A421; Fri, 24 Aug 2007 15:55:27 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DCFD16A417 for ; Fri, 24 Aug 2007 15:55:27 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0755513C467 for ; Fri, 24 Aug 2007 15:55:27 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OFtQN0099958 for ; Fri, 24 Aug 2007 15:55:26 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OFtQFW099955 for perforce@freebsd.org; Fri, 24 Aug 2007 15:55:26 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 24 Aug 2007 15:55:26 GMT Message-Id: <200708241555.l7OFtQFW099955@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 125625 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 15:55:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=125625 Change 125625 by gonzo@gonzo_jeeves on 2007/08/24 15:55:06 o Add pci support to IDT config o Add vr(3) support to IDT config Affected files ... .. //depot/projects/mips2/src/sys/mips/conf/IDT#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/conf/IDT#2 (text+ko) ==== @@ -38,4 +38,7 @@ device genclock device loop +device pci device ether +device miibus +device vr From owner-p4-projects@FreeBSD.ORG Fri Aug 24 17:50:00 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E2C0916A41B; Fri, 24 Aug 2007 17:49:59 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F44D16A418 for ; Fri, 24 Aug 2007 17:49:59 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8022513C458 for ; Fri, 24 Aug 2007 17:49:59 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OHnxw4017881 for ; Fri, 24 Aug 2007 17:49:59 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OHnxV5017878 for perforce@freebsd.org; Fri, 24 Aug 2007 17:49:59 GMT (envelope-from cnst@FreeBSD.org) Date: Fri, 24 Aug 2007 17:49:59 GMT Message-Id: <200708241749.l7OHnxV5017878@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125633 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 17:50:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=125633 Change 125633 by cnst@dale on 2007/08/24 17:49:52 integrate coretemp changes by des, rpaulo and cnst from CVS Screenshot from `systat -sensors` for my Intel Core 2 Duo E4300: Sensor Value Status Description cpu0.temp0 29.00 degC cpu1.temp0 30.00 degC Affected files ... .. //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#5 integrate Differences ... ==== //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/coretemp/coretemp.c,v 1.1 2007/08/15 19:26:02 des Exp $ + * $FreeBSD: src/sys/dev/coretemp/coretemp.c,v 1.2 2007/08/23 10:53:03 des Exp $ * */ @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/coretemp/coretemp.c,v 1.1 2007/08/15 19:26:02 des Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/coretemp/coretemp.c,v 1.2 2007/08/23 10:53:03 des Exp $"); #include #include @@ -98,7 +98,7 @@ /* Make sure we're not being doubly invoked. */ if (device_find_child(parent, "coretemp", -1) != NULL) return; - + /* Check that CPUID is supported and the vendor is Intel.*/ if (cpu_high == 0 || strcmp(cpu_vendor, "GenuineIntel")) return; @@ -140,13 +140,11 @@ int cpu_mask; sc->sc_dev = dev; - pdev = device_get_parent(dev); - - cpu_model = (cpu_id >> 4) & 15; + cpu_model = (cpu_id >> 4) & 15; /* extended model */ cpu_model += ((cpu_id >> 16) & 0xf) << 4; - cpu_mask = cpu_id & 15; + cpu_mask = cpu_id & 15; /* * Check for errata AE18. @@ -154,15 +152,13 @@ * updating upon returning from C3/C4 state." * * Adapted from the Linux coretemp driver. - */ + */ if (cpu_model == 0xe && cpu_mask < 0xc) { msr = rdmsr(MSR_BIOS_SIGN); msr = msr >> 32; if (msr < 0x39) { - device_printf(dev, "This processor behaves " - "erronously regarding to Intel errata " - "AE18.\nPlease update your BIOS or the " - "CPU microcode.\n"); + device_printf(dev, "not supported (Intel errata " + "AE18), try updating your BIOS\n"); return (ENXIO); } } @@ -173,13 +169,13 @@ * The if-clause for CPUs having the MSR_IA32_EXT_CONFIG was adapted * from the Linux coretemp driver. */ - if ((cpu_model == 0xf && cpu_mask > 3) || cpu_model == 0xe) { + sc->sc_tjmax = 100; + if ((cpu_model == 0xf && cpu_mask >= 2) || cpu_model == 0xe) { msr = rdmsr(MSR_IA32_EXT_CONFIG); - if ((msr >> 30) & 0x1) + if (msr & (1 << 30)) sc->sc_tjmax = 85; - } else - sc->sc_tjmax = 100; - + } + /* * Add hw.sensors.cpuN.temp0 MIB. */ @@ -211,9 +207,11 @@ static int coretemp_get_temp(device_t dev) { - uint64_t temp; + uint64_t msr; + int temp; int cpu = device_get_unit(dev); struct coretemp_softc *sc = device_get_softc(dev); + char stemp[16]; /* * Bind to specific CPU to read the correct temperature. @@ -237,40 +235,48 @@ * The temperature is computed by subtracting the temperature * reading by Tj(max). */ - temp = rdmsr(MSR_THERM_STATUS); + msr = rdmsr(MSR_THERM_STATUS); + + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); /* * Check for Thermal Status and Thermal Status Log. */ - if ((temp & 0x3) == 0x3) + if ((msr & 0x3) == 0x3) device_printf(dev, "PROCHOT asserted\n"); /* + * Bit 31 contains "Reading valid" + */ + if (((msr >> 31) & 0x1) == 1) { + /* + * Starting on bit 16 and ending on bit 22. + */ + temp = sc->sc_tjmax - ((msr >> 16) & 0x7f); + } else + temp = -1; + + /* * Check for Critical Temperature Status and Critical * Temperature Log. + * It doesn't really matter if the current temperature is + * invalid because the "Critical Temperature Log" bit will + * tell us if the Critical Temperature has been reached in + * past. It's not directly related to the current temperature. * * If we reach a critical level, allow devctl(4) to catch this * and shutdown the system. */ - if (((temp >> 4) & 0x3) == 0x3) { - device_printf(dev, "Critical Temperature detected.\n" - "Advising system shutdown.\n"); - devctl_notify("CPU", "coretemp", "temperature", - "notify=0x1"); + if (((msr >> 4) & 0x3) == 0x3) { + device_printf(dev, "critical temperature detected, " + "suggest system shutdown\n"); + snprintf(stemp, sizeof(stemp), "%d", temp); + devctl_notify("coretemp", "Thermal", stemp, "notify=0xcc"); } - /* - * Bit 31 contains "Reading valid" - */ - if (((temp >> 31) & 0x1) == 1) { - /* - * Starting on bit 16 and ending on bit 22. - */ - temp = sc->sc_tjmax - ((temp >> 16) & 0x7f); - return ((int) temp); - } - - return (-1); + return (temp); } static void From owner-p4-projects@FreeBSD.ORG Fri Aug 24 17:53:06 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 694AF16A41B; Fri, 24 Aug 2007 17:53:06 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D8CC16A418 for ; Fri, 24 Aug 2007 17:53:06 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2F31313C457 for ; Fri, 24 Aug 2007 17:53:06 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OHr6cL018269 for ; Fri, 24 Aug 2007 17:53:06 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OHr5TD018266 for perforce@freebsd.org; Fri, 24 Aug 2007 17:53:05 GMT (envelope-from cnst@FreeBSD.org) Date: Fri, 24 Aug 2007 17:53:05 GMT Message-Id: <200708241753.l7OHr5TD018266@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125635 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 17:53:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=125635 Change 125635 by cnst@dale on 2007/08/24 17:52:05 branch coretemp(4) manual page and integrate man4/Makefile Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man4/Makefile#3 integrate .. //depot/projects/soc2007/cnst-sensors/share.man.man4/coretemp.4#1 branch Differences ... ==== //depot/projects/soc2007/cnst-sensors/share.man.man4/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD: src/share/man/man4/Makefile,v 1.391 2007/08/02 08:04:48 bz Exp $ +# $FreeBSD: src/share/man/man4/Makefile,v 1.392 2007/08/23 20:05:09 des Exp $ MAN= aac.4 \ acpi.4 \ @@ -49,6 +49,7 @@ ciss.4 \ cm.4 \ cnw.4 \ + ${_coretemp.4} \ cpufreq.4 \ crypto.4 \ cue.4 \ @@ -103,6 +104,7 @@ ${_hptmv.4} \ hwpmc.4 \ ichsmb.4 \ + ${_ichwd.4} \ icmp.4 \ icmp6.4 \ ida.4 \ @@ -538,8 +540,10 @@ .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" _acpi_dock.4= acpi_dock.4 _amdsmb.4= amdsmb.4 +_coretemp.4= coretemp.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 +_ichwd.4= ichwd.4 _if_nfe.4= if_nfe.4 _if_nve.4= if_nve.4 _if_nxge.4= if_nxge.4 From owner-p4-projects@FreeBSD.ORG Fri Aug 24 18:10:28 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 31BE716A469; Fri, 24 Aug 2007 18:10:28 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0596916A417 for ; Fri, 24 Aug 2007 18:10:28 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EB54313C46A for ; Fri, 24 Aug 2007 18:10:27 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OIARnb020328 for ; Fri, 24 Aug 2007 18:10:27 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OIARhh020325 for perforce@freebsd.org; Fri, 24 Aug 2007 18:10:27 GMT (envelope-from cnst@FreeBSD.org) Date: Fri, 24 Aug 2007 18:10:27 GMT Message-Id: <200708241810.l7OIARhh020325@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125636 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 18:10:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=125636 Change 125636 by cnst@dale on 2007/08/24 18:10:22 document local coretemp; this should be changed to reflect sysctl(8) reference in the main text when/if sysctl(8)/sysctlbyname(3) is ready Affected files ... .. //depot/projects/soc2007/cnst-sensors/share.man.man4/coretemp.4#2 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/share.man.man4/coretemp.4#2 (text+ko) ==== @@ -50,13 +50,14 @@ .Nm driver provides support for the on-die digital thermal sensor present in Intel Core and newer CPUs. -.Pp -The -.Nm -driver reports each core's temperature through a sysctl node in the -corresponding CPU device's sysctl tree, named -.Va dev.cpu.%d.temperature . +The values are available through the +.Va HW_SENSORS +.Xr sysctl 3 +tree. .Sh SEE ALSO +.Xr systat 1 , +.Xr sysctl 3 , +.Xr sensorsd 8 , .Xr sysctl 8 .Sh HISTORY The From owner-p4-projects@FreeBSD.ORG Fri Aug 24 22:08:32 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C019D16A419; Fri, 24 Aug 2007 22:08:31 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C14816A468 for ; Fri, 24 Aug 2007 22:08:31 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6CF4413C45A for ; Fri, 24 Aug 2007 22:08:31 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7OM8VMw047418 for ; Fri, 24 Aug 2007 22:08:31 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7OM8VYp047415 for perforce@freebsd.org; Fri, 24 Aug 2007 22:08:31 GMT (envelope-from cnst@FreeBSD.org) Date: Fri, 24 Aug 2007 22:08:31 GMT Message-Id: <200708242208.l7OM8VYp047415@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125643 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 22:08:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=125643 Change 125643 by cnst@dale on 2007/08/24 22:07:49 partially getting rid of M's in my branch -- integrate my sysctl.8 doc fix (was already here, so only $FreeBSD$ is changed) Affected files ... .. //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.8#4 integrate Differences ... ==== //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.8#4 (text+ko) ==== @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 -.\" $FreeBSD: src/sbin/sysctl/sysctl.8,v 1.60 2005/11/18 10:32:12 ru Exp $ +.\" $FreeBSD: src/sbin/sysctl/sysctl.8,v 1.61 2007/08/24 20:38:09 danger Exp $ .\" .Dd September 15, 2005 .Dt SYSCTL 8 From owner-p4-projects@FreeBSD.ORG Sat Aug 25 00:07:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1809816A421; Sat, 25 Aug 2007 00:07:01 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD05916A419 for ; Sat, 25 Aug 2007 00:06:58 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BBB5A13C457 for ; Sat, 25 Aug 2007 00:06:58 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7P06w2S057224 for ; Sat, 25 Aug 2007 00:06:58 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7P06wdV057221 for perforce@freebsd.org; Sat, 25 Aug 2007 00:06:58 GMT (envelope-from mharvan@FreeBSD.org) Date: Sat, 25 Aug 2007 00:06:58 GMT Message-Id: <200708250006.l7P06wdV057221@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125646 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 00:07:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=125646 Change 125646 by mharvan@mharvan_bike-planet on 2007/08/25 00:06:10 update sys patches to -CURRENT Affected files ... .. //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/catchall.sys.patch#4 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/test_catchall/Makefile#3 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/test_catchall/README#3 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/test_catchall/tcatchalld.c#2 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/test_catchall/ucatchalld.c#4 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/usr_include.patch#3 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/icmp_user.patch#2 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/sys.6-stable.icmp-echo_user.patch#1 branch .. //depot/projects/soc2007/mharvan-mtund/sys.patches/sys.6-stable.icmp_user.patch#1 branch .. //depot/projects/soc2007/mharvan-mtund/sys.patches/sys.6-stable.tcp_catchall.patch#1 add .. //depot/projects/soc2007/mharvan-mtund/sys.patches/sys.6-stable.udp_catchall.patch#1 add .. //depot/projects/soc2007/mharvan-mtund/sys.patches/sys.current.icmp-echo_user.patch#1 add .. //depot/projects/soc2007/mharvan-mtund/sys.patches/sys.current.tcp_catchall.patch#1 add .. //depot/projects/soc2007/mharvan-mtund/sys.patches/sys.current.udp_catchall.patch#1 add .. //depot/projects/soc2007/mharvan-mtund/sys.patches/test_catchall/Makefile#1 branch .. //depot/projects/soc2007/mharvan-mtund/sys.patches/test_catchall/README#1 branch .. //depot/projects/soc2007/mharvan-mtund/sys.patches/test_catchall/tcatchalld.c#1 add .. //depot/projects/soc2007/mharvan-mtund/sys.patches/test_catchall/ucatchalld.c#1 branch .. //depot/projects/soc2007/mharvan-mtund/sys.patches/usr_include.patch#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Sat Aug 25 00:09:02 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 661D116A41B; Sat, 25 Aug 2007 00:09:02 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3294216A419 for ; Sat, 25 Aug 2007 00:09:02 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 070C513C45E for ; Sat, 25 Aug 2007 00:09:02 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7P0919v057325 for ; Sat, 25 Aug 2007 00:09:01 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7P091Ju057322 for perforce@freebsd.org; Sat, 25 Aug 2007 00:09:01 GMT (envelope-from mharvan@FreeBSD.org) Date: Sat, 25 Aug 2007 00:09:01 GMT Message-Id: <200708250009.l7P091Ju057322@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125647 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 00:09:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=125647 Change 125647 by mharvan@mharvan_bike-planet on 2007/08/25 00:08:22 removed the wrong copy of the file Affected files ... .. //depot/projects/soc2007/mharvan-mtund/sys.patches/sys.6-stable.icmp_user.patch#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Sat Aug 25 04:58:23 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 853DF16A420; Sat, 25 Aug 2007 04:58:23 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FE2116A419 for ; Sat, 25 Aug 2007 04:58:23 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2E22913C468 for ; Sat, 25 Aug 2007 04:58:23 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7P4wNqZ098031 for ; Sat, 25 Aug 2007 04:58:23 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7P4w4D8098021 for perforce@freebsd.org; Sat, 25 Aug 2007 04:58:04 GMT (envelope-from imp@freebsd.org) Date: Sat, 25 Aug 2007 04:58:04 GMT Message-Id: <200708250458.l7P4w4D8098021@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 125652 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 04:58:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=125652 Change 125652 by imp@imp_paco-paco on 2007/08/25 04:57:12 IFC @125649 Affected files ... .. //depot/projects/arm/src/contrib/gcc/BASE-VER#2 integrate .. //depot/projects/arm/src/contrib/gcc/ChangeLog#4 integrate .. //depot/projects/arm/src/contrib/gcc/DATESTAMP#2 integrate .. //depot/projects/arm/src/contrib/gcc/Makefile.in#3 integrate .. //depot/projects/arm/src/contrib/gcc/calls.c#3 integrate .. //depot/projects/arm/src/contrib/gcc/combine.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/config/arm/arm.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/config/arm/cirrus.md#3 integrate .. //depot/projects/arm/src/contrib/gcc/config/i386/i386.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/config/i386/i386.h#3 integrate .. //depot/projects/arm/src/contrib/gcc/config/i386/i386.md#4 integrate .. //depot/projects/arm/src/contrib/gcc/config/i386/sse.md#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/mips/iris6.h#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/rs6000/predicates.md#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/rs6000/rs6000.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/double.h#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/extended.h#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/floatundidf.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/floatundisf.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/floatunsidf.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/floatunsisf.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/op-2.h#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/op-4.h#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/op-common.h#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/soft-fp/quad.h#2 integrate .. //depot/projects/arm/src/contrib/gcc/config/sparc/sparc.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/ChangeLog#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/call.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/class.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/cp-tree.h#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/decl.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/decl2.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/init.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/parser.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/pt.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/semantics.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/typeck.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/cp/typeck2.c#3 integrate .. //depot/projects/arm/src/contrib/gcc/doc/cpp.1#3 integrate .. //depot/projects/arm/src/contrib/gcc/doc/gcc.1#3 integrate .. //depot/projects/arm/src/contrib/gcc/doc/gcov.1#3 integrate .. //depot/projects/arm/src/contrib/gcc/dwarf2out.c#3 integrate .. //depot/projects/arm/src/contrib/gcc/except.c#3 integrate .. //depot/projects/arm/src/contrib/gcc/fold-const.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/function.c#4 integrate .. //depot/projects/arm/src/contrib/gcc/gimplify.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/gthr-posix.c#3 integrate .. //depot/projects/arm/src/contrib/gcc/gthr-posix.h#3 integrate .. //depot/projects/arm/src/contrib/gcc/loop-iv.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/objc/ChangeLog#2 integrate .. //depot/projects/arm/src/contrib/gcc/omp-low.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/pointer-set.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/pointer-set.h#2 integrate .. //depot/projects/arm/src/contrib/gcc/reload.c#3 integrate .. //depot/projects/arm/src/contrib/gcc/tree-if-conv.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/tree-ssa-loop-niter.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/tree-ssa-operands.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/tree-ssa-structalias.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/tree-vrp.c#2 integrate .. //depot/projects/arm/src/contrib/gcc/version.c#4 integrate .. //depot/projects/arm/src/contrib/gcclibs/include/ChangeLog#2 integrate .. //depot/projects/arm/src/contrib/gcclibs/libcpp/ChangeLog#2 integrate .. //depot/projects/arm/src/contrib/gcclibs/libdecnumber/ChangeLog#2 integrate .. //depot/projects/arm/src/contrib/gcclibs/libgomp/ChangeLog#2 integrate .. //depot/projects/arm/src/contrib/gcclibs/libgomp/config/posix/lock.c#2 integrate .. //depot/projects/arm/src/contrib/gcclibs/libgomp/sections.c#2 integrate .. //depot/projects/arm/src/contrib/gcclibs/libiberty/ChangeLog#2 integrate .. //depot/projects/arm/src/contrib/gcclibs/libmudflap/ChangeLog#2 integrate .. //depot/projects/arm/src/contrib/gcclibs/libssp/ChangeLog#2 integrate .. //depot/projects/arm/src/contrib/less/main.c#8 integrate .. //depot/projects/arm/src/contrib/libobjc/ChangeLog#4 integrate .. //depot/projects/arm/src/contrib/libstdc++/ChangeLog#4 integrate .. //depot/projects/arm/src/contrib/libstdc++/acinclude.m4#3 integrate .. //depot/projects/arm/src/contrib/libstdc++/config.h.in#3 integrate .. //depot/projects/arm/src/contrib/libstdc++/configure#3 integrate .. //depot/projects/arm/src/contrib/libstdc++/include/Makefile.am#3 integrate .. //depot/projects/arm/src/contrib/libstdc++/include/Makefile.in#3 integrate .. //depot/projects/arm/src/contrib/libstdc++/include/bits/ostream.tcc#3 integrate .. //depot/projects/arm/src/contrib/libstdc++/include/bits/ostream_insert.h#2 integrate .. //depot/projects/arm/src/contrib/libstdc++/include/ext/throw_allocator.h#2 integrate .. //depot/projects/arm/src/contrib/libstdc++/include/std/std_fstream.h#3 integrate .. //depot/projects/arm/src/contrib/libstdc++/libsupc++/exception#3 integrate .. //depot/projects/arm/src/contrib/libstdc++/libsupc++/new#3 integrate .. //depot/projects/arm/src/contrib/libstdc++/libsupc++/typeinfo#3 integrate .. //depot/projects/arm/src/etc/etc.arm/ttys#3 integrate .. //depot/projects/arm/src/etc/namedb/named.conf#4 integrate .. //depot/projects/arm/src/etc/rc.d/Makefile#8 integrate .. //depot/projects/arm/src/etc/rc.d/lockd#2 integrate .. //depot/projects/arm/src/etc/rc.d/mdconfig#4 integrate .. //depot/projects/arm/src/etc/rc.d/nfslocking#5 integrate .. //depot/projects/arm/src/etc/rc.d/statd#2 integrate .. //depot/projects/arm/src/gnu/lib/libdialog/dialog.h#2 integrate .. //depot/projects/arm/src/gnu/lib/libgcc/Makefile#5 integrate .. //depot/projects/arm/src/gnu/lib/libstdc++/Makefile#5 integrate .. //depot/projects/arm/src/gnu/usr.bin/gdb/kgdb/trgt_amd64.c#3 integrate .. //depot/projects/arm/src/include/arpa/inet.h#4 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_support_format_tar.c#13 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_disk.c#8 integrate .. //depot/projects/arm/src/lib/libarchive/test/test_read_format_gtar_sparse.c#3 integrate .. //depot/projects/arm/src/lib/libarchive/test/test_write_disk_perms.c#6 integrate .. //depot/projects/arm/src/lib/libc/gen/fts-compat.c#1 branch .. //depot/projects/arm/src/lib/libc/gen/fts-compat.h#1 branch .. //depot/projects/arm/src/lib/libc/sys/Symbol.map#5 integrate .. //depot/projects/arm/src/release/Makefile#12 integrate .. //depot/projects/arm/src/release/doc/Makefile#2 integrate .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/Makefile#2 integrate .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#4 integrate .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#7 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/hardware/common/hw.ent#4 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/hardware/common/intro.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/Makefile#3 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/Makefile.inc#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/amd64/Makefile#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/amd64/article.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/common/abstract.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/common/install.ent#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/common/install.sgml#5 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/common/layout.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/common/upgrade.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/i386/Makefile#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/i386/article.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/ia64/Makefile#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/ia64/article.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/pc98/Makefile#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/pc98/article.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/powerpc/Makefile#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/powerpc/article.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/sparc64/Makefile#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/sparc64/article.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/installation/sparc64/install.sgml#2 delete .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/readme/article.sgml#4 integrate .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#19 integrate .. //depot/projects/arm/src/release/doc/share/examples/Makefile.relnotesng#5 integrate .. //depot/projects/arm/src/release/doc/share/misc/dev.archlist.txt#9 integrate .. //depot/projects/arm/src/release/doc/share/sgml/release.ent#3 integrate .. //depot/projects/arm/src/sbin/atacontrol/atacontrol.c#2 integrate .. //depot/projects/arm/src/sbin/fsck_ffs/main.c#3 integrate .. //depot/projects/arm/src/sbin/reboot/boot_i386.8#3 integrate .. //depot/projects/arm/src/sbin/sysctl/sysctl.8#2 integrate .. //depot/projects/arm/src/sbin/tunefs/tunefs.8#3 integrate .. //depot/projects/arm/src/share/man/man4/Makefile#18 integrate .. //depot/projects/arm/src/share/man/man4/aac.4#4 integrate .. //depot/projects/arm/src/share/man/man4/coretemp.4#1 branch .. //depot/projects/arm/src/share/man/man4/ichwd.4#1 branch .. //depot/projects/arm/src/share/man/man4/mfi.4#3 integrate .. //depot/projects/arm/src/share/man/man4/nfe.4#5 integrate .. //depot/projects/arm/src/share/man/man4/ng_fec.4#3 integrate .. //depot/projects/arm/src/share/man/man4/umodem.4#3 integrate .. //depot/projects/arm/src/share/man/man5/Makefile#5 integrate .. //depot/projects/arm/src/share/man/man5/boot.config.5#1 branch .. //depot/projects/arm/src/share/man/man5/msdosfs.5#2 integrate .. //depot/projects/arm/src/share/man/man7/ports.7#6 integrate .. //depot/projects/arm/src/share/mk/sys.mk#4 integrate .. //depot/projects/arm/src/share/zoneinfo/africa#4 integrate .. //depot/projects/arm/src/share/zoneinfo/antarctica#3 integrate .. //depot/projects/arm/src/share/zoneinfo/australasia#4 integrate .. //depot/projects/arm/src/share/zoneinfo/europe#4 integrate .. //depot/projects/arm/src/share/zoneinfo/leapseconds#5 integrate .. //depot/projects/arm/src/share/zoneinfo/northamerica#4 integrate .. //depot/projects/arm/src/share/zoneinfo/zone.tab#4 integrate .. //depot/projects/arm/src/sys/amd64/amd64/cpu_switch.S#8 integrate .. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#36 integrate .. //depot/projects/arm/src/sys/amd64/amd64/support.S#10 integrate .. //depot/projects/arm/src/sys/amd64/conf/NOTES#18 integrate .. //depot/projects/arm/src/sys/amd64/include/asm.h#3 integrate .. //depot/projects/arm/src/sys/amd64/include/asmacros.h#5 integrate .. //depot/projects/arm/src/sys/amd64/include/specialreg.h#9 integrate .. //depot/projects/arm/src/sys/arm/arm/busdma_machdep.c#16 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#37 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_proto.h#23 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscall.h#23 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscalls.c#23 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_sysent.c#23 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/syscalls.master#24 integrate .. //depot/projects/arm/src/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/arm/src/sys/conf/NOTES#54 integrate .. //depot/projects/arm/src/sys/conf/files.amd64#27 integrate .. //depot/projects/arm/src/sys/conf/files.i386#29 integrate .. //depot/projects/arm/src/sys/contrib/pf/net/pf.c#11 integrate .. //depot/projects/arm/src/sys/dev/aac/aac_pci.c#7 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-raid.c#15 integrate .. //depot/projects/arm/src/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/arm/src/sys/dev/cxgb/common/cxgb_t3_hw.c#6 integrate .. //depot/projects/arm/src/sys/dev/cxgb/cxgb_adapter.h#7 integrate .. //depot/projects/arm/src/sys/dev/cxgb/cxgb_ioctl.h#5 integrate .. //depot/projects/arm/src/sys/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/arm/src/sys/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/arm/src/sys/dev/cxgb/cxgb_main.c#8 integrate .. //depot/projects/arm/src/sys/dev/cxgb/cxgb_offload.c#4 integrate .. //depot/projects/arm/src/sys/dev/cxgb/cxgb_offload.h#4 integrate .. //depot/projects/arm/src/sys/dev/cxgb/cxgb_sge.c#9 integrate .. //depot/projects/arm/src/sys/dev/dcons/dcons_os.c#10 integrate .. //depot/projects/arm/src/sys/dev/drm/i915_dma.c#6 integrate .. //depot/projects/arm/src/sys/dev/ichwd/ichwd.c#6 integrate .. //depot/projects/arm/src/sys/dev/ichwd/ichwd.h#3 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_freebsd.c#32 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfi.c#18 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfi_disk.c#6 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfi_pci.c#6 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfireg.h#8 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfivar.h#9 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.c#25 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.h#28 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#41 integrate .. //depot/projects/arm/src/sys/dev/mxge/eth_z8e.h#2 integrate .. //depot/projects/arm/src/sys/dev/mxge/ethp_z8e.h#2 integrate .. //depot/projects/arm/src/sys/dev/mxge/if_mxge.c#19 integrate .. //depot/projects/arm/src/sys/dev/mxge/if_mxge_var.h#9 integrate .. //depot/projects/arm/src/sys/dev/mxge/mxge_mcp.h#7 integrate .. //depot/projects/arm/src/sys/dev/re/if_re.c#28 integrate .. //depot/projects/arm/src/sys/dev/usb/ehci.c#16 integrate .. //depot/projects/arm/src/sys/fs/msdosfs/msdosfs_vfsops.c#20 integrate .. //depot/projects/arm/src/sys/fs/tmpfs/tmpfs.h#5 integrate .. //depot/projects/arm/src/sys/fs/tmpfs/tmpfs_subr.c#5 integrate .. //depot/projects/arm/src/sys/fs/tmpfs/tmpfs_vfsops.c#4 integrate .. //depot/projects/arm/src/sys/fs/tmpfs/tmpfs_vnops.c#4 integrate .. //depot/projects/arm/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#10 integrate .. //depot/projects/arm/src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#10 integrate .. //depot/projects/arm/src/sys/i386/conf/NOTES#26 integrate .. //depot/projects/arm/src/sys/i386/i386/pmap.c#35 integrate .. //depot/projects/arm/src/sys/i386/i386/support.s#9 integrate .. //depot/projects/arm/src/sys/i386/i386/swtch.s#9 integrate .. //depot/projects/arm/src/sys/i386/include/asm.h#2 integrate .. //depot/projects/arm/src/sys/i386/include/asmacros.h#4 integrate .. //depot/projects/arm/src/sys/i386/include/specialreg.h#11 integrate .. //depot/projects/arm/src/sys/kern/init_sysent.c#22 integrate .. //depot/projects/arm/src/sys/kern/kern_cpu.c#7 integrate .. //depot/projects/arm/src/sys/kern/kern_switch.c#16 integrate .. //depot/projects/arm/src/sys/kern/kern_thr.c#18 integrate .. //depot/projects/arm/src/sys/kern/sched_ule.c#23 integrate .. //depot/projects/arm/src/sys/kern/syscalls.c#22 integrate .. //depot/projects/arm/src/sys/kern/syscalls.master#24 integrate .. //depot/projects/arm/src/sys/kern/systrace_args.c#10 integrate .. //depot/projects/arm/src/sys/kern/vfs_aio.c#18 integrate .. //depot/projects/arm/src/sys/kern/vfs_mount.c#32 integrate .. //depot/projects/arm/src/sys/kern/vfs_subr.c#36 integrate .. //depot/projects/arm/src/sys/modules/Makefile#47 integrate .. //depot/projects/arm/src/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/netgraph/bluetooth/Makefile#4 integrate .. //depot/projects/arm/src/sys/net/bridgestp.c#19 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_output.c#16 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#5 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#9 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#8 integrate .. //depot/projects/arm/src/sys/netgraph/ng_base.c#12 integrate .. //depot/projects/arm/src/sys/netinet/sctp.h#10 integrate .. //depot/projects/arm/src/sys/netinet/sctp_asconf.c#13 integrate .. //depot/projects/arm/src/sys/netinet/sctp_auth.c#12 integrate .. //depot/projects/arm/src/sys/netinet/sctp_constants.h#16 integrate .. //depot/projects/arm/src/sys/netinet/sctp_header.h#6 integrate .. //depot/projects/arm/src/sys/netinet/sctp_indata.c#19 integrate .. //depot/projects/arm/src/sys/netinet/sctp_input.c#20 integrate .. //depot/projects/arm/src/sys/netinet/sctp_os.h#8 integrate .. //depot/projects/arm/src/sys/netinet/sctp_os_bsd.h#14 integrate .. //depot/projects/arm/src/sys/netinet/sctp_output.c#19 integrate .. //depot/projects/arm/src/sys/netinet/sctp_pcb.c#19 integrate .. //depot/projects/arm/src/sys/netinet/sctp_pcb.h#12 integrate .. //depot/projects/arm/src/sys/netinet/sctp_peeloff.c#12 integrate .. //depot/projects/arm/src/sys/netinet/sctp_structs.h#16 integrate .. //depot/projects/arm/src/sys/netinet/sctp_sysctl.c#9 integrate .. //depot/projects/arm/src/sys/netinet/sctp_sysctl.h#6 integrate .. //depot/projects/arm/src/sys/netinet/sctp_timer.c#14 integrate .. //depot/projects/arm/src/sys/netinet/sctp_usrreq.c#20 integrate .. //depot/projects/arm/src/sys/netinet/sctp_var.h#11 integrate .. //depot/projects/arm/src/sys/netinet/sctputil.c#21 integrate .. //depot/projects/arm/src/sys/netinet/sctputil.h#15 integrate .. //depot/projects/arm/src/sys/netinet/tcp_subr.c#31 integrate .. //depot/projects/arm/src/sys/netinet6/sctp6_usrreq.c#17 integrate .. //depot/projects/arm/src/sys/powerpc/include/intr_machdep.h#5 integrate .. //depot/projects/arm/src/sys/powerpc/include/md_var.h#4 integrate .. //depot/projects/arm/src/sys/powerpc/include/openpicvar.h#3 integrate .. //depot/projects/arm/src/sys/powerpc/powermac/hrowpic.c#4 integrate .. //depot/projects/arm/src/sys/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/arm/src/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/autoconf.c#3 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/interrupt.c#4 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/intr_machdep.c#8 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/nexus.c#4 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/openpic.c#4 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/pic_if.m#3 integrate .. //depot/projects/arm/src/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/arm/src/sys/sys/ata.h#7 integrate .. //depot/projects/arm/src/sys/sys/mbuf.h#24 integrate .. //depot/projects/arm/src/sys/sys/syscall.h#22 integrate .. //depot/projects/arm/src/sys/sys/syscall.mk#22 integrate .. //depot/projects/arm/src/sys/sys/sysproto.h#23 integrate .. //depot/projects/arm/src/sys/sys/thr.h#8 integrate .. //depot/projects/arm/src/sys/vm/device_pager.c#6 integrate .. //depot/projects/arm/src/sys/vm/phys_pager.c#6 integrate .. //depot/projects/arm/src/sys/vm/vm_map.c#16 integrate .. //depot/projects/arm/src/sys/vm/vm_map.h#4 integrate .. //depot/projects/arm/src/sys/vm/vm_mmap.c#11 integrate .. //depot/projects/arm/src/tools/regression/tmpfs/h_tools.c#2 integrate .. //depot/projects/arm/src/tools/regression/tmpfs/t_mount#2 integrate .. //depot/projects/arm/src/tools/regression/tmpfs/t_rename#2 integrate .. //depot/projects/arm/src/tools/tools/tinybsd/conf/bridge/TINYBSD#2 integrate .. //depot/projects/arm/src/tools/tools/tinybsd/conf/default/TINYBSD#2 integrate .. //depot/projects/arm/src/tools/tools/tinybsd/conf/firewall/TINYBSD#2 integrate .. //depot/projects/arm/src/tools/tools/tinybsd/conf/minimal/TINYBSD#2 integrate .. //depot/projects/arm/src/tools/tools/tinybsd/conf/vpn/TINYBSD#2 integrate .. //depot/projects/arm/src/tools/tools/tinybsd/conf/wireless/TINYBSD#2 integrate .. //depot/projects/arm/src/tools/tools/tinybsd/conf/wrap/TINYBSD#2 integrate .. //depot/projects/arm/src/tools/tools/tinybsd/tinybsd#4 integrate .. //depot/projects/arm/src/usr.bin/netstat/sctp.c#3 integrate .. //depot/projects/arm/src/usr.bin/rpcgen/rpc_main.c#2 integrate .. //depot/projects/arm/src/usr.bin/rpcgen/rpc_svcout.c#3 integrate .. //depot/projects/arm/src/usr.sbin/freebsd-update/freebsd-update.sh#8 integrate .. //depot/projects/arm/src/usr.sbin/pkg_install/add/extract.c#2 integrate .. //depot/projects/arm/src/usr.sbin/rpc.statd/file.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sysinstall/menus.c#6 integrate Differences ... ==== //depot/projects/arm/src/contrib/gcc/BASE-VER#2 (text+ko) ==== @@ -1,1 +1,1 @@ -4.2.0 +4.2.1 ==== //depot/projects/arm/src/contrib/gcc/ChangeLog#4 (text+ko) ==== @@ -1,3 +1,441 @@ +2007-07-19 Release Manager + + * GCC 4.2.1 released. + +2007-07-18 Paolo Bonzini + + Revert: + + 2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + + 2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-16 Paul Brook + + PR target/32753 + gcc/ + * config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn. + +2007-07-10 Rainer Orth + + PR target/32538 + * config/mips/iris6.h (LIBGCC_SPEC): Add libm. + +2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + +2007-07-09 Uros Bizjak + + PR tree-optimization/32681 + * tree-if-conv.c (find_phi_replacement_condition): Use the condition + saved in second_edge->aux when first_bb is a loop header. + +2007-07-07 Anatoly Sokolov + + PR target/31331 + * config/avr/avr.c (avr_naked_function_p): Handle receiving a type + rather than a decl. + (avr_attribute_table): Make "naked" attribute apply to function types + rather than to decls. + (avr_handle_fntype_attribute): New function. + +2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-06 Uros Bizjak + + PR rtl-optimization/32450 + * function.c (thread_prologue_and_epilogue_insns): Emit blockage insn + to ensure that instructions are not moved into the prologue when + profiling is on. + +2007-07-04 Richard Guenther + + PR tree-optimization/32500 + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): + Only use basic blocks that are always executed to infer loop bounds. + +2007-07-04 Uros Bizjak + + PR tree-optimization/31966 + PR tree-optimization/32533 + * tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not + "basic_block" description as its third argument. Update function + calls to get destination bb from "edge" argument. Save "cond" into + aux field of the edge. Update prototype for changed arguments. + (if_convertible_loop_p): Clear aux field of incoming edges if bb + contains phi node. + (find_phi_replacement_condition): Operate on incoming edges, not + on predecessor blocks. If there is a condition saved in the + incoming edge aux field, AND it with incoming bb predicate. + Return source bb of the first edge. + (clean_predicate_lists): Clean aux field of outgoing node edges. + (tree_if_conversion): Do not initialize cond variable. Move + variable declaration into the loop. + (replace_phi_with_cond_gimple_modify_stmt): Remove unneded + initializations of new_stmt, arg0 and arg1 variables. + +2007-07-04 Kaz Kojima + + PR target/32506 + Backport from mainline. + * config/sh/sh.md (udivsi3_i1_media): Use target_reg_operand + predicate instead of target_operand. + (divsi3_i1_media, divsi3_media_2): Likewise. + +2007-07-03 Richard Guenther + + Backport from mainline: + 2006-12-11 Zdenek Dvorak + + PR rtl-optimization/30113 + * loop-iv.c (implies_p): Require the mode of the operands to be + scalar. + +2007-07-03 Rainer Orth + + PR target/28307 + * gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK] + (__gthrw_pragma): Provide default definition. + (__gthrw2): Use it. + * gthr-posix.c (__gthrw_pragma): Define. + +2007-07-02 Jakub Jelinek + + PR libgomp/32468 + * omp-low.c (check_combined_parallel): New function. + (lower_omp_parallel): Call it via walk_stmts, set + OMP_PARALLEL_COMBINED if appropriate. + (determine_parallel_type): If OMP_FOR resp. OMP_SECTIONS + isn't the only statement in WS_ENTRY_BB or OMP_RETURN + the only one in PAR_EXIT_BB and not OMP_PARALLEL_COMBINED, + don't consider it as combined parallel. + +2007-06-30 Alexandre Oliva + + * dwarf2out.c (dwarf2out_finish): Accept namespaces as context of + limbo die nodes. + +2007-06-28 Seongbae Park + + * config/arm/arm.c (arm_get_frame_offsets): Set + offsets->locals_base to avoid negative stack size. + (thumb_expand_prologue): Assert on negative stack size. + +2007-06-28 Jakub Jelinek + + * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure + decl is non-external for AIX ABI. + +2007-06-28 David Edelsohn + + * config/rs6000/predicates.md (current_file_function_operand): + Ensure the symbol is non-external for AIX ABI. + +2007-06-21 H.J. Lu + + * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_VEC_EXT_V16QI. + (ix86_init_mmx_sse_builtins): Add __builtin_ia32_vec_ext_v16qi. + (ix86_expand_builtin): Handle IX86_BUILTIN_VEC_EXT_V16QI. + +2007-06-21 Jakub Jelinek + + PR middle-end/32362 + * omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL, + but decl is a global var, instead return decl. + * gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses + even for is_global_var decls, if they are private in some outer + context. + +2007-06-21 Uros Bizjak + + PR target/32389 + * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL. + * config/i386/i386.c (assign_386_stack_local): Assert that + SLOT_VIRTUAL is valid only before virtual regs are instantiated. + (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]: + Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP. + * config/i386/i386.md (truncdfsf2, truncxfsf2, truncxfdf2): Ditto. + +2007-06-20 Jakub Jelinek + + PR inline-asm/32109 + * gimplify.c (gimplify_asm_expr): Issue error if type is addressable + and !allows_mem. + + PR middle-end/32285 + * calls.c (precompute_arguments): Also precompute CALL_EXPR arguments + if ACCUMULATE_OUTGOING_ARGS. + +2007-06-20 Kaz Kojima + + PR rtl-optimization/28011 + Backport from mainline. + * reload.c (push_reload): Set dont_share if IN appears in OUT + also when IN is a PLUS rtx. + (reg_overlap_mentioned_for_reload_p): Return true if X and IN + are same PLUS rtx. + +2007-06-19 Richard Guenther + Michael Matz + + PR tree-optimization/30252 + * tree-ssa-structalias.c (solution_set_add): Make sure to + preserve all relevant vars. + (handle_ptr_arith): Make sure to only handle positive + offsets. + (push_fields_onto_fieldstack): Create fields for empty + bases. + +2007-06-19 Jakub Jelinek + + PR tree-optimization/32353 + * tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL. + +2007-06-17 Eric Botcazou + + * config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the + return mode from the builtin itself. + (sparc_fold_builtin): Fix cast of zero constant. + +2007-06-15 Diego Novillo + + PR 32327 + * tree-ssa-operands.c (build_ssa_operands): Initially assume + that the statement does not take any addresses. + +2007-06-13 Eric Botcazou + + * config/sparc/sparc.c (sparc_override_options): Initialize + fpu mask correctly. + +2007-06-09 Ian Lance Taylor + + PR tree-optimization/32169 + * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and + CONVERT_EXPR, check whether min and max both converted to an + overflow infinity representation. + +2007-06-08 Kaz Kojima + + PR target/32163 + Backport from mainline. + * config/sh/sh.md (symGOT_load): Don't schedule insns when + the symbol is generated with the stack protector. + +2007-06-06 Ian Lance Taylor + + * fold-const.c (merge_ranges): If range_successor or + range_predecessor fail, just return 0. + +2007-06-05 Ian Lance Taylor + + * tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a + PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p. + (extract_range_from_assert): Set TREE_NO_WARNING when creating an + expression. + (test_for_singularity): Likewise. + +2007-06-04 Ian Lance Taylor + + * tree-vrp.c (adjust_range_with_scev): When loop is not expected + to overflow, reduce overflow infinity to regular infinity. + (vrp_var_may_overflow): New static function. + (vrp_visit_phi_node): Check vrp_var_may_overflow. + +2007-05-31 H.J. Lu + + Backport from mainline: + 2007-05-25 H.J. Lu + + * config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it + with MASK_SSE2. + (__builtin_ia32_vec_ext_v2di): Likewise. + (__builtin_ia32_vec_ext_v4si): Likewise. + (__builtin_ia32_vec_ext_v8hi): Likewise. + (__builtin_ia32_vec_set_v8hi): Likewise. + +2007-05-31 John David Anglin + + Backport from mainline: + 2007-05-05 Aurelien Jarno + + * config/pa/pa.md: Split tgd_load, tld_load and tie_load + into pic and non-pic versions. Mark r19 as used for + tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used + for tgd_load, tld_load and tie_load . + * config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic + version of tgd_load, tld_load and tie_load depending on the + value of flag_pic. + +2007-05-27 Daniel Berlin + + Fix PR/30052 + Backport PTA solver from mainline + + * pointer-set.c: Copy from mainline + * pointer-set.h: Ditto. + * tree-ssa-structalias.c: Copy solver portions from mainline. + * Makefile.in (tree-ssa-structalias.o): Update dependencies + +2007-05-30 Ralf Wildenhues + + * tree-vrp.c (compare_names): Initialize sop. + +2007-05-30 Jakub Jelinek + + PR tree-optimization/31769 + * except.c (duplicate_eh_regions): Clear prev_try if + ERT_MUST_NOT_THROW region is inside of ERT_TRY region. + +2007-05-28 Andrew Pinski + + PR tree-opt/32100 + * fold-const.c (tree_expr_nonnegative_warnv_p): Don't + return true when truth_value_p is true and the type + is of signed:1. + +2007-05-27 H.J. Lu + + Backport from mainline: + 2007-05-25 Uros Bizjak + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate + "memory" attribute for "sseishft" type insn without operands[2]. + + 2007-05-25 H.J. Lu + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift. + +2007-05-22 Ian Lance Taylor + + * tree-vrp.c (avoid_overflow_infinity): New static function, + broken out of set_value_range_to_value. + (set_value_range_to_value): Call avoid_overflow_infinity. + (extract_range_from_assert): Likewise. + +2007-05-23 Chen Liqin + + PR target/30987 + * config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove. + * config/score/predicate.md (const_pow2, const_npow2): remove. + * config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef. + PR target/30474 + * config/score/score.c (score_print_operand): makes sure that only lower + bits are used. + +2007-05-21 Uros Bizjak + + PR target/31167 + Backport from mainline. + * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use + x86_64_general_operand as operand[2] predicate. Remove "iF" + from operand constraints and use "e" constraint instead. + (*subti3_1, *subti3_1 splitter): Ditto. + (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as + operand[1] predicate. + +2007-05-21 Uros Bizjak + + PR target/30041 + Backport from mainline. + * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and + operands[1] in insn constraint. Correct type attribute to sselog1. + +2007-05-20 Kaz Kojima + + PR target/31701 + Backport from mainline. + * config/sh/sh.c (output_stack_adjust): Avoid using the frame + register itself to hold the offset constant. Tell flow the use + of r4 and r5 when they are used. + +2007-05-20 Kaz Kojima + + PR target/31480 + Backport from mainline. + * config/sh/sh.md (length): Check if prev_nonnote_insn (insn) + is null. + +2007-05-20 Kaz Kojima + + PR target/31022 + Backport from mainline. + * config/sh/sh.c (sh_adjust_cost): Use the result of single_set + instead of PATTERN. + +2007-05-20 Kaz Kojima + + PR target/27405 + Backport from mainline. + * config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove. + (cmpsi{eq,gt,gtu}{si,di}_media): Rename to + cmp{eq,gt,gtu}{si,di}_media. + (*cmpne0si_media): Remove. + (*movsicc_umin): Adjust gen_cmp*_media call. + (unordered): Change the mode of unordered and operands[1] to + SImode. + (seq): Adjust gen_cmp*_media calls. Make the mode of + a temporary result of compare SImode if needed. If the mode + of operands[0] is DImode, extend the temporary result to DImode. + (slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise. + (sunorderd): Change the mode of match_operand and unorderd to + SImode. + (cmpeq{sf,df}_media): Remove. + (cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media. + (cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand + and compare operation to SImode. + +2007-05-18 Joseph Myers + + * config/soft-fp/double.h, config/soft-fp/extended.h, + config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c, + config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c, + config/soft-fp/op-2.h, config/soft-fp/op-4.h, + config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from + glibc CVS. + +2007-05-17 Ian Lance Taylor + + PR tree-optimization/31953 + * tree-vrp.c (set_value_range_to_value): Add equiv parameter. + Change all callers. + (set_value_range_to_null): Call set_value_range_to_value. + (extract_range_from_comparison): Likewise. + +2007-05-17 Eric Botcazou + + PR rtl-optimization/31691 + * combine.c (simplify_set): Build a new src pattern instead of + substituting its operands in the COMPARE case. + +2007-05-14 Mark Mitchell + + * BASE-VER: Set to 4.2.1. + * DEV-PHASE: Set to prerelease. + 2007-05-13 Release Manager * GCC 4.2.0 released. @@ -307,7 +745,8 @@ 2007-04-03 Stuart Hastings PR 31281 - * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl. + * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile + from rethrow decl. * cse.c (record_jump_equiv): Bail out on CCmode comparisons. 2007-04-03 Jakub Jelinek ==== //depot/projects/arm/src/contrib/gcc/DATESTAMP#2 (text+ko) ==== @@ -1,1 +1,1 @@ -20070514 +20070719 ==== //depot/projects/arm/src/contrib/gcc/Makefile.in#3 (text+ko) ==== @@ -1839,7 +1839,7 @@ tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \ $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \ $(TM_H) coretypes.h $(CGRAPH_H) tree-pass.h $(TIMEVAR_H) \ - gt-tree-ssa-structalias.h $(PARAMS_H) + gt-tree-ssa-structalias.h $(PARAMS_H) pointer-set.h tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ ==== //depot/projects/arm/src/contrib/gcc/calls.c#3 (text+ko) ==== @@ -1238,13 +1238,25 @@ /* If this is a libcall, then precompute all arguments so that we do not get extraneous instructions emitted as part of the libcall sequence. */ - if ((flags & ECF_LIBCALL_BLOCK) == 0) + + /* If we preallocated the stack space, and some arguments must be passed + on the stack, then we must precompute any parameter which contains a + function call which will store arguments on the stack. + Otherwise, evaluating the parameter may clobber previous parameters + which have already been stored into the stack. (we have code to avoid + such case by saving the outgoing stack arguments, but it results in + worse code) */ + if ((flags & ECF_LIBCALL_BLOCK) == 0 && !ACCUMULATE_OUTGOING_ARGS) return; for (i = 0; i < num_actuals; i++) { enum machine_mode mode; + if ((flags & ECF_LIBCALL_BLOCK) == 0 + && TREE_CODE (args[i].tree_value) != CALL_EXPR) + continue; + /* If this is an addressable type, we cannot pre-evaluate it. */ gcc_assert (!TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value))); ==== //depot/projects/arm/src/contrib/gcc/combine.c#4 (text+ko) ==== @@ -5341,14 +5341,14 @@ } else if (GET_MODE (op0) == compare_mode && op1 == const0_rtx) { - SUBST(SET_SRC (x), op0); + SUBST (SET_SRC (x), op0); src = SET_SRC (x); } - else + /* Otherwise, update the COMPARE if needed. */ + else if (XEXP (src, 0) != op0 || XEXP (src, 1) != op1) { - /* Otherwise, update the COMPARE if needed. */ - SUBST (XEXP (src, 0), op0); - SUBST (XEXP (src, 1), op1); + SUBST (SET_SRC (x), gen_rtx_COMPARE (compare_mode, op0, op1)); + src = SET_SRC (x); } } else ==== //depot/projects/arm/src/contrib/gcc/config/arm/arm.c#4 (text+ko) ==== @@ -10555,6 +10555,7 @@ if (leaf && frame_size == 0) { offsets->outgoing_args = offsets->soft_frame; + offsets->locals_base = offsets->soft_frame; return offsets; } @@ -13874,6 +13875,7 @@ amount = offsets->locals_base - offsets->saved_regs; } + gcc_assert (amount >= 0); if (amount) { if (amount < 512) ==== //depot/projects/arm/src/contrib/gcc/config/arm/cirrus.md#3 (text+ko) ==== @@ -404,28 +404,6 @@ ;; Cirrus SI values have been outlawed. Look in arm.h for the comment ;; on HARD_REGNO_MODE_OK. -(define_insn "*cirrus_arm_movsi_insn" - [(set (match_operand:SI 0 "general_operand" "=r,r,r,m,*v,r,*v,T,*v") - (match_operand:SI 1 "general_operand" "rI,K,mi,r,r,*v,T,*v,*v"))] - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0 - && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "@ - mov%?\\t%0, %1 - mvn%?\\t%0, #%B1 - ldr%?\\t%0, %1 - str%?\\t%1, %0 - cfmv64lr%?\\t%Z0, %1 - cfmvr64l%?\\t%0, %Z1 - cfldr32%?\\t%V0, %1 - cfstr32%?\\t%V1, %0 - cfsh32%?\\t%V0, %V1, #0" - [(set_attr "type" "*, *, load1,store1, *, *, load1,store1, *") - (set_attr "pool_range" "*, *, 4096, *, *, *, 1024, *, *") - (set_attr "neg_pool_range" "*, *, 4084, *, *, *, 1012, *, *") - (set_attr "cirrus" "not,not, not, not,move,normal,normal,normal,normal")] -) - (define_insn "*cirrus_movsf_hard_insn" [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m") (match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))] ==== //depot/projects/arm/src/contrib/gcc/config/i386/i386.c#4 (text+ko) ==== @@ -19,7 +19,7 @@ the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.24 2007/05/19 02:26:26 kan Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.25 2007/08/14 03:04:42 kan Exp $ */ #include "config.h" #include "system.h" @@ -13480,6 +13480,9 @@ gcc_assert (n < MAX_386_STACK_LOCALS); + /* Virtual slot is valid only before vregs are instantiated. */ + gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated); + for (s = ix86_stack_locals; s; s = s->next) if (s->mode == mode && s->n == n) return s->rtl; @@ -14570,6 +14573,7 @@ IX86_BUILTIN_VEC_EXT_V4SF, IX86_BUILTIN_VEC_EXT_V4SI, IX86_BUILTIN_VEC_EXT_V8HI, + IX86_BUILTIN_VEC_EXT_V16QI, IX86_BUILTIN_VEC_EXT_V2SI, IX86_BUILTIN_VEC_EXT_V4HI, IX86_BUILTIN_VEC_SET_V8HI, @@ -15542,13 +15546,13 @@ /* Access to the vec_extract patterns. */ ftype = build_function_type_list (double_type_node, V2DF_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2df", ftype, IX86_BUILTIN_VEC_EXT_V2DF); ftype = build_function_type_list (long_long_integer_type_node, V2DI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2di", ftype, IX86_BUILTIN_VEC_EXT_V2DI); ftype = build_function_type_list (float_type_node, V4SF_type_node, @@ -15558,12 +15562,12 @@ ftype = build_function_type_list (intSI_type_node, V4SI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v4si", ftype, IX86_BUILTIN_VEC_EXT_V4SI); ftype = build_function_type_list (intHI_type_node, V8HI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v8hi", ftype, IX86_BUILTIN_VEC_EXT_V8HI); ftype = build_function_type_list (intHI_type_node, V4HI_type_node, @@ -15576,11 +15580,15 @@ def_builtin (MASK_MMX, "__builtin_ia32_vec_ext_v2si", ftype, IX86_BUILTIN_VEC_EXT_V2SI); + ftype = build_function_type_list (intQI_type_node, V16QI_type_node, + integer_type_node, NULL_TREE); + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v16qi", ftype, IX86_BUILTIN_VEC_EXT_V16QI); + /* Access to the vec_set patterns. */ ftype = build_function_type_list (V8HI_type_node, V8HI_type_node, intHI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_set_v8hi", ftype, IX86_BUILTIN_VEC_SET_V8HI); ftype = build_function_type_list (V4HI_type_node, V4HI_type_node, @@ -16124,13 +16132,13 @@ case IX86_BUILTIN_LDMXCSR: op0 = expand_normal (TREE_VALUE (arglist)); - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_move_insn (target, op0); emit_insn (gen_sse_ldmxcsr (target)); return 0; case IX86_BUILTIN_STMXCSR: - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_insn (gen_sse_stmxcsr (target)); return copy_to_mode_reg (SImode, target); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Aug 25 05:25:58 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 747C216A41A; Sat, 25 Aug 2007 05:25:58 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3582416A419 for ; Sat, 25 Aug 2007 05:25:58 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 24F4513C45D for ; Sat, 25 Aug 2007 05:25:58 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7P5PwIV002202 for ; Sat, 25 Aug 2007 05:25:58 GMT (envelope-from dongmei@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7P5PvB1002197 for perforce@freebsd.org; Sat, 25 Aug 2007 05:25:57 GMT (envelope-from dongmei@FreeBSD.org) Date: Sat, 25 Aug 2007 05:25:57 GMT Message-Id: <200708250525.l7P5PvB1002197@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to dongmei@FreeBSD.org using -f From: dongmei To: Perforce Change Reviews Cc: Subject: PERFORCE change 125654 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 05:25:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=125654 Change 125654 by dongmei@dongmei2007 on 2007/08/25 05:25:01 check some error of closing file and read file Affected files ... .. //depot/projects/soc2007/dongmei-auditanalyzer/README#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/bsm/audit.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/bsm/audit_filter.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/bsm/audit_internal.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/bsm/audit_kevents.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/bsm/audit_record.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/bsm/audit_uevents.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/bsm/libbsm.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/buffer.h#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/file_access.c#3 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#5 edit Differences ... ==== //depot/projects/soc2007/dongmei-auditanalyzer/README#2 (text+ko) ==== @@ -1,1 +1,11 @@ My task in this summer is to write a GUI audit analyzer based on trustedBSD audit3 branch. The whole work is refer to WireShark-0.99.5. Thanks Robert Watson and the FreeBSD mentor organization give me this chance. Thanks again. +20070824 +This program can run under: +Gtk-2.8.9 +Glib-2.8.4 +To compile and run this program,please: +1. install gtk-2.8.x and glib-2.8.x +2. cp bsm /usr/inlcude/ +3. cd /usr/src/contrib/openbsm/lib/libbsm + make + make install ==== //depot/projects/soc2007/dongmei-auditanalyzer/buffer.h#2 (text+ko) ==== @@ -2,22 +2,6 @@ * * $Id: buffer.h 11400 2004-07-18 00:24:25Z guy $ * - * Wiretap Library - * Copyright (c) 1998 by Gilbert Ramirez - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ ==== //depot/projects/soc2007/dongmei-auditanalyzer/file_access.c#3 (text+ko) ==== @@ -13,8 +13,7 @@ allows the application to do random-access I/O without moving the seek offset for sequential I/O, which is used to display the token tree when a record are selected. */ -tsess* tsess_open_offline(const char *filename, int *err, char **err_info, - gboolean do_random) +tsess* tsess_open_offline(const char *filename, int *err, char **err_info,gboolean do_random) { struct stat statb; tsess *ts; @@ -97,8 +96,8 @@ /* initialization */ ts->data_offset = 0; - ts->record_buffer = g_malloc(sizeof(struct Buffer)); - buffer_init(ts->record_buffer, 1500); +/* ts->record_buffer = g_malloc(sizeof(struct Buffer)); + buffer_init(ts->record_buffer, 1500);*/ return ts; } /* Opens auditpipe and prepares a tsess struct. @@ -165,7 +164,7 @@ } if (!(ts->fh = filed_open(ts->fd, "rb"))) { *err = errno; - eth_close(ts->fd); + eth_close(ts->fh); g_free(ts); return NULL; } ==== //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#5 (text+ko) ==== @@ -8,6 +8,8 @@ #include #include "exceptions.h" #include "gtk/tree_view.h" +#include "file_wrappers.h" + #include /* Update the progress bar this many times when reading a file. */ @@ -65,6 +67,17 @@ clear_tree_view_rows(); /* We have no file open. */ tf->state = FILE_CLOSED; + if (tf->rlist_chunk) + g_mem_chunk_destroy(tf->rlist_chunk); + if (tf->ts) + { + if (tf->ts->fh!=NULL) + { + printf("close fh\n"); + file_close(tf->ts->fh); + } + g_free(tf->ts); + } } tf_status_t @@ -73,14 +86,13 @@ gchar *err_info; tsess *ts; + tf_reset_state(tf); + ts=tsess_open_offline(fname,err,&err_info,TRUE); if (ts==NULL) goto fail; - - tf_reset_state(tf); /* We're about to start reading the file. */ tf->state = FILE_READ_IN_PROGRESS; - tf->f_datalen = 0; /* Set the file name because we need it to set the follow stream filter. @@ -103,7 +115,7 @@ g_assert(tf->rlist_chunk); tf->ts=ts; return CF_OK; - + fail: return CF_ERROR; @@ -329,7 +341,7 @@ int reclen; data_offset=0; - while ((reclen = au_read_rec(tf->ts->random_fh, &buf)) != -1) { + while ((reclen = au_read_rec(tf->ts->fh, &buf)) != -1) { data_offset = data_offset+reclen; TRY { printf("%d\n",reclen); From owner-p4-projects@FreeBSD.ORG Sat Aug 25 06:06:50 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4DE016A468; Sat, 25 Aug 2007 06:06:50 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655D916A418 for ; Sat, 25 Aug 2007 06:06:50 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5477913C461 for ; Sat, 25 Aug 2007 06:06:50 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7P66oJL006668 for ; Sat, 25 Aug 2007 06:06:50 GMT (envelope-from dongmei@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7P66oEj006664 for perforce@freebsd.org; Sat, 25 Aug 2007 06:06:50 GMT (envelope-from dongmei@FreeBSD.org) Date: Sat, 25 Aug 2007 06:06:50 GMT Message-Id: <200708250606.l7P66oEj006664@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to dongmei@FreeBSD.org using -f From: dongmei To: Perforce Change Reviews Cc: Subject: PERFORCE change 125656 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 06:06:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=125656 Change 125656 by dongmei@dongmei2007 on 2007/08/25 06:06:20 distinguish the file is tail file or pipe when reset tfile Affected files ... .. //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#6 edit Differences ... ==== //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#6 (text+ko) ==== @@ -73,8 +73,8 @@ { if (tf->ts->fh!=NULL) { - printf("close fh\n"); - file_close(tf->ts->fh); + if (tf->type==TAIL_FILE) + file_close(tf->ts->fh); } g_free(tf->ts); } @@ -107,7 +107,7 @@ tf->user_saved = !is_tempfile; tf->count = 0; - + tf->type=TAIL_FILE; tf->rlist_chunk = g_mem_chunk_new("record_data_chunk", sizeof(record_data), RECORD_DATA_CHUNK_SIZE * sizeof(record_data), @@ -126,11 +126,12 @@ gchar *err_info; tsess *ts; + tf_reset_state(tf); + ts=tsess_open_online(err,&err_info,FALSE); if (ts==NULL) goto fail; - tf_reset_state(tf); /* We're about to start reading the file. */ tf->state = FILE_READ_IN_PROGRESS; @@ -148,7 +149,7 @@ tf->user_saved = !is_tempfile; tf->count = 0; - + tf->type=LIVE_FILE; tf->rlist_chunk = g_mem_chunk_new("record_data_chunk", sizeof(record_data), RECORD_DATA_CHUNK_SIZE * sizeof(record_data), From owner-p4-projects@FreeBSD.ORG Sat Aug 25 06:43:36 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CFADC16A41A; Sat, 25 Aug 2007 06:43:36 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94BDF16A417 for ; Sat, 25 Aug 2007 06:43:36 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 82EF213C457 for ; Sat, 25 Aug 2007 06:43:36 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7P6haIk008851 for ; Sat, 25 Aug 2007 06:43:36 GMT (envelope-from dongmei@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7P6has7008848 for perforce@freebsd.org; Sat, 25 Aug 2007 06:43:36 GMT (envelope-from dongmei@FreeBSD.org) Date: Sat, 25 Aug 2007 06:43:36 GMT Message-Id: <200708250643.l7P6has7008848@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to dongmei@FreeBSD.org using -f From: dongmei To: Perforce Change Reviews Cc: Subject: PERFORCE change 125657 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 06:43:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=125657 Change 125657 by dongmei@dongmei2007 on 2007/08/25 06:43:32 tfile.h Affected files ... .. //depot/projects/soc2007/dongmei-auditanalyzer/tfile.h#3 edit Differences ... ==== //depot/projects/soc2007/dongmei-auditanalyzer/tfile.h#3 (text+ko) ==== @@ -11,6 +11,11 @@ FILE_READ_DONE /* Read completed */ } file_state; +typedef enum { + TAIL_FILE, + LIVE_FILE +} file_type; + typedef struct _record_data { struct _record_data *next; /* Next element in list */ struct _record_data *prev; /* Previous element in list */ @@ -29,6 +34,7 @@ gboolean is_tempfile; /* Is trail file a temporary file? */ gboolean user_saved;/* If trail file is temporary, has it been saved by user yet? */ gint64 f_datalen; /* Size of trail file data (uncompressed) */ + file_type type; int count; /* Total number of records */ struct tsess *ts; /* tail file session */ /* record data */ From owner-p4-projects@FreeBSD.ORG Sat Aug 25 07:32:39 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3B39516A421; Sat, 25 Aug 2007 07:32:39 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 138C116A41A for ; Sat, 25 Aug 2007 07:32:39 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F34AF13C442 for ; Sat, 25 Aug 2007 07:32:38 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7P7WcrQ013022 for ; Sat, 25 Aug 2007 07:32:38 GMT (envelope-from dongmei@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7P7WcKm013019 for perforce@freebsd.org; Sat, 25 Aug 2007 07:32:38 GMT (envelope-from dongmei@FreeBSD.org) Date: Sat, 25 Aug 2007 07:32:38 GMT Message-Id: <200708250732.l7P7WcKm013019@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to dongmei@FreeBSD.org using -f From: dongmei To: Perforce Change Reviews Cc: Subject: PERFORCE change 125659 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 07:32:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=125659 Change 125659 by dongmei@dongmei2007 on 2007/08/25 07:31:40 clean up part of codes Affected files ... .. //depot/projects/soc2007/dongmei-auditanalyzer/filesystem.h#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/compat_macros.h#4 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/file_dlg.c#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/file_dlg.h#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/gtkglobals.h#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/keys.h#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/main.c#5 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/menu.h#3 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/progress_dlg.c#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/simple_dialog.c#3 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/progress_dlg.h#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/simple_dialog.h#4 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/strerror.c#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/strerror.h#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#7 edit Differences ... ==== //depot/projects/soc2007/dongmei-auditanalyzer/filesystem.h#2 (text+ko) ==== @@ -3,23 +3,6 @@ * * $Id: filesystem.h 20431 2007-01-14 22:25:22Z ulfl $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef FILESYSTEM_H @@ -68,9 +51,7 @@ /* * Get the directory in which files that, at least on UNIX, are - * system files (such as "/etc/ethers") are stored; on Windows, - * there's no "/etc" directory, so we get them from the Wireshark - * global configuration and data file directory. + * system files (such as "/etc/ethers") are stored; */ extern const char *get_systemfile_dir(void); @@ -87,11 +68,6 @@ * Construct the path name of a personal configuration file, given the * file name. * - * On Win32, if "for_writing" is FALSE, we check whether the file exists - * and, if not, construct a path name relative to the ".wireshark" - * subdirectory of the user's home directory, and check whether that - * exists; if it does, we return that, so that configuration files - * from earlier versions can be read. */ extern char *get_persconffile_path(const char *filename, gboolean for_writing); ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/compat_macros.h#4 (text+ko) ==== @@ -3,23 +3,6 @@ * * $Id: compat_macros.h 19924 2006-11-18 01:47:49Z gerald $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/file_dlg.c#2 (text+ko) ==== @@ -3,23 +3,6 @@ * * $Id: file_dlg.c 19046 2006-08-26 17:55:21Z gal $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include @@ -45,7 +28,7 @@ /* Keys ... */ #define E_FS_CALLER_PTR_KEY "fs_caller_ptr" -/* Create a file selection dialog box window that belongs to Wireshark's +/* Create a file selection dialog box window that belongs to AuditAnalyzer's main window. */ #if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2 GtkWidget * ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/file_dlg.h#2 (text+ko) ==== @@ -3,23 +3,6 @@ * * $Id: file_dlg.h 18205 2006-05-22 07:29:40Z guy $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** @defgroup filesel_dialog_group File Selection Dialogs @@ -59,7 +42,7 @@ FILE_SELECTION_WRITE_BROWSE /**< browse for a file to write to */ } file_selection_action_t; -/** Create a file selection dialog box window that belongs to Wireshark's +/** Create a file selection dialog box window that belongs to AuditAnalyzer's * main window. See window_new() for usage. * * @param title the title for the new file selection dialog ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/gtkglobals.h#2 (text+ko) ==== @@ -3,23 +3,6 @@ * * $Id: gtkglobals.h 18205 2006-05-22 07:29:40Z guy $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GTKGLOBALS_H__ @@ -29,7 +12,7 @@ * * @section intro Introduction * - * Wireshark uses GTK (the Gimp ToolKit) as its user interface toolkit. + * AuditAnalyzer uses GTK (the Gimp ToolKit) as its user interface toolkit. * * See Modules for a list of submodules. * ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/keys.h#2 (text+ko) ==== @@ -3,23 +3,6 @@ * * $Id: keys.h 20049 2006-12-05 19:24:25Z gerald $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __KEYS_H__ ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/main.c#5 (text+ko) ==== @@ -141,7 +141,7 @@ return g_strdup_printf("%s", caption); } /* Create a new window, of the specified type, with the specified title - (if any) and the Wireshark icon. */ + (if any) and the Auditanalyzer icon. */ GtkWidget * window_new(GtkWindowType type, const gchar *title) { ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/menu.h#3 (text+ko) ==== @@ -3,23 +3,6 @@ * * $Id: menu.h 18197 2006-05-21 05:12:17Z sahlberg $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GTKGUIMENU_H__ ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/progress_dlg.c#2 (text+ko) ==== @@ -3,23 +3,6 @@ * * $Id: progress_dlg.c 19942 2006-11-21 00:40:36Z ulfl $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/simple_dialog.c#3 (text+ko) ==== @@ -80,7 +80,7 @@ #endif } -/* Create a dialog box window that belongs to Wireshark's main window. */ +/* Create a dialog box window that belongs to AuditAnalyzer's main window. */ GtkWidget * dlg_window_new(const gchar *title) { @@ -508,14 +508,14 @@ * shouldn't say "error", as that provides no useful information. * * So we give it a title on Win32, and don't give it one on UN*X. - * For now, we give it a Win32 title of just "Wireshark"; we should + * For now, we give it a Win32 title of just "AuditAnalyzer"; we should * arguably take an argument for the title. */ if(btn_mask == ESD_BTN_NONE) { win = splash_window_new(); } else { #ifdef _WIN32 - win = dlg_window_new("Wireshark"); + win = dlg_window_new("AuditAnalyzer"); #else win = dlg_window_new(""); #endif ==== //depot/projects/soc2007/dongmei-auditanalyzer/progress_dlg.h#2 (text+ko) ==== @@ -3,23 +3,6 @@ * * $Id: progress_dlg.h 18197 2006-05-21 05:12:17Z sahlberg $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PROGRESS_DLG_H__ ==== //depot/projects/soc2007/dongmei-auditanalyzer/simple_dialog.h#4 (text+ko) ==== @@ -4,23 +4,6 @@ * * $Id: simple_dialog.h 18197 2006-05-21 05:12:17Z sahlberg $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __DIALOG_H__ ==== //depot/projects/soc2007/dongmei-auditanalyzer/strerror.c#2 (text+ko) ==== @@ -2,23 +2,6 @@ * * $Id: strerror.c 18197 2006-05-21 05:12:17Z sahlberg $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "strerror.h" ==== //depot/projects/soc2007/dongmei-auditanalyzer/strerror.h#2 (text+ko) ==== @@ -2,23 +2,6 @@ * * $Id: strerror.h 18197 2006-05-21 05:12:17Z sahlberg $ * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __STRERROR_H__ ==== //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#7 (text+ko) ==== @@ -355,10 +355,8 @@ dialog = simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%sOut Of Memory!%s\n" "\n" - "Sorry, but Wireshark has to terminate now!\n" - "\n" - "Some infos / workarounds can be found at:\n" - "http://wiki.wireshark.org/KnownBugs/OutOfMemory", + "Sorry, but AuditAnalyzer has to terminate now!\n" + "\n", simple_dialog_primary_start(), simple_dialog_primary_end()); /* we have to terminate, as we cannot recover from the memory error */ simple_dialog_set_cb(dialog, outofmemory_cb, NULL); @@ -439,10 +437,8 @@ dialog = simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%sOut Of Memory!%s\n" "\n" - "Sorry, but Wireshark has to terminate now!\n" - "\n" - "Some infos / workarounds can be found at:\n" - "http://wiki.wireshark.org/KnownBugs/OutOfMemory", + "Sorry, but AuditAnalyzer has to terminate now!\n" + "\n", simple_dialog_primary_start(), simple_dialog_primary_end()); /* we have to terminate, as we cannot recover from the memory error */ simple_dialog_set_cb(dialog, outofmemory_cb, NULL); From owner-p4-projects@FreeBSD.ORG Sat Aug 25 12:06:20 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6479416A41A; Sat, 25 Aug 2007 12:06:20 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26B2C16A419 for ; Sat, 25 Aug 2007 12:06:20 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0F86F13C474 for ; Sat, 25 Aug 2007 12:06:20 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7PC6JfX045067 for ; Sat, 25 Aug 2007 12:06:19 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7PC6Ja9045064 for perforce@freebsd.org; Sat, 25 Aug 2007 12:06:19 GMT (envelope-from mharvan@FreeBSD.org) Date: Sat, 25 Aug 2007 12:06:19 GMT Message-Id: <200708251206.l7PC6Ja9045064@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125661 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 12:06:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=125661 Change 125661 by mharvan@mharvan_bike-planet on 2007/08/25 12:05:34 bugfix in plugin_send of the UDP plugin Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#13 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#13 (text+ko) ==== @@ -208,7 +208,7 @@ data->fd = udp_open(port); if (data->fd != -1) data->state = PLUGIN_STATE_INITIALIZED; - } else { + } else { /* client */ data->fd = udp_connect(host, port); if (data->fd != -1) data->state = PLUGIN_STATE_CONNECTED; @@ -303,7 +303,8 @@ struct plugin_udp_data *datapl = (struct plugin_udp_data*) pl->data; int nwrite = 0; struct conn *conn = &(datapl->conns[clid]); - + *consumed = 0; + if (server) { nwrite = sendto(datapl->fd, data, len, 0, (struct sockaddr*)&conn->addr, @@ -319,11 +320,15 @@ if (datapl->state != PLUGIN_STATE_CONNECTED) { debug("not connected yet, discarding data\n"); return (SEND_ERROR); + } + nwrite = send(datapl->fd, data, len, 0); + if (nwrite == len) { + *consumed = nwrite; + return (SEND_PKT_SENT); } else { - *consumed = nwrite; - nwrite = send(datapl->fd, data, len, 0); + warn("plugin_send: send returned %d", nwrite); + return (SEND_ERROR); } - return (SEND_PKT_SENT); } } From owner-p4-projects@FreeBSD.ORG Sat Aug 25 13:54:35 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 643E616A41B; Sat, 25 Aug 2007 13:54:35 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2030716A417 for ; Sat, 25 Aug 2007 13:54:35 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 081F613C459 for ; Sat, 25 Aug 2007 13:54:35 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7PDsY6e061281 for ; Sat, 25 Aug 2007 13:54:34 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7PDsYvk061278 for perforce@freebsd.org; Sat, 25 Aug 2007 13:54:34 GMT (envelope-from mharvan@FreeBSD.org) Date: Sat, 25 Aug 2007 13:54:34 GMT Message-Id: <200708251354.l7PDsYvk061278@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125663 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 13:54:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=125663 Change 125663 by mharvan@mharvan_bike-planet on 2007/08/25 13:54:24 fragment reassembly bugfix - bitmap was not correctly initialized fragment reassembly code cleanup fragment header modified - 16 bit unsigned integers are enough for our mtu Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#13 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#13 (text+ko) ==== @@ -71,23 +71,23 @@ /* DATA TYPES */ /* fragment header */ struct frag_hdr { - u_int8_t dispatch; - uint id; /* ID of the packet. same in each fragment + uint8_t dispatch; + uint16_t id; /* ID of the packet. same in each fragment * belonging to the same packet */ - uint size; /* length of the whole packet, same in each fragment */ - uint offset; /* fragment offset (in bytes) from the beginning + uint16_t size; /* length of the whole packet, same in each fragment */ + uint16_t offset;/* fragment offset (in bytes) from the beginning * of the packet */ }; /* info about a packet being reassembled from fragments */ struct frag_info { - uint id; /* ID of the packet. same in each fragment + uint16_t id; /* ID of the packet. same in each fragment * belonging to the same packet */ - uint size; /* length of the whole packet, same + uint16_t size; /* length of the whole packet, same * in each fragment */ time_t tv_sec; /* seconds after epoch when reassembly * of this packet started */ - u_int8_t *bitmap; /* bitmap representing already + uint8_t *bitmap; /* bitmap representing already * received parts of the packet */ char *buf; /* buffer into which the fragment is * reassembled */ @@ -112,7 +112,7 @@ char frag_data[MTU+sizeof(struct frag_hdr)]; char *frag_datap; int frag_data_len; - uint frag_id;/* id for the next packet to be fragmented */ + uint16_t frag_id;/* id for the next packet to be fragmented */ /* fragment reassembly information */ LIST_HEAD(frag_infos_head, frag_info) frag_infos; }; @@ -709,8 +709,6 @@ break; case DISPATCH_FRAG: /* fragment reassembly */ - pl->conn_map(pl, *clid, CONN_PERM); - if (len <= sizeof(*frag_hdr)) { plugin_report(pl, *clid, REPORT_ERROR_RECEIVE); return; @@ -729,7 +727,7 @@ if (np->id == frag_hdr->id && np->size == frag_hdr->size) { /* found in list */ - fprintf(stderr, "found frag info in list\n"); + debug("found frag info in list\n"); p = np; break; } @@ -753,7 +751,7 @@ "fragment reassembly: out of memory\n"); return; } - p->bitmap = malloc(frag_hdr->size/8 + 1); + p->bitmap = malloc(frag_hdr->size / 8 + 1); if (!p->bitmap) { free(p->buf); free(p); @@ -761,8 +759,8 @@ "fragment reassembly: out of memory\n"); return; } - memset(p->bitmap, 0, sizeof(*(p->bitmap))); - + memset(p->bitmap, 0, frag_hdr->size / 8 + 1); + /* collect information about the fragments */ gettimeofday(&tv, NULL); p->id = frag_hdr->id; @@ -771,49 +769,47 @@ LIST_INSERT_HEAD(&cl->frag_infos, p, frag_infos); } - if (frag_hdr->offset + len <= p->size) { - /* copy the data */ - memcpy(p->buf + frag_hdr->offset, data, len); - /* update the bitmap - * - * We ignore fragment overlaps as these should - * be caught by the upper layer - * checksum. Actually, they should not happen - * at all. - */ - for (i = frag_hdr->offset; i < frag_hdr->offset+len; - i++) - p->bitmap[i/8] |= (0x1 << (i%8)); - } else { - debug("fragment outside of packet payload\n"); + if (frag_hdr->offset + len > p->size) { + debug("fragment payload outside of packet payload\n"); return; } + /* copy the data */ + memcpy(p->buf + frag_hdr->offset, data, len); + /* update the bitmap + * + * We ignore fragment overlaps as these should + * be caught by the upper layer + * checksum. Actually, they should not happen + * at all. + */ + for (i = frag_hdr->offset; i < frag_hdr->offset+len; i++) + p->bitmap[i/8] |= (0x1 << (i%8)); /* * Fragment was processed without errors, so it was * valid traffic and the plugin used by this client * should be updated. */ + pl->conn_map(pl, *clid, CONN_PERM); set_client_pl(cl, pl); /* check if the complete packet has been reassembled */ dgram_reassembled = 1; /* examine the bitmap */ - for(i=0; i < p->size/8 && dgram_reassembled; i++) { + for(i = 0; i < p->size / 8 && dgram_reassembled; i++) { if (p->bitmap[i] != 0xff) { dgram_reassembled = 0; } } - for(i=0; i < p->size%8 && dgram_reassembled; i++) { - if (! (p->bitmap[p->size/8] & (1 << i))) { - dgram_reassembled=0; + for(i = 0; i < p->size % 8 && dgram_reassembled; i++) { + if ((p->bitmap[p->size / 8] & (1 << i)) == 0) { + dgram_reassembled = 0; } } /* packet completely reassembled */ - if (dgram_reassembled) { + if (dgram_reassembled != 0) { debug("frag reassembly: packet complete\n"); - set_client_pl(cl, pl); /* pass the reassembled packet to the tun device */ tun_send(cl, p->buf, p->size); @@ -1066,6 +1062,7 @@ int consumed; int n; + debug("send_next_frag: frag_hdr.size: %u\n", cl->frag_hdr.size); if (server) { while(cl->frag_data_len > sizeof(cl->frag_hdr) && nwrite == SEND_PKT_SENT) { @@ -1132,6 +1129,7 @@ n = cl->frag_data_len; nwrite = cl->pl->send(cl->pl, cl->clid, cl->frag_datap, n, NORMAL_DATA, &consumed); + debug("send_next_frag: consumed: %d\n", consumed); switch (nwrite) { case SEND_PKT_SENT: case SEND_PKT_QUEUED: @@ -1327,23 +1325,23 @@ signal(SIGTERM, sigcb); /* load plugins */ - if (server) { - pl = load_plugin("./plugin_udp_catchall.so"); - pl->name = "udp_catchall"; - } else { /* client */ +/* if (server) { */ +/* pl = load_plugin("./plugin_udp_catchall.so"); */ +/* pl->name = "udp_catchall"; */ +/* } else { /\* client *\/ */ pl = load_plugin("./plugin_udp.so"); pl->name = "udp_1234"; - pl = load_plugin("./plugin_udp.so"); - pl->name = "udp_1235"; /* pl = load_plugin("./plugin_udp.so"); */ -/* pl->name = "udp_53"; */ - } - pl = load_plugin("./plugin_tcp.so"); - pl->name = "tcp_1234"; - pl = load_plugin("./plugin_icmp.so"); - pl->name = "icmp"; - pl = load_plugin("./plugin_dns/plugin_dns.so"); - pl->name = "dns_53"; +/* pl->name = "udp_1235"; */ +/* /\* pl = load_plugin("./plugin_udp.so"); *\/ */ +/* /\* pl->name = "udp_53"; *\/ */ +/* } */ +/* pl = load_plugin("./plugin_tcp.so"); */ +/* pl->name = "tcp_1234"; */ +/* pl = load_plugin("./plugin_icmp.so"); */ +/* pl->name = "icmp"; */ +/* pl = load_plugin("./plugin_dns/plugin_dns.so"); */ +/* pl->name = "dns_53"; */ if (server) { /* initialize all plugins */ From owner-p4-projects@FreeBSD.ORG Sat Aug 25 13:55:37 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E9CC816A420; Sat, 25 Aug 2007 13:55:36 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCDF616A417 for ; Sat, 25 Aug 2007 13:55:36 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A56C513C457 for ; Sat, 25 Aug 2007 13:55:36 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7PDtaqu061377 for ; Sat, 25 Aug 2007 13:55:36 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7PDta8u061374 for perforce@freebsd.org; Sat, 25 Aug 2007 13:55:36 GMT (envelope-from mharvan@FreeBSD.org) Date: Sat, 25 Aug 2007 13:55:36 GMT Message-Id: <200708251355.l7PDta8u061374@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125664 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 13:55:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=125664 Change 125664 by mharvan@mharvan_bike-planet on 2007/08/25 13:55:31 UDP plugin: plugin_send() cleanup Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#14 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#14 (text+ko) ==== @@ -303,32 +303,22 @@ struct plugin_udp_data *datapl = (struct plugin_udp_data*) pl->data; int nwrite = 0; struct conn *conn = &(datapl->conns[clid]); - *consumed = 0; if (server) { nwrite = sendto(datapl->fd, data, len, 0, (struct sockaddr*)&conn->addr, conn->addrlen); - if (nwrite == len) { - *consumed = nwrite; - return (SEND_PKT_SENT); - } else { - warn("plugin_send: send returned %d", nwrite); - return (SEND_ERROR); - } } else { /* client */ - if (datapl->state != PLUGIN_STATE_CONNECTED) { - debug("not connected yet, discarding data\n"); - return (SEND_ERROR); - } nwrite = send(datapl->fd, data, len, 0); - if (nwrite == len) { - *consumed = nwrite; - return (SEND_PKT_SENT); - } else { - warn("plugin_send: send returned %d", nwrite); - return (SEND_ERROR); - } + } + + if (nwrite == len) { + *consumed = nwrite; + return (SEND_PKT_SENT); + } else { + *consumed = 0; + warn("plugin_send: send returned %d", nwrite); + return (SEND_ERROR); } } From owner-p4-projects@FreeBSD.ORG Sat Aug 25 15:34:45 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3884616A420; Sat, 25 Aug 2007 15:34:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C20EE16A41A for ; Sat, 25 Aug 2007 15:34:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 71ED213C481 for ; Sat, 25 Aug 2007 15:34:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8k) with ESMTP id 205258618-1834499 for multiple; Sat, 25 Aug 2007 11:34:55 -0400 Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l7PFYfVP007582; Sat, 25 Aug 2007 11:34:42 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Roman Divacky Date: Thu, 23 Aug 2007 11:19:19 -0400 User-Agent: KMail/1.9.7 References: <200708011424.l71EOnG4029903@repoman.freebsd.org> In-Reply-To: <200708011424.l71EOnG4029903@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708231119.19392.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Sat, 25 Aug 2007 11:34:42 -0400 (EDT) X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.2 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_48_96 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 124465 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 15:34:45 -0000 On Wednesday 01 August 2007 10:24:49 am Roman Divacky wrote: > http://perforce.freebsd.org/chv.cgi?CH=124465 > > Change 124465 by rdivacky@rdivacky_witten on 2007/08/01 14:24:10 > > Initialize cr2 using rcr2() in signal context. > > PR: 77710 > > Affected files ... > > .. //depot/projects/soc2007/rdivacky/linux_fixes/sys/i386/linux/linux_sysvec.c#2 edit > > Differences ... > > ==== //depot/projects/soc2007/rdivacky/linux_fixes/sys/i386/linux/linux_sysvec.c#2 (text+ko) ==== > > @@ -359,6 +359,7 @@ > frame.sf_sc.uc_mcontext.sc_esp_at_signal = regs->tf_esp; > frame.sf_sc.uc_mcontext.sc_ss = regs->tf_ss; > frame.sf_sc.uc_mcontext.sc_err = regs->tf_err; > + frame.sf_sc.uc_mcontext.sc_cr2 = rcr2(); > frame.sf_sc.uc_mcontext.sc_trapno = bsd_to_linux_trapcode(code); > > #ifdef DEBUG > @@ -487,6 +488,7 @@ > frame.sf_sc.sc_esp_at_signal = regs->tf_esp; > frame.sf_sc.sc_ss = regs->tf_ss; > frame.sf_sc.sc_err = regs->tf_err; > + frame.sf_sc.sc_cr2 = rcr2(); > frame.sf_sc.sc_trapno = bsd_to_linux_trapcode(ksi->ksi_trapno); > > for (i = 0; i < (LINUX_NSIG_WORDS-1); i++) This is wrong. Use the same thing that the i386 freebsd code uses to set sc_addr. I think it is ksi->ksi_addr. The sc_err part of the PR is already fixed by the recent fixes for sc_err for wine. -- John Baldwin From owner-p4-projects@FreeBSD.ORG Sat Aug 25 21:24:57 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2FD2B16A41A; Sat, 25 Aug 2007 21:24:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F024016A417 for ; Sat, 25 Aug 2007 21:24:56 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DC6E813C459 for ; Sat, 25 Aug 2007 21:24:56 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7PLOuEJ017013 for ; Sat, 25 Aug 2007 21:24:56 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7PLKFav016598 for perforce@freebsd.org; Sat, 25 Aug 2007 21:20:15 GMT (envelope-from marcel@freebsd.org) Date: Sat, 25 Aug 2007 21:20:15 GMT Message-Id: <200708252120.l7PLKFav016598@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 125677 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 21:24:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=125677 Change 125677 by marcel@marcel_xcllnt on 2007/08/25 21:16:31 IFC @125675 Affected files ... .. //depot/projects/gdb/MAINTAINERS#18 integrate .. //depot/projects/gdb/Makefile#14 integrate .. //depot/projects/gdb/Makefile.inc1#20 integrate .. //depot/projects/gdb/ObsoleteFiles.inc#6 integrate .. //depot/projects/gdb/UPDATING#29 integrate .. //depot/projects/gdb/bin/chflags/chflags.1#4 integrate .. //depot/projects/gdb/bin/csh/config.h#5 integrate .. //depot/projects/gdb/bin/csh/config_p.h#3 integrate .. //depot/projects/gdb/bin/date/date.1#9 integrate .. //depot/projects/gdb/bin/df/df.c#15 integrate .. //depot/projects/gdb/bin/ed/Makefile#4 integrate .. //depot/projects/gdb/bin/mv/mv.1#4 integrate .. //depot/projects/gdb/bin/pax/ar_io.c#5 integrate .. //depot/projects/gdb/bin/pax/file_subs.c#3 integrate .. //depot/projects/gdb/bin/pax/pat_rep.c#3 integrate .. //depot/projects/gdb/bin/pax/sel_subs.c#3 integrate .. //depot/projects/gdb/bin/pax/tables.c#3 integrate .. //depot/projects/gdb/bin/rcp/rcp.c#3 integrate .. //depot/projects/gdb/bin/sh/var.c#4 integrate .. //depot/projects/gdb/cddl/lib/Makefile#2 integrate .. //depot/projects/gdb/cddl/lib/libzfs/Makefile#2 integrate .. //depot/projects/gdb/cddl/lib/libzpool/Makefile#2 integrate .. //depot/projects/gdb/cddl/usr.bin/Makefile#2 integrate .. //depot/projects/gdb/cddl/usr.sbin/Makefile#2 integrate .. //depot/projects/gdb/compat/opensolaris/include/devid.h#2 integrate .. //depot/projects/gdb/compat/opensolaris/misc/deviceid.c#1 branch .. //depot/projects/gdb/compat/opensolaris/misc/fsshare.c#2 integrate .. //depot/projects/gdb/contrib/amd/amq/amq.8#4 integrate .. //depot/projects/gdb/contrib/bind9/CHANGES#4 integrate .. //depot/projects/gdb/contrib/bind9/COPYRIGHT#3 integrate .. //depot/projects/gdb/contrib/bind9/FAQ#3 integrate .. //depot/projects/gdb/contrib/bind9/FAQ.xml#3 integrate .. //depot/projects/gdb/contrib/bind9/FREEBSD-Upgrade#2 integrate .. //depot/projects/gdb/contrib/bind9/Makefile.in#3 integrate .. //depot/projects/gdb/contrib/bind9/README#3 integrate .. //depot/projects/gdb/contrib/bind9/README.idnkit#1 branch .. //depot/projects/gdb/contrib/bind9/acconfig.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/check-tool.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/check-tool.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/named-checkconf.8#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/named-checkconf.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/named-checkconf.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/named-checkconf.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/named-checkzone.8#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/named-checkzone.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/named-checkzone.docbook#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/check/named-checkzone.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/dig.1#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/dig.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/dig.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/dig.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/dighost.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/host.1#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/host.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/host.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/host.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/include/dig/dig.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/nslookup.1#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/nslookup.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/nslookup.docbook#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dig/nslookup.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssec-keygen.8#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssec-keygen.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssec-keygen.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssec-keygen.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssec-signzone.8#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssec-signzone.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssec-signzone.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssec-signzone.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssectool.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/dnssec/dnssectool.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/aclconf.c#3 delete .. //depot/projects/gdb/contrib/bind9/bin/named/builtin.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/client.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/config.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/control.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/controlconf.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/aclconf.h#3 delete .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/builtin.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/client.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/config.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/control.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/globals.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/interfacemgr.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/listenlist.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/log.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/logconf.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/lwaddr.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/lwdclient.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/lwresd.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/lwsearch.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/main.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/notify.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/ns_smf_globals.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/query.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/server.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/sortlist.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/tkeyconf.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/tsigconf.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/types.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/update.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/xfrout.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/include/named/zoneconf.h#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/interfacemgr.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/listenlist.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/log.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/logconf.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwaddr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwdclient.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwderror.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwdgabn.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwdgnba.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwdgrbn.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwdnoop.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwresd.8#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwresd.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwresd.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwresd.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/lwsearch.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/main.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/named.8#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/named.conf.5#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/named.conf.docbook#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/named.conf.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/named.docbook#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/named.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/notify.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/query.c#4 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/server.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/sortlist.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/tkeyconf.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/tsigconf.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/unix/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/unix/include/named/os.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/unix/os.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/update.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/xfrout.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/named/zoneconf.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/nsupdate/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/nsupdate/nsupdate.8#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/nsupdate/nsupdate.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/nsupdate/nsupdate.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/nsupdate/nsupdate.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/include/rndc/os.h#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc-confgen.8#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc-confgen.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc-confgen.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc-confgen.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc.8#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc.c#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc.conf#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc.conf.5#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc.conf.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc.conf.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/rndc.html#3 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/unix/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/unix/os.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/util.c#2 integrate .. //depot/projects/gdb/contrib/bind9/bin/rndc/util.h#2 integrate .. //depot/projects/gdb/contrib/bind9/configure.in#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM-book.xml#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch01.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch02.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch03.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch04.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch05.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch06.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch07.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch08.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch09.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.ch10.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.html#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Bv9ARM.pdf#3 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/README-SGML#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/arm/isc-logo.eps#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/isc-logo.pdf#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.dig.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.dnssec-keygen.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.dnssec-signzone.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.host.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.named-checkconf.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.named-checkzone.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.named.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.rndc-confgen.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.rndc.conf.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/arm/man.rndc.html#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-dhcid-rr-09.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-dhcid-rr-12.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-online-signing-00.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-online-signing-02.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-rsasha256-00.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-ds-sha256-05.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-insensitive-06.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-nsec3-02.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-nsec3-04.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-nsid-01.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-trustupdate-threshold-00.txt#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-trustupdate-timers-01.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-trustupdate-timers-02.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-tsig-sha-04.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-tsig-sha-06.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-wcard-clarify-08.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsext-wcard-clarify-10.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsop-bad-dns-res-04.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsop-bad-dns-res-05.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-04.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-08.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsop-serverid-04.txt#2 delete .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-ietf-dnsop-serverid-06.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/draft/draft-schlitt-spf-classic-02.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/misc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/misc/dnssec#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/misc/format-options.pl#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/misc/ipv6#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/misc/migration#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/misc/migration-4to9#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/misc/options#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/misc/rfc-compliance#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/misc/roadmap#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/misc/sdb#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/rfc/index#2 integrate .. //depot/projects/gdb/contrib/bind9/doc/rfc/rfc4193.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/rfc/rfc4255.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/rfc/rfc4343.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/rfc/rfc4367.txt#1 branch .. //depot/projects/gdb/contrib/bind9/doc/rfc/rfc4431.txt#1 branch .. //depot/projects/gdb/contrib/bind9/isc-config.sh.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/Makefile.in#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/api#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/daemon.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/ftruncate.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/gettimeofday.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/mktemp.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/putenv.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/readv.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/setenv.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/setitimer.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/strcasecmp.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/strdup.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/strerror.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/strpbrk.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/strsep.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/strtoul.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/utimes.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/bsd/writev.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/configure#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/configure.in#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/dst/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/dst/dst_api.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/dst/dst_internal.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/dst/hmac_link.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/dst/md5.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/dst/md5_dgst.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/dst/md5_locl.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/dst/support.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/arpa/inet.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/arpa/nameser.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/arpa/nameser_compat.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/fd_setsize.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/hesiod.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/irp.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/irs.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/assertions.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/ctl.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/dst.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/eventlib.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/heap.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/irpmarshall.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/list.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/logging.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/memcluster.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/misc.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/isc/tree.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/netdb.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/netgroup.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/res_update.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/include/resolv.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_addr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_cidr_ntop.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_cidr_pton.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_data.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_lnaof.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_makeaddr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_net_ntop.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_net_pton.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_neta.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_netof.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_network.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_ntoa.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_ntop.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/inet_pton.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/inet/nsap_addr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/dns.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/dns_gr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/dns_ho.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/dns_nw.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/dns_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/dns_pr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/dns_pw.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/dns_sv.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gai_strerror.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gen.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gen_gr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gen_ho.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gen_ng.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gen_nw.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gen_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gen_pr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gen_pw.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gen_sv.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getaddrinfo.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getgrent.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getgrent_r.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gethostent.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/gethostent_r.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getnameinfo.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getnetent.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getnetent_r.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getnetgrent.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getnetgrent_r.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getprotoent.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getprotoent_r.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getpwent.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getpwent_r.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getservent.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/getservent_r.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/hesiod.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/hesiod_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irp.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irp_gr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irp_ho.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irp_ng.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irp_nw.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irp_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irp_pr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irp_pw.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irp_sv.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irpmarshall.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irs_data.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irs_data.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/irs_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/lcl.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/lcl_gr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/lcl_ho.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/lcl_ng.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/lcl_nw.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/lcl_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/lcl_pr.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/lcl_pw.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/lcl_sv.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nis.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nis_gr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nis_ho.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nis_ng.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nis_nw.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nis_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nis_pr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nis_pw.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nis_sv.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/nul_ng.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/pathnames.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/irs/util.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/assertions.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/assertions.mdoc#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/base64.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/bitncmp.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/bitncmp.mdoc#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/ctl_clnt.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/ctl_p.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/ctl_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/ctl_srvr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/ev_connects.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/ev_files.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/ev_streams.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/ev_timers.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/ev_waits.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/eventlib.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/eventlib.mdoc#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/eventlib_p.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/heap.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/heap.mdoc#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/hex.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/logging.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/logging.mdoc#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/logging_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/memcluster.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/memcluster.mdoc#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/movefile.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/tree.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/isc/tree.mdoc#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/make/includes.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/make/rules.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/ns_date.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/ns_name.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/ns_netint.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/ns_parse.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/ns_print.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/ns_samedomain.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/ns_sign.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/ns_ttl.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/nameser/ns_verify.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/port/freebsd/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/port_before.h.in#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/herror.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_comp.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_data.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_debug.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_debug.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_findzonecut.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_init.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_mkquery.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_mkupdate.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_mkupdate.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_private.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_query.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_send.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_sendsigned.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind/resolv/res_update.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/api#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/check.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/getaddresses.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/include/bind9/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/include/bind9/check.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/include/bind9/getaddresses.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/include/bind9/version.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/bind9/version.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/Makefile.in#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/acache.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/acl.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/adb.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/api#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/byaddr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/cache.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/callbacks.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/compress.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/db.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dbiterator.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dbtable.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/diff.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dispatch.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dlz.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/dnssec.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/ds.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dst_api.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dst_internal.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dst_lib.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dst_openssl.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dst_parse.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dst_parse.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/dst_result.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/forward.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/gen-unix.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/gen.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/gssapi_link.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/gssapictx.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/hmac_link.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/acache.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/acl.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/adb.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/bit.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/byaddr.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/cache.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/callbacks.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/cert.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/compress.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/db.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/dbiterator.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/dbtable.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/diff.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/dispatch.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/dlz.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/dnssec.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/ds.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/events.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/fixedname.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/forward.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/journal.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/keyflags.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/keytable.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/keyvalues.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/lib.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/log.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/lookup.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/master.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/masterdump.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/message.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/name.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/ncache.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/nsec.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/opcode.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/order.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/peer.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/portlist.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rbt.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rcode.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rdata.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rdataclass.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rdatalist.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rdataset.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rdatasetiter.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rdataslab.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rdatatype.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/request.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/resolver.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/result.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/rootns.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/sdb.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/sdlz.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/secalg.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/secproto.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/soa.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/ssu.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/stats.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/tcpmsg.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/time.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/timer.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/tkey.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/tsig.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/ttl.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/types.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/validator.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/version.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/view.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/xfrin.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/zone.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/zonekey.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dns/zt.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dst/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dst/dst.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dst/gssapi.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dst/lib.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/include/dst/result.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/journal.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/key.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/keytable.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/lib.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/log.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/lookup.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/master.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/masterdump.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/message.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/name.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/ncache.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/nsec.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/openssl_link.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/openssldh_link.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/openssldsa_link.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/opensslrsa_link.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/order.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/peer.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/portlist.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rbt.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rbtdb.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rbtdb.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rbtdb64.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rbtdb64.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rcode.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/any_255/tsig_250.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/ch_3/a_1.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/ch_3/a_1.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/afsdb_18.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/afsdb_18.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/cert_37.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/cert_37.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/cname_5.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/cname_5.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/dlv_32769.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/dname_39.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/dname_39.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/dnskey_48.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/dnskey_48.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/ds_43.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/ds_43.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/gpos_27.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/gpos_27.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/hinfo_13.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/hinfo_13.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/isdn_20.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/isdn_20.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/key_25.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/key_25.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/loc_29.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/loc_29.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mb_7.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mb_7.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/md_3.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/md_3.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mf_4.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mf_4.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mg_8.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mg_8.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/minfo_14.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/minfo_14.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mr_9.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mr_9.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mx_15.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/mx_15.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/ns_2.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/ns_2.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/nsec_47.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/nsec_47.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/null_10.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/null_10.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/nxt_30.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/nxt_30.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/opt_41.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/opt_41.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/proforma.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/proforma.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/ptr_12.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/ptr_12.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/rp_17.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/rp_17.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/rrsig_46.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/rrsig_46.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/rt_21.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/rt_21.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/sig_24.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/sig_24.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/soa_6.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/soa_6.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/spf_99.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/spf_99.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/sshfp_44.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/sshfp_44.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/tkey_249.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/tkey_249.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/txt_16.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/txt_16.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/unspec_103.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/unspec_103.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/x25_19.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/generic/x25_19.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/hs_4/a_1.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/hs_4/a_1.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/a6_38.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/a6_38.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/a_1.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/a_1.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/apl_42.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/apl_42.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/kx_36.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/kx_36.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/naptr_35.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/nsap_22.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/nsap_22.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/px_26.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/px_26.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/srv_33.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/srv_33.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/wks_11.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/in_1/wks_11.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/rdatastructpre.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdata/rdatastructsuf.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdatalist.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdatalist_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdataset.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdatasetiter.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rdataslab.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/request.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/resolver.c#4 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/result.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/rootns.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/sdb.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/sdlz.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/dns/soa.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/ssu.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/stats.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/tcpmsg.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/time.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/timer.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/tkey.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/tsig.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/ttl.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/validator.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/version.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/view.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/xfrin.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/zone.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/zonekey.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/dns/zt.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/alpha/include/isc/atomic.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/api#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/arm/include/isc/atomic.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/assertions.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/base64.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/bitstring.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/buffer.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/bufferlist.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/commandline.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/entropy.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/error.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/event.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/fsaccess.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/hash.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/heap.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/hex.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/hmacmd5.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/hmacsha.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/ia64/include/isc/atomic.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/app.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/assertions.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/base64.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/bitstring.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/boolean.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/buffer.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/bufferlist.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/commandline.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/entropy.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/error.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/event.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/eventclass.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/file.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/formatcheck.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/fsaccess.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/hash.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/heap.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/hex.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/hmacmd5.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/hmacsha.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/interfaceiter.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/ipv6.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/lang.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/lex.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/lfsr.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/lib.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/list.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/log.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/magic.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/md5.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/mem.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/msgcat.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/msgs.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/mutexblock.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/netaddr.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/netscope.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/ondestroy.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/os.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/parseint.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/platform.h.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/print.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/quota.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/random.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/ratelimiter.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/refcount.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/region.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/resource.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/result.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/resultclass.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/rwlock.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/serial.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/sha1.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/sha2.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/sockaddr.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/socket.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/stdio.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/stdlib.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/string.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/symtab.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/task.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/taskpool.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/timer.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/types.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/util.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/include/isc/version.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/inet_aton.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/inet_ntop.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/inet_pton.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/lex.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/lfsr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/lib.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/log.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/md5.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/mem.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/mips/include/isc/atomic.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/mutexblock.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/netaddr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/netscope.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nls/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nls/msgcat.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/noatomic/include/isc/atomic.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/condition.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/include/isc/condition.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/include/isc/mutex.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/include/isc/once.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/include/isc/thread.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/mutex.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/nothreads/thread.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/ondestroy.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/parseint.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/powerpc/include/isc/atomic.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/print.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/condition.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/include/isc/condition.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/include/isc/mutex.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/include/isc/once.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/include/isc/thread.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/mutex.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/pthreads/thread.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/quota.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/random.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/ratelimiter.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/refcount.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/region.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/result.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/rwlock.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/serial.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/sha1.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/sha2.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/sockaddr.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/string.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/strtoul.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/symtab.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/task.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/task_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/taskpool.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/timer.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/timer_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/app.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/dir.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/entropy.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/errno2result.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/errno2result.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/file.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/fsaccess.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/ifiter_ioctl.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/ifiter_sysctl.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/dir.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/int.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/keyboard.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/net.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/netdb.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/offset.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/stat.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/stdtime.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/strerror.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/syslog.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/include/isc/time.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/interfaceiter.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/ipv6.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/keyboard.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/net.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/os.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/resource.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/socket.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/socket_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/stdio.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/stdtime.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/strerror.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/syslog.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/unix/time.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/version.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isc/x86_64/include/isc/atomic.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isccc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/alist.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/api#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/base64.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/cc.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/ccmsg.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/alist.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/base64.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/cc.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/ccmsg.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/events.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/lib.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/result.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/sexpr.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/symtab.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/symtype.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/types.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/util.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/include/isccc/version.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/lib.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/result.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/sexpr.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/symtab.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccc/version.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/aclconf.c#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isccfg/api#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/include/isccfg/aclconf.h#1 branch .. //depot/projects/gdb/contrib/bind9/lib/isccfg/include/isccfg/cfg.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/include/isccfg/grammar.h#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/include/isccfg/log.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/include/isccfg/version.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/log.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/namedconf.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/parser.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/isccfg/version.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/api#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/assert_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/context.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/context_p.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/gai_strerror.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/getaddrinfo.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/gethost.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/getipnode.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/getnameinfo.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/getrrset.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/herror.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/context.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/int.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/ipv6.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/lang.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/list.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/lwbuffer.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/lwpacket.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/lwres.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/netdb.h.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/platform.h.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/result.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/stdlib.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/include/lwres/version.h#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwbuffer.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwconfig.c#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwinetaton.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwinetntop.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwinetpton.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwpacket.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwres_gabn.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwres_gnba.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwres_grbn.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwres_noop.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/lwresutil.c#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres.3#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres.html#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_buffer.3#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_buffer.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_buffer.html#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_config.3#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_config.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_config.html#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_context.3#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_context.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_context.html#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_gabn.3#3 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_gabn.docbook#2 integrate .. //depot/projects/gdb/contrib/bind9/lib/lwres/man/lwres_gabn.html#3 integrate >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Aug 25 22:25:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BD44416A41A; Sat, 25 Aug 2007 22:25:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75E6416A420 for ; Sat, 25 Aug 2007 22:25:16 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 64A9113C465 for ; Sat, 25 Aug 2007 22:25:16 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7PMPGgp022005 for ; Sat, 25 Aug 2007 22:25:16 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7PMOHjn021908 for perforce@freebsd.org; Sat, 25 Aug 2007 22:24:17 GMT (envelope-from marcel@freebsd.org) Date: Sat, 25 Aug 2007 22:24:17 GMT Message-Id: <200708252224.l7PMOHjn021908@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 125686 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 22:25:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=125686 Change 125686 by marcel@marcel_xcllnt on 2007/08/25 22:23:53 IFC @125675 Affected files ... .. //depot/projects/busdma/Makefile#6 integrate .. //depot/projects/busdma/amd64/acpica/madt.c#4 integrate .. //depot/projects/busdma/amd64/amd64/busdma_machdep.c#4 integrate .. //depot/projects/busdma/amd64/amd64/cpu_switch.S#3 integrate .. //depot/projects/busdma/amd64/amd64/elf_machdep.c#2 integrate .. //depot/projects/busdma/amd64/amd64/genassym.c#3 integrate .. //depot/projects/busdma/amd64/amd64/identcpu.c#4 integrate .. //depot/projects/busdma/amd64/amd64/intr_machdep.c#4 integrate .. //depot/projects/busdma/amd64/amd64/io_apic.c#3 integrate .. //depot/projects/busdma/amd64/amd64/local_apic.c#4 integrate .. //depot/projects/busdma/amd64/amd64/machdep.c#6 integrate .. //depot/projects/busdma/amd64/amd64/mp_machdep.c#5 integrate .. //depot/projects/busdma/amd64/amd64/mp_watchdog.c#2 integrate .. //depot/projects/busdma/amd64/amd64/mptable.c#3 integrate .. //depot/projects/busdma/amd64/amd64/mptable_pci.c#3 integrate .. //depot/projects/busdma/amd64/amd64/msi.c#2 integrate .. //depot/projects/busdma/amd64/amd64/nexus.c#4 integrate .. //depot/projects/busdma/amd64/amd64/pmap.c#6 integrate .. //depot/projects/busdma/amd64/amd64/support.S#4 integrate .. //depot/projects/busdma/amd64/amd64/trap.c#5 integrate .. //depot/projects/busdma/amd64/amd64/tsc.c#3 integrate .. //depot/projects/busdma/amd64/amd64/vm_machdep.c#3 integrate .. //depot/projects/busdma/amd64/conf/DEFAULTS#4 integrate .. //depot/projects/busdma/amd64/conf/GENERIC#7 integrate .. //depot/projects/busdma/amd64/conf/NOTES#7 integrate .. //depot/projects/busdma/amd64/ia32/ia32_syscall.c#4 integrate .. //depot/projects/busdma/amd64/include/apicvar.h#3 integrate .. //depot/projects/busdma/amd64/include/asm.h#2 integrate .. //depot/projects/busdma/amd64/include/asmacros.h#3 integrate .. //depot/projects/busdma/amd64/include/intr_machdep.h#3 integrate .. //depot/projects/busdma/amd64/include/kdb.h#2 integrate .. //depot/projects/busdma/amd64/include/md_var.h#4 integrate .. //depot/projects/busdma/amd64/include/pcpu.h#3 integrate .. //depot/projects/busdma/amd64/include/smp.h#3 integrate .. //depot/projects/busdma/amd64/include/specialreg.h#4 integrate .. //depot/projects/busdma/amd64/include/vmparam.h#3 integrate .. //depot/projects/busdma/amd64/isa/atpic.c#3 integrate .. //depot/projects/busdma/amd64/isa/clock.c#4 integrate .. //depot/projects/busdma/amd64/linux32/linux32_machdep.c#4 integrate .. //depot/projects/busdma/amd64/linux32/linux32_support.s#1 branch .. //depot/projects/busdma/amd64/linux32/linux32_sysvec.c#5 integrate .. //depot/projects/busdma/amd64/pci/pci_bus.c#3 integrate .. //depot/projects/busdma/arm/arm/busdma_machdep.c#5 integrate .. //depot/projects/busdma/arm/arm/cpufunc.c#4 integrate .. //depot/projects/busdma/arm/arm/cpufunc_asm_xscale_c3.S#1 branch .. //depot/projects/busdma/arm/arm/elf_machdep.c#2 integrate .. //depot/projects/busdma/arm/arm/elf_trampoline.c#6 integrate .. //depot/projects/busdma/arm/arm/genassym.c#3 integrate .. //depot/projects/busdma/arm/arm/identcpu.c#4 integrate .. //depot/projects/busdma/arm/arm/intr.c#3 integrate .. //depot/projects/busdma/arm/arm/machdep.c#5 integrate .. //depot/projects/busdma/arm/arm/pmap.c#5 integrate .. //depot/projects/busdma/arm/arm/swtch.S#2 integrate .. //depot/projects/busdma/arm/arm/trap.c#4 integrate .. //depot/projects/busdma/arm/arm/undefined.c#3 integrate .. //depot/projects/busdma/arm/arm/vm_machdep.c#5 integrate .. //depot/projects/busdma/arm/at91/at91rm92reg.h#4 integrate .. //depot/projects/busdma/arm/at91/if_ate.c#5 integrate .. //depot/projects/busdma/arm/at91/kb920x_machdep.c#5 integrate .. //depot/projects/busdma/arm/at91/ohci_atmelarm.c#3 integrate .. //depot/projects/busdma/arm/at91/uart_cpu_at91rm9200usart.c#4 integrate .. //depot/projects/busdma/arm/conf/AVILA#2 integrate .. //depot/projects/busdma/arm/conf/AVILA.hints#1 branch .. //depot/projects/busdma/arm/conf/CRB#1 branch .. //depot/projects/busdma/arm/conf/KB920X#5 integrate .. //depot/projects/busdma/arm/include/armreg.h#4 integrate .. //depot/projects/busdma/arm/include/asm.h#3 integrate .. //depot/projects/busdma/arm/include/cpufunc.h#5 integrate .. //depot/projects/busdma/arm/include/intr.h#3 integrate .. //depot/projects/busdma/arm/include/kdb.h#2 integrate .. //depot/projects/busdma/arm/include/pcpu.h#3 integrate .. //depot/projects/busdma/arm/include/pmap.h#5 integrate .. //depot/projects/busdma/arm/include/profile.h#2 integrate .. //depot/projects/busdma/arm/include/pte.h#2 integrate .. //depot/projects/busdma/arm/include/vmparam.h#3 integrate .. //depot/projects/busdma/arm/xscale/i80321/ep80219_machdep.c#3 integrate .. //depot/projects/busdma/arm/xscale/i80321/i80321_pci.c#4 integrate .. //depot/projects/busdma/arm/xscale/i80321/i80321_timer.c#4 integrate .. //depot/projects/busdma/arm/xscale/i80321/i80321_wdog.c#3 integrate .. //depot/projects/busdma/arm/xscale/i80321/i80321var.h#3 integrate .. //depot/projects/busdma/arm/xscale/i80321/iq31244_machdep.c#5 integrate .. //depot/projects/busdma/arm/xscale/i80321/obio.c#2 integrate .. //depot/projects/busdma/arm/xscale/i8134x/crb_machdep.c#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/files.crb#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/files.i81342#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/i81342.c#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/i81342_mcu.c#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/i81342_pci.c#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/i81342_space.c#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/i81342reg.h#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/i81342var.h#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/obio.c#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/obio_space.c#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/obiovar.h#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/std.crb#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/std.i81342#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/uart_bus_i81342.c#1 branch .. //depot/projects/busdma/arm/xscale/i8134x/uart_cpu_i81342.c#1 branch .. //depot/projects/busdma/arm/xscale/ixp425/avila_ata.c#2 integrate .. //depot/projects/busdma/arm/xscale/ixp425/avila_machdep.c#2 integrate .. //depot/projects/busdma/arm/xscale/ixp425/if_npe.c#2 integrate .. //depot/projects/busdma/arm/xscale/ixp425/ixp425.c#2 integrate .. //depot/projects/busdma/arm/xscale/ixp425/ixp425_npe.c#2 integrate .. //depot/projects/busdma/arm/xscale/ixp425/ixp425_npevar.h#2 integrate .. //depot/projects/busdma/arm/xscale/ixp425/ixp425var.h#2 integrate .. //depot/projects/busdma/arm/xscale/ixp425/uart_bus_ixp425.c#2 integrate .. //depot/projects/busdma/arm/xscale/ixp425/uart_cpu_ixp425.c#2 integrate .. //depot/projects/busdma/boot/arm/at91/Makefile.inc#4 integrate .. //depot/projects/busdma/boot/arm/at91/boot2/board.h#2 integrate .. //depot/projects/busdma/boot/arm/at91/boot2/boot2.c#2 integrate .. //depot/projects/busdma/boot/arm/at91/boot2/bwct_board.c#1 branch .. //depot/projects/busdma/boot/arm/at91/boot2/centipad_board.c#1 branch .. //depot/projects/busdma/boot/arm/at91/boot2/kb920x_board.c#2 integrate .. //depot/projects/busdma/boot/arm/at91/libat91/Makefile#4 integrate .. //depot/projects/busdma/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 integrate .. //depot/projects/busdma/boot/arm/at91/libat91/at91rm9200_lowlevel.h#4 integrate .. //depot/projects/busdma/boot/arm/at91/libat91/emac.c#4 integrate .. //depot/projects/busdma/boot/arm/at91/libat91/emac.h#4 integrate .. //depot/projects/busdma/boot/common/loader.8#5 integrate .. //depot/projects/busdma/boot/forth/loader.conf#5 integrate .. //depot/projects/busdma/boot/i386/Makefile#2 integrate .. //depot/projects/busdma/boot/i386/boot2/Makefile#2 integrate .. //depot/projects/busdma/boot/i386/libfirewire/Makefile#1 branch .. //depot/projects/busdma/boot/i386/libfirewire/dconsole.c#1 branch .. //depot/projects/busdma/boot/i386/libfirewire/firewire.c#1 branch .. //depot/projects/busdma/boot/i386/libfirewire/fwohci.c#1 branch .. //depot/projects/busdma/boot/i386/libfirewire/fwohci.h#1 branch .. //depot/projects/busdma/boot/i386/libfirewire/fwohcireg.h#1 branch .. //depot/projects/busdma/boot/i386/libi386/smbios.c#2 integrate .. //depot/projects/busdma/boot/i386/loader/Makefile#3 integrate .. //depot/projects/busdma/boot/i386/loader/conf.c#2 integrate .. //depot/projects/busdma/boot/i386/loader/main.c#4 integrate .. //depot/projects/busdma/boot/ia64/common/exec.c#2 integrate .. //depot/projects/busdma/boot/ofw/common/main.c#3 integrate .. //depot/projects/busdma/boot/ofw/libofw/Makefile#3 integrate .. //depot/projects/busdma/boot/ofw/libofw/ofw_console.c#2 integrate .. //depot/projects/busdma/boot/ofw/libofw/ofw_net.c#2 integrate .. //depot/projects/busdma/boot/ofw/libofw/openfirm.c#3 integrate .. //depot/projects/busdma/boot/ofw/libofw/openfirm.h#2 integrate .. //depot/projects/busdma/boot/ofw/libofw/openfirm_mmu.c#2 delete .. //depot/projects/busdma/boot/sparc64/loader/main.c#3 integrate .. //depot/projects/busdma/bsm/audit.h#5 integrate .. //depot/projects/busdma/bsm/audit_internal.h#4 integrate .. //depot/projects/busdma/bsm/audit_kevents.h#5 integrate .. //depot/projects/busdma/bsm/audit_record.h#6 integrate .. //depot/projects/busdma/cam/README.quirks#1 branch .. //depot/projects/busdma/cam/cam.c#2 integrate .. //depot/projects/busdma/cam/cam_periph.c#5 integrate .. //depot/projects/busdma/cam/cam_xpt.c#6 integrate .. //depot/projects/busdma/cam/cam_xpt.h#3 integrate .. //depot/projects/busdma/cam/cam_xpt_sim.h#2 integrate .. //depot/projects/busdma/cam/scsi/scsi_all.c#3 integrate .. //depot/projects/busdma/cam/scsi/scsi_cd.c#4 integrate .. //depot/projects/busdma/cam/scsi/scsi_ch.c#3 integrate .. //depot/projects/busdma/cam/scsi/scsi_da.c#4 integrate .. //depot/projects/busdma/cam/scsi/scsi_low.c#3 integrate .. //depot/projects/busdma/cam/scsi/scsi_pass.c#4 integrate .. //depot/projects/busdma/cam/scsi/scsi_pt.c#3 integrate .. //depot/projects/busdma/cam/scsi/scsi_sa.c#3 integrate .. //depot/projects/busdma/cam/scsi/scsi_ses.c#3 integrate .. //depot/projects/busdma/cam/scsi/scsi_sg.c#2 integrate .. //depot/projects/busdma/cam/scsi/scsi_targ_bh.c#3 integrate .. //depot/projects/busdma/coda/00READ#2 delete .. //depot/projects/busdma/coda/README#2 delete .. //depot/projects/busdma/coda/TODO#2 delete .. //depot/projects/busdma/coda/cnode.h#3 delete .. //depot/projects/busdma/coda/coda.h#2 delete .. //depot/projects/busdma/coda/coda_fbsd.c#2 delete .. //depot/projects/busdma/coda/coda_io.h#2 delete .. //depot/projects/busdma/coda/coda_kernel.h#2 delete .. //depot/projects/busdma/coda/coda_namecache.c#2 delete .. //depot/projects/busdma/coda/coda_namecache.h#2 delete .. //depot/projects/busdma/coda/coda_opstats.h#2 delete .. //depot/projects/busdma/coda/coda_pioctl.h#2 delete .. //depot/projects/busdma/coda/coda_psdev.c#2 delete .. //depot/projects/busdma/coda/coda_psdev.h#2 delete .. //depot/projects/busdma/coda/coda_subr.c#2 delete .. //depot/projects/busdma/coda/coda_subr.h#2 delete .. //depot/projects/busdma/coda/coda_venus.c#2 delete .. //depot/projects/busdma/coda/coda_venus.h#2 delete .. //depot/projects/busdma/coda/coda_vfsops.c#2 delete .. //depot/projects/busdma/coda/coda_vfsops.h#3 delete .. //depot/projects/busdma/coda/coda_vnops.c#3 delete .. //depot/projects/busdma/coda/coda_vnops.h#3 delete .. //depot/projects/busdma/compat/freebsd32/freebsd32_misc.c#5 integrate .. //depot/projects/busdma/compat/freebsd32/freebsd32_proto.h#5 integrate .. //depot/projects/busdma/compat/freebsd32/freebsd32_syscall.h#5 integrate .. //depot/projects/busdma/compat/freebsd32/freebsd32_syscalls.c#5 integrate .. //depot/projects/busdma/compat/freebsd32/freebsd32_sysent.c#5 integrate .. //depot/projects/busdma/compat/freebsd32/syscalls.master#5 integrate .. //depot/projects/busdma/compat/ia32/ia32_sysvec.c#3 integrate .. //depot/projects/busdma/compat/linprocfs/linprocfs.c#7 integrate .. //depot/projects/busdma/compat/linux/linux_file.c#5 integrate .. //depot/projects/busdma/compat/linux/linux_futex.c#3 integrate .. //depot/projects/busdma/compat/linux/linux_misc.c#6 integrate .. //depot/projects/busdma/compat/linux/linux_socket.c#5 integrate .. //depot/projects/busdma/compat/linux/linux_uid16.c#3 integrate .. //depot/projects/busdma/compat/ndis/kern_ndis.c#4 integrate .. //depot/projects/busdma/compat/ndis/kern_windrv.c#2 integrate .. //depot/projects/busdma/compat/ndis/subr_ndis.c#4 integrate .. //depot/projects/busdma/compat/ndis/subr_ntoskrnl.c#4 integrate .. //depot/projects/busdma/compat/opensolaris/kern/opensolaris_atomic.c#1 branch .. //depot/projects/busdma/compat/opensolaris/kern/opensolaris_kobj.c#2 integrate .. //depot/projects/busdma/compat/opensolaris/kern/opensolaris_kstat.c#2 integrate .. //depot/projects/busdma/compat/opensolaris/kern/opensolaris_misc.c#2 integrate .. //depot/projects/busdma/compat/opensolaris/kern/opensolaris_policy.c#2 integrate .. //depot/projects/busdma/compat/opensolaris/kern/opensolaris_vfs.c#2 integrate .. //depot/projects/busdma/compat/opensolaris/sys/atomic.h#1 branch .. //depot/projects/busdma/compat/opensolaris/sys/dnlc.h#1 branch .. //depot/projects/busdma/compat/opensolaris/sys/misc.h#2 integrate .. //depot/projects/busdma/compat/opensolaris/sys/mutex.h#2 integrate .. //depot/projects/busdma/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/busdma/compat/opensolaris/sys/rwlock.h#2 integrate .. //depot/projects/busdma/compat/opensolaris/sys/sunddi.h#1 branch .. //depot/projects/busdma/compat/opensolaris/sys/types.h#2 integrate .. //depot/projects/busdma/compat/opensolaris/sys/vfs.h#2 integrate .. //depot/projects/busdma/compat/opensolaris/sys/vnode.h#2 integrate .. //depot/projects/busdma/compat/pecoff/imgact_pecoff.c#2 integrate .. //depot/projects/busdma/compat/svr4/svr4_fcntl.c#3 integrate .. //depot/projects/busdma/compat/svr4/svr4_misc.c#5 integrate .. //depot/projects/busdma/conf/Makefile.amd64#2 integrate .. //depot/projects/busdma/conf/Makefile.arm#4 integrate .. //depot/projects/busdma/conf/Makefile.i386#2 integrate .. //depot/projects/busdma/conf/Makefile.ia64#2 integrate .. //depot/projects/busdma/conf/Makefile.pc98#2 integrate .. //depot/projects/busdma/conf/Makefile.powerpc#2 integrate .. //depot/projects/busdma/conf/Makefile.sparc64#2 integrate .. //depot/projects/busdma/conf/Makefile.sun4v#2 integrate .. //depot/projects/busdma/conf/NOTES#7 integrate .. //depot/projects/busdma/conf/files#7 integrate .. //depot/projects/busdma/conf/files.amd64#7 integrate .. //depot/projects/busdma/conf/files.arm#5 integrate .. //depot/projects/busdma/conf/files.i386#7 integrate .. //depot/projects/busdma/conf/files.ia64#5 integrate .. //depot/projects/busdma/conf/files.pc98#6 integrate .. //depot/projects/busdma/conf/files.powerpc#5 integrate .. //depot/projects/busdma/conf/files.sparc64#3 integrate .. //depot/projects/busdma/conf/files.sun4v#3 integrate .. //depot/projects/busdma/conf/kern.mk#6 integrate .. //depot/projects/busdma/conf/kern.pre.mk#5 integrate .. //depot/projects/busdma/conf/kmod.mk#6 integrate .. //depot/projects/busdma/conf/options#7 integrate .. //depot/projects/busdma/conf/options.amd64#4 integrate .. //depot/projects/busdma/conf/options.arm#5 integrate .. //depot/projects/busdma/conf/options.i386#5 integrate .. //depot/projects/busdma/conf/options.ia64#2 integrate .. //depot/projects/busdma/conf/options.pc98#4 integrate .. //depot/projects/busdma/contrib/altq/altq/altq_cbq.c#3 integrate .. //depot/projects/busdma/contrib/altq/altq/altq_hfsc.c#3 integrate .. //depot/projects/busdma/contrib/altq/altq/altq_priq.c#3 integrate .. //depot/projects/busdma/contrib/altq/altq/altq_red.c#3 integrate .. //depot/projects/busdma/contrib/altq/altq/altq_subr.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/fil.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_auth.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_auth.h#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_compat.h#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_fil.h#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_fil_freebsd.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_frag.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_frag.h#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_ftp_pxy.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_htable.c#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_htable.h#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_ipsec_pxy.c#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_irc_pxy.c#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_log.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_lookup.c#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_lookup.h#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_nat.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_nat.h#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_pool.c#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_pool.h#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_pptp_pxy.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_proxy.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_proxy.h#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_raudio_pxy.c#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_rcmd_pxy.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_rpcb_pxy.c#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_scan.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_scan.h#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_state.c#4 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_state.h#2 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_sync.c#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ip_sync.h#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/ipl.h#3 integrate .. //depot/projects/busdma/contrib/ipfilter/netinet/mlfk_ipl.c#3 integrate .. //depot/projects/busdma/contrib/ngatm/netnatm/api/cc_conn.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/common/atomic/amd64/atomic.S#2 integrate .. //depot/projects/busdma/contrib/opensolaris/common/atomic/i386/atomic.S#2 integrate .. //depot/projects/busdma/contrib/opensolaris/common/atomic/ia64/atomic.S#1 branch .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/dnlc.c#2 delete .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/gfs.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/arc.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/dbuf.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/dnode.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/spa.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/spa_config.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/vdev.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zap.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zil.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zio.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/fs/zfs/zvol.c#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/sys/asm_linkage.h#2 integrate .. //depot/projects/busdma/contrib/opensolaris/uts/common/sys/atomic.h#2 delete .. //depot/projects/busdma/contrib/opensolaris/uts/common/sys/dnlc.h#2 delete .. //depot/projects/busdma/contrib/pf/net/if_pflog.c#3 integrate .. //depot/projects/busdma/contrib/pf/net/if_pflog.h#2 integrate .. //depot/projects/busdma/contrib/pf/net/if_pfsync.c#5 integrate .. //depot/projects/busdma/contrib/pf/net/if_pfsync.h#3 integrate .. //depot/projects/busdma/contrib/pf/net/pf.c#4 integrate .. //depot/projects/busdma/contrib/pf/net/pf_if.c#2 integrate .. //depot/projects/busdma/contrib/pf/net/pf_ioctl.c#5 integrate .. //depot/projects/busdma/contrib/pf/net/pf_mtag.h#1 branch .. //depot/projects/busdma/contrib/pf/net/pf_norm.c#2 integrate .. //depot/projects/busdma/contrib/pf/net/pf_osfp.c#2 integrate .. //depot/projects/busdma/contrib/pf/net/pf_ruleset.c#1 branch .. //depot/projects/busdma/contrib/pf/net/pf_subr.c#2 integrate .. //depot/projects/busdma/contrib/pf/net/pf_table.c#2 integrate .. //depot/projects/busdma/contrib/pf/net/pfvar.h#2 integrate .. //depot/projects/busdma/crypto/camellia/camellia-api.c#1 branch .. //depot/projects/busdma/crypto/camellia/camellia.c#1 branch .. //depot/projects/busdma/crypto/camellia/camellia.h#1 branch .. //depot/projects/busdma/crypto/via/padlock.c#5 integrate .. //depot/projects/busdma/dev/aac/aac_cam.c#4 integrate .. //depot/projects/busdma/dev/aac/aac_pci.c#4 integrate .. //depot/projects/busdma/dev/acpi_support/acpi_asus.c#3 integrate .. //depot/projects/busdma/dev/acpi_support/acpi_ibm.c#4 integrate .. //depot/projects/busdma/dev/acpi_support/acpi_panasonic.c#3 integrate .. //depot/projects/busdma/dev/acpica/Osd/OsdHardware.c#3 integrate .. //depot/projects/busdma/dev/acpica/acpi.c#6 integrate .. //depot/projects/busdma/dev/acpica/acpi_cpu.c#3 integrate .. //depot/projects/busdma/dev/acpica/acpi_dock.c#5 integrate .. //depot/projects/busdma/dev/acpica/acpi_ec.c#3 integrate .. //depot/projects/busdma/dev/acpica/acpi_hpet.c#5 integrate .. //depot/projects/busdma/dev/acpica/acpi_pcib_acpi.c#3 integrate .. //depot/projects/busdma/dev/acpica/acpi_pcib_pci.c#3 integrate .. //depot/projects/busdma/dev/acpica/acpi_timer.c#3 integrate .. //depot/projects/busdma/dev/acpica/acpiio.h#2 integrate .. //depot/projects/busdma/dev/acpica/acpivar.h#5 integrate .. //depot/projects/busdma/dev/adlink/adlink.c#3 integrate .. //depot/projects/busdma/dev/advansys/advansys.c#3 integrate .. //depot/projects/busdma/dev/advansys/advlib.h#2 integrate .. //depot/projects/busdma/dev/advansys/adwcam.c#3 integrate .. //depot/projects/busdma/dev/aha/aha.c#3 integrate .. //depot/projects/busdma/dev/ahb/ahb.c#4 integrate .. //depot/projects/busdma/dev/ahb/ahbreg.h#2 integrate .. //depot/projects/busdma/dev/aic/aic.c#3 integrate .. //depot/projects/busdma/dev/aic/aic_cbus.c#3 integrate .. //depot/projects/busdma/dev/aic/aic_isa.c#3 integrate .. //depot/projects/busdma/dev/aic/aic_pccard.c#4 integrate .. //depot/projects/busdma/dev/aic/aicvar.h#2 integrate .. //depot/projects/busdma/dev/aic7xxx/aic79xx_osm.c#3 integrate .. //depot/projects/busdma/dev/aic7xxx/aic7xxx.c#3 integrate .. //depot/projects/busdma/dev/aic7xxx/aic7xxx_osm.c#4 integrate .. //depot/projects/busdma/dev/aic7xxx/aic_osm_lib.c#3 integrate .. //depot/projects/busdma/dev/amd/amd.c#3 integrate .. //depot/projects/busdma/dev/amr/amr_cam.c#3 integrate .. //depot/projects/busdma/dev/an/if_an.c#4 integrate .. //depot/projects/busdma/dev/arcmsr/arcmsr.c#5 integrate .. //depot/projects/busdma/dev/asr/asr.c#4 integrate .. //depot/projects/busdma/dev/ata/ata-all.h#4 integrate .. //depot/projects/busdma/dev/ata/ata-chipset.c#7 integrate .. //depot/projects/busdma/dev/ata/ata-disk.c#4 integrate .. //depot/projects/busdma/dev/ata/ata-pci.h#5 integrate .. //depot/projects/busdma/dev/ata/ata-raid.c#4 integrate .. //depot/projects/busdma/dev/ata/ata-usb.c#4 integrate .. //depot/projects/busdma/dev/ata/atapi-cam.c#3 integrate .. //depot/projects/busdma/dev/ath/ah_osdep.c#3 integrate .. //depot/projects/busdma/dev/ath/ah_osdep.h#2 integrate .. //depot/projects/busdma/dev/ath/ath_rate/amrr/amrr.c#3 integrate .. //depot/projects/busdma/dev/ath/ath_rate/onoe/onoe.c#3 integrate .. //depot/projects/busdma/dev/ath/ath_rate/onoe/onoe.h#2 integrate .. //depot/projects/busdma/dev/ath/ath_rate/sample/sample.c#3 integrate .. //depot/projects/busdma/dev/ath/if_ath.c#7 integrate .. //depot/projects/busdma/dev/ath/if_ath_pci.c#5 integrate .. //depot/projects/busdma/dev/ath/if_athioctl.h#4 integrate .. //depot/projects/busdma/dev/ath/if_athrate.h#3 integrate .. //depot/projects/busdma/dev/ath/if_athvar.h#7 integrate .. //depot/projects/busdma/dev/atkbdc/psm.c#3 integrate .. //depot/projects/busdma/dev/awi/awi.c#3 integrate .. //depot/projects/busdma/dev/awi/awivar.h#3 integrate .. //depot/projects/busdma/dev/bce/if_bce.c#5 integrate .. //depot/projects/busdma/dev/bce/if_bcefw.h#2 integrate .. //depot/projects/busdma/dev/bce/if_bcereg.h#5 integrate .. //depot/projects/busdma/dev/bge/if_bge.c#6 integrate .. //depot/projects/busdma/dev/bge/if_bgereg.h#6 integrate .. //depot/projects/busdma/dev/buslogic/bt.c#3 integrate .. //depot/projects/busdma/dev/cardbus/cardbus.c#4 integrate .. //depot/projects/busdma/dev/cardbus/cardbus_cis.c#3 integrate .. //depot/projects/busdma/dev/ce/if_ce.c#3 integrate .. //depot/projects/busdma/dev/ciss/ciss.c#4 integrate .. //depot/projects/busdma/dev/ciss/cissvar.h#2 integrate .. //depot/projects/busdma/dev/coretemp/coretemp.c#1 branch .. //depot/projects/busdma/dev/cp/if_cp.c#3 integrate .. //depot/projects/busdma/dev/ctau/if_ct.c#4 integrate .. //depot/projects/busdma/dev/cx/if_cx.c#4 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_ael1002.c#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_common.h#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_ctl_defs.h#1 branch .. //depot/projects/busdma/dev/cxgb/common/cxgb_firmware_exports.h#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_mc5.c#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_mv88e1xxx.c#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_regs.h#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_sge_defs.h#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_t3_cpl.h#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_t3_hw.c#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_tcb.h#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_version.h#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_vsc7323.c#1 branch .. //depot/projects/busdma/dev/cxgb/common/cxgb_vsc8211.c#2 integrate .. //depot/projects/busdma/dev/cxgb/common/cxgb_xgmac.c#2 integrate .. //depot/projects/busdma/dev/cxgb/common/jhash.h#1 branch .. //depot/projects/busdma/dev/cxgb/cxgb_adapter.h#2 integrate .. //depot/projects/busdma/dev/cxgb/cxgb_config.h#2 integrate .. //depot/projects/busdma/dev/cxgb/cxgb_include.h#1 branch .. //depot/projects/busdma/dev/cxgb/cxgb_ioctl.h#2 integrate .. //depot/projects/busdma/dev/cxgb/cxgb_l2t.c#1 branch .. //depot/projects/busdma/dev/cxgb/cxgb_l2t.h#1 branch .. //depot/projects/busdma/dev/cxgb/cxgb_lro.c#2 integrate .. //depot/projects/busdma/dev/cxgb/cxgb_main.c#2 integrate .. //depot/projects/busdma/dev/cxgb/cxgb_offload.c#1 branch .. //depot/projects/busdma/dev/cxgb/cxgb_offload.h#1 branch .. //depot/projects/busdma/dev/cxgb/cxgb_osdep.h#2 integrate .. //depot/projects/busdma/dev/cxgb/cxgb_sge.c#2 integrate .. //depot/projects/busdma/dev/cxgb/sys/mbufq.h#1 branch .. //depot/projects/busdma/dev/cxgb/sys/mvec.h#2 integrate .. //depot/projects/busdma/dev/cxgb/sys/uipc_mvec.c#2 integrate .. //depot/projects/busdma/dev/cxgb/t3b_protocol_sram-1.1.0.bin.gz.uu#1 branch .. //depot/projects/busdma/dev/cxgb/t3b_tp_eeprom-1.1.0.bin.gz.uu#1 branch .. //depot/projects/busdma/dev/cxgb/t3fw-3.2.bin.gz.uu#2 delete .. //depot/projects/busdma/dev/cxgb/t3fw-4.5.0.bin.gz.uu#1 branch .. //depot/projects/busdma/dev/cxgb/ulp/toecore/toedev.h#1 branch .. //depot/projects/busdma/dev/dc/if_dc.c#5 integrate .. //depot/projects/busdma/dev/dc/if_dcreg.h#5 integrate .. //depot/projects/busdma/dev/dcons/dcons.c#2 integrate .. //depot/projects/busdma/dev/dcons/dcons.h#2 integrate .. //depot/projects/busdma/dev/dcons/dcons_crom.c#2 integrate .. //depot/projects/busdma/dev/dcons/dcons_os.c#4 integrate .. //depot/projects/busdma/dev/dcons/dcons_os.h#2 integrate .. //depot/projects/busdma/dev/de/if_de.c#5 integrate .. //depot/projects/busdma/dev/de/if_devar.h#3 integrate .. //depot/projects/busdma/dev/dpt/dpt.h#3 integrate .. //depot/projects/busdma/dev/dpt/dpt_eisa.c#3 integrate .. //depot/projects/busdma/dev/dpt/dpt_isa.c#3 integrate .. //depot/projects/busdma/dev/dpt/dpt_pci.c#3 integrate .. //depot/projects/busdma/dev/dpt/dpt_scsi.c#5 integrate .. //depot/projects/busdma/dev/drm/i915_dma.c#3 integrate .. //depot/projects/busdma/dev/ed/if_ed_pccard.c#4 integrate .. //depot/projects/busdma/dev/em/LICENSE#2 integrate .. //depot/projects/busdma/dev/em/README#3 integrate .. //depot/projects/busdma/dev/em/e1000_80003es2lan.c#1 branch .. //depot/projects/busdma/dev/em/e1000_80003es2lan.h#1 branch .. //depot/projects/busdma/dev/em/e1000_82540.c#1 branch .. //depot/projects/busdma/dev/em/e1000_82541.c#1 branch .. //depot/projects/busdma/dev/em/e1000_82541.h#1 branch .. //depot/projects/busdma/dev/em/e1000_82542.c#1 branch .. //depot/projects/busdma/dev/em/e1000_82543.c#1 branch .. //depot/projects/busdma/dev/em/e1000_82543.h#1 branch .. //depot/projects/busdma/dev/em/e1000_82571.c#1 branch .. //depot/projects/busdma/dev/em/e1000_82571.h#1 branch .. //depot/projects/busdma/dev/em/e1000_82575.c#1 branch .. //depot/projects/busdma/dev/em/e1000_82575.h#1 branch .. //depot/projects/busdma/dev/em/e1000_api.c#1 branch .. //depot/projects/busdma/dev/em/e1000_api.h#1 branch .. //depot/projects/busdma/dev/em/e1000_defines.h#1 branch .. //depot/projects/busdma/dev/em/e1000_hw.h#1 branch .. //depot/projects/busdma/dev/em/e1000_ich8lan.c#1 branch .. //depot/projects/busdma/dev/em/e1000_ich8lan.h#1 branch .. //depot/projects/busdma/dev/em/e1000_mac.c#1 branch .. //depot/projects/busdma/dev/em/e1000_mac.h#1 branch .. //depot/projects/busdma/dev/em/e1000_manage.c#1 branch .. //depot/projects/busdma/dev/em/e1000_manage.h#1 branch .. //depot/projects/busdma/dev/em/e1000_nvm.c#1 branch .. //depot/projects/busdma/dev/em/e1000_nvm.h#1 branch .. //depot/projects/busdma/dev/em/e1000_osdep.h#1 branch .. //depot/projects/busdma/dev/em/e1000_phy.c#1 branch .. //depot/projects/busdma/dev/em/e1000_phy.h#1 branch .. //depot/projects/busdma/dev/em/e1000_regs.h#1 branch .. //depot/projects/busdma/dev/em/if_em.c#5 integrate .. //depot/projects/busdma/dev/em/if_em.h#4 integrate .. //depot/projects/busdma/dev/em/if_em_hw.c#5 delete .. //depot/projects/busdma/dev/em/if_em_hw.h#4 delete .. //depot/projects/busdma/dev/em/if_em_osdep.h#4 delete .. //depot/projects/busdma/dev/en/midway.c#4 integrate .. //depot/projects/busdma/dev/esp/ncr53c9x.c#3 integrate .. //depot/projects/busdma/dev/fb/boot_font.c#4 integrate .. //depot/projects/busdma/dev/fb/creator.c#4 integrate .. //depot/projects/busdma/dev/fb/gallant12x22.c#2 integrate .. //depot/projects/busdma/dev/fb/gallant12x22.h#2 delete .. //depot/projects/busdma/dev/fb/gfb.h#3 integrate .. //depot/projects/busdma/dev/fb/machfb.c#2 integrate .. //depot/projects/busdma/dev/fb/splash_bmp.c#2 integrate .. //depot/projects/busdma/dev/firewire/firewire.c#3 integrate .. //depot/projects/busdma/dev/firewire/firewire.h#2 integrate .. //depot/projects/busdma/dev/firewire/firewirereg.h#3 integrate .. //depot/projects/busdma/dev/firewire/fwdev.c#3 integrate .. //depot/projects/busdma/dev/firewire/fwdma.c#3 integrate .. //depot/projects/busdma/dev/firewire/fwmem.c#3 integrate .. //depot/projects/busdma/dev/firewire/fwohci.c#3 integrate .. //depot/projects/busdma/dev/firewire/fwohci_pci.c#4 integrate .. //depot/projects/busdma/dev/firewire/fwohcireg.h#2 integrate .. //depot/projects/busdma/dev/firewire/fwohcivar.h#3 integrate .. //depot/projects/busdma/dev/firewire/if_fwe.c#3 integrate .. //depot/projects/busdma/dev/firewire/if_fwevar.h#2 integrate .. //depot/projects/busdma/dev/firewire/if_fwip.c#3 integrate .. //depot/projects/busdma/dev/firewire/if_fwipvar.h#2 integrate .. //depot/projects/busdma/dev/firewire/sbp.c#3 integrate .. //depot/projects/busdma/dev/firewire/sbp_targ.c#3 integrate .. //depot/projects/busdma/dev/fxp/if_fxp.c#5 integrate .. //depot/projects/busdma/dev/gem/if_gem.c#5 integrate .. //depot/projects/busdma/dev/gem/if_gem_pci.c#3 integrate .. //depot/projects/busdma/dev/gem/if_gemreg.h#2 integrate .. //depot/projects/busdma/dev/gem/if_gemvar.h#3 integrate .. //depot/projects/busdma/dev/hatm/if_hatm_intr.c#2 integrate .. //depot/projects/busdma/dev/hme/if_hme.c#5 integrate .. //depot/projects/busdma/dev/hptiop/hptiop.c#1 branch .. //depot/projects/busdma/dev/hptiop/hptiop.h#1 branch .. //depot/projects/busdma/dev/hptmv/entry.c#4 integrate .. //depot/projects/busdma/dev/hptmv/ioctl.c#3 integrate .. //depot/projects/busdma/dev/hwpmc/hwpmc_mod.c#4 integrate .. //depot/projects/busdma/dev/ichwd/ichwd.c#3 integrate .. //depot/projects/busdma/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/busdma/dev/if_ndis/if_ndis.c#3 integrate .. //depot/projects/busdma/dev/if_ndis/if_ndis_usb.c#3 integrate .. //depot/projects/busdma/dev/if_ndis/if_ndisvar.h#2 integrate .. //depot/projects/busdma/dev/iir/iir.c#4 integrate .. //depot/projects/busdma/dev/iir/iir.h#2 integrate .. //depot/projects/busdma/dev/iir/iir_pci.c#4 integrate .. //depot/projects/busdma/dev/ipmi/ipmi_isa.c#2 integrate .. //depot/projects/busdma/dev/ipmi/ipmi_smbios.c#3 integrate .. //depot/projects/busdma/dev/ipw/if_ipw.c#4 integrate .. //depot/projects/busdma/dev/iscsi/initiator/isc_cam.c#1 branch .. //depot/projects/busdma/dev/iscsi/initiator/isc_sm.c#1 branch .. //depot/projects/busdma/dev/iscsi/initiator/isc_soc.c#1 branch .. //depot/projects/busdma/dev/iscsi/initiator/isc_subr.c#1 branch .. //depot/projects/busdma/dev/iscsi/initiator/iscsi.c#1 branch .. //depot/projects/busdma/dev/iscsi/initiator/iscsi.h#1 branch .. //depot/projects/busdma/dev/iscsi/initiator/iscsi_subr.c#1 branch .. //depot/projects/busdma/dev/iscsi/initiator/iscsivar.h#1 branch .. //depot/projects/busdma/dev/isp/isp.c#5 integrate .. //depot/projects/busdma/dev/isp/isp_freebsd.c#5 integrate .. //depot/projects/busdma/dev/isp/isp_freebsd.h#5 integrate .. //depot/projects/busdma/dev/isp/isp_ioctl.h#4 integrate .. //depot/projects/busdma/dev/isp/isp_library.c#4 integrate .. //depot/projects/busdma/dev/isp/isp_pci.c#6 integrate .. //depot/projects/busdma/dev/isp/isp_sbus.c#4 integrate .. //depot/projects/busdma/dev/isp/isp_tpublic.h#5 integrate .. //depot/projects/busdma/dev/isp/ispvar.h#6 integrate .. //depot/projects/busdma/dev/iwi/if_iwi.c#5 integrate .. //depot/projects/busdma/dev/iwi/if_iwireg.h#3 integrate .. //depot/projects/busdma/dev/iwi/if_iwivar.h#3 integrate .. //depot/projects/busdma/dev/ixgbe/LICENSE#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe.c#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe.h#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe_82598.c#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe_api.c#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe_api.h#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe_common.c#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe_common.h#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe_osdep.h#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe_phy.c#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe_phy.h#1 branch .. //depot/projects/busdma/dev/ixgbe/ixgbe_type.h#1 branch .. //depot/projects/busdma/dev/kbdmux/kbdmux.c#3 integrate .. //depot/projects/busdma/dev/led/led.c#2 integrate .. //depot/projects/busdma/dev/led/led.h#2 integrate .. //depot/projects/busdma/dev/lmc/if_lmc.c#5 integrate .. //depot/projects/busdma/dev/mc146818/mc146818.c#2 integrate .. //depot/projects/busdma/dev/mc146818/mc146818var.h#2 integrate .. //depot/projects/busdma/dev/md/md.c#3 integrate .. //depot/projects/busdma/dev/mfi/mfi.c#6 integrate .. //depot/projects/busdma/dev/mfi/mfi_cam.c#1 branch .. //depot/projects/busdma/dev/mfi/mfi_disk.c#4 integrate .. //depot/projects/busdma/dev/mfi/mfi_ioctl.h#4 integrate .. //depot/projects/busdma/dev/mfi/mfi_pci.c#4 integrate .. //depot/projects/busdma/dev/mfi/mfireg.h#5 integrate .. //depot/projects/busdma/dev/mfi/mfivar.h#5 integrate .. //depot/projects/busdma/dev/mii/brgphy.c#6 integrate .. //depot/projects/busdma/dev/mii/brgphyreg.h#3 integrate .. //depot/projects/busdma/dev/mii/ciphy.c#5 integrate .. //depot/projects/busdma/dev/mii/ciphyreg.h#2 integrate .. //depot/projects/busdma/dev/mii/icsphy.c#1 branch .. //depot/projects/busdma/dev/mii/icsphyreg.h#1 branch .. //depot/projects/busdma/dev/mii/mii.c#3 integrate .. //depot/projects/busdma/dev/mii/miidevs#4 integrate .. //depot/projects/busdma/dev/mii/rlphy.c#4 integrate .. //depot/projects/busdma/dev/mly/mly.c#3 integrate .. //depot/projects/busdma/dev/mmc/bridge.h#2 integrate .. //depot/projects/busdma/dev/mmc/mmc.c#2 integrate .. //depot/projects/busdma/dev/mmc/mmcbr_if.m#2 integrate .. //depot/projects/busdma/dev/mmc/mmcbrvar.h#2 integrate .. //depot/projects/busdma/dev/mmc/mmcbus_if.m#2 integrate .. //depot/projects/busdma/dev/mmc/mmcreg.h#2 integrate .. //depot/projects/busdma/dev/mmc/mmcsd.c#2 integrate .. //depot/projects/busdma/dev/mmc/mmcvar.h#2 integrate .. //depot/projects/busdma/dev/mpt/mpilib/mpi.h#2 integrate .. //depot/projects/busdma/dev/mpt/mpilib/mpi_cnfg.h#2 integrate .. //depot/projects/busdma/dev/mpt/mpilib/mpi_init.h#2 integrate .. //depot/projects/busdma/dev/mpt/mpilib/mpi_ioc.h#2 integrate .. //depot/projects/busdma/dev/mpt/mpilib/mpi_log_fc.h#2 delete .. //depot/projects/busdma/dev/mpt/mpilib/mpi_log_sas.h#2 delete .. //depot/projects/busdma/dev/mpt/mpilib/mpi_raid.h#2 integrate .. //depot/projects/busdma/dev/mpt/mpilib/mpi_sas.h#2 integrate .. //depot/projects/busdma/dev/mpt/mpilib/mpi_targ.h#2 integrate .. //depot/projects/busdma/dev/mpt/mpt.c#6 integrate .. //depot/projects/busdma/dev/mpt/mpt.h#7 integrate .. //depot/projects/busdma/dev/mpt/mpt_cam.c#7 integrate .. //depot/projects/busdma/dev/mpt/mpt_cam.h#4 integrate .. //depot/projects/busdma/dev/mpt/mpt_pci.c#7 integrate .. //depot/projects/busdma/dev/mpt/mpt_raid.c#5 integrate .. //depot/projects/busdma/dev/msk/if_msk.c#2 integrate .. //depot/projects/busdma/dev/msk/if_mskreg.h#2 integrate .. //depot/projects/busdma/dev/mxge/eth_z8e.dat.gz.uu#4 delete .. //depot/projects/busdma/dev/mxge/eth_z8e.h#1 branch .. //depot/projects/busdma/dev/mxge/ethp_z8e.dat.gz.uu#4 delete .. //depot/projects/busdma/dev/mxge/ethp_z8e.h#1 branch .. //depot/projects/busdma/dev/mxge/if_mxge.c#4 integrate .. //depot/projects/busdma/dev/mxge/if_mxge_var.h#4 integrate .. //depot/projects/busdma/dev/mxge/mcp_gen_header.h#2 integrate .. //depot/projects/busdma/dev/mxge/mxge_eth_z8e.c#1 branch .. //depot/projects/busdma/dev/mxge/mxge_ethp_z8e.c#1 branch .. //depot/projects/busdma/dev/mxge/mxge_lro.c#1 branch .. //depot/projects/busdma/dev/mxge/mxge_mcp.h#3 integrate .. //depot/projects/busdma/dev/nfe/if_nfe.c#4 integrate .. //depot/projects/busdma/dev/nfe/if_nfereg.h#4 integrate .. //depot/projects/busdma/dev/nfe/if_nfevar.h#3 integrate .. //depot/projects/busdma/dev/nmdm/nmdm.c#3 integrate .. //depot/projects/busdma/dev/nve/if_nve.c#4 integrate .. //depot/projects/busdma/dev/nxge/if_nxge.c#1 branch .. //depot/projects/busdma/dev/nxge/if_nxge.h#1 branch .. //depot/projects/busdma/dev/nxge/include/build-version.h#1 branch .. //depot/projects/busdma/dev/nxge/include/version.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xge-debug.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xge-defs.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xge-list.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xge-os-pal.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xge-os-template.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xge-queue.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-channel.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-config.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-device.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-driver.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-event.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-fifo.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-mgmt.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-mgmtaux.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-mm.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-regs.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-ring.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-stats.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal-types.h#1 branch .. //depot/projects/busdma/dev/nxge/include/xgehal.h#1 branch .. //depot/projects/busdma/dev/nxge/xge-osdep.h#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xge-queue.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-channel-fp.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-channel.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-config.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-device-fp.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-device.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-driver.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-fifo-fp.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-fifo.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-mgmt.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-mgmtaux.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-mm.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-ring-fp.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-ring.c#1 branch .. //depot/projects/busdma/dev/nxge/xgehal/xgehal-stats.c#1 branch .. //depot/projects/busdma/dev/nxge/xgell-version.h#1 branch .. //depot/projects/busdma/dev/ofw/openfirm.c#3 integrate .. //depot/projects/busdma/dev/ofw/openfirm.h#3 integrate .. //depot/projects/busdma/dev/pccard/pccard.c#3 integrate .. //depot/projects/busdma/dev/pccard/pccarddevs#5 integrate .. //depot/projects/busdma/dev/pccard/pccardvarp.h#3 integrate .. //depot/projects/busdma/dev/pccbb/pccbb.c#5 integrate .. //depot/projects/busdma/dev/pccbb/pccbb_pci.c#5 integrate .. //depot/projects/busdma/dev/pccbb/pccbbvar.h#4 integrate .. //depot/projects/busdma/dev/pci/pci.c#5 integrate .. //depot/projects/busdma/dev/pci/pci_if.m#3 integrate .. //depot/projects/busdma/dev/pci/pci_pci.c#3 integrate .. //depot/projects/busdma/dev/pci/pci_private.h#3 integrate .. //depot/projects/busdma/dev/pci/pcib_if.m#3 integrate .. //depot/projects/busdma/dev/pci/pcib_private.h#3 integrate .. //depot/projects/busdma/dev/pci/pcireg.h#4 integrate .. //depot/projects/busdma/dev/pci/pcivar.h#4 integrate .. //depot/projects/busdma/dev/pdq/pdq_ifsubr.c#2 integrate .. //depot/projects/busdma/dev/pdq/pdqreg.h#2 integrate .. //depot/projects/busdma/dev/ppbus/vpo.c#3 integrate .. //depot/projects/busdma/dev/puc/puc.c#4 integrate .. //depot/projects/busdma/dev/puc/pucdata.c#5 integrate .. //depot/projects/busdma/dev/ral/if_ral_pci.c#4 integrate .. //depot/projects/busdma/dev/ral/rt2560.c#5 integrate .. //depot/projects/busdma/dev/ral/rt2560reg.h#2 integrate .. //depot/projects/busdma/dev/ral/rt2560var.h#3 integrate .. //depot/projects/busdma/dev/ral/rt2661.c#4 integrate .. //depot/projects/busdma/dev/ral/rt2661reg.h#2 integrate .. //depot/projects/busdma/dev/ral/rt2661var.h#3 integrate .. //depot/projects/busdma/dev/random/randomdev_soft.c#3 integrate .. //depot/projects/busdma/dev/random/yarrow.c#2 integrate .. //depot/projects/busdma/dev/re/if_re.c#6 integrate .. //depot/projects/busdma/dev/rp/rp.c#3 integrate .. //depot/projects/busdma/dev/rr232x/osm_bsd.c#4 integrate .. //depot/projects/busdma/dev/sbni/if_sbni.c#3 integrate .. //depot/projects/busdma/dev/sbsh/if_sbsh.c#4 integrate .. //depot/projects/busdma/dev/sk/if_sk.c#6 integrate .. //depot/projects/busdma/dev/snp/snp.c#3 integrate .. //depot/projects/busdma/dev/sound/clone.c#1 branch .. //depot/projects/busdma/dev/sound/clone.h#1 branch .. //depot/projects/busdma/dev/sound/isa/ad1816.c#3 integrate .. //depot/projects/busdma/dev/sound/isa/ess.c#3 integrate .. //depot/projects/busdma/dev/sound/isa/mss.c#3 integrate .. //depot/projects/busdma/dev/sound/isa/sb16.c#3 integrate .. //depot/projects/busdma/dev/sound/isa/sb8.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/als4000.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/atiixp.c#4 integrate .. //depot/projects/busdma/dev/sound/pci/au88x0.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/aureal.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/cmi.c#5 integrate .. //depot/projects/busdma/dev/sound/pci/cs4281.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/csapcm.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/ds1.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/emu10k1.c#5 integrate .. //depot/projects/busdma/dev/sound/pci/emu10kx-pcm.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/emu10kx.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/envy24.c#4 integrate .. //depot/projects/busdma/dev/sound/pci/envy24.h#2 integrate .. //depot/projects/busdma/dev/sound/pci/envy24ht.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/envy24ht.h#3 integrate .. //depot/projects/busdma/dev/sound/pci/es137x.c#4 integrate .. //depot/projects/busdma/dev/sound/pci/fm801.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/hda/hdac.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/hda/hdac_private.h#3 integrate .. //depot/projects/busdma/dev/sound/pci/ich.c#5 integrate .. //depot/projects/busdma/dev/sound/pci/maestro.c#4 integrate .. //depot/projects/busdma/dev/sound/pci/maestro3.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/neomagic.c#2 integrate .. //depot/projects/busdma/dev/sound/pci/solo.c#4 integrate .. //depot/projects/busdma/dev/sound/pci/spicds.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/spicds.h#2 integrate .. //depot/projects/busdma/dev/sound/pci/t4dwave.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/via8233.c#4 integrate .. //depot/projects/busdma/dev/sound/pci/via82c686.c#3 integrate .. //depot/projects/busdma/dev/sound/pci/vibes.c#3 integrate .. //depot/projects/busdma/dev/sound/pcm/ac97.c#4 integrate .. //depot/projects/busdma/dev/sound/pcm/ac97_patch.c#4 integrate .. //depot/projects/busdma/dev/sound/pcm/buffer.c#4 integrate .. //depot/projects/busdma/dev/sound/pcm/buffer.h#4 integrate .. //depot/projects/busdma/dev/sound/pcm/channel.c#4 integrate .. //depot/projects/busdma/dev/sound/pcm/channel.h#4 integrate .. //depot/projects/busdma/dev/sound/pcm/dsp.c#4 integrate .. //depot/projects/busdma/dev/sound/pcm/dsp.h#4 integrate .. //depot/projects/busdma/dev/sound/pcm/feeder.c#3 integrate .. //depot/projects/busdma/dev/sound/pcm/feeder_fmt.c#3 integrate .. //depot/projects/busdma/dev/sound/pcm/feeder_rate.c#4 integrate .. //depot/projects/busdma/dev/sound/pcm/feeder_volume.c#3 integrate .. //depot/projects/busdma/dev/sound/pcm/mixer.c#4 integrate .. //depot/projects/busdma/dev/sound/pcm/mixer.h#3 integrate .. //depot/projects/busdma/dev/sound/pcm/sndstat.c#3 integrate .. //depot/projects/busdma/dev/sound/pcm/sound.c#5 integrate .. //depot/projects/busdma/dev/sound/pcm/sound.h#5 integrate .. //depot/projects/busdma/dev/sound/pcm/vchan.c#4 integrate .. //depot/projects/busdma/dev/sound/pcm/vchan.h#2 integrate .. //depot/projects/busdma/dev/sound/sbus/cs4231.c#3 integrate .. //depot/projects/busdma/dev/sound/unit.c#1 branch .. //depot/projects/busdma/dev/sound/unit.h#1 branch .. //depot/projects/busdma/dev/sound/usb/uaudio.c#4 integrate .. //depot/projects/busdma/dev/sound/usb/uaudio_pcm.c#4 integrate .. //depot/projects/busdma/dev/sound/version.h#1 branch .. //depot/projects/busdma/dev/speaker/spkr.c#2 integrate .. //depot/projects/busdma/dev/stge/if_stge.c#3 integrate .. //depot/projects/busdma/dev/stge/if_stgereg.h#2 integrate .. //depot/projects/busdma/dev/streams/streams.c#4 integrate .. //depot/projects/busdma/dev/sym/sym_hipd.c#4 integrate .. //depot/projects/busdma/dev/syscons/scgfbrndr.c#2 integrate .. //depot/projects/busdma/dev/syscons/scmouse.c#3 integrate .. //depot/projects/busdma/dev/syscons/syscons.c#5 integrate .. //depot/projects/busdma/dev/trm/trm.c#4 integrate .. //depot/projects/busdma/dev/twa/tw_cl.h#2 integrate .. //depot/projects/busdma/dev/twa/tw_cl_externs.h#2 integrate .. //depot/projects/busdma/dev/twa/tw_cl_fwif.h#2 integrate .. //depot/projects/busdma/dev/twa/tw_cl_fwimg.c#2 delete .. //depot/projects/busdma/dev/twa/tw_cl_init.c#2 integrate .. //depot/projects/busdma/dev/twa/tw_cl_intr.c#2 integrate .. //depot/projects/busdma/dev/twa/tw_cl_io.c#2 integrate .. //depot/projects/busdma/dev/twa/tw_cl_ioctl.h#2 integrate .. //depot/projects/busdma/dev/twa/tw_cl_misc.c#2 integrate .. //depot/projects/busdma/dev/twa/tw_cl_share.h#2 integrate .. //depot/projects/busdma/dev/twa/tw_osl.h#2 integrate .. //depot/projects/busdma/dev/twa/tw_osl_cam.c#3 integrate .. //depot/projects/busdma/dev/twa/tw_osl_externs.h#2 integrate .. //depot/projects/busdma/dev/twa/tw_osl_freebsd.c#3 integrate .. //depot/projects/busdma/dev/twa/tw_osl_includes.h#3 integrate .. //depot/projects/busdma/dev/twa/tw_osl_inline.h#3 integrate .. //depot/projects/busdma/dev/twa/tw_osl_ioctl.h#2 integrate .. //depot/projects/busdma/dev/twa/tw_osl_share.h#3 integrate .. //depot/projects/busdma/dev/twa/tw_osl_types.h#2 integrate .. //depot/projects/busdma/dev/txp/if_txp.c#5 integrate .. //depot/projects/busdma/dev/uart/uart_bus_pci.c#3 integrate .. //depot/projects/busdma/dev/uart/uart_kbd_sun.c#4 integrate .. //depot/projects/busdma/dev/usb/dsbr100io.h#2 integrate .. //depot/projects/busdma/dev/usb/ehci.c#5 integrate .. //depot/projects/busdma/dev/usb/ehci_pci.c#5 integrate .. //depot/projects/busdma/dev/usb/ehcivar.h#4 integrate .. //depot/projects/busdma/dev/usb/hid.c#3 integrate .. //depot/projects/busdma/dev/usb/if_aue.c#5 integrate .. //depot/projects/busdma/dev/usb/if_axe.c#5 integrate .. //depot/projects/busdma/dev/usb/if_axereg.h#3 integrate .. //depot/projects/busdma/dev/usb/if_cdce.c#3 integrate .. //depot/projects/busdma/dev/usb/if_cdcereg.h#2 integrate .. //depot/projects/busdma/dev/usb/if_cue.c#3 integrate .. //depot/projects/busdma/dev/usb/if_cuereg.h#2 integrate .. //depot/projects/busdma/dev/usb/if_kue.c#3 integrate .. //depot/projects/busdma/dev/usb/if_kuereg.h#2 integrate .. //depot/projects/busdma/dev/usb/if_rue.c#3 integrate .. //depot/projects/busdma/dev/usb/if_ruereg.h#2 integrate .. //depot/projects/busdma/dev/usb/if_rum.c#1 branch .. //depot/projects/busdma/dev/usb/if_rumreg.h#1 branch .. //depot/projects/busdma/dev/usb/if_rumvar.h#1 branch .. //depot/projects/busdma/dev/usb/if_udav.c#4 integrate .. //depot/projects/busdma/dev/usb/if_ural.c#6 integrate .. //depot/projects/busdma/dev/usb/if_uralreg.h#2 integrate .. //depot/projects/busdma/dev/usb/if_uralvar.h#3 integrate .. //depot/projects/busdma/dev/usb/ohci.c#5 integrate .. //depot/projects/busdma/dev/usb/ohci_pci.c#5 integrate .. //depot/projects/busdma/dev/usb/ohcivar.h#4 integrate .. //depot/projects/busdma/dev/usb/rio500_usb.h#2 integrate .. //depot/projects/busdma/dev/usb/rt2573_ucode.h#1 branch .. //depot/projects/busdma/dev/usb/sl811hs.c#5 integrate .. //depot/projects/busdma/dev/usb/slhci_pccard.c#3 integrate .. //depot/projects/busdma/dev/usb/uark.c#2 integrate .. //depot/projects/busdma/dev/usb/ubsa.c#4 integrate .. //depot/projects/busdma/dev/usb/ubser.c#4 integrate .. //depot/projects/busdma/dev/usb/ucom.c#3 integrate .. //depot/projects/busdma/dev/usb/ucomvar.h#3 integrate .. //depot/projects/busdma/dev/usb/ucycom.c#2 integrate .. //depot/projects/busdma/dev/usb/udbp.c#3 integrate .. //depot/projects/busdma/dev/usb/ufm.c#3 integrate .. //depot/projects/busdma/dev/usb/ufoma.c#3 integrate .. //depot/projects/busdma/dev/usb/uftdi.c#3 integrate .. //depot/projects/busdma/dev/usb/ugen.c#4 integrate .. //depot/projects/busdma/dev/usb/uhci.c#5 integrate .. //depot/projects/busdma/dev/usb/uhci_pci.c#4 integrate .. //depot/projects/busdma/dev/usb/uhcivar.h#4 integrate .. //depot/projects/busdma/dev/usb/uhid.c#4 integrate .. //depot/projects/busdma/dev/usb/uhub.c#4 integrate .. //depot/projects/busdma/dev/usb/uipaq.c#2 integrate .. //depot/projects/busdma/dev/usb/ukbd.c#4 integrate .. //depot/projects/busdma/dev/usb/ulpt.c#3 integrate .. //depot/projects/busdma/dev/usb/umass.c#4 integrate .. //depot/projects/busdma/dev/usb/umct.c#3 integrate .. //depot/projects/busdma/dev/usb/umodem.c#4 integrate .. //depot/projects/busdma/dev/usb/ums.c#4 integrate .. //depot/projects/busdma/dev/usb/uplcom.c#6 integrate .. //depot/projects/busdma/dev/usb/urio.c#3 integrate .. //depot/projects/busdma/dev/usb/usb.c#5 integrate .. //depot/projects/busdma/dev/usb/usb.h#3 integrate .. //depot/projects/busdma/dev/usb/usb_mem.c#4 integrate .. //depot/projects/busdma/dev/usb/usb_mem.h#2 integrate .. //depot/projects/busdma/dev/usb/usb_port.h#3 integrate .. //depot/projects/busdma/dev/usb/usb_quirks.c#4 integrate .. //depot/projects/busdma/dev/usb/usb_quirks.h#3 integrate .. //depot/projects/busdma/dev/usb/usb_subr.c#5 integrate .. //depot/projects/busdma/dev/usb/usbdevs#6 integrate .. //depot/projects/busdma/dev/usb/usbdi.c#5 integrate .. //depot/projects/busdma/dev/usb/usbdi.h#4 integrate .. //depot/projects/busdma/dev/usb/usbdi_util.c#3 integrate .. //depot/projects/busdma/dev/usb/usbdivar.h#4 integrate .. //depot/projects/busdma/dev/usb/uscanner.c#4 integrate .. //depot/projects/busdma/dev/usb/uvisor.c#5 integrate .. //depot/projects/busdma/dev/usb/uvscom.c#4 integrate .. //depot/projects/busdma/dev/wds/wd7000.c#4 integrate .. //depot/projects/busdma/dev/wi/if_wavelan_ieee.h#3 integrate .. //depot/projects/busdma/dev/wi/if_wi.c#5 integrate .. //depot/projects/busdma/dev/wi/if_wivar.h#3 integrate .. //depot/projects/busdma/fs/coda/README#1 branch .. //depot/projects/busdma/fs/coda/TODO#1 branch .. //depot/projects/busdma/fs/coda/cnode.h#1 branch .. //depot/projects/busdma/fs/coda/coda.h#1 branch .. //depot/projects/busdma/fs/coda/coda_fbsd.c#1 branch .. //depot/projects/busdma/fs/coda/coda_io.h#1 branch .. //depot/projects/busdma/fs/coda/coda_kernel.h#1 branch .. //depot/projects/busdma/fs/coda/coda_namecache.c#1 branch .. //depot/projects/busdma/fs/coda/coda_namecache.h#1 branch .. //depot/projects/busdma/fs/coda/coda_opstats.h#1 branch .. //depot/projects/busdma/fs/coda/coda_pioctl.h#1 branch .. //depot/projects/busdma/fs/coda/coda_psdev.c#1 branch .. //depot/projects/busdma/fs/coda/coda_psdev.h#1 branch .. //depot/projects/busdma/fs/coda/coda_subr.c#1 branch .. //depot/projects/busdma/fs/coda/coda_subr.h#1 branch .. //depot/projects/busdma/fs/coda/coda_venus.c#1 branch .. //depot/projects/busdma/fs/coda/coda_venus.h#1 branch .. //depot/projects/busdma/fs/coda/coda_vfsops.c#1 branch .. //depot/projects/busdma/fs/coda/coda_vfsops.h#1 branch .. //depot/projects/busdma/fs/coda/coda_vnops.c#1 branch .. //depot/projects/busdma/fs/coda/coda_vnops.h#1 branch .. //depot/projects/busdma/fs/devfs/devfs_devs.c#4 integrate .. //depot/projects/busdma/fs/devfs/devfs_int.h#3 integrate .. //depot/projects/busdma/fs/devfs/devfs_vnops.c#5 integrate .. //depot/projects/busdma/fs/fifofs/fifo_vnops.c#3 integrate .. //depot/projects/busdma/fs/msdosfs/bpb.h#3 integrate .. //depot/projects/busdma/fs/msdosfs/denode.h#4 integrate .. //depot/projects/busdma/fs/msdosfs/msdosfs_conv.c#4 integrate .. //depot/projects/busdma/fs/msdosfs/msdosfs_denode.c#3 integrate .. //depot/projects/busdma/fs/msdosfs/msdosfs_fat.c#3 integrate .. //depot/projects/busdma/fs/msdosfs/msdosfs_fileno.c#2 integrate .. //depot/projects/busdma/fs/msdosfs/msdosfs_iconv.c#2 integrate .. //depot/projects/busdma/fs/msdosfs/msdosfs_lookup.c#2 integrate .. //depot/projects/busdma/fs/msdosfs/msdosfs_vfsops.c#5 integrate .. //depot/projects/busdma/fs/msdosfs/msdosfs_vnops.c#3 integrate .. //depot/projects/busdma/fs/msdosfs/msdosfsmount.h#2 integrate .. //depot/projects/busdma/fs/nullfs/null_vfsops.c#5 integrate .. //depot/projects/busdma/fs/nullfs/null_vnops.c#3 integrate .. //depot/projects/busdma/fs/nwfs/nwfs_io.c#4 integrate .. //depot/projects/busdma/fs/procfs/procfs_ctl.c#2 integrate .. //depot/projects/busdma/fs/procfs/procfs_ioctl.c#4 integrate .. //depot/projects/busdma/fs/procfs/procfs_map.c#3 integrate .. //depot/projects/busdma/fs/procfs/procfs_status.c#3 integrate .. //depot/projects/busdma/fs/pseudofs/pseudofs_vncache.c#3 integrate .. //depot/projects/busdma/fs/pseudofs/pseudofs_vnops.c#4 integrate .. //depot/projects/busdma/fs/smbfs/smbfs_io.c#4 integrate .. //depot/projects/busdma/fs/smbfs/smbfs_node.c#3 integrate .. //depot/projects/busdma/fs/smbfs/smbfs_vnops.c#4 integrate .. //depot/projects/busdma/fs/tmpfs/tmpfs.h#1 branch .. //depot/projects/busdma/fs/tmpfs/tmpfs_fifoops.c#1 branch .. //depot/projects/busdma/fs/tmpfs/tmpfs_fifoops.h#1 branch .. //depot/projects/busdma/fs/tmpfs/tmpfs_subr.c#1 branch .. //depot/projects/busdma/fs/tmpfs/tmpfs_vfsops.c#1 branch .. //depot/projects/busdma/fs/tmpfs/tmpfs_vnops.c#1 branch .. //depot/projects/busdma/fs/tmpfs/tmpfs_vnops.h#1 branch .. //depot/projects/busdma/fs/udf/udf_vnops.c#3 integrate .. //depot/projects/busdma/fs/umapfs/umap.h#2 delete .. //depot/projects/busdma/fs/umapfs/umap_subr.c#3 delete .. //depot/projects/busdma/fs/umapfs/umap_vfsops.c#4 delete .. //depot/projects/busdma/fs/umapfs/umap_vnops.c#3 delete .. //depot/projects/busdma/fs/unionfs/union.h#3 integrate .. //depot/projects/busdma/fs/unionfs/union_subr.c#3 integrate .. //depot/projects/busdma/fs/unionfs/union_vnops.c#4 integrate .. //depot/projects/busdma/gdb/gdb_packet.c#3 integrate .. //depot/projects/busdma/geom/cache/g_cache.c#2 integrate .. //depot/projects/busdma/geom/eli/g_eli.c#5 integrate .. //depot/projects/busdma/geom/eli/g_eli_ctl.c#5 integrate .. //depot/projects/busdma/geom/geom.h#5 integrate .. //depot/projects/busdma/geom/geom_dev.c#4 integrate .. //depot/projects/busdma/geom/geom_disk.c#3 integrate .. //depot/projects/busdma/geom/geom_disk.h#3 integrate .. //depot/projects/busdma/geom/geom_io.c#4 integrate .. //depot/projects/busdma/geom/geom_kern.c#2 integrate .. //depot/projects/busdma/geom/geom_slice.c#3 integrate .. //depot/projects/busdma/geom/geom_subr.c#3 integrate .. //depot/projects/busdma/geom/journal/g_journal.c#2 integrate .. //depot/projects/busdma/geom/mirror/g_mirror.c#5 integrate .. //depot/projects/busdma/geom/part/g_part.c#2 integrate .. //depot/projects/busdma/geom/part/g_part.h#2 integrate .. //depot/projects/busdma/geom/part/g_part_apm.c#2 integrate .. //depot/projects/busdma/geom/part/g_part_gpt.c#2 integrate .. //depot/projects/busdma/geom/part/g_part_mbr.c#1 branch .. //depot/projects/busdma/geom/raid3/g_raid3.c#6 integrate .. //depot/projects/busdma/geom/stripe/g_stripe.c#3 integrate .. //depot/projects/busdma/geom/uzip/g_uzip.c#3 integrate .. //depot/projects/busdma/gnu/fs/ext2fs/ext2_bmap.c#2 integrate .. //depot/projects/busdma/gnu/fs/ext2fs/ext2_vfsops.c#5 integrate .. //depot/projects/busdma/gnu/fs/ext2fs/ext2_vnops.c#3 integrate .. //depot/projects/busdma/gnu/fs/reiserfs/reiserfs_namei.c#2 integrate .. //depot/projects/busdma/gnu/fs/reiserfs/reiserfs_stree.c#2 integrate .. //depot/projects/busdma/gnu/fs/reiserfs/reiserfs_vfsops.c#5 integrate .. //depot/projects/busdma/gnu/fs/xfs/FreeBSD/support/spin.h#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/FreeBSD/xfs_ioctl.c#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/FreeBSD/xfs_mountops.c#5 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_bit.c#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_bmap.c#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_bmap_btree.c#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_dir.c#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_ialloc.c#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_inode.c#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_log.c#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_log_recover.c#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_rtalloc.h#3 integrate .. //depot/projects/busdma/gnu/fs/xfs/xfs_vnodeops.c#3 integrate .. //depot/projects/busdma/i386/Makefile#2 integrate .. //depot/projects/busdma/i386/acpica/acpi_machdep.c#5 integrate .. //depot/projects/busdma/i386/acpica/madt.c#4 integrate >>> TRUNCATED FOR MAIL (1000 lines) <<<