Re: New simple prio queueing doesn't work with pppoe(4)
* Christopher Zimmermann madro...@zakweb.de [2011-07-21 23:46]: ok, found the villain. Seems like my ISP is limiting bandwidth by randomly dropping packets. congratulations, you just figured out how IP works. -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services, http://bsws.de Full-Service ISP - Secure Hosting, Mail and DNS Services Dedicated Servers, Rootservers, Application Hosting
impossible panic() in ifafree()
Hi, this panic cannot possibly happen. The question is, whether to move it up to the macro that is used in the code, or zap it entirely. The whole logic in these two seems pretty ugly, but inet6 crashed when I tried to make it look prettier and more uniform. And again, until 5.0 is out, this might just sit here, or wait on someone's todo list. -- Martin Pelikan Index: net/if.h === RCS file: /cvs/src/sys/net/if.h,v retrieving revision 1.128 diff -u -p -r1.128 if.h --- net/if.h8 Jul 2011 18:48:51 - 1.128 +++ net/if.h22 Jul 2011 12:14:01 - @@ -696,6 +696,8 @@ __END_DECLS #ifdef _KERNEL #defineIFAFREE(ifa) \ do { \ + if (ifa == NULL) \ + panic(IFAFREE); \ if ((ifa)-ifa_refcnt = 0) \ ifafree(ifa); \ else \ Index: net/route.c === RCS file: /cvs/src/sys/net/route.c,v retrieving revision 1.131 diff -u -p -r1.131 route.c --- net/route.c 4 Jul 2011 04:29:17 - 1.131 +++ net/route.c 22 Jul 2011 12:14:01 - @@ -411,8 +411,6 @@ rtfree(struct rtentry *rt) void ifafree(struct ifaddr *ifa) { - if (ifa == NULL) - panic(ifafree); if (ifa-ifa_refcnt == 0) free(ifa, M_IFADDR); else
rtableid typo across kernel
Hi, ugly typo; anyone thinks this should survive to the upcoming release? -- Martin Pelikan Index: net/pf.c === RCS file: /cvs/src/sys/net/pf.c,v retrieving revision 1.764 diff -u -p -r1.764 pf.c --- net/pf.c9 Jul 2011 17:42:19 - 1.764 +++ net/pf.c22 Jul 2011 11:45:45 - @@ -2592,7 +2592,7 @@ pf_get_mss(struct mbuf *m, int off, u_in } u_int16_t -pf_calc_mss(struct pf_addr *addr, sa_family_t af, int rtabelid, u_int16_t offer) +pf_calc_mss(struct pf_addr *addr, sa_family_t af, int rtableid, u_int16_t offer) { #ifdef INET struct sockaddr_in *dst; @@ -2615,7 +2615,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam dst-sin_family = AF_INET; dst-sin_len = sizeof(*dst); dst-sin_addr = addr-v4; - ro.ro_tableid = rtabelid; + ro.ro_tableid = rtableid; rtalloc_noclone(ro); rt = ro.ro_rt; break; @@ -2628,7 +2628,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam dst6-sin6_family = AF_INET6; dst6-sin6_len = sizeof(*dst6); dst6-sin6_addr = addr-v6; - ro6.ro_tableid = rtabelid; + ro6.ro_tableid = rtableid; rtalloc_noclone((struct route *)ro6); rt = ro6.ro_rt; break; Index: net/radix.c === RCS file: /cvs/src/sys/net/radix.c,v retrieving revision 1.28 diff -u -p -r1.28 radix.c --- net/radix.c 22 Aug 2010 17:02:04 - 1.28 +++ net/radix.c 22 Jul 2011 11:45:45 - @@ -986,7 +986,7 @@ rn_walktree(struct radix_node_head *h, i while ((rn = base) != NULL) { base = rn-rn_dupedkey; if (!(rn-rn_flags RNF_ROOT) - (error = (*f)(rn, w, h-rnh_rtabelid))) + (error = (*f)(rn, w, h-rnh_rtableid))) return (error); } rn = next; Index: net/radix.h === RCS file: /cvs/src/sys/net/radix.h,v retrieving revision 1.16 diff -u -p -r1.16 radix.h --- net/radix.h 28 Jun 2010 18:50:37 - 1.16 +++ net/radix.h 22 Jul 2011 11:45:45 - @@ -128,7 +128,7 @@ struct radix_node_head { int (*)(struct radix_node *, void *, u_int), void *); struct radix_node rnh_nodes[3];/* empty tree for common case */ int rnh_multipath; /* multipath? */ - u_int rnh_rtabelid; + u_int rnh_rtableid; }; #ifdef _KERNEL Index: net/route.c === RCS file: /cvs/src/sys/net/route.c,v retrieving revision 1.131 diff -u -p -r1.131 route.c --- net/route.c 4 Jul 2011 04:29:17 - 1.131 +++ net/route.c 22 Jul 2011 11:45:46 - @@ -197,7 +197,7 @@ rtable_init(struct radix_node_head ***ta for (i = 0; i rtafidx_max; i++) { if ((*table)[i] != NULL) - (*table)[i]-rnh_rtabelid = id; + (*table)[i]-rnh_rtableid = id; } return (0);
Re: impossible panic() in ifafree()
On Fri, Jul 22, 2011 at 02:51:32PM +0200, Martin Pelikan wrote: Hi, this panic cannot possibly happen. The question is, whether to move it up to the macro that is used in the code, or zap it entirely. The whole logic in these two seems pretty ugly, but inet6 crashed when I tried to make it look prettier and more uniform. And again, until 5.0 is out, this might just sit here, or wait on someone's todo list. -- Martin Pelikan Index: net/if.h === RCS file: /cvs/src/sys/net/if.h,v retrieving revision 1.128 diff -u -p -r1.128 if.h --- net/if.h 8 Jul 2011 18:48:51 - 1.128 +++ net/if.h 22 Jul 2011 12:14:01 - @@ -696,6 +696,8 @@ __END_DECLS #ifdef _KERNEL #define IFAFREE(ifa) \ do { \ + if (ifa == NULL) \ + panic(IFAFREE); \ if ((ifa)-ifa_refcnt = 0) \ ifafree(ifa); \ else \ Index: net/route.c === RCS file: /cvs/src/sys/net/route.c,v retrieving revision 1.131 diff -u -p -r1.131 route.c --- net/route.c 4 Jul 2011 04:29:17 - 1.131 +++ net/route.c 22 Jul 2011 12:14:01 - @@ -411,8 +411,6 @@ rtfree(struct rtentry *rt) void ifafree(struct ifaddr *ifa) { - if (ifa == NULL) - panic(ifafree); if (ifa-ifa_refcnt == 0) free(ifa, M_IFADDR); else What is the point of the #define? If anything I'd go the other way and move the refcount check into ifafree(). Saving a function call at the expense of bloating the kernel has, in other cases, been shown to be a losing proposition. I can only see fewer than 30 IFAFREE() occurances in /usr/src/*.c. Ken
Re: Synaptics touchpad
* Alexandr Shadchin alexandr.shadc...@gmail.com [110719 22:52]: Hi, Please test latest patch for support Synaptics touchpad (or http://koba.devio.us/distfiles/synaptics.v5.diff) Patch for snapshot from 18-Jul-2011 or newer. It seems everything regression eliminated. Works fine here: pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 wsmouse1 at pms0 mux 0 pms0: Synaptics touchpad, firmware 7.4 -- Alexander Polakov | plhk.ru