search for: bcnt

Displaying 8 results from an estimated 8 matches for "bcnt".

Did you mean: bcat
2010 Mar 18
0
[MODULE] COM32 module to time null-dumping a file
...ayout.inc: xfer_buf_seg equ 1000h + */ + +float get_tps(){ return 18.2; } + +#else /* __COM32__ */ + +#define BUFSZ 16384 +/* Need to check what might be a "best" buffer/fetch block size here */ + +float get_tps(){ return (float)sysconf(_SC_CLK_TCK); } +void print_cp_result2(char *fn, int bcnt, clock_t bc, clock_t ec) +{ + float et, dr; + et = ((float)(ec - bc)) / (float)sysconf(_SC_CLK_TCK); + dr = ((float)bcnt) / et; + printf(" %dB in %.3fs from '%s'\n", bcnt, et, fn); + printf(" %.0f B/s; %.0f KiB/s; %.0f MiB/s\n", dr, dr/1024, dr/1048576); +} /* void pri...
2010 Mar 20
1
[MODULE] COM32 module to time null-dumping a file, v1.1
...# define SSIZE_MAX PTRDIFF_MAX +#endif +/* typedef ptrdiff_t ssize_t; */ +#define BUFSZ_MAX SSIZE_MAX +/* ssize_t max */ +#define BUFSZ_MIN 1 +#ifndef OFF_MAX +# define OFF_MAX SIZE_MAX +#endif +/* typedef size_t off_t */ +#define LEN_MAX OFF_MAX +/* off_t max */ + +void print_cp_result_tick(int bcnt, clock_t et, float tps, int offs) +{ + int dr; + dr = bcnt * tps / max(1,(et + offs)); // prevent divide by 0 + printf(" %+d %d B/s; %d KiB/s; %d MiB/s\n", offs, dr, dr/1024, dr/1048576); +} /* void print_cp_result_tick(int bcnt, clock_t et, float tps, int offs) */ + +void print_cp_resul...
2014 Nov 22
3
Use z size specifier for printf-ing size_t variable
...SSWD_MARGIN + 3); diff --git a/com32/modules/cptime.c b/com32/modules/cptime.c index 0f5ffe6..315b9f9 100644 --- a/com32/modules/cptime.c +++ b/com32/modules/cptime.c @@ -216,7 +216,7 @@ int time_copy(char *fn, char do_simple, char do_verbose, size_t ibufsz, off_t ma print_cp_result_long(fn, bcnt, bc, ec, ibufsz, do_verbose); } if (do_verbose) - printf(" numrd %d bcnt %d bufsz %d i %d\n", numrd, bcnt, bufsz, i); + printf(" numrd %d bcnt %zd bufsz %zd i %d\n", numrd, bcnt, bufsz, i); } return rv; } /* int time_copy(char *fn, char do_simple, int bufsz, off...
2006 Mar 24
2
[PATCH] qemu pcnet emulation fixes
...(bad || (nnrd == crda)) nnrd = 0; s->csr[28] = crda & 0xffff; @@ -303,14 +290,12 @@ static void pcnet_rdte_poll(PCNetState * } if (CSR_CRDA(s)) { - struct pcnet_RMD rmd; - RMDLOAD(&rmd, PHYSADDR(s,CSR_CRDA(s))); - CSR_CRBC(s) = rmd.rmd1.bcnt; - CSR_CRST(s) = ((uint32_t *)&rmd)[1] >> 16; + CSR_CRBC(s) = s->crmd.rmd1.bcnt; + CSR_CRST(s) = ((uint32_t *)&(s->crmd))[1] >> 16; #ifdef PCNET_DEBUG_RMD_X printf("CRDA=0x%08x CRST=0x%04x RCVRC=%d RMD1=0x%08x RMD2=0x%08x\n",...
2015 Jan 25
0
Use z size specifier for printf-ing size_t variable
...e.c b/com32/modules/cptime.c > index 0f5ffe6..315b9f9 100644 > --- a/com32/modules/cptime.c > +++ b/com32/modules/cptime.c > @@ -216,7 +216,7 @@ int time_copy(char *fn, char do_simple, char do_verbose, size_t ibufsz, off_t ma > print_cp_result_long(fn, bcnt, bc, ec, ibufsz, do_verbose); > } > if (do_verbose) > - printf(" numrd %d bcnt %d bufsz %d i %d\n", numrd, bcnt, bufsz, i); > + printf(" numrd %d bcnt %zd bufsz %zd i %d\n", numrd, bcnt, bu...
2007 Apr 18
1
[Bridge] Ip traffic not bridged
...packets on the PREROUTING hook never appear at the POSTROUTING hook. (Though they can be seen on the FORWARD hook in both iptables and ebtables). linux:~ # ebtables -t nat -L --Lc Bridge table: nat Bridge chain: PREROUTING, entries: 1, policy: ACCEPT -s fe:fd:c0:a8:0:3 -j ACCEPT , pcnt = 7424 -- bcnt = 610120 Bridge chain: OUTPUT, entries: 1, policy: ACCEPT -s fe:fd:c0:a8:0:3 -j ACCEPT , pcnt = 0 -- bcnt = 0 Bridge chain: POSTROUTING, entries: 1, policy: ACCEPT -s fe:fd:c0:a8:0:3 -j ACCEPT , pcnt = 240 -- bcnt = 6720 linux:~ # I am using Suse 9.0 : linux:~ # uname -a Linux linux 2.6.5-7.97...
2019 Nov 12
20
[PATCH hmm v3 00/14] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com> 8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1, scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where they only use invalidate_range_start/end and immediately check the invalidating range against some driver data structure to tell if the driver is interested. Half of them use an interval_tree, the others
2019 Oct 28
32
[PATCH v2 00/15] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com> 8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1, scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where they only use invalidate_range_start/end and immediately check the invalidating range against some driver data structure to tell if the driver is interested. Half of them use an interval_tree, the others