Home
last modified time | relevance | path

Searched +full:max +full:- +full:len (Results 1 – 25 of 1090) sorted by relevance

12345678910>>...44

/linux/net/core/
H A Dpktgen.c1 // SPDX-License-Identifier: GPL-2.0-or-later
23 * MAC address typo fixed. 010417 --ro
24 * Integrated. 020301 --DaveM
25 * Added multiskb option 020301 --DaveM
26 * Scaling of results. 020417--sigurdur@linpro.no
27 * Significant re-work of the module:
31 * * Allow configuration of ranges, like min/max IP address, MACs,
32 * and UDP-ports, for both source and destination, and can
35 * * Place 12-byte packet in UDP payload with magic number,
37 * * Add receiver code that detects dropped pkts, re-ordered pkts, and
[all …]
/linux/lib/zlib_inflate/
H A Dinftrees.c1 /* inftrees.c -- generate Huffman trees for efficient decoding
2 * Copyright (C) 1995-2005 Mark Adler
13 The code lengths are lens[0..codes-1]. The result starts at *table,
14 whose indices are 0..2^bits-1. work is a writable array of at least
17 -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
26 unsigned len; /* a code's length in bits */ in zlib_inflate_table() local
28 unsigned min, max; /* minimum and maximum code lengths */ in zlib_inflate_table() local
31 unsigned drop; /* code bits to drop for sub-table */ in zlib_inflate_table()
63 code lengths are lens[0..codes-1]. Each length corresponds to the in zlib_inflate_table()
64 symbols 0..codes-1. The Huffman code is generated by first sorting the in zlib_inflate_table()
[all …]
/linux/tools/lib/python/feat/
H A Dparse_features.py4 # SPDX-License-Identifier: GPL-2.0
47 # The only missing status is "..", which was mapped as "---",
64 self.max_size_name = len(self.h_name)
65 self.max_size_kconfig = len(self.h_kconfig)
66 self.max_size_description = len(self.h_description)
68 self.max_size_subsys = len(sel
[all...]
/linux/lib/
H A Dnlattr.c1 // SPDX-License-Identifier: GPL-2.0
60 static int __nla_validate_parse(const struct nlattr *head, int len, int maxtype,
72 return -EINVAL; in validate_nla_bitfield32()
75 if (bf->selector & ~valid_flags_mask) in validate_nla_bitfield32()
76 return -EINVAL; in validate_nla_bitfield32()
79 if (bf->value & ~valid_flags_mask) in validate_nla_bitfield32()
80 return -EINVAL; in validate_nla_bitfield32()
83 if (bf->value & ~bf->selector) in validate_nla_bitfield32()
84 return -EINVAL; in validate_nla_bitfield32()
89 static int nla_validate_array(const struct nlattr *head, int len, int maxtype, in nla_validate_array() argument
[all …]
/linux/drivers/scsi/ibmvscsi_tgt/
H A Dlibsrp.c1 // SPDX-License-Identifier: GPL-2.0-or-later
17 #include <linux/dma-mapping.h>
24 static int srp_iu_pool_alloc(struct srp_queue *q, size_t max, in srp_iu_pool_alloc() argument
30 q->pool = kzalloc_objs(struct iu_entry *, max); in srp_iu_pool_alloc()
31 if (!q->pool) in srp_iu_pool_alloc()
32 return -ENOMEM; in srp_iu_pool_alloc()
33 q->items = kzalloc_objs(struct iu_entry, max); in srp_iu_pool_alloc()
34 if (!q->items) in srp_iu_pool_alloc()
37 spin_lock_init(&q->lock); in srp_iu_pool_alloc()
38 kfifo_init(&q->queue, (void *)q->pool, max * sizeof(void *)); in srp_iu_pool_alloc()
[all …]
/linux/include/linux/
H A Dminmax.h1 /* SPDX-License-Identifier: GPL-2.0 */
11 * min()/max()/clamp() macros must accomplish several things:
13 * - Avoid multiple evaluations of the arguments (so side-effects like
14 * "x++" happen only once) when non-constant.
15 * - Perform signed v unsigned type-checking (to generate compile
17 * - Unsigned char/short are always promoted to signed int and can be
19 * - Unsigned arguments can be compared against non-negative signed constants.
20 * - Comparison of a signed argument against an unsigned constant fails
31 * In particular, statically non-negative signed integer expressions
53 * Check whether a signed value is always non-negative.
[all …]
H A Dhighmem.h1 /* SPDX-License-Identifier: GPL-2.0 */
14 #include "highmem-internal.h"
17 * kmap - Map a page for long term usage
40 * kunmap - Unmap the virtual address mapped by kmap()
49 * kmap_to_page - Get the page for a kmap'ed address
57 * kmap_flush_unused - Flush all unused kmap mappings in order to
63 * kmap_local_page - Map a page for temporary usage
99 * kmap_local_folio - Map a page in this folio for temporary usage
135 * kmap_atomic - Atomically map a page for temporary usage - Deprecated!
203 * clear_user_page() - clear a page to be mapped to user space
[all …]
/linux/net/netfilter/
H A Dnf_log_syslog.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* (C) 1999-2001 Paul `Rusty' Russell
3 * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
57 nf_log_buf_add(m, "VPROTO=%04x VID=%u ", ntohs(skb->vlan_proto), vid); in nf_log_dump_vlan()
76 if (info->type == NF_LOG_TYPE_LOG) in dump_arp_packet()
77 logflags = info->u.log.logflags; in dump_arp_packet()
82 skb->dev && skb->dev->type == ARPHRD_ETHER && in dump_arp_packet()
86 eth_hdr(skb)->h_source, eth_hdr(skb)->h_dest); in dump_arp_packet()
89 ntohs(eth_hdr(skb)->h_proto)); in dump_arp_packet()
93 ntohs(ah->ar_hrd), ntohs(ah->ar_pro), ntohs(ah->ar_op)); in dump_arp_packet()
[all …]
/linux/net/xdp/
H A Dxsk_queue.h1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* XDP user-space ring structure
69 return batch->tx_descs + batch->reclaim_descs; in xsk_tx_batch_cq_descs()
74 * Documentation/core-api/circular-buffers.rst. For the Rx and
81 * if (LOAD ->consumer) { (A) LOAD.acq ->producer (C)
83 * STORE.rel ->producer (B) STORE.rel ->consumer (D)
98 * between ->producer and data.
100 * (A) is a control dependency that separates the load of ->consumer
101 * from the stores of $data. In case ->consumer indicates there is no
138 struct xdp_umem_ring *ring = (struct xdp_umem_ring *)q->ring; in __xskq_cons_read_addr_unchecked()
[all …]
/linux/fs/hfsplus/
H A Dbitmap.c1 // SPDX-License-Identifier: GPL-2.0
20 u32 offset, u32 *max) in hfsplus_block_allocate() argument
26 u32 mask, start, len, n; in hfsplus_block_allocate() local
30 len = *max; in hfsplus_block_allocate()
31 if (!len) in hfsplus_block_allocate()
34 hfs_dbg("size %u, offset %u, len %u\n", size, offset, len); in hfsplus_block_allocate()
35 mutex_lock(&sbi->alloc_mutex); in hfsplus_block_allocate()
36 mapping = sbi->alloc_file->i_mapping; in hfsplus_block_allocate()
43 curr = pptr + (offset & (PAGE_CACHE_BITS - 1)) / 32; in hfsplus_block_allocate()
45 offset &= ~(PAGE_CACHE_BITS - 1); in hfsplus_block_allocate()
[all …]
/linux/tools/perf/scripts/python/
H A Dtask-analyzer.py1 # task-analyzer.py - comprehensive perf tasks analysis
2 # SPDX-License-Identifier: GPL-2.0
8 # perf record -e sched:sched_switch -a -- sleep 10
9 # perf script report task-analyzer
21 os.environ["PERF_EXEC_PATH"] + "/scripts/python/Perf-Trace-Util/lib/Perf/Trace"
39 LEN_SWITCHED_IN = len("9999999.999999999") # 17
40 LEN_SWITCHED_OUT = len("9999999.999999999") # 17
41 LEN_CPU = len("000")
42 LEN_PID = len("maxvalue") # 8
43 LEN_TID = len("maxvalue") # 8
[all …]
/linux/Documentation/netlink/
H A Dgenetlink-c.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
3 ---
4 $id: http://kernel.org/schemas/netlink/genetlink-c.yaml#
5 $schema: https://json-schema.org/draft-07/schema
12 len-or-define:
14 pattern: ^[0-9A-Za-z_-]+( - 1)?$
16 len-or-limit:
17 # literal int, const name, or limit based on fixed-width type
18 # e.g. u8-min, u16-max, etc.
20 pattern: ^[0-9A-Za-z_-]+$
[all …]
H A Dgenetlink-legacy.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
3 ---
4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml#
5 $schema: https://json-schema.org/draft-07/schema
11 pattern: ^[0-9a-z-]+$
15 len-or-define:
17 pattern: ^[0-9A-Za-z_-]+( - 1)?$
19 len-or-limit:
20 # literal int, const name, or limit based on fixed-width type
21 # e.g. u8-min, u16-max, etc.
[all …]
H A Dnetlink-raw.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
3 ---
4 $id: http://kernel.org/schemas/netlink/netlink-raw.yaml#
5 $schema: https://json-schema.org/draft-07/schema
11 pattern: ^[0-9a-z-]+$
12 name-cap:
14 pattern: ^[0-9a-zA-Z-]+$
18 len-or-define:
20 pattern: ^[0-9A-Za-z_-]+( - 1)?$
22 len-or-limit:
[all …]
H A Dgenetlink.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
3 ---
4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml#
5 $schema: https://json-schema.org/draft-07/schema
11 pattern: ^[0-9a-z-]+$
15 len-or-define:
17 pattern: ^[0-9A-Za-z_-]+( - 1)?$
19 len-or-limit:
20 # literal int, const name, or limit based on fixed-width type
21 # e.g. u8-min, u16-max, etc.
[all …]
/linux/drivers/pnp/pnpbios/
H A Drsparser.c1 // SPDX-License-Identifier: GPL-2.0
3 * rsparser.c - parses and encodes pnpbios resource data streams
45 * end tag ->
47 * end tag ->
49 * final end tag ->
57 int start, int len) in pnpbios_parse_allocated_ioresource() argument
60 int end = start + len - 1; in pnpbios_parse_allocated_ioresource()
62 if (len <= 0 || end >= 0x10003) in pnpbios_parse_allocated_ioresource()
69 int start, int len) in pnpbios_parse_allocated_memresource() argument
72 int end = start + len - 1; in pnpbios_parse_allocated_memresource()
[all …]
/linux/Documentation/core-api/
H A Dnetlink.rst1 .. SPDX-License-Identifier: BSD-3-Clause
13 ---------------
21 -------------
31 ---------------
44 ----------
51 ------------------------
54 them - make sure to report dump inconsistency with ``NLM_F_DUMP_INTR``.
65 -------
67 kernel-policy
71 operations of the family, defined for each operation individually - ``per-op``,
[all …]
/linux/tools/testing/selftests/drivers/net/
H A Dshaper.py2 # SPDX-License-Identifier: GPL-2.0
3 # pylint: disable=too-many-lines
15 def _delete_shaper(cfg, nl_shaper, handle) -> None:
16 """ Delete the shaper identified by handle, ignoring a missing-shaper error. """
26 qcnt = len(glob.glob(f"/sys/class/net/{cfg.ifname}/queues/tx-*"))
41 def _require_caps(cfg, nl_shaper, scope, caps, msg) -> None:
53 def get_shapers(cfg, nl_shaper) -> None:
62 ksft_eq(len(shapers), 0)
64 def get_caps(cfg, nl_shaper) -> None:
74 ksft_true(len(caps)> 0)
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A Dvolt.c29 nvbios_volt_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_volt_table() argument
47 *len = nvbios_rd08(bios, volt + 1); in nvbios_volt_table()
52 *len = nvbios_rd08(bios, volt + 3); in nvbios_volt_table()
59 *len = nvbios_rd08(bios, volt + 2); in nvbios_volt_table()
69 nvbios_volt_parse(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, in nvbios_volt_parse() argument
72 u32 volt = nvbios_volt_table(bios, ver, hdr, cnt, len); in nvbios_volt_parse()
76 info->type = NVBIOS_VOLT_GPIO; in nvbios_volt_parse()
77 info->vidmask = nvbios_rd08(bios, volt + 0x04); in nvbios_volt_parse()
78 info->ranged = false; in nvbios_volt_parse()
81 info->type = NVBIOS_VOLT_GPIO; in nvbios_volt_parse()
[all …]
/linux/drivers/net/wireless/broadcom/brcm80211/include/
H A Dbrcmu_utils.h1 // SPDX-License-Identifier: ISC
20 countdown -= 10; \
24 /* osl multi-precedence packet queue */
25 #define PKTQ_LEN_DEFAULT 128 /* Max 128 packets */
28 #define BCME_STRLEN 64 /* Max string length for BCM errors */
45 #define MAXBITVAL(nbits) ((1 << (nbits)) - 1)
53 /* 18-bytes of Ethernet address buffer length */
58 u16 max; /* maximum number of queued packets */ member
61 /* multi-priority pkt queue */
64 u16 hi_prec; /* rapid dequeue hint (>= highest non-empty prec) */
[all …]
/linux/fs/nfsd/
H A Dnfscache.c1 // SPDX-License-Identifier: GPL-2.0
4 * change in the future and be a per-client cache.
28 * We use this value to determine the number of hash buckets from the max
63 * ~1k, so the above numbers should give a rough max of the amount of memory
66 * XXX: these limits are per-container, so memory used will increase
73 unsigned long low_pages = totalram_pages() - totalhigh_pages(); in nfsd_cache_size_limit()
75 limit = (16 * int_sqrt(low_pages)) << (PAGE_SHIFT-10); in nfsd_cache_size_limit()
80 * Compute the number of hash buckets we need. Divide the max cachesize by
81 * the "target" max bucket size, and round up to next power of two.
97 rp->c_state = RC_UNUSED; in nfsd_cacherep_alloc()
[all …]
/linux/drivers/net/wireless/mediatek/mt76/
H A Dmt792x_acpi_sar.c1 // SPDX-License-Identifier: BSD-3-Clause-Clear
30 mt792x_acpi_read(struct mt792x_dev *dev, u8 *method, u8 **tbl, u32 *len) in mt792x_acpi_read() argument
33 struct mt76_dev *mdev = &dev->mt76; in mt792x_acpi_read()
40 root = ACPI_HANDLE(mdev->dev); in mt792x_acpi_read()
42 return -EOPNOTSUPP; in mt792x_acpi_read()
46 return -EIO; in mt792x_acpi_read()
50 return -EIO; in mt792x_acpi_read()
53 if (sar_root->type != ACPI_TYPE_PACKAGE || in mt792x_acpi_read()
54 sar_root->package.count < 4 || in mt792x_acpi_read()
55 sar_root->package.elements[0].type != ACPI_TYPE_INTEGER) { in mt792x_acpi_read()
[all …]
/linux/tools/power/cpupower/utils/helpers/
H A Dbitmask.c1 // SPDX-License-Identifier: GPL-2.0
12 #define howmany(x, y) (((x)+((y)-1))/(y))
17 #define max(a, b) ((a) > (b) ? (a) : (b)) macro
31 bmp->size = n; in bitmask_alloc()
32 bmp->maskp = calloc(longsperbits(n), sizeof(unsigned long)); in bitmask_alloc()
33 if (!bmp->maskp) { in bitmask_alloc()
45 free(bmp->maskp); in bitmask_free()
46 bmp->maskp = (unsigned long *)0xdeadcdef; /* double free tripwire */ in bitmask_free()
52 * routines that actually understand the layout of bmp->maskp[].
64 if (n < bmp->size) in _getbit()
[all …]
/linux/scripts/dtc/libfdt/
H A Dfdt_ro.c1 // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
3 * libfdt - Flat Device Tree manipulation
14 const char *s, int len) in fdt_nodename_eq_() argument
19 if (!p || olen < len) in fdt_nodename_eq_()
38 size_t len; fdt_get_string() local
106 fdt_string_eq_(const void * fdt,int stroffset,const char * s,int len) fdt_string_eq_() argument
116 uint32_t max = 0; fdt_find_max_phandle() local
144 uint32_t max; fdt_generate_phandle() local
303 fdt_get_name(const void * fdt,int nodeoffset,int * len) fdt_get_name() argument
514 int len; fdt_get_phandle() local
543 int len; fdt_get_alias_namelen() local
689 int len; fdt_node_offset_by_prop_value() local
737 int len = strlen(str); fdt_stringlist_contains() local
780 int length, len, idx = 0; fdt_stringlist_search() local
856 int len; fdt_node_check_compatible() local
[all...]
/linux/fs/ext4/
H A Dmballoc.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com
18 #include <linux/backing-dev.h>
25 * - test ext4_ext_search_left() and ext4_ext_search_right()
26 * - search for metadata in few groups
29 * - normalization should take into account whether file is still open
30 * - discard preallocations if no free space left (policy?)
31 * - don't normalize tails
32 * - quota
33 * - reservation for superuser
[all …]

12345678910>>...44