search for: bufsz

Displaying 15 results from an estimated 15 matches for "bufsz".

Did you mean: bufs
2010 Mar 20
1
[MODULE] COM32 module to time null-dumping a file, v1.1
...nclude <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <fcntl.h> +#include <unistd.h> +#include <sys/times.h> +#include <consoles.h> +#include <minmax.h> +#include <limits.h> +#include <string.h> + +#ifdef __COM32__ +# define BUFSZ_DEF 2048 +/* What's optimal? Under 4k? + * layout.inc: xfer_buf_seg equ 1000h + */ +# define O_DIRECT 0 + +static inline float get_tps(){ return 18.2; } + +#else /* __COM32__ */ + +# define BUFSZ_DEF 16384 +/* Need to check what might be a "best" buffer/fetch block size here */ + +...
2014 Nov 22
3
Use z size specifier for printf-ing size_t variable
...t;messages[MSG_PASSPROMPT], PASSWD_ROW + 1, PASSWD_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_...
2010 Mar 18
0
[MODULE] COM32 module to time null-dumping a file
...oDos: + * Refine timing to be more precise. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <fcntl.h> +#include <unistd.h> +#include <sys/times.h> +#include <consoles.h> +#include <minmax.h> + + +#ifdef __COM32__ +#define BUFSZ 2048 +/* What's optimal? Under 4k? + * layout.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...
2015 Jan 25
0
Use z size specifier for printf-ing size_t variable
...PASSWD_ROW + 1, PASSWD_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); > +...
2007 Aug 21
1
[git patch] dmesg + fstype ocfs2
...+1,71 @@ +#include <unistd.h> +#include <errno.h> +#include <stdio.h> +#include <ctype.h> +#include <stdlib.h> + +static void usage(char *name) +{ + fprintf(stderr, "usage: %s [-c]\n", name); +} + +int main(int argc, char *argv[]) +{ + char *buf = NULL; + int bufsz = 0; + int cmd = 3; /* Read all messages remaining in the ring buffer */ + int len = 0; + int opt; + int i = 0; + + while ((opt = getopt(argc, argv, "c")) != -1) { + switch(opt) { + /* Read and clear all messages remaining in the ring buffer */ + case 'c': + cmd = 4; + brea...
2007 Mar 09
2
xen / AOE / vblade
...to the vblade server. It turns out that for some reason the packets were shorter than vblade expected, and it was ignoring them. I changed the check for packet length to be if < 32 instead of if < 60, and voila it works. (in aoe.c) for (;;) { n = getpkt(sfd, buf, bufsz); if (n < 0) { perror("read network"); exit(1); } // if (n < 60) { if (n < 32) { // fprintf(stderr,"skipping short read (%d<36)\n",n...
2009 Jan 27
5
[PATCH 2/2] Add VMDq support to ixgbe
..._csum_rx_good++; + +#ifdef CONFIG_XEN_NETDEV2_BACKEND + skb->proto_data_valid = 1; +#endif } /** @@ -554,13 +569,33 @@ static void ixgbe_alloc_rx_buffers(struc } if (!bi->skb) { - struct sk_buff *skb = netdev_alloc_skb(adapter->netdev, - bufsz); + struct sk_buff *skb; +#ifdef CONFIG_XEN_NETDEV2_BACKEND + if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && + rx_ring->queue_index) { + skb = vmq_alloc_skb(adapter->netdev, + rx_ring->queue_index, + bufsz); +...
2006 Nov 02
0
ssh strlen fixes
...=============================== RCS file: /home/ray/openbsd/src/usr.bin/ssh/misc.c,v retrieving revision 1.64 diff -u -p -r1.64 misc.c --- misc.c 3 Aug 2006 03:34:42 -0000 1.64 +++ misc.c 2 Nov 2006 20:05:41 -0000 @@ -604,11 +604,15 @@ read_keyfile_line(FILE *f, const char *f { while (fgets(buf, bufsz, f) != NULL) { (*lineno)++; - if (buf[strlen(buf) - 1] == '\n' || feof(f)) { + if (buf[0] != '\0' && buf[strlen(buf) - 1] == '\n' || feof(f)) { return 0; } else { - debug("%s: %s line %lu exceeds size limit", __func__, - filename, *linen...
2009 Feb 10
3
[PATCH 2/2] Use correct config option for ixgbe VMDq
...XEN_NETDEV2_VMQ if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && rx_ring->queue_index) { skb = vmq_alloc_skb(adapter->netdev, @@ -604,7 +604,7 @@ static void ixgbe_alloc_rx_buffers(struc bi->skb = skb; bi->dma = pci_map_single(pdev, skb->data, bufsz, PCI_DMA_FROMDEVICE); -#ifdef CONFIG_XEN_NETDEV2_BACKEND +#ifdef CONFIG_XEN_NETDEV2_VMQ } #endif } @@ -1056,7 +1056,7 @@ static bool ixgbe_clean_rx_irq(struct ix cleaned = true; skb = rx_buffer_info->skb; rx_buffer_info->skb = NULL; -#ifdef CONFIG...
2005 Feb 25
1
ext3 +2TB fs
I've got a 3.3TB ext3 on a FC3 64-bit system, running kernel 2.6.10-1.766FC3smp. I create the partition with parted 1.6.21, and I make the fs via: mkfs.ext3 -m1 -b 4096 -T largefile4 /dev/sda1 Works fine. bonnie++ running on it multiple times for days on end, no problems. However, I do the exact same setup on a RHEL4-AS i686 system, 32-bit, and the fs is totally hosed, get all kinds of
2013 Jul 15
21
[PATCH 00 of 21 RESEND] blktap3/drivers: Introduce tapdisk server.
This patch series copies the core of the tapdisk process from blktap2, with updates coming from blktap2.5. Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
2017 Oct 10
3
tunnel device name acquisition?
Numerous how-tos all over the Internet show how one would set up a tunnel using ssh, e.g.: ssh -f -o Tunnel=ethernet <server_ip> true I was wondering if there's a way to subsequently acquire the names of the local and remote tun/tap interfaces (e.g., using the default "-w any:any") for subsequent automatic tunnel configuration, e.g.: ip link set $TapDev up ip link set
2012 Dec 27
30
[PATCH v3 00/11] xen: Initial kexec/kdump implementation
Hi, This set of patches contains initial kexec/kdump implementation for Xen v3. Currently only dom0 is supported, however, almost all infrustructure required for domU support is ready. Jan Beulich suggested to merge Xen x86 assembler code with baremetal x86 code. This could simplify and reduce a bit size of kernel code. However, this solution requires some changes in baremetal x86 code. First of
2012 Dec 27
30
[PATCH v3 00/11] xen: Initial kexec/kdump implementation
Hi, This set of patches contains initial kexec/kdump implementation for Xen v3. Currently only dom0 is supported, however, almost all infrustructure required for domU support is ready. Jan Beulich suggested to merge Xen x86 assembler code with baremetal x86 code. This could simplify and reduce a bit size of kernel code. However, this solution requires some changes in baremetal x86 code. First of
2012 Dec 27
30
[PATCH v3 00/11] xen: Initial kexec/kdump implementation
Hi, This set of patches contains initial kexec/kdump implementation for Xen v3. Currently only dom0 is supported, however, almost all infrustructure required for domU support is ready. Jan Beulich suggested to merge Xen x86 assembler code with baremetal x86 code. This could simplify and reduce a bit size of kernel code. However, this solution requires some changes in baremetal x86 code. First of