Home
last modified time | relevance | path

Searched refs:attrs (Results 1 – 25 of 80) sorted by relevance

1234

/net/ieee802154/
Dnl-mac.c149 if (info->attrs[IEEE802154_ATTR_DEV_NAME]) { in ieee802154_nl_get_dev()
152 nla_strscpy(name, info->attrs[IEEE802154_ATTR_DEV_NAME], in ieee802154_nl_get_dev()
155 } else if (info->attrs[IEEE802154_ATTR_DEV_INDEX]) { in ieee802154_nl_get_dev()
157 nla_get_u32(info->attrs[IEEE802154_ATTR_DEV_INDEX])); in ieee802154_nl_get_dev()
180 if (!info->attrs[IEEE802154_ATTR_CHANNEL] || in ieee802154_associate_req()
181 !info->attrs[IEEE802154_ATTR_COORD_PAN_ID] || in ieee802154_associate_req()
182 (!info->attrs[IEEE802154_ATTR_COORD_HW_ADDR] && in ieee802154_associate_req()
183 !info->attrs[IEEE802154_ATTR_COORD_SHORT_ADDR]) || in ieee802154_associate_req()
184 !info->attrs[IEEE802154_ATTR_CAPABILITY]) in ieee802154_associate_req()
193 if (info->attrs[IEEE802154_ATTR_COORD_HW_ADDR]) { in ieee802154_associate_req()
[all …]
Dnl802154.c37 __cfg802154_wpan_dev_from_attrs(struct net *netns, struct nlattr **attrs) in __cfg802154_wpan_dev_from_attrs() argument
41 bool have_ifidx = attrs[NL802154_ATTR_IFINDEX]; in __cfg802154_wpan_dev_from_attrs()
42 bool have_wpan_dev_id = attrs[NL802154_ATTR_WPAN_DEV]; in __cfg802154_wpan_dev_from_attrs()
53 ifidx = nla_get_u32(attrs[NL802154_ATTR_IFINDEX]); in __cfg802154_wpan_dev_from_attrs()
55 wpan_dev_id = nla_get_u64(attrs[NL802154_ATTR_WPAN_DEV]); in __cfg802154_wpan_dev_from_attrs()
92 __cfg802154_rdev_from_attrs(struct net *netns, struct nlattr **attrs) in __cfg802154_rdev_from_attrs() argument
99 if (!attrs[NL802154_ATTR_WPAN_PHY] && in __cfg802154_rdev_from_attrs()
100 !attrs[NL802154_ATTR_IFINDEX] && in __cfg802154_rdev_from_attrs()
101 !attrs[NL802154_ATTR_WPAN_DEV]) in __cfg802154_rdev_from_attrs()
104 if (attrs[NL802154_ATTR_WPAN_PHY]) in __cfg802154_rdev_from_attrs()
[all …]
Dnl-phy.c83 if (!info->attrs[IEEE802154_ATTR_PHY_NAME]) in ieee802154_list_phy()
86 name = nla_data(info->attrs[IEEE802154_ATTR_PHY_NAME]); in ieee802154_list_phy()
87 if (name[nla_len(info->attrs[IEEE802154_ATTR_PHY_NAME]) - 1] != '\0') in ieee802154_list_phy()
174 if (!info->attrs[IEEE802154_ATTR_PHY_NAME]) in ieee802154_add_iface()
177 name = nla_data(info->attrs[IEEE802154_ATTR_PHY_NAME]); in ieee802154_add_iface()
178 if (name[nla_len(info->attrs[IEEE802154_ATTR_PHY_NAME]) - 1] != '\0') in ieee802154_add_iface()
181 if (info->attrs[IEEE802154_ATTR_DEV_NAME]) { in ieee802154_add_iface()
182 devname = nla_data(info->attrs[IEEE802154_ATTR_DEV_NAME]); in ieee802154_add_iface()
183 if (devname[nla_len(info->attrs[IEEE802154_ATTR_DEV_NAME]) - 1] in ieee802154_add_iface()
203 if (info->attrs[IEEE802154_ATTR_HW_ADDR] && in ieee802154_add_iface()
[all …]
/net/l2tp/
Dl2tp_netlink.c55 if (info->attrs[L2TP_ATTR_IFNAME]) { in l2tp_nl_session_get()
56 ifname = nla_data(info->attrs[L2TP_ATTR_IFNAME]); in l2tp_nl_session_get()
58 } else if ((info->attrs[L2TP_ATTR_SESSION_ID]) && in l2tp_nl_session_get()
59 (info->attrs[L2TP_ATTR_CONN_ID])) { in l2tp_nl_session_get()
60 tunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_CONN_ID]); in l2tp_nl_session_get()
61 session_id = nla_get_u32(info->attrs[L2TP_ATTR_SESSION_ID]); in l2tp_nl_session_get()
158 static int l2tp_nl_cmd_tunnel_create_get_addr(struct nlattr **attrs, struct l2tp_tunnel_cfg *cfg) in l2tp_nl_cmd_tunnel_create_get_addr() argument
160 if (attrs[L2TP_ATTR_UDP_SPORT]) in l2tp_nl_cmd_tunnel_create_get_addr()
161 cfg->local_udp_port = nla_get_u16(attrs[L2TP_ATTR_UDP_SPORT]); in l2tp_nl_cmd_tunnel_create_get_addr()
162 if (attrs[L2TP_ATTR_UDP_DPORT]) in l2tp_nl_cmd_tunnel_create_get_addr()
[all …]
/net/netlabel/
Dnetlabel_mgmt.c91 entry->def.type = nla_get_u32(info->attrs[NLBL_MGMT_A_PROTOCOL]); in netlbl_mgmt_add_common()
92 if (info->attrs[NLBL_MGMT_A_DOMAIN]) { in netlbl_mgmt_add_common()
93 size_t tmp_size = nla_len(info->attrs[NLBL_MGMT_A_DOMAIN]); in netlbl_mgmt_add_common()
100 info->attrs[NLBL_MGMT_A_DOMAIN], tmp_size); in netlbl_mgmt_add_common()
110 if (info->attrs[NLBL_MGMT_A_FAMILY]) in netlbl_mgmt_add_common()
112 nla_get_u16(info->attrs[NLBL_MGMT_A_FAMILY]); in netlbl_mgmt_add_common()
117 if (!info->attrs[NLBL_MGMT_A_CV4DOI]) in netlbl_mgmt_add_common()
120 tmp_val = nla_get_u32(info->attrs[NLBL_MGMT_A_CV4DOI]); in netlbl_mgmt_add_common()
129 if (!info->attrs[NLBL_MGMT_A_CLPDOI]) in netlbl_mgmt_add_common()
132 tmp_val = nla_get_u32(info->attrs[NLBL_MGMT_A_CLPDOI]); in netlbl_mgmt_add_common()
[all …]
Dnetlabel_unlabeled.c769 if (info->attrs[NLBL_UNLABEL_A_IPV4ADDR] && in netlbl_unlabel_addrinfo_get()
770 info->attrs[NLBL_UNLABEL_A_IPV4MASK]) { in netlbl_unlabel_addrinfo_get()
771 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV4ADDR]); in netlbl_unlabel_addrinfo_get()
773 addr_len != nla_len(info->attrs[NLBL_UNLABEL_A_IPV4MASK])) in netlbl_unlabel_addrinfo_get()
776 *addr = nla_data(info->attrs[NLBL_UNLABEL_A_IPV4ADDR]); in netlbl_unlabel_addrinfo_get()
777 *mask = nla_data(info->attrs[NLBL_UNLABEL_A_IPV4MASK]); in netlbl_unlabel_addrinfo_get()
779 } else if (info->attrs[NLBL_UNLABEL_A_IPV6ADDR]) { in netlbl_unlabel_addrinfo_get()
780 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV6ADDR]); in netlbl_unlabel_addrinfo_get()
782 addr_len != nla_len(info->attrs[NLBL_UNLABEL_A_IPV6MASK])) in netlbl_unlabel_addrinfo_get()
785 *addr = nla_data(info->attrs[NLBL_UNLABEL_A_IPV6ADDR]); in netlbl_unlabel_addrinfo_get()
[all …]
Dnetlabel_cipso_v4.c86 doi_def->doi = nla_get_u32(info->attrs[NLBL_CIPSOV4_A_DOI]); in netlbl_cipsov4_add_common()
88 if (nla_validate_nested_deprecated(info->attrs[NLBL_CIPSOV4_A_TAGLST], in netlbl_cipsov4_add_common()
94 nla_for_each_nested(nla, info->attrs[NLBL_CIPSOV4_A_TAGLST], nla_rem) in netlbl_cipsov4_add_common()
132 if (!info->attrs[NLBL_CIPSOV4_A_TAGLST] || in netlbl_cipsov4_add_std()
133 !info->attrs[NLBL_CIPSOV4_A_MLSLVLLST]) in netlbl_cipsov4_add_std()
136 if (nla_validate_nested_deprecated(info->attrs[NLBL_CIPSOV4_A_MLSLVLLST], in netlbl_cipsov4_add_std()
158 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST], in netlbl_cipsov4_add_std()
207 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST], in netlbl_cipsov4_add_std()
225 if (info->attrs[NLBL_CIPSOV4_A_MLSCATLST]) { in netlbl_cipsov4_add_std()
226 if (nla_validate_nested_deprecated(info->attrs[NLBL_CIPSOV4_A_MLSCATLST], in netlbl_cipsov4_add_std()
[all …]
/net/wireless/
Dnl80211.c68 struct net *netns, struct nlattr **attrs) in __cfg80211_wdev_from_attrs() argument
71 bool have_ifidx = attrs[NL80211_ATTR_IFINDEX]; in __cfg80211_wdev_from_attrs()
72 bool have_wdev_id = attrs[NL80211_ATTR_WDEV]; in __cfg80211_wdev_from_attrs()
81 ifidx = nla_get_u32(attrs[NL80211_ATTR_IFINDEX]); in __cfg80211_wdev_from_attrs()
83 wdev_id = nla_get_u64(attrs[NL80211_ATTR_WDEV]); in __cfg80211_wdev_from_attrs()
140 __cfg80211_rdev_from_attrs(struct net *netns, struct nlattr **attrs) in __cfg80211_rdev_from_attrs() argument
147 if (!attrs[NL80211_ATTR_WIPHY] && in __cfg80211_rdev_from_attrs()
148 !attrs[NL80211_ATTR_IFINDEX] && in __cfg80211_rdev_from_attrs()
149 !attrs[NL80211_ATTR_WDEV]) in __cfg80211_rdev_from_attrs()
152 if (attrs[NL80211_ATTR_WIPHY]) in __cfg80211_rdev_from_attrs()
[all …]
/net/tipc/
Dnet.c169 struct nlattr *attrs; in __tipc_nl_add_net() local
177 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NET); in __tipc_nl_add_net()
178 if (!attrs) in __tipc_nl_add_net()
187 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_net()
193 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_net()
227 struct nlattr *attrs[TIPC_NLA_NET_MAX + 1]; in __tipc_nl_net_set() local
232 if (!info->attrs[TIPC_NLA_NET]) in __tipc_nl_net_set()
235 err = nla_parse_nested_deprecated(attrs, TIPC_NLA_NET_MAX, in __tipc_nl_net_set()
236 info->attrs[TIPC_NLA_NET], in __tipc_nl_net_set()
246 if (attrs[TIPC_NLA_NET_ID]) { in __tipc_nl_net_set()
[all …]
Dbearer.c825 struct nlattr *attrs; in __tipc_nl_add_bearer() local
833 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_BEARER); in __tipc_nl_add_bearer()
834 if (!attrs) in __tipc_nl_add_bearer()
862 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_bearer()
870 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_bearer()
916 struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1]; in tipc_nl_bearer_get() local
919 if (!info->attrs[TIPC_NLA_BEARER]) in tipc_nl_bearer_get()
922 err = nla_parse_nested_deprecated(attrs, TIPC_NLA_BEARER_MAX, in tipc_nl_bearer_get()
923 info->attrs[TIPC_NLA_BEARER], in tipc_nl_bearer_get()
928 if (!attrs[TIPC_NLA_BEARER_NAME]) in tipc_nl_bearer_get()
[all …]
Dnode.c1599 struct nlattr *attrs; in __tipc_nl_add_node() local
1606 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NODE); in __tipc_nl_add_node()
1607 if (!attrs) in __tipc_nl_add_node()
1616 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_node()
1622 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_node()
2244 struct nlattr *attrs[TIPC_NLA_NET_MAX + 1]; in tipc_nl_peer_rm() local
2253 if (!info->attrs[TIPC_NLA_NET]) in tipc_nl_peer_rm()
2256 err = nla_parse_nested_deprecated(attrs, TIPC_NLA_NET_MAX, in tipc_nl_peer_rm()
2257 info->attrs[TIPC_NLA_NET], in tipc_nl_peer_rm()
2265 if (attrs[TIPC_NLA_NET_ADDR]) { in tipc_nl_peer_rm()
[all …]
Dnetlink_compat.c68 int (*format)(struct tipc_nl_compat_msg *msg, struct nlattr **attrs);
216 info.attrs = attrbuf; in __tipc_nl_compat_dumpit()
360 info.attrs = attrbuf; in __tipc_nl_compat_doit()
410 struct nlattr **attrs) in tipc_nl_compat_bearer_dump() argument
415 if (!attrs[TIPC_NLA_BEARER]) in tipc_nl_compat_bearer_dump()
419 attrs[TIPC_NLA_BEARER], NULL, NULL); in tipc_nl_compat_bearer_dump()
546 struct nlattr **attrs) in tipc_nl_compat_link_stat_dump() argument
555 if (!attrs[TIPC_NLA_LINK]) in tipc_nl_compat_link_stat_dump()
559 attrs[TIPC_NLA_LINK], NULL, NULL); in tipc_nl_compat_link_stat_dump()
686 struct nlattr **attrs) in tipc_nl_compat_link_dump() argument
[all …]
/net/nfc/
Dnetlink.c113 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) in __get_device_from_cb()
116 idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]); in __get_device_from_cb()
724 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) in nfc_genl_get_device()
727 idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]); in nfc_genl_get_device()
761 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) in nfc_genl_dev_up()
764 idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]); in nfc_genl_dev_up()
782 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) in nfc_genl_dev_down()
785 idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]); in nfc_genl_dev_down()
806 if (!info->attrs[NFC_ATTR_DEVICE_INDEX] || in nfc_genl_start_poll()
807 ((!info->attrs[NFC_ATTR_IM_PROTOCOLS] && in nfc_genl_start_poll()
[all …]
/net/ncsi/
Dncsi-netlink.c163 if (!info || !info->attrs) in ncsi_pkg_info_nl()
166 if (!info->attrs[NCSI_ATTR_IFINDEX]) in ncsi_pkg_info_nl()
169 if (!info->attrs[NCSI_ATTR_PACKAGE_ID]) in ncsi_pkg_info_nl()
173 nla_get_u32(info->attrs[NCSI_ATTR_IFINDEX])); in ncsi_pkg_info_nl()
188 package_id = nla_get_u32(info->attrs[NCSI_ATTR_PACKAGE_ID]); in ncsi_pkg_info_nl()
215 struct nlattr *attrs[NCSI_ATTR_MAX + 1]; in ncsi_pkg_info_all_nl() local
223 rc = genlmsg_parse_deprecated(cb->nlh, &ncsi_genl_family, attrs, NCSI_ATTR_MAX, in ncsi_pkg_info_all_nl()
228 if (!attrs[NCSI_ATTR_IFINDEX]) in ncsi_pkg_info_all_nl()
232 nla_get_u32(attrs[NCSI_ATTR_IFINDEX])); in ncsi_pkg_info_all_nl()
283 if (!info || !info->attrs) in ncsi_set_interface_nl()
[all …]
/net/xfrm/
Dxfrm_user.c37 static int verify_one_alg(struct nlattr **attrs, enum xfrm_attr_type_t type) in verify_one_alg() argument
39 struct nlattr *rt = attrs[type]; in verify_one_alg()
63 static int verify_auth_trunc(struct nlattr **attrs) in verify_auth_trunc() argument
65 struct nlattr *rt = attrs[XFRMA_ALG_AUTH_TRUNC]; in verify_auth_trunc()
79 static int verify_aead(struct nlattr **attrs) in verify_aead() argument
81 struct nlattr *rt = attrs[XFRMA_ALG_AEAD]; in verify_aead()
95 static void verify_one_addr(struct nlattr **attrs, enum xfrm_attr_type_t type, in verify_one_addr() argument
98 struct nlattr *rt = attrs[type]; in verify_one_addr()
104 static inline int verify_sec_ctx_len(struct nlattr **attrs) in verify_sec_ctx_len() argument
106 struct nlattr *rt = attrs[XFRMA_SEC_CTX]; in verify_sec_ctx_len()
[all …]
Dxfrm_compat.c292 const struct nlattr *nla, *attrs; in xfrm_xlate64() local
300 attrs = nlmsg_attrdata(nlh_src, xfrm_msg_min[type]); in xfrm_xlate64()
303 nla_for_each_attr(nla, attrs, len, remaining) { in xfrm_xlate64()
355 struct nlattr *attrs[XFRMA_MAX + 1], in xfrm_user_rcv_calculate_len64()
387 if (attrs[XFRMA_SA]) in xfrm_user_rcv_calculate_len64()
389 if (attrs[XFRMA_POLICY]) in xfrm_user_rcv_calculate_len64()
465 struct nlattr *attrs[XFRMA_MAX+1], in xfrm_xlate32()
554 if (!attrs[i]) in xfrm_xlate32()
558 err = xfrm_attr_cpy32(dst, &pos, attrs[i], size, in xfrm_xlate32()
559 nla_len(attrs[i]), nla_len(attrs[i])); in xfrm_xlate32()
[all …]
/net/batman-adv/
Dnetlink.c444 if (info->attrs[BATADV_ATTR_AGGREGATED_OGMS_ENABLED]) { in batadv_netlink_set_mesh()
445 attr = info->attrs[BATADV_ATTR_AGGREGATED_OGMS_ENABLED]; in batadv_netlink_set_mesh()
450 if (info->attrs[BATADV_ATTR_AP_ISOLATION_ENABLED]) { in batadv_netlink_set_mesh()
451 attr = info->attrs[BATADV_ATTR_AP_ISOLATION_ENABLED]; in batadv_netlink_set_mesh()
456 if (info->attrs[BATADV_ATTR_ISOLATION_MARK]) { in batadv_netlink_set_mesh()
457 attr = info->attrs[BATADV_ATTR_ISOLATION_MARK]; in batadv_netlink_set_mesh()
462 if (info->attrs[BATADV_ATTR_ISOLATION_MASK]) { in batadv_netlink_set_mesh()
463 attr = info->attrs[BATADV_ATTR_ISOLATION_MASK]; in batadv_netlink_set_mesh()
468 if (info->attrs[BATADV_ATTR_BONDING_ENABLED]) { in batadv_netlink_set_mesh()
469 attr = info->attrs[BATADV_ATTR_BONDING_ENABLED]; in batadv_netlink_set_mesh()
[all …]
/net/smc/
Dsmc_stats.c50 struct nlattr *attrs; in smc_nl_fill_stats_rmb_data() local
57 attrs = nla_nest_start(skb, type); in smc_nl_fill_stats_rmb_data()
58 if (!attrs) in smc_nl_fill_stats_rmb_data()
89 nla_nest_end(skb, attrs); in smc_nl_fill_stats_rmb_data()
93 nla_nest_cancel(skb, attrs); in smc_nl_fill_stats_rmb_data()
103 struct nlattr *attrs; in smc_nl_fill_stats_bufsize_data() local
116 attrs = nla_nest_start(skb, type); in smc_nl_fill_stats_bufsize_data()
117 if (!attrs) in smc_nl_fill_stats_bufsize_data()
156 nla_nest_end(skb, attrs); in smc_nl_fill_stats_bufsize_data()
160 nla_nest_cancel(skb, attrs); in smc_nl_fill_stats_bufsize_data()
[all …]
/net/ipv6/
Dseg6_local.c48 unsigned long attrs; member
951 .attrs = 0,
957 .attrs = SEG6_F_ATTR(SEG6_LOCAL_NH6),
963 .attrs = SEG6_F_ATTR(SEG6_LOCAL_TABLE),
969 .attrs = SEG6_F_ATTR(SEG6_LOCAL_OIF),
975 .attrs = SEG6_F_ATTR(SEG6_LOCAL_NH6),
981 .attrs = SEG6_F_ATTR(SEG6_LOCAL_NH4),
987 .attrs = SEG6_F_ATTR(SEG6_LOCAL_VRFTABLE),
999 .attrs = 0,
1007 .attrs = SEG6_F_ATTR(SEG6_LOCAL_TABLE),
[all …]
Dioam6.c114 if (!info->attrs[IOAM6_ATTR_NS_ID]) in ioam6_genl_addns()
117 id = cpu_to_be16(nla_get_u16(info->attrs[IOAM6_ATTR_NS_ID])); in ioam6_genl_addns()
136 if (!info->attrs[IOAM6_ATTR_NS_DATA]) in ioam6_genl_addns()
139 data32 = nla_get_u32(info->attrs[IOAM6_ATTR_NS_DATA]); in ioam6_genl_addns()
141 if (!info->attrs[IOAM6_ATTR_NS_DATA_WIDE]) in ioam6_genl_addns()
144 data64 = nla_get_u64(info->attrs[IOAM6_ATTR_NS_DATA_WIDE]); in ioam6_genl_addns()
167 if (!info->attrs[IOAM6_ATTR_NS_ID]) in ioam6_genl_delns()
170 id = cpu_to_be16(nla_get_u16(info->attrs[IOAM6_ATTR_NS_ID])); in ioam6_genl_delns()
317 if (!info->attrs[IOAM6_ATTR_SC_ID] || !info->attrs[IOAM6_ATTR_SC_DATA]) in ioam6_genl_addsc()
320 id = nla_get_u32(info->attrs[IOAM6_ATTR_SC_ID]); in ioam6_genl_addsc()
[all …]
Dseg6.c165 if (!info->attrs[SEG6_ATTR_HMACKEYID] || in seg6_genl_sethmac()
166 !info->attrs[SEG6_ATTR_SECRETLEN] || in seg6_genl_sethmac()
167 !info->attrs[SEG6_ATTR_ALGID]) in seg6_genl_sethmac()
170 hmackeyid = nla_get_u32(info->attrs[SEG6_ATTR_HMACKEYID]); in seg6_genl_sethmac()
171 slen = nla_get_u8(info->attrs[SEG6_ATTR_SECRETLEN]); in seg6_genl_sethmac()
172 algid = nla_get_u8(info->attrs[SEG6_ATTR_ALGID]); in seg6_genl_sethmac()
189 if (!info->attrs[SEG6_ATTR_SECRET]) { in seg6_genl_sethmac()
194 if (slen > nla_len(info->attrs[SEG6_ATTR_SECRET])) { in seg6_genl_sethmac()
205 secret = (char *)nla_data(info->attrs[SEG6_ATTR_SECRET]); in seg6_genl_sethmac()
244 if (!info->attrs[SEG6_ATTR_DST]) in seg6_genl_set_tunsrc()
[all …]
/net/core/
Ddevlink.c124 struct nlattr **attrs) in devlink_get_from_attrs() argument
132 if (!attrs[DEVLINK_ATTR_BUS_NAME] || !attrs[DEVLINK_ATTR_DEV_NAME]) in devlink_get_from_attrs()
135 busname = nla_data(attrs[DEVLINK_ATTR_BUS_NAME]); in devlink_get_from_attrs()
136 devname = nla_data(attrs[DEVLINK_ATTR_DEV_NAME]); in devlink_get_from_attrs()
174 struct nlattr **attrs) in devlink_port_get_from_attrs() argument
176 if (attrs[DEVLINK_ATTR_PORT_INDEX]) { in devlink_port_get_from_attrs()
177 u32 port_index = nla_get_u32(attrs[DEVLINK_ATTR_PORT_INDEX]); in devlink_port_get_from_attrs()
191 return devlink_port_get_from_attrs(devlink, info->attrs); in devlink_port_get_from_info()
212 devlink_port = devlink_port_get_from_attrs(devlink, info->attrs); in devlink_rate_leaf_get_from_info()
233 devlink_rate_node_get_from_attrs(struct devlink *devlink, struct nlattr **attrs) in devlink_rate_node_get_from_attrs() argument
[all …]
/net/openvswitch/
Dflow_netlink.c469 u64 attrs; in __parse_flow_nlattrs() local
472 attrs = *attrsp; in __parse_flow_nlattrs()
483 if (attrs & (1 << type)) { in __parse_flow_nlattrs()
496 attrs |= 1 << type; in __parse_flow_nlattrs()
505 *attrsp = attrs; in __parse_flow_nlattrs()
1125 u64 *attrs, const struct nlattr **a, in parse_eth_type_from_nlattrs() argument
1141 *attrs &= ~(1 << OVS_KEY_ATTR_ETHERTYPE); in parse_eth_type_from_nlattrs()
1146 u64 *attrs, const struct nlattr **a, in metadata_from_nlattrs() argument
1151 if (*attrs & (1 << OVS_KEY_ATTR_DP_HASH)) { in metadata_from_nlattrs()
1155 *attrs &= ~(1 << OVS_KEY_ATTR_DP_HASH); in metadata_from_nlattrs()
[all …]
/net/rds/
Dib.c138 if (!(device->attrs.device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS)) in rds_ib_add_one()
153 rds_ibdev->max_wrs = device->attrs.max_qp_wr; in rds_ib_add_one()
154 rds_ibdev->max_sge = min(device->attrs.max_send_sge, RDS_IB_MAX_SGE); in rds_ib_add_one()
157 !!(device->attrs.device_cap_flags & in rds_ib_add_one()
159 !!(device->attrs.odp_caps.per_transport_caps.rc_odp_caps & in rds_ib_add_one()
161 !!(device->attrs.odp_caps.per_transport_caps.rc_odp_caps & in rds_ib_add_one()
164 rds_ibdev->max_1m_mrs = device->attrs.max_mr ? in rds_ib_add_one()
165 min_t(unsigned int, (device->attrs.max_mr / 2), in rds_ib_add_one()
168 rds_ibdev->max_8k_mrs = device->attrs.max_mr ? in rds_ib_add_one()
169 min_t(unsigned int, ((device->attrs.max_mr / 2) * RDS_MR_8K_SCALE), in rds_ib_add_one()
[all …]
/net/ipv4/
Dfou.c683 if (info->attrs[FOU_ATTR_AF]) { in parse_nl_config()
684 u8 family = nla_get_u8(info->attrs[FOU_ATTR_AF]); in parse_nl_config()
699 if (info->attrs[FOU_ATTR_PORT]) { in parse_nl_config()
700 port = nla_get_be16(info->attrs[FOU_ATTR_PORT]); in parse_nl_config()
704 if (info->attrs[FOU_ATTR_IPPROTO]) in parse_nl_config()
705 cfg->protocol = nla_get_u8(info->attrs[FOU_ATTR_IPPROTO]); in parse_nl_config()
707 if (info->attrs[FOU_ATTR_TYPE]) in parse_nl_config()
708 cfg->type = nla_get_u8(info->attrs[FOU_ATTR_TYPE]); in parse_nl_config()
710 if (info->attrs[FOU_ATTR_REMCSUM_NOPARTIAL]) in parse_nl_config()
714 if (info->attrs[FOU_ATTR_LOCAL_V4]) { in parse_nl_config()
[all …]

1234