Re: rt2661 patch to fix interrupt handling under load
Marco Peereboom wrote: Has this been tested on all variants of the chip? Well, not by me, but other people on misc mentioned it fixed ral(4) issues for them. I only have a RT2661 and a RT2860 (the patch does not touch RT2860). I still do get the odd wireless dropout now and then, but it basically makes the system go for not working/useless/hard lockup to working with intermittent drops which I'd say is a HUGE improvement, even thuogh it's not perfect. Tom
Re: UTF-8 and locale support
Hello, On Thu, 17.12.2009 at 12:43:33 +0100, Artur Litwinowicz bsd_n...@ybka.com wrote: I would like to ask about potential plans regarding UTF-8 in locales support. ;} The problem starts when I am trying to create PostgreSQL cluster The problem manifests itself on many other occasions as well. Please let me know if is any solution for this problem exists or in the future that feature will be available :) This feature will be available once someone sits down and writes the code. I though I was that someone, several weeks/months ago, but haven't made any progress. Instead, Jordi Beltran Creix has, to the best of my knowledge, done groundbreaking work in this direction. Kind regards, --Toni++
watchdog support for wbsio(4)
hi, the following diff adds watchdog support for the W83627HF, W83627THF as well as the W83697HF chips from winbond that wbsio(4) handles. The other chips supported from wbsio(4) to my knowledge don't have watchdog timers. While I personally tested with the W83627HF, I don't have any W83697HF's around. Anyone up for testing? felix Index: sys/dev/isa/wbsio.c === RCS file: /cvs/src/sys/dev/isa/wbsio.c,v retrieving revision 1.5 diff -u -r1.5 wbsio.c --- sys/dev/isa/wbsio.c 29 Mar 2009 21:53:52 - 1.5 +++ sys/dev/isa/wbsio.c 2 Jan 2010 16:00:19 - @@ -52,8 +52,18 @@ #define WBSIO_ID_W83697HF 0x60 /* Logical Device Number (LDN) Assignments */ +#define WBSIO_LDN_GPIO20x08 #define WBSIO_LDN_HM 0x0b +/* Watchdog / GPIO2 Control Registers (LDN 8) */ +#define WBSIO_GPIO20x30 +#define WBSIO_WDOG_83627_PLED 0xf5 +#define WBSIO_WDOG_83697_PLED 0xf3 +#define WBSIO_WDOG_83627_TIMER 0xf6 +#define WBSIO_WDOG_83697_TIMER 0xf4 +#define WBSIO_WDOG_83627_CTRL 0xf7 +#define WBSIO_WDOG_83697_CTRL 0xf5 + /* Hardware Monitor Control Registers (LDN B) */ #define WBSIO_HM_ADDR_MSB 0x60/* Address [15:8] */ #define WBSIO_HM_ADDR_LSB 0x61/* Address [7:0] */ @@ -69,11 +79,16 @@ bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; + + u_int8_tsc_type; }; intwbsio_probe(struct device *, void *, void *); void wbsio_attach(struct device *, struct device *, void *); intwbsio_print(void *, const char *); +void wbsio_wdog_83627_init(struct wbsio_softc *); +void wbsio_wdog_83697_init(struct wbsio_softc *); +intwbsio_wdog_set_timeout(void *, int); struct cfattach wbsio_ca = { sizeof(struct wbsio_softc), @@ -156,6 +171,7 @@ struct isa_attach_args nia; u_int8_t reg, reg0, reg1; u_int16_t iobase; + int wdog_present = 0; /* Map ISA I/O space */ sc-sc_iot = ia-ia_iot; @@ -173,9 +189,11 @@ switch (reg) { case WBSIO_ID_W83627HF: printf(: W83627HF); + wdog_present = 1; break; case WBSIO_ID_W83627THF: printf(: W83627THF); + wdog_present = 1; break; case WBSIO_ID_W83627EHF: printf(: W83627EHF); @@ -188,9 +206,12 @@ break; case WBSIO_ID_W83697HF: printf(: W83697HF); + wdog_present = 1; break; } + sc-sc_type = reg; + /* Read device revision */ reg = wbsio_conf_read(sc-sc_iot, sc-sc_ioh, WBSIO_REV); printf( rev 0x%02x, reg); @@ -209,7 +230,15 @@ iobase = (reg1 8) | (reg0 ~0x7); printf(\n); - + + if (wdog_present == 1) { + if ((sc-sc_type == WBSIO_ID_W83627HF) || + (sc-sc_type == WBSIO_ID_W83627THF)) + wbsio_wdog_83627_init(sc); + if (sc-sc_type == WBSIO_ID_W83697HF) + wbsio_wdog_83697_init(sc); + } + /* Escape from configuration mode */ wbsio_conf_disable(sc-sc_iot, sc-sc_ioh); @@ -219,6 +248,10 @@ nia = *ia; nia.ia_iobase = iobase; config_found(self, nia, wbsio_print); + + if (wdog_present == 1) + /* register with kernel watchdog */ + wdog_register(sc, wbsio_wdog_set_timeout); } int @@ -233,4 +266,74 @@ if (ia-ia_iosize 1) printf(/%d, ia-ia_iosize); return (UNCONF); +} + +void +wbsio_wdog_83627_init(struct wbsio_softc *self) +{ + struct wbsio_softc *sc = (void *)self; + u_int8_t reg; + + /* Select logical device 8 */ + wbsio_conf_write(sc-sc_iot, sc-sc_ioh, WBSIO_LDN, WBSIO_LDN_GPIO2); + + /* Enable gpio2 */ + wbsio_conf_write(sc-sc_iot, sc-sc_ioh, WBSIO_GPIO2, 0x01); + + /* Set initial timeout in CRF6 to 0 (disarmed) */ + wbsio_conf_write(sc-sc_iot, sc-sc_ioh, WBSIO_WDOG_83627_TIMER, 0); + + /* Set CRF5 it to clean state - some boards have weird values */ + reg = wbsio_conf_read(sc-sc_iot, sc-sc_ioh, WBSIO_WDOG_83627_PLED); + reg=~0x0C; + wbsio_conf_write(sc-sc_iot, sc-sc_ioh, WBSIO_WDOG_83627_PLED, reg); + + /* Set IRQ ressource of watchdog to SMI */ + wbsio_conf_write(sc-sc_iot, sc-sc_ioh, WBSIO_WDOG_83627_CTRL, 0x02); + +} + +void +wbsio_wdog_83697_init(struct wbsio_softc *self) +{ + struct wbsio_softc *sc = (void *)self; + + /* Select logical device 8 */ + wbsio_conf_write(sc-sc_iot, sc-sc_ioh, WBSIO_LDN, WBSIO_LDN_GPIO2); + + /* Enable gpio2 */ + wbsio_conf_write(sc-sc_iot, sc-sc_ioh, WBSIO_GPIO2, 0x01); + + /* Set initial timeout in CRF6 to 0 (disarmed) */ + wbsio_conf_write(sc-sc_iot, sc-sc_ioh, WBSIO_WDOG_83697_TIMER, 0); + +} + +int
pfsync and policy routing states patch
Hi All I'm testing this patch to permit synchronization of states that use route-to or reply-to for policy routing, this patch apply to OpenBSD v4.6 -stable, this is the problem: when pfsync send an state that uses route-to or reply-to option to the other machine, it only sends only current next-hop address in rt_addr member of pfsync_state struct, the peer gets the pfsync data and it will try to insert the state and bind it to ruleset, when the secondary machine gets active and a packet going to pass through pf will try to process pf_route if the state matches with a rule with route/reply option, but the interface information hadn't inserted into the state so the state will has st-rt_kif = NULL then the packet will be droped in pf_route function. To complete the route/reply option of one state and keep compatibility with pfsync_state structure, we can use the data space holding by pad member into pfsync_state_peer, it seems to not be used by other function, so we can free rename it, I rename it as ex_info (extra info), so we can use it to put the info to complete the state. The ex_info data is 6 bytes length so we can't put the st-rt_kif-pfik_name data here. We can put the relative position of the rt_kif into the route/reply pool, this manner we need only 2 bytes to send the integer that represents the relative position into the pool, this position will only tell us where the interface can be found, it no necesary be the exact pool, so when a peer receives the pfsync data it can bind it into the pool if the both ruleset have a checksum match. I made some tests and it is running fine, this patch can be ported to the -current version of cvs, but we need to make a little changes beacuse rpool member of pf_rule struct has a new name: route. The modified functions was: pfsync_state_export, pfsync_state_import and pfsync_in_upd, the pfsync_in_upd was inserted a new state with flags equal to zero, now it insert the new state with the pkt-flags, so if the ruleset checksum matches this state will be attached to the ruleset in pfsync_state_import function === RCS file: src/sys/net/RCS/if_pfsync.c,v retrieving revision 1.127 diff -u -r1.127 src/sys/net/if_pfsync.c --- src/sys/net/if_pfsync.c 2010/01/13 23:06:38 1.127 +++ src/sys/net/if_pfsync.c 2010/01/14 21:45:18 @@ -398,6 +398,9 @@ void pfsync_state_export(struct pfsync_state *sp, struct pf_state *st) { + struct pf_pooladdr *acur = NULL; + struct pf_rule *r = NULL; + int count = 0; bzero(sp, sizeof(struct pfsync_state)); /* copy from state key */ @@ -449,6 +452,20 @@ else sp-nat_rule = htonl(st-nat_rule.ptr-nr); + /* insert the rpool position reference for route-to states */ + if(st-rt_kif) { + if(sp-rule != htonl(-1) ntohl(sp-rule) pf_main_ruleset.rules[PF_RULESET_FILTER].active.rcount) + r = pf_main_ruleset.rules[PF_RULESET_FILTER].active.ptr_array[ntohl(sp-rule)]; + if(r != NULL) { + TAILQ_FOREACH(acur, r-rpool.list, entries) { + count++; + if(st-rt_kif == acur-kif) + break; + } + } + bcopy(count, sp-dst.ex_info, sizeof(count)); + } + pf_state_counter_hton(st-packets[0], sp-packets[0]); pf_state_counter_hton(st-packets[1], sp-packets[1]); pf_state_counter_hton(st-bytes[0], sp-bytes[0]); @@ -465,6 +482,9 @@ struct pfi_kif *kif; int pool_flags; int error; + struct pf_pooladdr *acur; + int count; + int i; if (sp-creatorid == 0 pf_status.debug = PF_DEBUG_MISC) { printf(pfsync_state_import: invalid creator id: @@ -563,6 +583,19 @@ st-nat_rule.ptr = NULL; st-anchor.ptr = NULL; st-rt_kif = NULL; + /* try to insert the route-to kif for this state */ + if(r != pf_default_rule r-rpool.cur) { + bcopy(sp-dst.ex_info, count, sizeof(count)); + i = 0; + TAILQ_FOREACH(acur, r-rpool.list, entries) { + i++; + if(i == count) { + st-rt_kif = acur-kif; + break; + } + } + } + st-pfsync_time = time_uptime; st-sync_state = PFSYNC_S_NONE; @@ -916,7 +949,7 @@ st = pf_find_state_byid(id_key); if (st == NULL) { /* insert the update */ - if (pfsync_state_import(sp, 0)) + if (pfsync_state_import(sp, pkt-flags)) pfsyncstats.pfsyncs_badstate++; continue; }
Dear reader from VOA news
d:2g1gh/;ho eff(e8fh.ige=d9i3d8fi(gg5i.f0i;eh1h/h/g(o f,h?f d;%d8f9f3h.io h.ig5i.f0i;o g9e;d8eif%ofhf g=ef h44e0f5h'e(ge0ef o http://www.voanews.com/chinese/email-subscription.cfm f i.gd8 geh=i.ch.ig=i!5e:g0eoe(g):g=e$e!+ef(gg5i.e0eo g9e;bg9e;h.ibch?f6de:g0d8d8*f0g=i!5ofg$:bh0h0f(e e%fd;,gg5i.e e bc f(d9e/d;%eg5i.e0 chin...@voanews.comoe(f id8g(h1h/fhd8ff fbh.ig5i.f0i;bc fd;,gg5i.f0i;ef,e=f%(ge=f6i4)e=igh./d;%e ghf(h gd8$g/f71e%eff %icee$oe$4d8$f!e=igh./f6f/e+d8h1d8$g' feodfh1ffed9 h1fgfeehc h.ih1h/h/g(o h/7eg5i.e0 chin...@voanews.comoe(f id8g(h1h/fhd8ff fbh.ih1h/febfh eff(e/9fd;,ge9?fcg5h'eg=g+f d;d9h/d;7cff3cfh'e hf1od9f,h?f(g;d8 h?0i.g.1ed?!c ih.g5ei.d;6o h%heffd;,gg5i.f e !od9h/7ed?!g; chin...@voanews.comch/7e(f id8g(h1h/fhd8fh!(feh.e*g' g(?d;6c f,h?f(f5h'fd;,gg=i!5o http://www.voanchinese.com f,h.iih/7e=fd;,e*ef(eid8f,!of(d;%ed8 de f6e0f$ih/7e=d;6c *** Dear Friends: We would like to invite you to subscribe to VOA Chinese daily newsletter and weekly English-teaching newsletters for Popular American and Words and Idioms. We offer these services free of charge and all you have to do is taking a few simple steps as follows: To subscribe to our daily newsletter: Please click the following link or copy/paste it into the address bar of your browser: http://www.voanews.com/chinese/email-subscription.cfm Then, press the return key on your keyboard. When the email-subscription page comes up, type your email address in the blank space and click g9e;h.i (Click to Subscribe). A new page will display the message: h0h0f(e e%fd;,gg5i.e e (Thank you for joining in our email newsletter list). You can also send an email to: chin...@voanews.com, and mark Subscribe to daily newsletter (h.ig5i.f0i;) in the subject bar of your email. Our email newsletter includes world news-in-brief of the day (U.S. time) and two in-depth news analysis/reports. In addition, the first two pieces of the news-in-brief are in both Chinese and English, to appeal to those who want to practice their translation skills. To subscribe to English-teaching lessons: Please send an email to: chin...@voanews.com, and mark Subscribe to English-teaching lessons (h.ih1h/fe) in the subject bar of your email. If you have any comments, thoughts, opinions or requests regarding our radio and TV broadcasts or our email and Internet services, you are welcome to send emails also to the above address. To unsubscribe: You can also use the above address to unsubscribe. To unsubscribe, please write clearly in either English or Chinese in your email's subject bar which kind of newsletter you want to cancel. If you want to cancel all the services, you must send in your requests individually. You are also welcome to browse our websites by clicking the following links: http://www.voanews.com/chinese http://www.voa.gov/chinese/news.htm This is a one-time-only invitation to subscribe to our email newsletter services. You will not receive this letter again. [IMAGE]