search for: ushrt_max

Displaying 20 results from an estimated 112 matches for "ushrt_max".

2004 Jul 15
2
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)
...define CHAR_MAX UCHAR_MAX #else #define CHAR_MIN SCHAR_MIN /* mim value for a char */ #define CHAR_MAX SCHAR_MAX /* max value for a char */ #endif /* _CHAR_UNSIGNED */ #define SHRT_MIN (-32768) /* min value for (signed) short */ #define SHRT_MAX 32767 /* max value for (signed) short */ #define USHRT_MAX 0xffff /* max value for unsigned short */ #define INT_MIN (-2147483647-1) /* min value for (signed) int */ #define INT_MAX 2147483647 /* max value for (signed) int */ #define UINT_MAX 0xffffffff /* max value for unsigned int */ #define LONG_MIN (-2147483647L-1) /* minimum (signed)...
2018 Nov 15
3
[PATCH net-next 1/2] vhost_net: mitigate page reference counting during page frag refill
We do a get_page() which involves a atomic operation. This patch tries to mitigate a per packet atomic operation by maintaining a reference bias which is initially USHRT_MAX. Each time a page is got, instead of calling get_page() we decrease the bias and when we find it's time to use a new page we will decrease the bias at one time through __page_cache_drain_cache(). Testpmd(virtio_user + vhost_net) + XDP_DROP on TAP shows about 1.6% improvement. Before: 4.63Mpps...
2004 Jul 14
0
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)
...define CHAR_MAX UCHAR_MAX #else #define CHAR_MIN SCHAR_MIN /* mim value for a char */ #define CHAR_MAX SCHAR_MAX /* max value for a char */ #endif /* _CHAR_UNSIGNED */ #define SHRT_MIN (-32768) /* min value for (signed) short */ #define SHRT_MAX 32767 /* max value for (signed) short */ #define USHRT_MAX 0xffff /* max value for unsigned short */ #define INT_MIN (-2147483647-1) /* min value for (signed) int */ #define INT_MAX 2147483647 /* max value for (signed) int */ #define UINT_MAX 0xffffffff /* max value for unsigned int */ #define LONG_MIN (-2147483647L-1) /* minimum (signed)...
2004 Jul 15
0
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)
...define CHAR_MIN SCHAR_MIN /* mim value for a char */ > #define CHAR_MAX SCHAR_MAX /* max value for a char */ > #endif /* _CHAR_UNSIGNED */ > > > #define SHRT_MIN (-32768) /* min value for (signed) short */ > #define SHRT_MAX 32767 /* max value for (signed) short */ > #define USHRT_MAX 0xffff /* max value for unsigned short */ > > #define INT_MIN (-2147483647-1) /* min value for (signed) int */ > #define INT_MAX 2147483647 /* max value for (signed) int */ > #define UINT_MAX 0xffffffff /* max value for unsigned int */ > > #define LONG_MIN (-2147483...
2011 Dec 22
1
[Bug 44061] New: dri/nouveau: Build error with clang
...xpanded from macro 'EXTRACT' out_t f(struct nouveau_array *a, int i, int j) { \ ^ nouveau_array.c:62:16: error: illegal storage class on function *extract_f = EXTRACT(unsigned short, float, USHRT_MAX); ^ nouveau_array.c:38:3: note: expanded from macro 'EXTRACT' auto out_t f(struct nouveau_array *, int, int); \ ^ nouveau_array.c:62:16: error: expected ';' at end of declaration *extract_f = EXTRAC...
2013 Feb 12
3
[PATCHv2 vringh 0/3] Introduce CAIF Virtio driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. Changes since V1: - Use the new iov helper functions, and simplify iov handling. However this triggers compile warnings, as it takes struct iov while kernel api uses struct kiov - Introduced
2013 Feb 12
3
[PATCHv2 vringh 0/3] Introduce CAIF Virtio driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. Changes since V1: - Use the new iov helper functions, and simplify iov handling. However this triggers compile warnings, as it takes struct iov while kernel api uses struct kiov - Introduced
2013 Feb 10
3
[PATCH vringh 0/2] Introduce CAIF Virtio driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> This patch-set introduces the CAIF Virtio Link layer driver. This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. Regards, Sjur cc: Rusty Russell <rusty at rustcorp.com.au> cc: Ohad Ben-Cohen <ohad at wizery.com> cc: David S. Miller
2013 Feb 10
3
[PATCH vringh 0/2] Introduce CAIF Virtio driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> This patch-set introduces the CAIF Virtio Link layer driver. This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. Regards, Sjur cc: Rusty Russell <rusty at rustcorp.com.au> cc: Ohad Ben-Cohen <ohad at wizery.com> cc: David S. Miller
2020 Jun 03
1
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...ures only need a compiler barrier here. */ >>> + read_barrier_depends(); >>> + >>> + count = len / sizeof desc; >>> + /* Buffers are chained via a 16 bit next field, so >>> + * we can have at most 2^16 of these. */ >>> + if (unlikely(count > USHRT_MAX + 1)) { >>> + vq_err(vq, "Indirect buffer length too big: %d\n", >>> + indirect->len); >>> + return -E2BIG; >>> + } >>> + if (unlikely(vq->ndescs + count > vq->max_descs)) { >>> + vq_err(vq, "Too many indire...
2013 Mar 15
4
[PATCHv3 vringh] caif_virtio: Introduce caif over virtio
...LIGN 4 + +/* struct cfv_napi_contxt - NAPI context info + * @riov: IOV holding data read from the ring. Note that riov may + * still hold data when cfv_rx_poll() returns. + * @head: Last descriptor ID we received from vringh_getdesc_kern. + * We use this to put descriptor back on the used ring. USHRT_MAX is + * used to indicate invalid head-id. + */ +struct cfv_napi_context { + struct vringh_kiov riov; + unsigned short head; +}; + +/* struct cfv_stats - statistics for debugfs + * @rx_napi_complete: Number of NAPI completions (RX) + * @rx_napi_resched: Number of calls where the full quota was used...
2013 Mar 15
4
[PATCHv3 vringh] caif_virtio: Introduce caif over virtio
...LIGN 4 + +/* struct cfv_napi_contxt - NAPI context info + * @riov: IOV holding data read from the ring. Note that riov may + * still hold data when cfv_rx_poll() returns. + * @head: Last descriptor ID we received from vringh_getdesc_kern. + * We use this to put descriptor back on the used ring. USHRT_MAX is + * used to indicate invalid head-id. + */ +struct cfv_napi_context { + struct vringh_kiov riov; + unsigned short head; +}; + +/* struct cfv_stats - statistics for debugfs + * @rx_napi_complete: Number of NAPI completions (RX) + * @rx_napi_resched: Number of calls where the full quota was used...
2003 Apr 29
0
[PATCH] Add configurable timeout to ipconfig
...} - + bail: packet_close(); return 0; @@ -404,7 +415,7 @@ progname = argv[0]; do { - c = getopt(argc, argv, "d:np:t"); + c = getopt(argc, argv, "d:np:t:"); if (c == EOF) break; @@ -413,7 +424,7 @@ port = atoi(optarg); if (port <= 0 || port > USHRT_MAX) { fprintf(stderr, - "%s: port number %d out of range\n", + "%s: invalid port number %d\n", progname, port); exit(1); } @@ -423,6 +434,13 @@ "dest to %d\n", local_port, remote_port); break; case 't': + loop_timeou...
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
..._sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); + } + + if (virtio_has_feature(vdev, VIRTIO_BLK_F_WRITE_ZEROES)) { + virtio_cread(vdev, struct virtio_blk_config, max_write_zeroes_sectors, &v); + if (v) + blk_queue_max_write_zeroes_sectors(q, v); + else + blk_queue_max_write_zeroes...
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
..._sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); + } + + if (virtio_has_feature(vdev, VIRTIO_BLK_F_WRITE_ZEROES)) { + virtio_cread(vdev, struct virtio_blk_config, max_write_zeroes_sectors, &v); + if (v) + blk_queue_max_write_zeroes_sectors(q, v); + else + blk_queue_max_write_zeroes...
2020 Jun 03
2
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...ddress to read from, so most > + * architectures only need a compiler barrier here. */ > + read_barrier_depends(); > + > + count = len / sizeof desc; > + /* Buffers are chained via a 16 bit next field, so > + * we can have at most 2^16 of these. */ > + if (unlikely(count > USHRT_MAX + 1)) { > + vq_err(vq, "Indirect buffer length too big: %d\n", > + indirect->len); > + return -E2BIG; > + } > + if (unlikely(vq->ndescs + count > vq->max_descs)) { > + vq_err(vq, "Too many indirect + direct descs: %d + %d\n", > +...
2020 Jun 03
2
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...ddress to read from, so most > + * architectures only need a compiler barrier here. */ > + read_barrier_depends(); > + > + count = len / sizeof desc; > + /* Buffers are chained via a 16 bit next field, so > + * we can have at most 2^16 of these. */ > + if (unlikely(count > USHRT_MAX + 1)) { > + vq_err(vq, "Indirect buffer length too big: %d\n", > + indirect->len); > + return -E2BIG; > + } > + if (unlikely(vq->ndescs + count > vq->max_descs)) { > + vq_err(vq, "Too many indirect + direct descs: %d + %d\n", > +...
2003 Apr 29
0
[PATCH] Fix busy-looping behaviour in ipconfig
...t argc, char *argv[]) { - int c; + int c, port; + progname = argv[0]; + do { - c = getopt(argc, argv, "td:"); + c = getopt(argc, argv, "d:np:t"); if (c == EOF) break; switch (c) { + case 'p': + port = atoi(optarg); + if (port <= 0 || port > USHRT_MAX) { + fprintf(stderr, + "%s: port number %d out of range\n", + progname, port); + exit(1); + } + local_port = port; + remote_port = local_port - 1; + printf("IP-Config: binding source port to %d, " + "dest to %d\n", local_port, remote_port...
2018 Mar 30
0
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
...ue_max_discard_sectors(q, v); > + else > + blk_queue_max_discard_sectors(q, UINT_MAX); > + > + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); > + if (v) > + blk_queue_max_discard_segments(q, v); > + else > + blk_queue_max_discard_segments(q, USHRT_MAX); > + > + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); > + } > + > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_WRITE_ZEROES)) { > + virtio_cread(vdev, struct virtio_blk_config, max_write_zeroes_sectors, &v); > + if (v) > + blk_queue_max_write_zeroes_sectors(q, v)...
2014 Nov 24
2
[PATCH v3 26/41] vhost: virtio 1.0 endian-ness support
...vhost_virtqueue *vq, * architectures only need a compiler barrier here. */ read_barrier_depends(); - count = indirect->len / sizeof desc; + count = len / sizeof desc; /* Buffers are chained via a 16 bit next field, so * we can have at most 2^16 of these. */ if (unlikely(count > USHRT_MAX + 1)) { @@ -1155,16 +1163,17 @@ static int get_indirect(struct vhost_virtqueue *vq, if (unlikely(memcpy_fromiovec((unsigned char *)&desc, vq->indirect, sizeof desc))) { vq_err(vq, "Failed indirect descriptor: idx %d, %zx\n", - i, (size_t)indirect->add...