| /linux/Documentation/userspace-api/netlink/ |
| H A D | genetlink-legacy.rst | 1 .. SPDX-License-Identifier: BSD-3-Clause 9 the ``genetlink-legacy`` protocol level. 15 ------- 29 -------------------- 31 New Netlink families should use ``multi-attr`` to define arrays. 33 define array types reusing attribute type to carry information. 35 For reference the ``multi-attr`` array may look like this:: 37 [ARRAY-ATTR] 41 [SOME-OTHER-ATTR] 42 [ARRAY-ATTR] [all …]
|
| /linux/net/ethtool/ |
| H A D | bitset.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 /* Some bitmaps are internally represented as an array of unsigned long, some 9 * as an array of u32 (some even as single u32 for now). To avoid the need of 17 return ~(u32)0 >> (32 - n % 32); in ethnl_lower_bits() 26 * ethnl_bitmap32_clear() - Clear u32 based bitmap 78 * ethnl_bitmap32_not_zero() - Check if any bit is set in an interval 83 * Return: true if there is non-zero bit with index @start <= i < @end, 108 (end_word - start_word) * sizeof(u32))) in ethnl_bitmap32_not_zero() 116 * ethnl_bitmap32_update() - Modify u32 based bitmap according to value/mask 146 nbits -= 32; in ethnl_bitmap32_update() [all …]
|
| H A D | stats.c | 1 // SPDX-License-Identifier: GPL-2.0-only 35 [ETHTOOL_STATS_ETH_PHY] = "eth-phy", 36 [ETHTOOL_STATS_ETH_MAC] = "eth-mac", 37 [ETHTOOL_STATS_ETH_CTRL] = "eth-ctrl", 110 err = ethnl_update_bitset(req_info->stat_mask, __ETHTOOL_STATS_CNT, in stats_parse_request() 118 return -EINVAL; in stats_parse_request() 124 req_info->src = src; in stats_parse_request() 135 enum ethtool_mac_stats_src src = req_info->src; in stats_prepare_data() 136 struct net_device *dev = reply_base->dev; in stats_prepare_data() 137 struct nlattr **tb = info->attrs; in stats_prepare_data() [all …]
|
| /linux/Documentation/netlink/specs/ |
| H A D | nlctrl.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 2 --- 4 protocol: genetlink-legacy 5 uapi-header: linux/genetlink.h 8 genetlink meta-family that exposes information about all genetlink 12 - 13 name: op-flags 15 enum-name: 17 - admin-perm 18 - cmd-cap-do [all …]
|
| H A D | netdev.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 2 --- 5 doc: >- 9 - 11 name: xdp-act 12 render-max: true 14 - 16 doc: >- 19 - 21 doc: >- [all …]
|
| /linux/drivers/net/ethernet/intel/fm10k/ |
| H A D | fm10k_tlv.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2013 - 2019 Intel Corporation. */ 7 * fm10k_tlv_msg_init - Initialize message block for TLV data storage 25 * fm10k_tlv_attr_put_null_string - Place null terminated string on message 76 * fm10k_tlv_attr_get_null_string - Get null terminated string from attribute 81 * it in the array pointed by string. It will return success if provided 95 while (len--) in fm10k_tlv_attr_get_null_string() 102 * fm10k_tlv_attr_put_mac_vlan - Store MAC/VLAN attribute in message 140 * fm10k_tlv_attr_get_mac_vlan - Get MAC/VLAN stored in attribute 146 * place it in the array pointed by mac_addr. It will return success [all …]
|
| /linux/drivers/net/ethernet/rocker/ |
| H A D | rocker_hw.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * drivers/net/ethernet/rocker/rocker_hw.h - Rocker switch device driver 4 * Copyright (c) 2014-2016 Jiri Pirko <jiri@mellanox.com> 32 /* MSI-X vectors */ 45 (ROCKER_MSIX_VEC_RX((portcnt - 1)) + 1) 56 #define ROCKER_TEST_REG64 0x0018 /* 8-byte */ 58 #define ROCKER_TEST_DMA_ADDR 0x0028 /* 8-byte */ 68 #define ROCKER_DMA_DESC_ADDR(x) (0x1000 + (x) * 32) /* 8-byte */ 121 ROCKER_TLV_CMD_INFO, /* nest */ 124 ROCKER_TLV_CMD_MAX = __ROCKER_TLV_CMD_MAX - 1, [all …]
|
| /linux/arch/powerpc/include/asm/ |
| H A D | imc-pmu.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 6 * IMC Nest Performance Monitor counter support. 22 #define IMC_DTB_COMPAT "ibm,opal-in-memory-counters" 23 #define IMC_DTB_UNIT_COMPAT "ibm,imc-counters" 28 * perf/imc-pmu.c has the LDBAR layout information. 35 * For debugfs interface for imc-mode and imc-command 50 * Place holder for nest pmu events and values. 87 /* Event attribute array index */ 146 * In-Memory Collection Counters type. 164 /* For trace-imc the domain is still thread but it operates in trace-mode */
|
| /linux/tools/net/ynl/pyynl/ |
| H A D | ynl_gen_c.py | 2 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 4 # pylint: disable=line-too-long, missing-clas [all...] |
| /linux/arch/powerpc/perf/ |
| H A D | imc-pmu.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * In-Memory Collection (IMC) Performance Monitor counter support. 13 #include <asm/imc-pmu.h> 19 /* Nest IMC data structures and variables */ 22 * Used to avoid races in counting the nest-pmu units during hotplug 51 * core and trace-imc 61 return container_of(event->pmu, struct imc_pmu, pmu); in imc_event_to_pmu() 64 PMU_FORMAT_ATTR(event, "config:0-61"); 65 PMU_FORMAT_ATTR(offset, "config:0-31"); 67 PMU_FORMAT_ATTR(mode, "config:33-40"); [all …]
|
| /linux/Documentation/arch/x86/ |
| H A D | entry_64.rst | 1 .. SPDX-License-Identifier: GPL-2.0 16 for 64-bit, arch/x86/entry/entry_32.S for 32-bit and finally 17 arch/x86/entry/entry_64_compat.S which implements the 32-bit compatibility 18 syscall entry points and thus provides for 32-bit processes the 19 ability to execute syscalls when running on 64-bit kernels. 25 - system_call: syscall instruction from 64-bit code. 27 - entry_INT80_compat: int 0x80 from 32-bit or 64-bit code; compat syscall 30 - entry_INT80_compat, ia32_sysenter: syscall and sysenter from 32-bit 33 - interrupt: An array of entries. Every IDT vector that doesn't 35 value in interrupts. These point to a whole array of [all …]
|
| /linux/lib/ |
| H A D | rhashtable.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Copyright (c) 2014-2015 Thomas Graf <tgraf@suug.ch> 7 * Copyright (c) 2008-2014 Patrick McHardy <kaber@trash.net> 41 return rht_head_hashfn(ht, tbl, he, ht->p); in head_hashfn() 49 return (debug_locks) ? lockdep_is_held(&ht->mutex) : 1; in lockdep_rht_mutex_is_held() 57 if (unlikely(tbl->nest)) in lockdep_rht_bucket_is_held() [all...] |
| /linux/net/sched/ |
| H A D | act_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 47 const struct tcf_chain *chain = rcu_dereference_bh(a->goto_chain); in tcf_action_goto_chain_exec() 49 res->goto_tp = rcu_dereference_bh(chain->filter_chain); in tcf_action_goto_chain_exec() 56 kfree(cookie->data); in tcf_free_cookie_rcu() 67 call_rcu(&old->rcu, tcf_free_cookie_rcu); in tcf_set_action_cookie() 74 int opcode = TC_ACT_EXT_OPCODE(action), ret = -EINVAL; in tcf_action_check_ctrlact() 78 ret = action > TC_ACT_VALUE_MAX ? -EINVAL : 0; in tcf_action_check_ctrlact() 89 ret = -EINVAL; in tcf_action_check_ctrlact() 94 *newchain = tcf_chain_get_by_act(tp->chain->block, chain_index); in tcf_action_check_ctrlact() 96 ret = -ENOMEM; in tcf_action_check_ctrlact() [all …]
|
| H A D | sch_qfq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 26 "Reducing the Execution Time of Fair-Queueing Schedulers." 27 http://algo.ing.unimo.it/people/paolo/agg-sched/agg-sched.pdf 67 ^.__grp->index = 0 68 *.__grp->slot_shift 85 The per-scheduler-instance data contain all the data structures 97 * Shifts used for aggregate<->group mapping. We allow class weights that are 102 * grp->index is the index of the group; and grp->slot_shift 122 * array of struct qfq_queue. 137 struct list_head alist; /* Link for active-classes list. */ [all …]
|
| H A D | cls_u32.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 * invent; it is not super-fast, but it is not slow (provided you 109 unsigned int h = ntohl(key & sel->hmask) >> fshift; in u32_hash_fold() 123 struct tc_u_hnode *ht = rcu_dereference_bh(tp->root); in u32_classify() 135 n = rcu_dereference_bh(ht->ht[sel]); in u32_classify() 139 struct tc_u32_key *key = n->sel.keys; in u32_classify() 142 __this_cpu_inc(n->pf->rcnt); in u32_classify() 146 if (tc_skip_sw(n->flags)) { in u32_classify() 147 n = rcu_dereference_bh(n->next); in u32_classify() 152 if ((skb->mark & n->mask) != n->val) { in u32_classify() [all …]
|
| /linux/tools/net/ynl/pyynl/lib/ |
| H A D | ynl.py | 1 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 3 # pylint: disable=missing-class-docstring, missing-function-docstring 4 # pylint: disable=too-man [all...] |
| /linux/drivers/crypto/nx/ |
| H A D | nx_csbcpb.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 104 #define NX_CPB_FDM(c) ((c)->cpb.hdr.fdm) 105 #define NX_CPB_KS_DS(c) ((c)->cpb.hdr.ks_ds) 137 /* co-processor status block */ 147 /* Nest accelerator workbook section 4.4 */ 199 /* indices into the array of algorithm properties */
|
| /linux/net/netlink/ |
| H A D | genetlink.c | 1 // SPDX-License-Identifier: GPL-2.0 59 if (!family->parallel_ops) in genl_op_lock() 65 if (!family->parallel_ops) in genl_op_unlock() 77 * Bit 1 is marked as already used since the drop-monitor code 82 * and the code no longer marks pre-reserved IDs as used. 95 /* We need the last attribute with non-zero ID therefore a 2-entry array */ 109 BUILD_BUG_ON(ARRAY_SIZE(genl_policy_reject_all) - 1 != 1); in genl_op_fill_in_reject_policy() 111 if (op->policy || op->cmd < family->resv_start_op) in genl_op_fill_in_reject_policy() 114 op->policy = genl_policy_reject_all; in genl_op_fill_in_reject_policy() 115 op->maxattr = 1; in genl_op_fill_in_reject_policy() [all …]
|
| /linux/kernel/trace/ |
| H A D | ring_buffer.c | 1 // SPDX-License-Identifier: GPL-2.0 105 * +------+ 108 * +------+ +---+ +---+ +---+ 109 * | |-->| |-->| | 110 * +---+ +---+ +---+ 113 * +---------------+ 116 * +------+ 118 * |page |------------------v 119 * +------+ +---+ +---+ +---+ 120 * | |-->| |-->| | [all …]
|
| /linux/include/uapi/linux/ |
| H A D | netlink.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 17 #define NETLINK_ISCSI 8 /* Open-iSCSI */ 45 * struct nlmsghdr - fixed format metadata header of Netlink messages 99 #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) 104 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 106 NLMSG_ALIGN((nlh)->nlmsg_len))) 108 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 109 (nlh)->nlmsg_len <= (len)) 110 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) 134 * enum nlmsgerr_attrs - nlmsgerr attributes [all …]
|
| /linux/tools/net/ynl/lib/ |
| H A D | ynl-priv.h | 1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 32 YNL_PARSE_CB_ERROR = -1, 39 #define YNL_ARRAY_SIZE(array) (sizeof(array) ? \ argument 40 sizeof(array) / sizeof(array[0]) : 0) 52 const struct ynl_policy_nest *nest; member 76 uptr -= offsetof(struct ynl_dump_list_type, data); in ynl_dump_obj_is_last() 85 uptr -= offsetof(struct ynl_dump_list_type, data); in ynl_dump_obj_next() 87 uptr = (unsigned long)list->next; in ynl_dump_obj_next() 112 /* YNL specific helpers used by the auto-generated code */ 153 nlh->nlmsg_len = NLMSG_HDRLEN; in ynl_nlmsg_put_header() [all …]
|
| /linux/net/devlink/ |
| H A D | dpipe.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 63 struct devlink_dpipe_header *header = match->header; in devlink_dpipe_match_put() 64 struct devlink_dpipe_field *field = &header->fields[match->field_id]; in devlink_dpipe_match_put() 69 return -EMSGSIZE; in devlink_dpipe_match_put() 71 if (nla_put_u32(skb, DEVLINK_ATTR_DPIPE_MATCH_TYPE, match->type) || in devlink_dpipe_match_put() 72 nla_put_u32(skb, DEVLINK_ATTR_DPIPE_HEADER_INDEX, match->header_index) || in devlink_dpipe_match_put() 73 nla_put_u32(skb, DEVLINK_ATTR_DPIPE_HEADER_ID, header->id) || in devlink_dpipe_match_put() 74 nla_put_u32(skb, DEVLINK_ATTR_DPIPE_FIELD_ID, field->id) || in devlink_dpipe_match_put() 75 nla_put_u8(skb, DEVLINK_ATTR_DPIPE_HEADER_GLOBAL, header->global)) in devlink_dpipe_match_put() 83 return -EMSGSIZE; in devlink_dpipe_match_put() [all …]
|
| /linux/drivers/net/ethernet/meta/fbnic/ |
| H A D | fbnic_tlv.c | 1 // SPDX-License-Identifier: GPL-2.0 14 * fbnic_tlv_msg_alloc - Allocate page and initialize FW message header 37 msg->hdr = hdr; in fbnic_tlv_msg_alloc() 43 * fbnic_tlv_attr_put_flag - Add flag value to message 47 * Return: -ENOSPC if there is no room for the attribute. Otherwise 0. 55 int attr_max_len = PAGE_SIZE - offset_in_page(msg) - sizeof(*msg); in fbnic_tlv_attr_put_flag() 59 attr_max_len -= le16_to_cpu(msg->hdr.len) * sizeof(u32); in fbnic_tlv_attr_put_flag() 61 return -ENOSPC; in fbnic_tlv_attr_put_flag() 64 attr = &msg[le16_to_cpu(msg->hdr.len)]; in fbnic_tlv_attr_put_flag() 70 attr->hdr = hdr; in fbnic_tlv_attr_put_flag() [all …]
|
| /linux/net/ipv4/ |
| H A D | nexthop.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2017-19 Cumulus Networks 5 * Copyright (c) 2017-19 David Ahern <dsa@cumulusnetworks.com> 93 return !net->nexthop.notifier_chain.head; in nexthop_notifiers_is_empty() 100 nh_info->dev = nhi->fib_nhc.nhc_dev; in __nh_notifier_single_info_init() 101 nh_info->gw_family = nhi->fib_nhc.nhc_gw_family; in __nh_notifier_single_info_init() 102 if (nh_info->gw_family == AF_INET) in __nh_notifier_single_info_init() 103 nh_info->ipv4 = nhi->fib_nhc.nhc_gw.ipv4; in __nh_notifier_single_info_init() 104 else if (nh_info->gw_family == AF_INET6) in __nh_notifier_single_info_init() 105 nh_info->ipv6 = nhi->fib_nhc.nhc_gw.ipv6; in __nh_notifier_single_info_init() [all …]
|
| /linux/include/net/ |
| H A D | netlink.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 12 * ------------------------------------------------------------------------ 14 * ------------------------------------------------------------------------ 17 * <--- nlmsg_total_size(payload) ---> 18 * <-- nlmsg_msg_size(payload) -> 19 * +----------+- - -+-------------+- - -+-------- - - 21 * +----------+- - -+-------------+- - -+-------- - - 22 * nlmsg_data(nlh)---^ ^ 23 * nlmsg_next(nlh)-----------------------+ 26 * <---------------------- nlmsg_len(nlh) ---------------------> [all …]
|