Home
last modified time | relevance | path

Searched refs:tb (Results 1 – 25 of 325) sorted by relevance

12345678910>>...13

/linux/drivers/net/wireless/morsemicro/mm81x/
H A Dmmrc.c257 static void rate_update_index(struct mmrc_table *tb, struct mmrc_rate *rate) in rate_update_index() argument
261 u16 bw = hweight_long(tb->caps.bandwidth); in rate_update_index()
262 u16 streams = hweight_long(tb->caps.spatial_streams); in rate_update_index()
263 u16 guard = hweight_long(tb->caps.guard); in rate_update_index()
264 u16 rows = rows_from_sta_caps(&tb->caps); in rate_update_index()
266 index = bit_index(tb->caps.guard, rate->guard) + in rate_update_index()
267 bit_index(tb->caps.bandwidth, rate->bw) * guard + in rate_update_index()
268 bit_index(tb->caps.spatial_streams, rate->ss) * guard * bw + in rate_update_index()
269 bit_index(tb->caps.rates, rate->rate) * bw * streams * guard; in rate_update_index()
277 static struct mmrc_rate get_rate_row(struct mmrc_table *tb, u16 index) in get_rate_row() argument
[all …]
/linux/tools/bpf/bpftool/
H A Dnetlink_dumper.c14 static void xdp_dump_prog_id(struct nlattr **tb, int attr, in xdp_dump_prog_id() argument
18 if (!tb[attr]) in xdp_dump_prog_id()
24 NET_DUMP_UINT("id", " id %u", libbpf_nla_getattr_u32(tb[attr])) in xdp_dump_prog_id()
32 struct nlattr *tb[IFLA_XDP_MAX + 1]; in do_xdp_dump_one() local
35 if (libbpf_nla_parse_nested(tb, IFLA_XDP_MAX, attr, NULL) < 0) in do_xdp_dump_one()
38 if (!tb[IFLA_XDP_ATTACHED]) in do_xdp_dump_one()
41 mode = libbpf_nla_getattr_u8(tb[IFLA_XDP_ATTACHED]); in do_xdp_dump_one()
55 xdp_dump_prog_id(tb, IFLA_XDP_SKB_PROG_ID, "generic", true); in do_xdp_dump_one()
56 xdp_dump_prog_id(tb, IFLA_XDP_DRV_PROG_ID, "driver", true); in do_xdp_dump_one()
57 xdp_dump_prog_id(tb, IFLA_XDP_HW_PROG_I in do_xdp_dump_one()
72 do_xdp_dump(struct ifinfomsg * ifinfo,struct nlattr ** tb) do_xdp_dump() argument
83 struct nlattr *tb[TCA_ACT_BPF_MAX + 1]; do_bpf_dump_one_act() local
104 struct nlattr *tb[TCA_ACT_MAX + 1]; do_dump_one_act() local
121 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1]; do_bpf_act_dump() local
140 struct nlattr *tb[TCA_BPF_MAX + 1]; do_bpf_filter_dump() local
161 do_filter_dump(struct tcmsg * info,struct nlattr ** tb,const char * kind,const char * devname,int ifindex) do_filter_dump() argument
[all...]
/linux/drivers/thunderbolt/
H A Dicm.c106 bool (*is_supported)(struct tb *tb);
107 int (*cio_reset)(struct tb *tb);
108 int (*get_mode)(struct tb *tb);
109 int (*get_route)(struct tb *tb, u8 link, u8 depth, u64 *route);
110 void (*save_devices)(struct tb *tb);
111 int (*driver_ready)(struct tb *tb,
114 void (*set_uuid)(struct tb *tb);
115 void (*device_connected)(struct tb *tb,
117 void (*device_disconnected)(struct tb *tb,
119 void (*xdomain_connected)(struct tb *tb,
[all …]
/linux/tools/testing/selftests/powerpc/pmu/ebb/
H A Dtrace.c17 struct trace_buffer *tb; in trace_buffer_allocate() local
19 if (size < sizeof(*tb)) { in trace_buffer_allocate()
24 tb = mmap(NULL, size, PROT_READ | PROT_WRITE, in trace_buffer_allocate()
26 if (tb == MAP_FAILED) { in trace_buffer_allocate()
31 tb->size = size; in trace_buffer_allocate()
32 tb->tail = tb->data; in trace_buffer_allocate()
33 tb->overflow = false; in trace_buffer_allocate()
35 return tb; in trace_buffer_allocate()
38 static bool trace_check_bounds(struct trace_buffer *tb, void *p) in trace_check_bounds() argument
40 return p < ((void *)tb + tb->size); in trace_check_bounds()
[all …]
/linux/include/drm/
H A Dtask_barrier.h55 static inline void task_barrier_init(struct task_barrier *tb) in task_barrier_init() argument
57 tb->n = 0; in task_barrier_init()
58 atomic_set(&tb->count, 0); in task_barrier_init()
59 sema_init(&tb->enter_turnstile, 0); in task_barrier_init()
60 sema_init(&tb->exit_turnstile, 0); in task_barrier_init()
63 static inline void task_barrier_add_task(struct task_barrier *tb) in task_barrier_add_task() argument
65 tb->n++; in task_barrier_add_task()
68 static inline void task_barrier_rem_task(struct task_barrier *tb) in task_barrier_rem_task() argument
70 tb->n--; in task_barrier_rem_task()
78 static inline void task_barrier_enter(struct task_barrier *tb) in task_barrier_enter() argument
[all …]
/linux/net/netfilter/
H A Dnfnetlink_cthelper.c79 struct nlattr *tb[NFCTH_TUPLE_MAX+1]; in nfnl_cthelper_parse_tuple() local
81 err = nla_parse_nested_deprecated(tb, NFCTH_TUPLE_MAX, attr, in nfnl_cthelper_parse_tuple()
86 if (!tb[NFCTH_TUPLE_L3PROTONUM] || !tb[NFCTH_TUPLE_L4PROTONUM]) in nfnl_cthelper_parse_tuple()
92 tuple->src.l3num = ntohs(nla_get_be16(tb[NFCTH_TUPLE_L3PROTONUM])); in nfnl_cthelper_parse_tuple()
93 tuple->dst.protonum = nla_get_u8(tb[NFCTH_TUPLE_L4PROTONUM]); in nfnl_cthelper_parse_tuple()
150 struct nlattr *tb[NFCTH_POLICY_MAX+1]; in nfnl_cthelper_expect_policy() local
152 err = nla_parse_nested_deprecated(tb, NFCTH_POLICY_MAX, attr, in nfnl_cthelper_expect_policy()
157 if (!tb[NFCTH_POLICY_NAME] || in nfnl_cthelper_expect_policy()
158 !tb[NFCTH_POLICY_EXPECT_MAX] || in nfnl_cthelper_expect_policy()
159 !tb[NFCTH_POLICY_EXPECT_TIMEOUT]) in nfnl_cthelper_expect_policy()
[all …]
H A Dnft_bitwise.c143 const struct nlattr *const tb[]) in nft_bitwise_init_mask_xor() argument
157 if (tb[NFTA_BITWISE_DATA] || in nft_bitwise_init_mask_xor()
158 tb[NFTA_BITWISE_SREG2]) in nft_bitwise_init_mask_xor()
161 if (!tb[NFTA_BITWISE_MASK] || in nft_bitwise_init_mask_xor()
162 !tb[NFTA_BITWISE_XOR]) in nft_bitwise_init_mask_xor()
165 err = nft_data_init(NULL, &priv->mask, &mask, tb[NFTA_BITWISE_MASK]); in nft_bitwise_init_mask_xor()
169 err = nft_data_init(NULL, &priv->xor, &xor, tb[NFTA_BITWISE_XOR]); in nft_bitwise_init_mask_xor()
182 const struct nlattr *const tb[]) in nft_bitwise_init_shift() argument
191 if (tb[NFTA_BITWISE_MASK] || in nft_bitwise_init_shift()
192 tb[NFTA_BITWISE_XOR] || in nft_bitwise_init_shift()
[all …]
/linux/net/ethtool/
H A Dbitset.c331 struct nlattr *tb[ARRAY_SIZE(bitset_policy)]; in ethnl_bitset_is_compact() local
334 ret = nla_parse_nested(tb, ARRAY_SIZE(bitset_policy) - 1, bitset, in ethnl_bitset_is_compact()
339 if (tb[ETHTOOL_A_BITSET_BITS]) { in ethnl_bitset_is_compact()
340 if (tb[ETHTOOL_A_BITSET_VALUE] || tb[ETHTOOL_A_BITSET_MASK]) in ethnl_bitset_is_compact()
345 if (!tb[ETHTOOL_A_BITSET_SIZE] || !tb[ETHTOOL_A_BITSET_VALUE]) in ethnl_bitset_is_compact()
383 struct nlattr *tb[ARRAY_SIZE(bit_policy)]; in ethnl_parse_bit() local
386 ret = nla_parse_nested(tb, ARRAY_SIZE(bit_policy) - 1, bit_attr, in ethnl_parse_bit()
391 if (tb[ETHTOOL_A_BITSET_BIT_INDEX]) { in ethnl_parse_bit()
394 idx = nla_get_u32(tb[ETHTOOL_A_BITSET_BIT_INDEX]); in ethnl_parse_bit()
397 tb[ETHTOOL_A_BITSET_BIT_INDEX], in ethnl_parse_bit()
[all …]
H A Dcoalesce.c362 struct nlattr **tb = info->attrs; in ethnl_set_coalesce_validate() local
378 if (tb[a] && !(supported_params & attr_to_mask(a))) { in ethnl_set_coalesce_validate()
379 NL_SET_ERR_MSG_ATTR(info->extack, tb[a], in ethnl_set_coalesce_validate()
401 struct nlattr **tb, in ethnl_update_irq_moder() argument
408 if (!tb[attr_type]) in ethnl_update_irq_moder()
412 val = nla_get_u32(tb[attr_type]); in ethnl_update_irq_moder()
419 NL_SET_BAD_ATTR(extack, tb[attr_type]); in ethnl_update_irq_moder()
455 struct nlattr *tb[ARRAY_SIZE(coalesce_irq_moderation_policy)]; in ethnl_update_profile() local
481 ret = nla_parse_nested(tb, len_irq_moder - 1, nest, in ethnl_update_profile()
489 tb, DIM_COALESCE_USEC, in ethnl_update_profile()
[all …]
/linux/drivers/target/
H A Dtarget_core_hba.c40 struct target_backend *tb, *old; in transport_backend_register() local
42 tb = kzalloc_obj(*tb); in transport_backend_register()
43 if (!tb) in transport_backend_register()
45 tb->ops = ops; in transport_backend_register()
52 kfree(tb); in transport_backend_register()
56 target_setup_backend_cits(tb); in transport_backend_register()
57 list_add_tail(&tb->list, &backend_list); in transport_backend_register()
68 struct target_backend *tb; in target_backend_unregister() local
71 list_for_each_entry(tb, &backend_list, list) { in target_backend_unregister()
72 if (tb->ops == ops) { in target_backend_unregister()
[all …]
/linux/net/netfilter/ipset/
H A Dip_set_hash_ipportnet.c160 hash_ipportnet4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipportnet4_uadt() argument
173 if (tb[IPSET_ATTR_LINENO]) in hash_ipportnet4_uadt()
174 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipportnet4_uadt()
176 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_ipportnet4_uadt()
177 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipportnet4_uadt()
178 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_ipportnet4_uadt()
179 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) in hash_ipportnet4_uadt()
182 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_ipportnet4_uadt()
186 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipportnet4_uadt()
190 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP2], &ip2_from); in hash_ipportnet4_uadt()
[all …]
H A Dip_set_hash_ipportip.c108 hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipportip4_uadt() argument
119 if (tb[IPSET_ATTR_LINENO]) in hash_ipportip4_uadt()
120 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipportip4_uadt()
122 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_ipportip4_uadt()
123 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipportip4_uadt()
124 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) in hash_ipportip4_uadt()
127 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipportip4_uadt()
131 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipportip4_uadt()
135 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP2], &e.ip2); in hash_ipportip4_uadt()
139 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipportip4_uadt()
[all …]
H A Dip_set_hash_netportnet.c189 hash_netportnet4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netportnet4_uadt() argument
201 if (tb[IPSET_ATTR_LINENO]) in hash_netportnet4_uadt()
202 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_netportnet4_uadt()
205 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_netportnet4_uadt()
206 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_netportnet4_uadt()
207 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_netportnet4_uadt()
208 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) in hash_netportnet4_uadt()
211 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_netportnet4_uadt()
215 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP2], &ip2_from); in hash_netportnet4_uadt()
219 ret = ip_set_get_extensions(set, tb, &ext); in hash_netportnet4_uadt()
[all …]
H A Dip_set_hash_netport.c154 hash_netport4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netport4_uadt() argument
166 if (tb[IPSET_ATTR_LINENO]) in hash_netport4_uadt()
167 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_netport4_uadt()
169 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_netport4_uadt()
170 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_netport4_uadt()
171 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_netport4_uadt()
172 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) in hash_netport4_uadt()
175 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_netport4_uadt()
179 ret = ip_set_get_extensions(set, tb, &ext); in hash_netport4_uadt()
183 if (tb[IPSET_ATTR_CIDR]) { in hash_netport4_uadt()
[all …]
H A Dip_set_hash_ipport.c112 hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipport4_uadt() argument
123 if (tb[IPSET_ATTR_LINENO]) in hash_ipport4_uadt()
124 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipport4_uadt()
126 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ipport4_uadt()
127 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipport4_uadt()
128 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) in hash_ipport4_uadt()
131 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipport4_uadt()
135 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipport4_uadt()
143 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipport4_uadt()
145 if (tb[IPSET_ATTR_PROTO]) { in hash_ipport4_uadt()
[all …]
H A Dip_set_hash_ipmark.c97 hash_ipmark4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipmark4_uadt() argument
107 if (tb[IPSET_ATTR_LINENO]) in hash_ipmark4_uadt()
108 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipmark4_uadt()
110 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ipmark4_uadt()
111 !ip_set_attr_netorder(tb, IPSET_ATTR_MARK))) in hash_ipmark4_uadt()
114 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipmark4_uadt()
118 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipmark4_uadt()
122 e.mark = ntohl(nla_get_be32(tb[IPSET_ATTR_MARK])); in hash_ipmark4_uadt()
128 !(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_CIDR])) { in hash_ipmark4_uadt()
134 if (tb[IPSET_ATTR_IP_TO]) { in hash_ipmark4_uadt()
[all …]
H A Dip_set_hash_netnet.c168 hash_netnet4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netnet4_uadt() argument
179 if (tb[IPSET_ATTR_LINENO]) in hash_netnet4_uadt()
180 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_netnet4_uadt()
183 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_netnet4_uadt()
184 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) in hash_netnet4_uadt()
187 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_netnet4_uadt()
191 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP2], &ip2_from); in hash_netnet4_uadt()
195 ret = ip_set_get_extensions(set, tb, &ext); in hash_netnet4_uadt()
199 if (tb[IPSET_ATTR_CIDR]) { in hash_netnet4_uadt()
200 e.cidr[0] = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_netnet4_uadt()
[all …]
/linux/drivers/net/wireless/ti/wlcore/
H A Dtestmode.c58 static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[]) in wl1271_tm_cmd_test() argument
67 if (!tb[WL1271_TM_ATTR_DATA]) in wl1271_tm_cmd_test()
70 buf = nla_data(tb[WL1271_TM_ATTR_DATA]); in wl1271_tm_cmd_test()
71 buf_len = nla_len(tb[WL1271_TM_ATTR_DATA]); in wl1271_tm_cmd_test()
73 if (tb[WL1271_TM_ATTR_ANSWER]) in wl1271_tm_cmd_test()
74 answer = nla_get_u8(tb[WL1271_TM_ATTR_ANSWER]); in wl1271_tm_cmd_test()
137 static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[]) in wl1271_tm_cmd_interrogate() argument
146 if (!tb[WL1271_TM_ATTR_IE_ID]) in wl1271_tm_cmd_interrogate()
149 ie_id = nla_get_u8(tb[WL1271_TM_ATTR_IE_ID]); in wl1271_tm_cmd_interrogate()
201 static int wl1271_tm_cmd_configure(struct wl1271 *wl, struct nlattr *tb[]) in wl1271_tm_cmd_configure() argument
[all …]
/linux/net/wireless/
H A Dpmsr.c16 struct nlattr *tb[NL80211_PMSR_FTM_REQ_ATTR_MAX + 1]; in pmsr_parse_ftm() local
34 nla_parse_nested_deprecated(tb, NL80211_PMSR_FTM_REQ_ATTR_MAX, ftmreq, in pmsr_parse_ftm()
37 if (tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE]) in pmsr_parse_ftm()
38 preamble = nla_get_u32(tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE]); in pmsr_parse_ftm()
48 if (!tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE]) { in pmsr_parse_ftm()
58 tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE], in pmsr_parse_ftm()
66 tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE], in pmsr_parse_ftm()
74 if (tb[NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD]) in pmsr_parse_ftm()
76 nla_get_u16(tb[NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD]); in pmsr_parse_ftm()
78 out->ftm.asap = !!tb[NL80211_PMSR_FTM_REQ_ATTR_ASAP]; in pmsr_parse_ftm()
[all …]
/linux/net/bridge/
H A Dbr_vlan_options.c162 struct nlattr **tb, in br_vlan_modify_tunnel() argument
180 attr = tb[BRIDGE_VLANDB_ENTRY_TUNNEL_INFO]; in br_vlan_modify_tunnel()
200 vinfo = nla_data(tb[BRIDGE_VLANDB_ENTRY_INFO]); in br_vlan_modify_tunnel()
221 struct nlattr **tb, in br_vlan_process_one_opts() argument
228 if (tb[BRIDGE_VLANDB_ENTRY_STATE]) { in br_vlan_process_one_opts()
229 u8 state = nla_get_u8(tb[BRIDGE_VLANDB_ENTRY_STATE]); in br_vlan_process_one_opts()
235 if (tb[BRIDGE_VLANDB_ENTRY_TUNNEL_INFO]) { in br_vlan_process_one_opts()
236 err = br_vlan_modify_tunnel(p, v, tb, changed, extack); in br_vlan_process_one_opts()
242 if (tb[BRIDGE_VLANDB_ENTRY_MCAST_ROUTER]) { in br_vlan_process_one_opts()
245 val = nla_get_u8(tb[BRIDGE_VLANDB_ENTRY_MCAST_ROUTER]); in br_vlan_process_one_opts()
[all …]
/linux/tools/testing/selftests/net/mptcp/
H A Dmptcp_diag.c27 #define parse_rtattr_nested(tb, max, rta) \ argument
28 (parse_rtattr_flags((tb), (max), RTA_DATA(rta), RTA_PAYLOAD(rta), \
159 static void parse_rtattr_flags(struct rtattr *tb[], int max, struct rtattr *rta, in parse_rtattr_flags() argument
164 memset(tb, 0, sizeof(struct rtattr *) * (max + 1)); in parse_rtattr_flags()
167 if (type <= max && !tb[type]) in parse_rtattr_flags()
168 tb[type] = rta; in parse_rtattr_flags()
209 static void print_subflow_info(struct rtattr *tb[]) in print_subflow_info() argument
214 if (tb[MPTCP_SUBFLOW_ATTR_FLAGS]) { in print_subflow_info()
217 flags = rta_getattr(__u32, tb[MPTCP_SUBFLOW_ATTR_FLAGS]); in print_subflow_info()
241 if (tb[MPTCP_SUBFLOW_ATTR_TOKEN_REM] && in print_subflow_info()
[all …]
/linux/drivers/infiniband/core/
H A Dnldev.c1124 struct nlattr *tb[RDMA_NLDEV_ATTR_MAX]; in nldev_get_doit() local
1130 err = __nlmsg_parse(nlh, 0, tb, RDMA_NLDEV_ATTR_MAX - 1, in nldev_get_doit()
1132 if (err || !tb[RDMA_NLDEV_ATTR_DEV_INDEX]) in nldev_get_doit()
1135 index = nla_get_u32(tb[RDMA_NLDEV_ATTR_DEV_INDEX]); in nldev_get_doit()
1174 struct nlattr *tb[RDMA_NLDEV_ATTR_MAX]; in nldev_set_doit() local
1179 err = nlmsg_parse(nlh, 0, tb, RDMA_NLDEV_ATTR_MAX - 1, in nldev_set_doit()
1181 if (err || !tb[RDMA_NLDEV_ATTR_DEV_INDEX]) in nldev_set_doit()
1184 index = nla_get_u32(tb[RDMA_NLDEV_ATTR_DEV_INDEX]); in nldev_set_doit()
1189 if (tb[RDMA_NLDEV_NET_NS_FD]) { in nldev_set_doit()
1193 if (tb[RDMA_NLDEV_ATTR_DEV_NAME]) { in nldev_set_doit()
[all …]
/linux/security/keys/trusted-keys/
H A Dtrusted_tpm1.c359 static int osap(struct tpm_buf *tb, struct osapsess *s, in osap() argument
373 tpm_buf_reset(tb, TPM_TAG_RQU_COMMAND, TPM_ORD_OSAP); in osap()
374 tpm_buf_append_u16(tb, type); in osap()
375 tpm_buf_append_u32(tb, handle); in osap()
376 tpm_buf_append(tb, ononce, TPM_NONCE_SIZE); in osap()
378 ret = trusted_tpm_send(tb); in osap()
382 s->handle = LOAD32(tb->data, TPM_DATA_OFFSET); in osap()
383 memcpy(s->enonce, &(tb->data[TPM_DATA_OFFSET + sizeof(uint32_t)]), in osap()
385 memcpy(enonce, &(tb->data[TPM_DATA_OFFSET + sizeof(uint32_t) + in osap()
394 static int oiap(struct tpm_buf *tb, uint32_t *handle, unsigned char *nonce) in oiap() argument
[all …]
/linux/net/sched/
H A Dcls_flower.c809 static void fl_set_key_val(struct nlattr **tb, in fl_set_key_val() argument
813 if (!tb[val_type]) in fl_set_key_val()
815 nla_memcpy(val, tb[val_type], len); in fl_set_key_val()
816 if (mask_type == TCA_FLOWER_UNSPEC || !tb[mask_type]) in fl_set_key_val()
819 nla_memcpy(mask, tb[mask_type], len); in fl_set_key_val()
822 static int fl_set_key_spi(struct nlattr **tb, struct fl_flow_key *key, in fl_set_key_spi() argument
833 fl_set_key_val(tb, &key->ipsec.spi, in fl_set_key_spi()
840 static int fl_set_key_port_range(struct nlattr **tb, struct fl_flow_key *key, in fl_set_key_port_range() argument
844 fl_set_key_val(tb, &key->tp_range.tp_min.dst, in fl_set_key_port_range()
847 fl_set_key_val(tb, &key->tp_range.tp_max.dst, in fl_set_key_port_range()
[all …]
H A Dem_ipt.c30 int (*validate_match_data)(struct nlattr **tb, u8 mrev);
60 static int policy_validate_match_data(struct nlattr **tb, u8 mrev) in policy_validate_match_data() argument
67 if (nla_get_u32(tb[TCA_EM_IPT_HOOK]) != NF_INET_PRE_ROUTING) { in policy_validate_match_data()
75 static int addrtype_validate_match_data(struct nlattr **tb, u8 mrev) in addrtype_validate_match_data() argument
97 static struct xt_match *get_xt_match(struct nlattr **tb) in get_xt_match() argument
104 mname_attr = tb[TCA_EM_IPT_MATCH_NAME]; in get_xt_match()
115 if (tb[TCA_EM_IPT_MATCH_REVISION]) in get_xt_match()
116 mrev = nla_get_u8(tb[TCA_EM_IPT_MATCH_REVISION]); in get_xt_match()
118 ret = m->validate_match_data(tb, mrev); in get_xt_match()
122 nfproto = nla_get_u8(tb[TCA_EM_IPT_NFPROTO]); in get_xt_match()
[all …]

12345678910>>...13