Re: cvs commit: src/sys/contrib/dev/ath COPYRIGHT README ah.h ah_desc.h ah_devid.h ah_soc.h version.h src/sys/contrib/dev/ath/public alpha-elf.hal.o.uu alpha-elf.inc alpha-elf.opt_ah.h ap30.hal.o.uu a
On Mon, Sep 08, 2008 at 06:19:06PM +0400, Vladimir Grebenschikov wrote: > On Wed, 2008-09-03 at 17:52 +0100, Rui Paulo wrote: > > On Tue, Sep 02, 2008 at 11:08:00PM +0400, Vladimir Grebenschikov wrote: > > > ? Thu, 28/08/2008 ? 00:22 +, Rui Paulo ?: > > > > rpaulo 2008-08-28 00:22:59 UTC > > > > > > > > > After that commit my wireless stop work: > > > > Can you tell us your ath mac+phy rev? > > ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, > RF5413) > ath0: mem 0xedf0-0xedf0 irq 17 at device 0.0 on > pci3 > ath0: [ITHREAD] > ath0: WARNING: using obsoleted if_watchdog interface > ath0: mac 10.3 phy 6.1 radio 10.2 I have a 5212 too and the problem is now fixed in HEAD. Please update. Thanks, -- Rui Paulo ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kern/127102: [wpi] Intel 3945ABG low throughput
The following reply was made to PR kern/127102; it has been noted by GNATS. From: "=?KOI8-R?B?7sUg5MHN09E=?=" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: Subject: Re: kern/127102: [wpi] Intel 3945ABG low throughput Date: Tue, 9 Sep 2008 13:15:29 -0400 --=_Part_24971_5426585.1220980530002 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Curious discovery. Similar behavior (slow throughput) is experienced under Windows on battery power, but not on AC power. Under FreeBSD, the behavior is experienced under AC power or battery power. --=_Part_24971_5426585.1220980530002 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Curious discovery. Similar behavior (slow throughput) is experienced under Windows on battery power, but not on AC power. Under FreeBSD, the behavior is experienced under AC power or battery power. --=_Part_24971_5426585.1220980530002-- ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rewrite of rt_check() (now rt_check_fib())
Hi Julian. Has anyone else tested this patch? I'm going to have a bit of time to try reproducing this again in the following days. Is this patch version the last one you have written? Should I patch with this one and give it a try? FWIW, reading through this version of rt_check_fib() is nicer, and I really liked the comment that explains how it works :-) On Fri, 05 Sep 2008 16:13:53 -0700, Julian Elischer <[EMAIL PROTECTED]> wrote: > this time with less (I hope) bugs... > > new macros... > > #define RT_TEMP_UNLOCK(_rt) do {\ > RT_ADDREF(_rt); \ > RT_UNLOCK(_rt); \ > } while (0) > > #define RT_RELOCK(_rt) do { \ > RT_LOCK(_rt)\ > if ((_rt)->rt_refcnt <= 1) \ > rtfree(_rt);\ > _rt = 0; /* signal that it went away */\ > else { \ > RT_REMREF(_rt); \ > /* note that _rt is still valid */ \ > } \ > } while (0) > > > with (better) code attached: > > /* > * rt_check() is invoked on each layer 2 output path, prior to > * encapsulating outbound packets. > * > * The function is mostly used to find a routing entry for the gateway, > * which in some protocol families could also point to the link-level > * address for the gateway itself (the side effect of revalidating the > * route to the destination is rather pointless at this stage, we did it > * already a moment before in the pr_output() routine to locate the ifp > * and gateway to use). > * > * When we remove the layer-3 to layer-2 mapping tables from the > * routing table, this function can be removed. > * > * === On input === > * *dst is the address of the NEXT HOP (which coincides with the > *final destination if directly reachable); > * *lrt0 points to the cached route to the final destination; > * *lrt is not meaningful; > *fibnum is the index to the correct network fib for this packet > *(*lrt0 has not ref held on it so REMREF is not needed ) > * > * === Operation === > * If the route is marked down try to find a new route. If the route > * to the gateway is gone, try to setup a new route. Otherwise, > * if the route is marked for packets to be rejected, enforce that. > * Note that rtalloc returns an rtentry with an extra REF that we need to > lose. > * > * === On return === > * *dst is unchanged; > * *lrt0 points to the (possibly new) route to the final destination > * *lrt points to the route to the next hop [LOCKED] > * > * Their values are meaningful ONLY if no error is returned. > * > * To follow this you have to remember that: > * RT_REMREF reduces the reference count by 1 but doesn't check it for 0 (!) > * RTFREE_LOCKED includes an RT_REMREF (or an rtfree if refs == 1) > *and an RT_UNLOCK > * RTFREE does an RT_LOCK and an RTFREE_LOCKED > * The gwroute pointer counts as a reference on the rtentry to which it > points. > * so when we add it we use the ref that rtalloc gives us and when we lose it > * we need to remove the reference. > */ > int > rt_check(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr *dst) > { > return (rt_check_fib(lrt, lrt0, dst, 0)); > } > > int > rt_check_fib(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr > *dst, > u_int fibnum) > { > struct rtentry *rt; > struct rtentry *rt0; > int error; > > KASSERT(*lrt0 != NULL, ("rt_check")); > rt0 = *lrt0; > rt = NULL; > > /* NB: the locking here is tortuous... */ > RT_LOCK(rt0); > retry: > if (rt0 && (rt0->rt_flags & RTF_UP) == 0) { > /* Current rt0 is useless, try get a replacement. */ > RT_UNLOCK(rt0); > rt0 = NULL; > } > if (rt0 == NULL) { > rt0 = rtalloc1_fib(dst, 1, 0UL, fibnum); > if (rt0 == NULL) { > return (EHOSTUNREACH); > } > RT_REMREF(rt0); /* don't need the reference. */ > } > > if (rt0->rt_flags & RTF_GATEWAY) { > if ((rt = rt0->rt_gwroute) != NULL) { > RT_LOCK(rt);/* NB: gwroute */ > if ((rt->rt_flags & RTF_UP) == 0) { > /* gw route is dud. ignore/lose it */ > RTFREE_LOCKED(rt); /* unref (&unlock) gwroute */ > rt = rt0->rt_gwroute = NULL; > } > } > > if (rt == NULL) { /* NOT AN ELSE CLAUSE */ > RT_
Problem with IFDATA_DRIVERNAME sysctl
Whenever I call this sysctl, I get an errno of EPROGNOTAVAIL from sysctl(): »···name[0] = CTL_NET; »···name[1] = PF_LINK; »···name[2] = NETLINK_GENERIC; »···name[3] = IFMIB_IFDATA; »···name[4] = ifindex; »···name[5] = IFDATA_DRIVERNAME; »···len = IFNAMSIZ; »···if (sysctl(name, 6, dname, &len, NULL, 0) == -1) { »···»···warnc(EX_OSERR, "cannot obtain driver name for ifname %s", »···»···ifname); »···»···return (-1); »···} The ifindex is valid. "dname" is a pointer to an IFNAMSIZ sized buffer. This problem is happening on a 7.0-RELEASE system. It looks like the switch..case in that path could be fubar'd by the compiler as there are not break statements for each distinct case label, could this be due to gcc friendly fire? cheers BMS ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Problem with IFDATA_DRIVERNAME sysctl
Bruce M Simpson wrote: It looks like the switch..case in that path could be fubar'd by the compiler as there are not break statements for each distinct case label, could this be due to gcc friendly fire? Possibly false alarm or PEBKAC, I wasn't checking return values right in some of my code, although we should probably have "break" there anyway. Patch against RELENG_7_0. --- if_mib.c.orig 2008-09-10 00:31:25.0 +0100 +++ if_mib.c2008-09-10 00:32:15.0 +0100 @@ -90,6 +90,7 @@ switch(name[1]) { default: return ENOENT; + break; case IFDATA_GENERAL: bzero(&ifmd, sizeof(ifmd)); @@ -136,6 +137,7 @@ error = SYSCTL_IN(req, ifp->if_linkmib, ifp->if_linkmiblen); if (error) return error; + break; case IFDATA_DRIVERNAME: /* 20 is enough for 64bit ints */ @@ -152,6 +154,7 @@ error = EPERM; free(dbuf, M_TEMP); return (error); + break; } return 0; } ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rewrite of rt_check() (now rt_check_fib())
Giorgos Keramidas wrote: Hi Julian. Has anyone else tested this patch? I'm going to have a bit of time to try reproducing this again in the following days. Is this patch version the last one you have written? Should I patch with this one and give it a try? I think this was the last one. FWIW, reading through this version of rt_check_fib() is nicer, and I really liked the comment that explains how it works :-) On Fri, 05 Sep 2008 16:13:53 -0700, Julian Elischer <[EMAIL PROTECTED]> wrote: this time with less (I hope) bugs... new macros... #define RT_TEMP_UNLOCK(_rt) do {\ RT_ADDREF(_rt); \ RT_UNLOCK(_rt); \ } while (0) #define RT_RELOCK(_rt) do { \ RT_LOCK(_rt)\ if ((_rt)->rt_refcnt <= 1) \ rtfree(_rt);\ _rt = 0; /* signal that it went away */\ else { \ RT_REMREF(_rt); \ /* note that _rt is still valid */ \ } \ } while (0) with (better) code attached: /* * rt_check() is invoked on each layer 2 output path, prior to * encapsulating outbound packets. * * The function is mostly used to find a routing entry for the gateway, * which in some protocol families could also point to the link-level * address for the gateway itself (the side effect of revalidating the * route to the destination is rather pointless at this stage, we did it * already a moment before in the pr_output() routine to locate the ifp * and gateway to use). * * When we remove the layer-3 to layer-2 mapping tables from the * routing table, this function can be removed. * * === On input === * *dst is the address of the NEXT HOP (which coincides with the * final destination if directly reachable); * *lrt0 points to the cached route to the final destination; * *lrt is not meaningful; *fibnum is the index to the correct network fib for this packet * (*lrt0 has not ref held on it so REMREF is not needed ) * * === Operation === * If the route is marked down try to find a new route. If the route * to the gateway is gone, try to setup a new route. Otherwise, * if the route is marked for packets to be rejected, enforce that. * Note that rtalloc returns an rtentry with an extra REF that we need to lose. * * === On return === * *dst is unchanged; * *lrt0 points to the (possibly new) route to the final destination * *lrt points to the route to the next hop [LOCKED] * * Their values are meaningful ONLY if no error is returned. * * To follow this you have to remember that: * RT_REMREF reduces the reference count by 1 but doesn't check it for 0 (!) * RTFREE_LOCKED includes an RT_REMREF (or an rtfree if refs == 1) *and an RT_UNLOCK * RTFREE does an RT_LOCK and an RTFREE_LOCKED * The gwroute pointer counts as a reference on the rtentry to which it points. * so when we add it we use the ref that rtalloc gives us and when we lose it * we need to remove the reference. */ int rt_check(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr *dst) { return (rt_check_fib(lrt, lrt0, dst, 0)); } int rt_check_fib(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr *dst, u_int fibnum) { struct rtentry *rt; struct rtentry *rt0; int error; KASSERT(*lrt0 != NULL, ("rt_check")); rt0 = *lrt0; rt = NULL; /* NB: the locking here is tortuous... */ RT_LOCK(rt0); retry: if (rt0 && (rt0->rt_flags & RTF_UP) == 0) { /* Current rt0 is useless, try get a replacement. */ RT_UNLOCK(rt0); rt0 = NULL; } if (rt0 == NULL) { rt0 = rtalloc1_fib(dst, 1, 0UL, fibnum); if (rt0 == NULL) { return (EHOSTUNREACH); } RT_REMREF(rt0); /* don't need the reference. */ } if (rt0->rt_flags & RTF_GATEWAY) { if ((rt = rt0->rt_gwroute) != NULL) { RT_LOCK(rt);/* NB: gwroute */ if ((rt->rt_flags & RTF_UP) == 0) { /* gw route is dud. ignore/lose it */ RTFREE_LOCKED(rt); /* unref (&unlock) gwroute */ rt = rt0->rt_gwroute = NULL; } } if (rt == NULL) { /* NOT AN ELSE CLAUSE */ RT_TEMP_UNLOCK(rt0); /* MUST return to undo this */ rt = rtalloc1_fib
Re: rewrite of rt_check() (now rt_check_fib())
Giorgos Keramidas wrote: Hi Julian. Has anyone else tested this patch? I'm going to have a bit of time to try reproducing this again in the following days. Is this patch version the last one you have written? Should I patch with this one and give it a try? no one else has.. which seems strange given that several people got hit by the problem. I think that while removing the quick crash, the underlying problem is somewhere else. FWIW, reading through this version of rt_check_fib() is nicer, and I really liked the comment that explains how it works :-) On Fri, 05 Sep 2008 16:13:53 -0700, Julian Elischer <[EMAIL PROTECTED]> wrote: this time with less (I hope) bugs... new macros... #define RT_TEMP_UNLOCK(_rt) do {\ RT_ADDREF(_rt); \ RT_UNLOCK(_rt); \ } while (0) #define RT_RELOCK(_rt) do { \ RT_LOCK(_rt)\ if ((_rt)->rt_refcnt <= 1) \ rtfree(_rt);\ _rt = 0; /* signal that it went away */\ else { \ RT_REMREF(_rt); \ /* note that _rt is still valid */ \ } \ } while (0) with (better) code attached: /* * rt_check() is invoked on each layer 2 output path, prior to * encapsulating outbound packets. * * The function is mostly used to find a routing entry for the gateway, * which in some protocol families could also point to the link-level * address for the gateway itself (the side effect of revalidating the * route to the destination is rather pointless at this stage, we did it * already a moment before in the pr_output() routine to locate the ifp * and gateway to use). * * When we remove the layer-3 to layer-2 mapping tables from the * routing table, this function can be removed. * * === On input === * *dst is the address of the NEXT HOP (which coincides with the * final destination if directly reachable); * *lrt0 points to the cached route to the final destination; * *lrt is not meaningful; *fibnum is the index to the correct network fib for this packet * (*lrt0 has not ref held on it so REMREF is not needed ) * * === Operation === * If the route is marked down try to find a new route. If the route * to the gateway is gone, try to setup a new route. Otherwise, * if the route is marked for packets to be rejected, enforce that. * Note that rtalloc returns an rtentry with an extra REF that we need to lose. * * === On return === * *dst is unchanged; * *lrt0 points to the (possibly new) route to the final destination * *lrt points to the route to the next hop [LOCKED] * * Their values are meaningful ONLY if no error is returned. * * To follow this you have to remember that: * RT_REMREF reduces the reference count by 1 but doesn't check it for 0 (!) * RTFREE_LOCKED includes an RT_REMREF (or an rtfree if refs == 1) *and an RT_UNLOCK * RTFREE does an RT_LOCK and an RTFREE_LOCKED * The gwroute pointer counts as a reference on the rtentry to which it points. * so when we add it we use the ref that rtalloc gives us and when we lose it * we need to remove the reference. */ int rt_check(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr *dst) { return (rt_check_fib(lrt, lrt0, dst, 0)); } int rt_check_fib(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr *dst, u_int fibnum) { struct rtentry *rt; struct rtentry *rt0; int error; KASSERT(*lrt0 != NULL, ("rt_check")); rt0 = *lrt0; rt = NULL; /* NB: the locking here is tortuous... */ RT_LOCK(rt0); retry: if (rt0 && (rt0->rt_flags & RTF_UP) == 0) { /* Current rt0 is useless, try get a replacement. */ RT_UNLOCK(rt0); rt0 = NULL; } if (rt0 == NULL) { rt0 = rtalloc1_fib(dst, 1, 0UL, fibnum); if (rt0 == NULL) { return (EHOSTUNREACH); } RT_REMREF(rt0); /* don't need the reference. */ } if (rt0->rt_flags & RTF_GATEWAY) { if ((rt = rt0->rt_gwroute) != NULL) { RT_LOCK(rt);/* NB: gwroute */ if ((rt->rt_flags & RTF_UP) == 0) { /* gw route is dud. ignore/lose it */ RTFREE_LOCKED(rt); /* unref (&unlock) gwroute */ rt = rt0->rt_gwroute = NULL; } } if (rt == NULL