| /linux/net/core/ |
| H A D | pktgen.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 23 * MAC address typo fixed. 010417 --ro 24 * Integrated. 020301 --DaveM 25 * Added multiskb option 020301 - 518 size_t max; pgctrl_write() local 846 size_t i = 0, max; get_imix_entries() local 847 ssize_t len; get_imix_entries() local 908 size_t i = 0, max; get_labels() local 909 ssize_t len; get_labels() local 982 size_t i, max; pktgen_if_write() local 983 ssize_t len; pktgen_if_write() local 1917 size_t i, max; pktgen_thread_write() local 1918 ssize_t len, ret; pktgen_thread_write() local 2817 int i, len; pktgen_finalize_skb() local 3759 size_t len = strlen(ifname); pktgen_find_dev() local [all...] |
| /linux/lib/zlib_inflate/ |
| H A D | inftrees.c | 1 /* 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/lib/ |
| H A D | nlattr.c | 1 // 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/include/linux/ |
| H A D | highmem.h | 1 /* 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! 212 * vma_alloc_zeroed_movable_folio - Allocate a zeroed page for a VMA. [all …]
|
| /linux/net/netfilter/ |
| H A D | nf_log_syslog.c | 1 // 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() 83 eth_hdr(skb)->h_source, eth_hdr(skb)->h_dest); in dump_arp_packet() 86 ntohs(eth_hdr(skb)->h_proto)); in dump_arp_packet() 90 ntohs(ah->ar_hrd), ntohs(ah->ar_pro), ntohs(ah->ar_op)); in dump_arp_packet() 94 if (ah->ar_hrd != htons(ARPHRD_ETHER) || in dump_arp_packet() [all …]
|
| /linux/kernel/ |
| H A D | sysctl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 27 const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 }; 42 * enum sysctl_writes_mode - supported sysctl write modes 53 * position, but restrict this to the max length of the buffer, anything 54 * passed the max length will be ignored. Multiple writes will append 61 SYSCTL_WRITES_LEGACY = -1, 79 size_t len; in _proc_do_string() local 90 len = strlen(data); in _proc_do_string() 91 if (len > maxlen - 1) in _proc_do_string() 92 len = maxlen - 1; in _proc_do_string() [all …]
|
| H A D | kallsyms_selftest.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 28 int max; member 106 u32 pos, off, len, num; in test_kallsyms_compression_ratio() local 125 len = kallsyms_names[off]; in test_kallsyms_compression_ratio() 129 if ((len & 0x80) != 0) { in test_kallsyms_compression_ratio() 130 len = (len & 0x7f) | (kallsyms_names[off] << 7); in test_kallsyms_compression_ratio() 134 off += len; in test_kallsyms_compression_ratio() 142 total_size = off - num; in test_kallsyms_compression_ratio() 147 pr_info(" ---------------------------------------------------------\n"); in test_kallsyms_compression_ratio() 149 pr_info("|---------------------------------------------------------|\n"); in test_kallsyms_compression_ratio() [all …]
|
| /linux/fs/hfsplus/ |
| H A D | bitmap.c | 1 // 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/net/xdp/ |
| H A D | xsk_queue.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* XDP user-space ring structure 58 * Documentation/core-api/circular-buffers.rst. For the Rx and 65 * if (LOAD ->consumer) { (A) LOAD.acq ->producer (C) 67 * STORE.rel ->producer (B) STORE.rel ->consumer (D) 82 * between ->producer and data. 84 * (A) is a control dependency that separates the load of ->consumer 85 * from the stores of $data. In case ->consumer indicates there is no 122 struct xdp_umem_ring *ring = (struct xdp_umem_ring *)q->ring; in __xskq_cons_read_addr_unchecked() 123 u32 idx = cached_cons & q->ring_mask; in __xskq_cons_read_addr_unchecked() [all …]
|
| /linux/tools/perf/scripts/python/ |
| H A D | task-analyzer.py | 1 # 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/drivers/pnp/ |
| H A D | support.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * support.c - standard functions for the use of pnp protocol drivers 6 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 16 * pnp_is_active - Determines if a device is active based on its current 24 * only clears out auto-assigned resources. in pnp_is_active() 28 pnp_irq(dev, 0) == -1 && pnp_dma(dev, 0) == -1) in pnp_is_active() 44 * According to the specs, the first three characters are five-bit in pnp_eisa_id_to_string() 45 * compressed ASCII, and the left-over high order bit should be zero. in pnp_eisa_id_to_string() 51 str[0] = 'A' + ((id >> 26) & 0x3f) - 1; in pnp_eisa_id_to_string() 52 str[1] = 'A' + ((id >> 21) & 0x1f) - 1; in pnp_eisa_id_to_string() [all …]
|
| /linux/drivers/pnp/pnpbios/ |
| H A D | rsparser.c | 1 // 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 D | netlink.rst | 1 .. 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/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
| H A D | volt.c | 29 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/fs/nfsd/ |
| H A D | nfscache.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * change in the future and be a per-client cache. 26 * We use this value to determine the number of hash buckets from the max 61 * ~1k, so the above numbers should give a rough max of the amount of memory 64 * XXX: these limits are per-container, so memory used will increase 71 unsigned long low_pages = totalram_pages() - totalhigh_pages(); in nfsd_cache_size_limit() 73 limit = (16 * int_sqrt(low_pages)) << (PAGE_SHIFT-10); in nfsd_cache_size_limit() 78 * Compute the number of hash buckets we need. Divide the max cachesize by 79 * the "target" max bucket size, and round up to next power of two. 95 rp->c_state = RC_UNUSED; in nfsd_cacherep_alloc() [all …]
|
| /linux/drivers/net/wireless/broadcom/brcm80211/include/ |
| H A D | brcmu_utils.h | 1 // 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/smb/client/ |
| H A D | compress.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 * MS-SMB2 "3.1.4.4 Compressing the Message" 12 * MS-SMB2 "3.1.5.3 Decompressing the Chained Message" 13 * MS-XCA - for details of the supported algorithms 39 * Parsing the sample goes from "low-hanging fruits" (fastest algorithms, likely compressible) 48 * has_low_entropy() - Compute Shannon entropy of the sampled data. 66 size_t i, p, p2, len, sum = 0; in has_low_entropy() local 69 len = ilog2(pow4(slen)); in has_low_entropy() 74 sum += p * (len - p2); in has_low_entropy() 86 * calc_byte_distribution() - Compute byte distribution on the sampled data. [all …]
|
| /linux/drivers/net/wireless/mediatek/mt76/ |
| H A D | mt792x_acpi_sar.c | 1 // SPDX-License-Identifier: ISC 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/Documentation/netlink/ |
| H A D | genetlink.yaml | 1 # 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/tools/power/cpupower/utils/helpers/ |
| H A D | bitmask.c | 1 // 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 D | fdt_ro.c | 1 // 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_() 23 if (memcmp(p, s, len) != 0) in fdt_nodename_eq_() 26 if (p[len] == '\0') in fdt_nodename_eq_() 28 else if (!memchr(s, '@', len) && (p[len] == '@')) in fdt_nodename_eq_() 38 size_t len; in fdt_get_string() local 54 err = -FDT_ERR_BADOFFSET; in fdt_get_string() 58 len = totalsize - absoffset; in fdt_get_string() [all …]
|
| /linux/scripts/kconfig/ |
| H A D | nconf.gui.c | 1 // SPDX-License-Identifier: GPL-2.0 36 #define COLOR_DEFAULT -1 107 for (; p->attr; p++) { in set_colors() 108 int attr = p->highlight; in set_colors() 110 if (p->has_color) { in set_colors() 112 init_pair(pair, p->color_fg, p->color_bg); in set_colors() 116 *p->att in set_colors() 178 int len = get_line_length(line); fill_window() local 224 int len = get_line_length(line); btn_dialog() local 345 int len = get_line_length(line); dialog_inputbox() local 396 int len = strlen(result); dialog_inputbox() local 548 int len = get_line_length(line); show_scroll_win_ext() local [all...] |
| /linux/drivers/net/usb/ |
| H A D | cdc_ncm.c | 4 * Copyright (C) ST-Ericsson 2010-2012 16 * of the GNU General Public License (GPL) Version 2 or the 2-clause 78 .sizeof_stat = sizeof(((struct cdc_ncm_ctx *)0)->m), \ 101 return -EOPNOTSUPP; in cdc_ncm_get_sset_count() 110 struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; in cdc_ncm_get_ethtool_stats() 152 struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; in cdc_ncm_check_rx_max() 153 u32 val, max, min; in cdc_ncm_check_rx_max() local 157 max = min_t(u32, CDC_NCM_NTB_MAX_SIZE_RX, le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)); in cdc_ncm_check_rx_max() 160 if (max < min) { in cdc_ncm_check_rx_max() 161 dev_warn(&dev->intf->dev, "dwNtbInMaxSize=%u is too small. Using %u\n", in cdc_ncm_check_rx_max() [all …]
|
| /linux/fs/ext4/ |
| H A D | mballoc.c | 1 // 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 …]
|
| /linux/tools/testing/selftests/powerpc/copyloops/ |
| H A D | memmove_validate.c | 1 // SPDX-License-Identifier: GPL-2.0 13 size_t max(size_t a, size_t b) in max() function 22 size_t i, src_off, dst_off, len; in testcase_run() local 40 for (len = 1; len < MAX_OFFSET - max(src_off, dst_off); len++) { in testcase_run() 42 memmove(usermap + dst_off, usermap + src_off, len); in testcase_run() 43 TEST_MEMMOVE(kernelmap + dst_off, kernelmap + src_off, len); in testcase_run() 46 src_off, dst_off, len); in testcase_run()
|