tcpbench: Don't use floating precision while printing PPS in UDP mode.
Moin, I think it doesn't make sense for PPS, also, the rounding is wrong so we always get .000 This makes the output go from: Elapsed: 11685 Mbps: 63.602 Peak Mbps: 63.602 Rx PPS: 5401.000 to: Elapsed: 15000 Mbps:1227.177 Peak Mbps:1245.347 Tx PPS: 104210 ok ? Index: tcpbench.c === RCS file: /cvs/src/usr.bin/tcpbench/tcpbench.c,v retrieving revision 1.30 diff -d -u -p -w -r1.30 tcpbench.c --- tcpbench.c 26 Jan 2012 17:53:53 - 1.30 +++ tcpbench.c 29 Jan 2012 02:47:38 - @@ -571,8 +571,8 @@ static void udp_process_slice(int fd, short event, void *v_sc) { struct statctx *sc = v_sc; - unsigned long long total_elapsed, since_last; - long double slice_mbps, pps; + unsigned long long total_elapsed, since_last, pps; + long double slice_mbps; struct timeval t_cur, t_diff; if (clock_gettime_tv(CLOCK_MONOTONIC, &t_cur) == -1) @@ -586,7 +586,7 @@ udp_process_slice(int fd, short event, v pps = (sc->udp_slice_pkts * 1000) / since_last; if (slice_mbps > mainstats.peak_mbps) mainstats.peak_mbps = slice_mbps; - printf("Elapsed: %11llu Mbps: %11.3Lf Peak Mbps: %11.3Lf %s PPS: %10.3Lf\n", + printf("Elapsed: %11llu Mbps: %11.3Lf Peak Mbps: %11.3Lf %s PPS: %7llu\n", total_elapsed, slice_mbps, mainstats.peak_mbps, ptb->sflag ? "Rx" : "Tx", pps);
Re: Apache's FAQ.html
On 01/27/2012 08:44 PM, Mikolaj Kucharski wrote: On Fri, Jan 27, 2012 at 08:42:08AM +, Jason McIntyre wrote: hmm. there are more problems than this: - some of the pages in htdocs refer to a FAQ page at http://httpd.apache.org/docs/misc/FAQ.html. the link doesn;t work though. - misc/index.html refers to FAQ.html, the file you propose to remove. your intention seems correct though (i agree misc/FAQ.html looks broken). the reference in misc/index.html can be trivially fixed. i've no idea about the apache link though. jmc I would also change link in ssl faq too: Index: mod/mod_ssl/ssl_faq.html === RCS file: /cvs/src/usr.sbin/httpd/htdocs/manual/mod/mod_ssl/ssl_faq.html,v retrieving revision 1.12 diff -u -r1.12 ssl_faq.html --- mod/mod_ssl/ssl_faq.html18 Jun 2008 05:42:29 - 1.12 +++ mod/mod_ssl/ssl_faq.html27 Jan 2012 18:34:58 - @@ -500,7 +500,7 @@ are done with full year value instead of abbreviating to two digits. Additionally according to ahttp://www.apache.org/docs/misc/FAQ.html#year2000";>Year 2000 +href="../../misc/FAQ.html#year2000">Year 2000 statement from the Apache Group, the Apache webserver is Year 2000 compliant, too. But whether OpenSSL or the underlaying Operating System (either a Unix or Win32 platform) is Year 2000 compliant is a different Looking at latest online FAQ for Apache 1.3 it looks even worse than in-tree manual/FAQ.html http://httpd.apache.org/docs/1.3/misc/FAQ.html so I'm also not sure what's the option here. I think it's "underlying", because underlaying means something not really OS-related. :) http://en.wikipedia.org/wiki/Underlay Best regards, -- Rares Aioanei
Re: sppp(4): remove some crap
I am OK with minor kernel-only ABI changes for a little while longer.
Re: sppp(4): remove some crap
On 2012/01/28 14:20, Mike Belopuhov wrote: > On Sat, Jan 28, 2012 at 12:06 PM, Stuart Henderson > wrote: > > Any comments? ("bleurgh" is implicitly assumed). > > OK? This mail was sent through a router running it. > > > > hi, > > if you remove pp_fastq, why don't i see it being removed from the header > file? > Because I missed it, though I am not sure whether it is still OK to touch kernel headers at the moment? Index: if_sppp.h === RCS file: /cvs/src/sys/net/if_sppp.h,v retrieving revision 1.16 diff -u -p -r1.16 if_sppp.h --- if_sppp.h 12 Nov 2011 12:32:59 - 1.16 +++ if_sppp.h 28 Jan 2012 21:43:23 - @@ -107,7 +107,6 @@ enum ppp_phase { struct sppp { /* NB: pp_if _must_ be first */ struct ifnet pp_if;/* network interface data */ - struct ifqueue pp_fastq; /* fast output queue */ struct ifqueue pp_cpq; /* PPP control protocol queue */ struct sppp *pp_next; /* next interface in keepalive list */ u_int pp_flags; /* use Cisco protocol instead of PPP */
Atentie!... Cad preturile!!!!
Primiti acest mesaj in urma abonarii dvs. pe site-ul nostru sau printr-un site partener. Daca nu mai doriti sa primiti mesaje de la noi sau considerati ca abonarea dvs. s-a produs din greseala, va rugam sa acceptati scuzele noastre pentru neplacerile provocate si sa va dezabonati folosind urmatorul link: Dezabonare ATX Computers oem [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] oem [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] oem [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] oem [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] oem [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] oem [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] oem
Re: small vr(4) patch.
On Sat, Jan 28, 2012 at 3:54 AM, Brynet wrote: > Remove redundant call to vr_reset, it gets called in vr_init. > > -Bryan. > I agree that this is pointless. OK mikeb
Re: tcpdump IKE dissector: print UDP_ENCAP_*_DRAFT
For what it's worth, I like the idea. Mitja > -Original Message- > From: owner-t...@openbsd.org [mailto:owner-t...@openbsd.org] On Behalf Of > Stuart Henderson > Sent: Saturday, January 28, 2012 10:54 AM > To: tech > Subject: tcpdump IKE dissector: print UDP_ENCAP_*_DRAFT > > cizco still use the IDs from the draft for nat-t, let tcpdump > print them, useful for diagnosis even if the isakmpd patches are too > messy. OK? > > Index: ike.h > === > RCS file: /cvs/src/usr.sbin/tcpdump/ike.h,v > retrieving revision 1.23 > diff -u -p -r1.23 ike.h > --- ike.h 7 Jun 2010 16:20:58 - 1.23 > +++ ike.h 28 Jan 2012 09:52:30 - > @@ -382,10 +382,6 @@ > #define IPSEC_ATTR_DURATION_INITIALIZER \ > { "NONE", "SECONDS", "KILOBYTES", \ > } > -#define IPSEC_ATTR_ENCAP_INITIALIZER \ > - { "NONE", "TUNNEL", "TRANSPORT", "UDP_ENCAP_TUNNEL",\ > - "UDP_ENCAP_TRANSPORT" \ > - } > #define IPSEC_ATTR_AUTH_INITIALIZER \ > { "NONE", "HMAC_MD5", "HMAC_SHA", "DES_MAC", "KPDK",\ > "HMAC_SHA2_256", "HMAC_SHA2_384", "HMAC_SHA2_512",\ > @@ -403,6 +399,15 @@ > #define IPCOMP_INITIALIZER \ > { "NONE", "OUI", "DEFLATE", "LZS", "V42BIS",\ > } > +static struct tok ipsec_attr_encap[] = { > + { 0,"NONE" }, > + { 1,"TUNNEL" }, > + { 2,"TRANSPORT" }, > + { 3,"UDP_ENCAP_TUNNEL" }, > + { 4,"UDP_ENCAP_TRANSPORT" }, > + { 61443, "UDP_ENCAP_TUNNEL_DRAFT" },/* draft-ietf-ipsec-nat-t-ike */ > + { 61444, "UDP_ENCAP_TRANSPORT_DRAFT" } /* draft-ietf-ipsec-nat-t-ike */ > +}; > > /* > * IKE mode config. > Index: print-ike.c > === > RCS file: /cvs/src/usr.sbin/tcpdump/print-ike.c,v > retrieving revision 1.35 > diff -u -p -r1.35 print-ike.c > --- print-ike.c 7 Jun 2010 16:20:58 - 1.35 > +++ print-ike.c 28 Jan 2012 09:52:30 - > @@ -303,7 +303,6 @@ ike_attribute_print (u_int8_t *buf, u_in > static char *attr_gtype[] = IKE_ATTR_GROUP_INITIALIZER; > static char *attr_ltype[] = IKE_ATTR_SA_DURATION_INITIALIZER; > static char *ipsec_attrs[] = IPSEC_ATTR_INITIALIZER; > - static char *ipsec_attr_encap[] = IPSEC_ATTR_ENCAP_INITIALIZER; > static char *ipsec_attr_auth[] = IPSEC_ATTR_AUTH_INITIALIZER; > static char *ipsec_attr_ltype[] = IPSEC_ATTR_DURATION_INITIALIZER; > > @@ -357,10 +356,12 @@ ike_attribute_print (u_int8_t *buf, u_in > else > switch(type) { > CASE_PRINT(IPSEC_ATTR_SA_LIFE_TYPE, ipsec_attr_ltype); > - CASE_PRINT(IPSEC_ATTR_ENCAPSULATION_MODE, > - ipsec_attr_encap); > CASE_PRINT(IPSEC_ATTR_AUTHENTICATION_ALGORITHM, > ipsec_attr_auth); > + case IPSEC_ATTR_ENCAPSULATION_MODE: > + printf("%s", tok2str(ipsec_attr_encap, > + "%d", val)); > + break; > default: > printf("%d", val); > }
Re: sppp(4): remove some crap
On Sat, Jan 28, 2012 at 12:06 PM, Stuart Henderson wrote: > Any comments? ("bleurgh" is implicitly assumed). > OK? This mail was sent through a router running it. > hi, if you remove pp_fastq, why don't i see it being removed from the header file?
tcpdump print-radius: use safeputs
Some radius decodes have unprintable characters. Use safeputs() to escape them. Test file showing the problem at http://www.wand.net.nz/trac/libtrace/export/1746/trunk/test/traces/radius.pcap OK? Index: print-radius.c === RCS file: /cvs/src/usr.sbin/tcpdump/print-radius.c,v retrieving revision 1.8 diff -u -p -r1.8 print-radius.c --- print-radius.c 23 May 2006 21:57:15 - 1.8 +++ print-radius.c 28 Jan 2012 12:03:33 - @@ -218,7 +218,8 @@ static void r_print_string(int code, int memset(string, 0, 128); memcpy(string, data, len); - fprintf(stdout, " %s", string); + fprintf(stdout, " "); + safeputs(string); } static void r_print_hex(int code, int len, const u_char *data) {
sppp(4): remove some crap
Any comments? ("bleurgh" is implicitly assumed). OK? This mail was sent through a router running it. Index: if_spppsubr.c === RCS file: /cvs/src/sys/net/if_spppsubr.c,v retrieving revision 1.95 diff -u -p -r1.95 if_spppsubr.c --- if_spppsubr.c 19 Jan 2012 01:13:20 - 1.95 +++ if_spppsubr.c 28 Jan 2012 10:50:22 - @@ -273,20 +273,6 @@ static struct callout_handle keepalive_c #defineSPP_ARGS(ifp) (ifp)->if_xname #endif -/* - * The following disgusting hack gets around the problem that IP TOS - * can't be set yet. We want to put "interactive" traffic on a high - * priority queue. To decide if traffic is interactive, we check that - * a) it is TCP and b) one of its ports is telnet, rlogin or ftp control. - * - * XXX is this really still necessary? - joerg - - */ -static u_short interactive_ports[8] = { - 0, 513,0, 0, - 0, 21, 0, 23, -}; -#define INTERACTIVE(p) (interactive_ports[(p) & 7] == (p)) - /* almost every function needs these */ #define STDDCL \ struct ifnet *ifp = &sp->pp_if; \ @@ -771,12 +757,6 @@ sppp_output(struct ifnet *ifp, struct mb else return (0); } - - if (!IF_QFULL(&sp->pp_fastq) && - ((ip && (ip->ip_tos & IPTOS_LOWDELAY)) || - (th && (INTERACTIVE(ntohs(th->th_sport)) || - INTERACTIVE(ntohs(th->th_dport)) - ifq = &sp->pp_fastq; } #endif @@ -933,7 +913,6 @@ sppp_attach(struct ifnet *ifp) sp->pp_if.if_type = IFT_PPP; sp->pp_if.if_output = sppp_output; IFQ_SET_MAXLEN(&sp->pp_if.if_snd, 50); - IFQ_SET_MAXLEN(&sp->pp_fastq, 50); IFQ_SET_MAXLEN(&sp->pp_cpq, 50); sp->pp_loopcnt = 0; sp->pp_alivecnt = 0; @@ -997,7 +976,6 @@ sppp_flush(struct ifnet *ifp) struct sppp *sp = (struct sppp*) ifp; IFQ_PURGE(&sp->pp_if.if_snd); - sppp_qflush (&sp->pp_fastq); sppp_qflush (&sp->pp_cpq); } @@ -1011,7 +989,7 @@ sppp_isempty(struct ifnet *ifp) int empty, s; s = splnet(); - empty = IF_IS_EMPTY(&sp->pp_fastq) && IF_IS_EMPTY(&sp->pp_cpq) && + empty = IF_IS_EMPTY(&sp->pp_cpq) && IFQ_IS_EMPTY(&sp->pp_if.if_snd); splx(s); return (empty); @@ -1032,14 +1010,12 @@ sppp_dequeue(struct ifnet *ifp) * Process only the control protocol queue until we have at * least one NCP open. * -* Do always serve all three queues in Cisco mode. +* Do always serve all queues in Cisco mode. */ IF_DEQUEUE(&sp->pp_cpq, m); if (m == NULL && (sppp_ncp_check(sp) || (sp->pp_flags & PP_CISCO) != 0)) { - IF_DEQUEUE(&sp->pp_fastq, m); - if (m == NULL) - IFQ_DEQUEUE (&sp->pp_if.if_snd, m); + IFQ_DEQUEUE (&sp->pp_if.if_snd, m); } splx(s); return m; @@ -1060,9 +1036,7 @@ sppp_pick(struct ifnet *ifp) if (m == NULL && (sp->pp_phase == PHASE_NETWORK || (sp->pp_flags & PP_CISCO) != 0)) { - IF_POLL(&sp->pp_fastq, m); - if ((m) == NULL) - IFQ_POLL(&sp->pp_if.if_snd, m); + IFQ_POLL(&sp->pp_if.if_snd, m); } splx (s); return (m); @@ -1288,7 +1262,6 @@ sppp_cisco_send(struct sppp *sp, u_int32 (u_int)ch->rel, (u_int)ch->time0, (u_int)ch->time1); if (IF_QFULL (&sp->pp_cpq)) { - IF_DROP (&sp->pp_fastq); IF_DROP (&ifp->if_snd); m_freem (m); m = NULL; @@ -1354,7 +1327,6 @@ sppp_cp_send(struct sppp *sp, u_short pr addlog(">\n"); } if (IF_QFULL (&sp->pp_cpq)) { - IF_DROP (&sp->pp_fastq); IF_DROP (&ifp->if_snd); m_freem (m); ++ifp->if_oerrors; @@ -4528,7 +4500,6 @@ sppp_auth_send(const struct cp *cp, stru addlog(">\n"); } if (IF_QFULL (&sp->pp_cpq)) { - IF_DROP (&sp->pp_fastq); IF_DROP (&ifp->if_snd); m_freem (m); ++ifp->if_oerrors;
Re: small vr(4) patch.
On Sat, Jan 28, 2012 at 09:57:34AM +, Stuart Henderson wrote: > On 2012/01/27 21:54, Brynet wrote: > > Remove redundant call to vr_reset, it gets called in vr_init. > > Can you show me where it gets called? I don't see it. Apologies, it gets called in vr_chipinit, which is called early in vr_init. -Bryan.
Re: small vr(4) patch.
On 2012/01/27 21:54, Brynet wrote: > Remove redundant call to vr_reset, it gets called in vr_init. Can you show me where it gets called? I don't see it. > -Bryan. > > Index: if_vr.c > === > RCS file: /cvs/src/sys/dev/pci/if_vr.c,v > retrieving revision 1.113 > diff -u -p -u -r1.113 if_vr.c > --- dev/pci/if_vr.c 5 Jan 2012 19:08:25 - 1.113 > +++ dev/pci/if_vr.c 28 Jan 2012 02:41:20 - > @@ -1124,7 +1124,6 @@ vr_intr(void *arg) > if (status & VR_ISR_TX_UNDERRUN) > printf("%s: transmit underrun\n", > sc->sc_dev.dv_xname); > - vr_reset(sc); > vr_init(sc); > status = 0; > }
tcpdump IKE dissector: print UDP_ENCAP_*_DRAFT
cizco still use the IDs from the draft for nat-t, let tcpdump print them, useful for diagnosis even if the isakmpd patches are too messy. OK? Index: ike.h === RCS file: /cvs/src/usr.sbin/tcpdump/ike.h,v retrieving revision 1.23 diff -u -p -r1.23 ike.h --- ike.h 7 Jun 2010 16:20:58 - 1.23 +++ ike.h 28 Jan 2012 09:52:30 - @@ -382,10 +382,6 @@ #define IPSEC_ATTR_DURATION_INITIALIZER\ { "NONE", "SECONDS", "KILOBYTES", \ } -#define IPSEC_ATTR_ENCAP_INITIALIZER \ - { "NONE", "TUNNEL", "TRANSPORT", "UDP_ENCAP_TUNNEL",\ - "UDP_ENCAP_TRANSPORT" \ - } #define IPSEC_ATTR_AUTH_INITIALIZER\ { "NONE", "HMAC_MD5", "HMAC_SHA", "DES_MAC", "KPDK",\ "HMAC_SHA2_256", "HMAC_SHA2_384", "HMAC_SHA2_512",\ @@ -403,6 +399,15 @@ #define IPCOMP_INITIALIZER \ { "NONE", "OUI", "DEFLATE", "LZS", "V42BIS",\ } +static struct tok ipsec_attr_encap[] = { + { 0,"NONE" }, + { 1,"TUNNEL" }, + { 2,"TRANSPORT" }, + { 3,"UDP_ENCAP_TUNNEL" }, + { 4,"UDP_ENCAP_TRANSPORT" }, + { 61443, "UDP_ENCAP_TUNNEL_DRAFT" },/* draft-ietf-ipsec-nat-t-ike */ + { 61444, "UDP_ENCAP_TRANSPORT_DRAFT" } /* draft-ietf-ipsec-nat-t-ike */ +}; /* * IKE mode config. Index: print-ike.c === RCS file: /cvs/src/usr.sbin/tcpdump/print-ike.c,v retrieving revision 1.35 diff -u -p -r1.35 print-ike.c --- print-ike.c 7 Jun 2010 16:20:58 - 1.35 +++ print-ike.c 28 Jan 2012 09:52:30 - @@ -303,7 +303,6 @@ ike_attribute_print (u_int8_t *buf, u_in static char *attr_gtype[] = IKE_ATTR_GROUP_INITIALIZER; static char *attr_ltype[] = IKE_ATTR_SA_DURATION_INITIALIZER; static char *ipsec_attrs[] = IPSEC_ATTR_INITIALIZER; - static char *ipsec_attr_encap[] = IPSEC_ATTR_ENCAP_INITIALIZER; static char *ipsec_attr_auth[] = IPSEC_ATTR_AUTH_INITIALIZER; static char *ipsec_attr_ltype[] = IPSEC_ATTR_DURATION_INITIALIZER; @@ -357,10 +356,12 @@ ike_attribute_print (u_int8_t *buf, u_in else switch(type) { CASE_PRINT(IPSEC_ATTR_SA_LIFE_TYPE, ipsec_attr_ltype); - CASE_PRINT(IPSEC_ATTR_ENCAPSULATION_MODE, - ipsec_attr_encap); CASE_PRINT(IPSEC_ATTR_AUTHENTICATION_ALGORITHM, ipsec_attr_auth); + case IPSEC_ATTR_ENCAPSULATION_MODE: + printf("%s", tok2str(ipsec_attr_encap, + "%d", val)); + break; default: printf("%d", val); }