/net/ieee802154/ |
D | nl-mac.c | 157 if (info->attrs[IEEE802154_ATTR_DEV_NAME]) { in ieee802154_nl_get_dev() 160 nla_strlcpy(name, info->attrs[IEEE802154_ATTR_DEV_NAME], in ieee802154_nl_get_dev() 163 } else if (info->attrs[IEEE802154_ATTR_DEV_INDEX]) { in ieee802154_nl_get_dev() 165 nla_get_u32(info->attrs[IEEE802154_ATTR_DEV_INDEX])); in ieee802154_nl_get_dev() 188 if (!info->attrs[IEEE802154_ATTR_CHANNEL] || in ieee802154_associate_req() 189 !info->attrs[IEEE802154_ATTR_COORD_PAN_ID] || in ieee802154_associate_req() 190 (!info->attrs[IEEE802154_ATTR_COORD_HW_ADDR] && in ieee802154_associate_req() 191 !info->attrs[IEEE802154_ATTR_COORD_SHORT_ADDR]) || in ieee802154_associate_req() 192 !info->attrs[IEEE802154_ATTR_CAPABILITY]) in ieee802154_associate_req() 201 if (info->attrs[IEEE802154_ATTR_COORD_HW_ADDR]) { in ieee802154_associate_req() [all …]
|
D | nl802154.c | 43 __cfg802154_wpan_dev_from_attrs(struct net *netns, struct nlattr **attrs) in __cfg802154_wpan_dev_from_attrs() argument 47 bool have_ifidx = attrs[NL802154_ATTR_IFINDEX]; in __cfg802154_wpan_dev_from_attrs() 48 bool have_wpan_dev_id = attrs[NL802154_ATTR_WPAN_DEV]; in __cfg802154_wpan_dev_from_attrs() 59 ifidx = nla_get_u32(attrs[NL802154_ATTR_IFINDEX]); in __cfg802154_wpan_dev_from_attrs() 61 wpan_dev_id = nla_get_u64(attrs[NL802154_ATTR_WPAN_DEV]); in __cfg802154_wpan_dev_from_attrs() 98 __cfg802154_rdev_from_attrs(struct net *netns, struct nlattr **attrs) in __cfg802154_rdev_from_attrs() argument 105 if (!attrs[NL802154_ATTR_WPAN_PHY] && in __cfg802154_rdev_from_attrs() 106 !attrs[NL802154_ATTR_IFINDEX] && in __cfg802154_rdev_from_attrs() 107 !attrs[NL802154_ATTR_WPAN_DEV]) in __cfg802154_rdev_from_attrs() 110 if (attrs[NL802154_ATTR_WPAN_PHY]) in __cfg802154_rdev_from_attrs() [all …]
|
D | nl-phy.c | 91 if (!info->attrs[IEEE802154_ATTR_PHY_NAME]) in ieee802154_list_phy() 94 name = nla_data(info->attrs[IEEE802154_ATTR_PHY_NAME]); in ieee802154_list_phy() 95 if (name[nla_len(info->attrs[IEEE802154_ATTR_PHY_NAME]) - 1] != '\0') in ieee802154_list_phy() 182 if (!info->attrs[IEEE802154_ATTR_PHY_NAME]) in ieee802154_add_iface() 185 name = nla_data(info->attrs[IEEE802154_ATTR_PHY_NAME]); in ieee802154_add_iface() 186 if (name[nla_len(info->attrs[IEEE802154_ATTR_PHY_NAME]) - 1] != '\0') in ieee802154_add_iface() 189 if (info->attrs[IEEE802154_ATTR_DEV_NAME]) { in ieee802154_add_iface() 190 devname = nla_data(info->attrs[IEEE802154_ATTR_DEV_NAME]); in ieee802154_add_iface() 191 if (devname[nla_len(info->attrs[IEEE802154_ATTR_DEV_NAME]) - 1] in ieee802154_add_iface() 211 if (info->attrs[IEEE802154_ATTR_HW_ADDR] && in ieee802154_add_iface() [all …]
|
/net/l2tp/ |
D | l2tp_netlink.c | 61 if (info->attrs[L2TP_ATTR_IFNAME]) { in l2tp_nl_session_get() 62 ifname = nla_data(info->attrs[L2TP_ATTR_IFNAME]); in l2tp_nl_session_get() 64 } else if ((info->attrs[L2TP_ATTR_SESSION_ID]) && in l2tp_nl_session_get() 65 (info->attrs[L2TP_ATTR_CONN_ID])) { in l2tp_nl_session_get() 66 tunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_CONN_ID]); in l2tp_nl_session_get() 67 session_id = nla_get_u32(info->attrs[L2TP_ATTR_SESSION_ID]); in l2tp_nl_session_get() 176 if (!info->attrs[L2TP_ATTR_CONN_ID]) { in l2tp_nl_cmd_tunnel_create() 180 tunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_CONN_ID]); in l2tp_nl_cmd_tunnel_create() 182 if (!info->attrs[L2TP_ATTR_PEER_CONN_ID]) { in l2tp_nl_cmd_tunnel_create() 186 peer_tunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_PEER_CONN_ID]); in l2tp_nl_cmd_tunnel_create() [all …]
|
/net/netlabel/ |
D | netlabel_mgmt.c | 104 entry->def.type = nla_get_u32(info->attrs[NLBL_MGMT_A_PROTOCOL]); in netlbl_mgmt_add_common() 105 if (info->attrs[NLBL_MGMT_A_DOMAIN]) { in netlbl_mgmt_add_common() 106 size_t tmp_size = nla_len(info->attrs[NLBL_MGMT_A_DOMAIN]); in netlbl_mgmt_add_common() 113 info->attrs[NLBL_MGMT_A_DOMAIN], tmp_size); in netlbl_mgmt_add_common() 123 if (info->attrs[NLBL_MGMT_A_FAMILY]) in netlbl_mgmt_add_common() 125 nla_get_u16(info->attrs[NLBL_MGMT_A_FAMILY]); in netlbl_mgmt_add_common() 130 if (!info->attrs[NLBL_MGMT_A_CV4DOI]) in netlbl_mgmt_add_common() 133 tmp_val = nla_get_u32(info->attrs[NLBL_MGMT_A_CV4DOI]); in netlbl_mgmt_add_common() 142 if (!info->attrs[NLBL_MGMT_A_CLPDOI]) in netlbl_mgmt_add_common() 145 tmp_val = nla_get_u32(info->attrs[NLBL_MGMT_A_CLPDOI]); in netlbl_mgmt_add_common() [all …]
|
D | netlabel_unlabeled.c | 784 if (info->attrs[NLBL_UNLABEL_A_IPV4ADDR] && in netlbl_unlabel_addrinfo_get() 785 info->attrs[NLBL_UNLABEL_A_IPV4MASK]) { in netlbl_unlabel_addrinfo_get() 786 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV4ADDR]); in netlbl_unlabel_addrinfo_get() 788 addr_len != nla_len(info->attrs[NLBL_UNLABEL_A_IPV4MASK])) in netlbl_unlabel_addrinfo_get() 791 *addr = nla_data(info->attrs[NLBL_UNLABEL_A_IPV4ADDR]); in netlbl_unlabel_addrinfo_get() 792 *mask = nla_data(info->attrs[NLBL_UNLABEL_A_IPV4MASK]); in netlbl_unlabel_addrinfo_get() 794 } else if (info->attrs[NLBL_UNLABEL_A_IPV6ADDR]) { in netlbl_unlabel_addrinfo_get() 795 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV6ADDR]); in netlbl_unlabel_addrinfo_get() 797 addr_len != nla_len(info->attrs[NLBL_UNLABEL_A_IPV6MASK])) in netlbl_unlabel_addrinfo_get() 800 *addr = nla_data(info->attrs[NLBL_UNLABEL_A_IPV6ADDR]); in netlbl_unlabel_addrinfo_get() [all …]
|
D | netlabel_cipso_v4.c | 100 doi_def->doi = nla_get_u32(info->attrs[NLBL_CIPSOV4_A_DOI]); in netlbl_cipsov4_add_common() 102 if (nla_validate_nested(info->attrs[NLBL_CIPSOV4_A_TAGLST], in netlbl_cipsov4_add_common() 107 nla_for_each_nested(nla, info->attrs[NLBL_CIPSOV4_A_TAGLST], nla_rem) in netlbl_cipsov4_add_common() 145 if (!info->attrs[NLBL_CIPSOV4_A_TAGLST] || in netlbl_cipsov4_add_std() 146 !info->attrs[NLBL_CIPSOV4_A_MLSLVLLST]) in netlbl_cipsov4_add_std() 149 if (nla_validate_nested(info->attrs[NLBL_CIPSOV4_A_MLSLVLLST], in netlbl_cipsov4_add_std() 170 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST], in netlbl_cipsov4_add_std() 218 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST], in netlbl_cipsov4_add_std() 236 if (info->attrs[NLBL_CIPSOV4_A_MLSCATLST]) { in netlbl_cipsov4_add_std() 237 if (nla_validate_nested(info->attrs[NLBL_CIPSOV4_A_MLSCATLST], in netlbl_cipsov4_add_std() [all …]
|
D | netlabel_calipso.c | 94 doi_def->doi = nla_get_u32(info->attrs[NLBL_CALIPSO_A_DOI]); in netlbl_calipso_add_pass() 118 if (!info->attrs[NLBL_CALIPSO_A_DOI] || in netlbl_calipso_add() 119 !info->attrs[NLBL_CALIPSO_A_MTYPE]) in netlbl_calipso_add() 123 switch (nla_get_u32(info->attrs[NLBL_CALIPSO_A_MTYPE])) { in netlbl_calipso_add() 152 if (!info->attrs[NLBL_CALIPSO_A_DOI]) { in netlbl_calipso_list() 157 doi = nla_get_u32(info->attrs[NLBL_CALIPSO_A_DOI]); in netlbl_calipso_list() 301 if (!info->attrs[NLBL_CALIPSO_A_DOI]) in netlbl_calipso_remove() 305 cb_arg.doi = nla_get_u32(info->attrs[NLBL_CALIPSO_A_DOI]); in netlbl_calipso_remove()
|
/net/tipc/ |
D | bearer.c | 684 struct nlattr *attrs; in __tipc_nl_add_bearer() local 692 attrs = nla_nest_start(msg->skb, TIPC_NLA_BEARER); in __tipc_nl_add_bearer() 693 if (!attrs) in __tipc_nl_add_bearer() 718 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_bearer() 726 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_bearer() 772 struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1]; in tipc_nl_bearer_get() local 775 if (!info->attrs[TIPC_NLA_BEARER]) in tipc_nl_bearer_get() 778 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX, in tipc_nl_bearer_get() 779 info->attrs[TIPC_NLA_BEARER], in tipc_nl_bearer_get() 784 if (!attrs[TIPC_NLA_BEARER_NAME]) in tipc_nl_bearer_get() [all …]
|
D | net.c | 151 struct nlattr *attrs; in __tipc_nl_add_net() local 158 attrs = nla_nest_start(msg->skb, TIPC_NLA_NET); in __tipc_nl_add_net() 159 if (!attrs) in __tipc_nl_add_net() 165 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_net() 171 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_net() 207 struct nlattr *attrs[TIPC_NLA_NET_MAX + 1]; in tipc_nl_net_set() local 210 if (!info->attrs[TIPC_NLA_NET]) in tipc_nl_net_set() 213 err = nla_parse_nested(attrs, TIPC_NLA_NET_MAX, in tipc_nl_net_set() 214 info->attrs[TIPC_NLA_NET], tipc_nl_net_policy, in tipc_nl_net_set() 219 if (attrs[TIPC_NLA_NET_ID]) { in tipc_nl_net_set() [all …]
|
D | netlink_compat.c | 68 int (*format)(struct tipc_nl_compat_msg *msg, struct nlattr **attrs); 206 struct nlattr **attrs; in __tipc_nl_compat_dumpit() local 208 err = tipc_nlmsg_parse(nlmsg, &attrs); in __tipc_nl_compat_dumpit() 212 err = (*cmd->format)(msg, attrs); in __tipc_nl_compat_dumpit() 332 info.attrs = attrbuf; in __tipc_nl_compat_doit() 367 struct nlattr **attrs) in tipc_nl_compat_bearer_dump() argument 372 if (!attrs[TIPC_NLA_BEARER]) in tipc_nl_compat_bearer_dump() 376 attrs[TIPC_NLA_BEARER], NULL, NULL); in tipc_nl_compat_bearer_dump() 503 struct nlattr **attrs) in tipc_nl_compat_link_stat_dump() argument 512 if (!attrs[TIPC_NLA_LINK]) in tipc_nl_compat_link_stat_dump() [all …]
|
D | node.c | 1140 struct nlattr *attrs; in __tipc_nl_add_node() local 1147 attrs = nla_nest_start(msg->skb, TIPC_NLA_NODE); in __tipc_nl_add_node() 1148 if (!attrs) in __tipc_nl_add_node() 1157 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_node() 1163 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_node() 1594 struct nlattr *attrs[TIPC_NLA_NET_MAX + 1]; in tipc_nl_peer_rm() local 1601 if (!info->attrs[TIPC_NLA_NET]) in tipc_nl_peer_rm() 1604 err = nla_parse_nested(attrs, TIPC_NLA_NET_MAX, in tipc_nl_peer_rm() 1605 info->attrs[TIPC_NLA_NET], tipc_nl_net_policy, in tipc_nl_peer_rm() 1610 if (!attrs[TIPC_NLA_NET_ADDR]) in tipc_nl_peer_rm() [all …]
|
/net/wireless/ |
D | nl80211.c | 64 __cfg80211_wdev_from_attrs(struct net *netns, struct nlattr **attrs) in __cfg80211_wdev_from_attrs() argument 68 bool have_ifidx = attrs[NL80211_ATTR_IFINDEX]; in __cfg80211_wdev_from_attrs() 69 bool have_wdev_id = attrs[NL80211_ATTR_WDEV]; in __cfg80211_wdev_from_attrs() 80 ifidx = nla_get_u32(attrs[NL80211_ATTR_IFINDEX]); in __cfg80211_wdev_from_attrs() 82 wdev_id = nla_get_u64(attrs[NL80211_ATTR_WDEV]); in __cfg80211_wdev_from_attrs() 117 __cfg80211_rdev_from_attrs(struct net *netns, struct nlattr **attrs) in __cfg80211_rdev_from_attrs() argument 124 if (!attrs[NL80211_ATTR_WIPHY] && in __cfg80211_rdev_from_attrs() 125 !attrs[NL80211_ATTR_IFINDEX] && in __cfg80211_rdev_from_attrs() 126 !attrs[NL80211_ATTR_WDEV]) in __cfg80211_rdev_from_attrs() 129 if (attrs[NL80211_ATTR_WIPHY]) in __cfg80211_rdev_from_attrs() [all …]
|
/net/nfc/ |
D | netlink.c | 754 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) in nfc_genl_get_device() 757 idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]); in nfc_genl_get_device() 791 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) in nfc_genl_dev_up() 794 idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]); in nfc_genl_dev_up() 812 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) in nfc_genl_dev_down() 815 idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]); in nfc_genl_dev_down() 836 if (!info->attrs[NFC_ATTR_DEVICE_INDEX] || in nfc_genl_start_poll() 837 ((!info->attrs[NFC_ATTR_IM_PROTOCOLS] && in nfc_genl_start_poll() 838 !info->attrs[NFC_ATTR_PROTOCOLS]) && in nfc_genl_start_poll() 839 !info->attrs[NFC_ATTR_TM_PROTOCOLS])) in nfc_genl_start_poll() [all …]
|
/net/ipv6/ |
D | seg6_local.c | 40 unsigned long attrs; member 455 .attrs = 0, 460 .attrs = (1 << SEG6_LOCAL_NH6), 465 .attrs = (1 << SEG6_LOCAL_TABLE), 470 .attrs = (1 << SEG6_LOCAL_OIF), 475 .attrs = (1 << SEG6_LOCAL_NH6), 480 .attrs = (1 << SEG6_LOCAL_NH4), 485 .attrs = (1 << SEG6_LOCAL_TABLE), 490 .attrs = (1 << SEG6_LOCAL_SRH), 495 .attrs = (1 << SEG6_LOCAL_SRH), [all …]
|
D | seg6.c | 100 if (!info->attrs[SEG6_ATTR_HMACKEYID] || in seg6_genl_sethmac() 101 !info->attrs[SEG6_ATTR_SECRETLEN] || in seg6_genl_sethmac() 102 !info->attrs[SEG6_ATTR_ALGID]) in seg6_genl_sethmac() 105 hmackeyid = nla_get_u32(info->attrs[SEG6_ATTR_HMACKEYID]); in seg6_genl_sethmac() 106 slen = nla_get_u8(info->attrs[SEG6_ATTR_SECRETLEN]); in seg6_genl_sethmac() 107 algid = nla_get_u8(info->attrs[SEG6_ATTR_ALGID]); in seg6_genl_sethmac() 127 if (!info->attrs[SEG6_ATTR_SECRET]) { in seg6_genl_sethmac() 138 secret = (char *)nla_data(info->attrs[SEG6_ATTR_SECRET]); in seg6_genl_sethmac() 177 if (!info->attrs[SEG6_ATTR_DST]) in seg6_genl_set_tunsrc() 180 val = nla_data(info->attrs[SEG6_ATTR_DST]); in seg6_genl_set_tunsrc()
|
/net/decnet/ |
D | dn_fib.c | 267 struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct nlattr *attrs[], in dn_fib_create_info() argument 281 if (attrs[RTA_MULTIPATH] && in dn_fib_create_info() 282 (nhs = dn_fib_count_nhs(attrs[RTA_MULTIPATH])) == 0) in dn_fib_create_info() 294 if (attrs[RTA_PRIORITY]) in dn_fib_create_info() 295 fi->fib_priority = nla_get_u32(attrs[RTA_PRIORITY]); in dn_fib_create_info() 297 if (attrs[RTA_METRICS]) { in dn_fib_create_info() 301 nla_for_each_nested(attr, attrs[RTA_METRICS], rem) { in dn_fib_create_info() 314 if (attrs[RTA_PREFSRC]) in dn_fib_create_info() 315 fi->fib_prefsrc = nla_get_le16(attrs[RTA_PREFSRC]); in dn_fib_create_info() 317 if (attrs[RTA_MULTIPATH]) { in dn_fib_create_info() [all …]
|
D | dn_table.c | 228 static int dn_fib_nh_match(struct rtmsg *r, struct nlmsghdr *nlh, struct nlattr *attrs[], struct dn… in dn_fib_nh_match() argument 233 if (attrs[RTA_PRIORITY] && in dn_fib_nh_match() 234 nla_get_u32(attrs[RTA_PRIORITY]) != fi->fib_priority) in dn_fib_nh_match() 237 if (attrs[RTA_OIF] || attrs[RTA_GATEWAY]) { in dn_fib_nh_match() 238 if ((!attrs[RTA_OIF] || nla_get_u32(attrs[RTA_OIF]) == fi->fib_nh->nh_oif) && in dn_fib_nh_match() 239 (!attrs[RTA_GATEWAY] || nla_get_le16(attrs[RTA_GATEWAY]) != fi->fib_nh->nh_gw)) in dn_fib_nh_match() 244 if (!attrs[RTA_MULTIPATH]) in dn_fib_nh_match() 247 nhp = nla_data(attrs[RTA_MULTIPATH]); in dn_fib_nh_match() 248 nhlen = nla_len(attrs[RTA_MULTIPATH]); in dn_fib_nh_match() 527 static int dn_fib_table_insert(struct dn_fib_table *tb, struct rtmsg *r, struct nlattr *attrs[], in dn_fib_table_insert() argument [all …]
|
/net/xfrm/ |
D | xfrm_user.c | 36 static int verify_one_alg(struct nlattr **attrs, enum xfrm_attr_type_t type) in verify_one_alg() argument 38 struct nlattr *rt = attrs[type]; in verify_one_alg() 62 static int verify_auth_trunc(struct nlattr **attrs) in verify_auth_trunc() argument 64 struct nlattr *rt = attrs[XFRMA_ALG_AUTH_TRUNC]; in verify_auth_trunc() 78 static int verify_aead(struct nlattr **attrs) in verify_aead() argument 80 struct nlattr *rt = attrs[XFRMA_ALG_AEAD]; in verify_aead() 94 static void verify_one_addr(struct nlattr **attrs, enum xfrm_attr_type_t type, in verify_one_addr() argument 97 struct nlattr *rt = attrs[type]; in verify_one_addr() 103 static inline int verify_sec_ctx_len(struct nlattr **attrs) in verify_sec_ctx_len() argument 105 struct nlattr *rt = attrs[XFRMA_SEC_CTX]; in verify_sec_ctx_len() [all …]
|
/net/openvswitch/ |
D | flow_netlink.c | 436 u64 attrs; in __parse_flow_nlattrs() local 439 attrs = *attrsp; in __parse_flow_nlattrs() 450 if (attrs & (1 << type)) { in __parse_flow_nlattrs() 463 attrs |= 1 << type; in __parse_flow_nlattrs() 472 *attrsp = attrs; in __parse_flow_nlattrs() 1024 u64 *attrs, const struct nlattr **a, in parse_eth_type_from_nlattrs() argument 1040 *attrs &= ~(1 << OVS_KEY_ATTR_ETHERTYPE); in parse_eth_type_from_nlattrs() 1045 u64 *attrs, const struct nlattr **a, in metadata_from_nlattrs() argument 1050 if (*attrs & (1 << OVS_KEY_ATTR_DP_HASH)) { in metadata_from_nlattrs() 1054 *attrs &= ~(1 << OVS_KEY_ATTR_DP_HASH); in metadata_from_nlattrs() [all …]
|
/net/core/ |
D | devlink.c | 112 struct nlattr **attrs) in devlink_get_from_attrs() argument 118 if (!attrs[DEVLINK_ATTR_BUS_NAME] || !attrs[DEVLINK_ATTR_DEV_NAME]) in devlink_get_from_attrs() 121 busname = nla_data(attrs[DEVLINK_ATTR_BUS_NAME]); in devlink_get_from_attrs() 122 devname = nla_data(attrs[DEVLINK_ATTR_DEV_NAME]); in devlink_get_from_attrs() 136 return devlink_get_from_attrs(genl_info_net(info), info->attrs); in devlink_get_from_info() 157 struct nlattr **attrs) in devlink_port_get_from_attrs() argument 159 if (attrs[DEVLINK_ATTR_PORT_INDEX]) { in devlink_port_get_from_attrs() 160 u32 port_index = nla_get_u32(attrs[DEVLINK_ATTR_PORT_INDEX]); in devlink_port_get_from_attrs() 174 return devlink_port_get_from_attrs(devlink, info->attrs); in devlink_port_get_from_info() 211 struct nlattr **attrs) in devlink_sb_get_from_attrs() argument [all …]
|
/net/rds/ |
D | ib.c | 146 rds_ibdev->max_wrs = device->attrs.max_qp_wr; in rds_ib_add_one() 147 rds_ibdev->max_sge = min(device->attrs.max_sge, RDS_IB_MAX_SGE); in rds_ib_add_one() 149 rds_ibdev->has_fr = (device->attrs.device_cap_flags & in rds_ib_add_one() 155 rds_ibdev->fmr_max_remaps = device->attrs.max_map_per_fmr?: 32; in rds_ib_add_one() 156 rds_ibdev->max_1m_mrs = device->attrs.max_mr ? in rds_ib_add_one() 157 min_t(unsigned int, (device->attrs.max_mr / 2), in rds_ib_add_one() 160 rds_ibdev->max_8k_mrs = device->attrs.max_mr ? in rds_ib_add_one() 161 min_t(unsigned int, ((device->attrs.max_mr / 2) * RDS_MR_8K_SCALE), in rds_ib_add_one() 164 rds_ibdev->max_initiator_depth = device->attrs.max_qp_init_rd_atom; in rds_ib_add_one() 165 rds_ibdev->max_responder_resources = device->attrs.max_qp_rd_atom; in rds_ib_add_one() [all …]
|
/net/batman-adv/ |
D | netlink.c | 189 if (!info->attrs[BATADV_ATTR_MESH_IFINDEX]) in batadv_netlink_get_mesh_info() 192 ifindex = nla_get_u32(info->attrs[BATADV_ATTR_MESH_IFINDEX]); in batadv_netlink_get_mesh_info() 332 if (!info->attrs[BATADV_ATTR_MESH_IFINDEX]) in batadv_netlink_tp_meter_start() 335 if (!info->attrs[BATADV_ATTR_ORIG_ADDRESS]) in batadv_netlink_tp_meter_start() 338 if (!info->attrs[BATADV_ATTR_TPMETER_TEST_TIME]) in batadv_netlink_tp_meter_start() 341 ifindex = nla_get_u32(info->attrs[BATADV_ATTR_MESH_IFINDEX]); in batadv_netlink_tp_meter_start() 345 dst = nla_data(info->attrs[BATADV_ATTR_ORIG_ADDRESS]); in batadv_netlink_tp_meter_start() 347 test_length = nla_get_u32(info->attrs[BATADV_ATTR_TPMETER_TEST_TIME]); in batadv_netlink_tp_meter_start() 405 if (!info->attrs[BATADV_ATTR_MESH_IFINDEX]) in batadv_netlink_tp_meter_cancel() 408 if (!info->attrs[BATADV_ATTR_ORIG_ADDRESS]) in batadv_netlink_tp_meter_cancel() [all …]
|
/net/wimax/ |
D | op-msg.c | 345 if (info->attrs[WIMAX_GNL_MSG_IFIDX] == NULL) { in wimax_gnl_doit_msg_from_user() 349 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_MSG_IFIDX]); in wimax_gnl_doit_msg_from_user() 357 if (info->attrs[WIMAX_GNL_MSG_DATA] == NULL) { in wimax_gnl_doit_msg_from_user() 362 msg_buf = nla_data(info->attrs[WIMAX_GNL_MSG_DATA]); in wimax_gnl_doit_msg_from_user() 363 msg_len = nla_len(info->attrs[WIMAX_GNL_MSG_DATA]); in wimax_gnl_doit_msg_from_user() 365 if (info->attrs[WIMAX_GNL_MSG_PIPE_NAME] == NULL) in wimax_gnl_doit_msg_from_user() 368 struct nlattr *attr = info->attrs[WIMAX_GNL_MSG_PIPE_NAME]; in wimax_gnl_doit_msg_from_user()
|
/net/sunrpc/xprtrdma/ |
D | frwr_ops.c | 84 struct ib_device_attr *attrs = &ia->ri_device->attrs; in frwr_is_supported() local 86 if (!(attrs->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS)) in frwr_is_supported() 88 if (attrs->max_fast_reg_page_list_len == 0) in frwr_is_supported() 210 struct ib_device_attr *attrs = &ia->ri_device->attrs; in frwr_op_open() local 214 if (attrs->device_cap_flags & IB_DEVICE_SG_GAPS_REG) in frwr_op_open() 219 attrs->max_fast_reg_page_list_len); in frwr_op_open() 246 if (ep->rep_attr.cap.max_send_wr > attrs->max_qp_wr) { in frwr_op_open() 247 cdata->max_requests = attrs->max_qp_wr / depth; in frwr_op_open()
|