Lines Matching refs:a
545 struct nlattr **a = info->attrs; in ovs_packet_cmd_execute() local
555 bool log = !a[OVS_PACKET_ATTR_PROBE]; in ovs_packet_cmd_execute()
558 if (!a[OVS_PACKET_ATTR_PACKET] || !a[OVS_PACKET_ATTR_KEY] || in ovs_packet_cmd_execute()
559 !a[OVS_PACKET_ATTR_ACTIONS]) in ovs_packet_cmd_execute()
562 len = nla_len(a[OVS_PACKET_ATTR_PACKET]); in ovs_packet_cmd_execute()
569 nla_memcpy(__skb_put(packet, len), a[OVS_PACKET_ATTR_PACKET], len); in ovs_packet_cmd_execute()
572 if (a[OVS_PACKET_ATTR_MRU]) { in ovs_packet_cmd_execute()
573 mru = nla_get_u16(a[OVS_PACKET_ATTR_MRU]); in ovs_packet_cmd_execute()
584 err = ovs_flow_key_extract_userspace(net, a[OVS_PACKET_ATTR_KEY], in ovs_packet_cmd_execute()
589 err = ovs_nla_copy_actions(net, a[OVS_PACKET_ATTR_ACTIONS], in ovs_packet_cmd_execute()
907 struct nlattr **a = info->attrs; in ovs_flow_cmd_new() local
916 u32 ufid_flags = ovs_nla_get_ufid_flags(a[OVS_FLOW_ATTR_UFID_FLAGS]); in ovs_flow_cmd_new()
918 bool log = !a[OVS_FLOW_ATTR_PROBE]; in ovs_flow_cmd_new()
922 if (!a[OVS_FLOW_ATTR_KEY]) { in ovs_flow_cmd_new()
926 if (!a[OVS_FLOW_ATTR_ACTIONS]) { in ovs_flow_cmd_new()
948 error = ovs_nla_get_match(net, &match, a[OVS_FLOW_ATTR_KEY], in ovs_flow_cmd_new()
949 a[OVS_FLOW_ATTR_MASK], log); in ovs_flow_cmd_new()
956 error = ovs_nla_get_identifier(&new_flow->id, a[OVS_FLOW_ATTR_UFID], in ovs_flow_cmd_new()
962 error = ovs_nla_copy_actions(net, a[OVS_FLOW_ATTR_ACTIONS], in ovs_flow_cmd_new()
1076 const struct nlattr *a, in get_flow_actions() argument
1086 error = ovs_nla_copy_actions(net, a, &masked_key, &acts, log); in get_flow_actions()
1113 struct nlattr **a, in ovs_nla_init_match_and_action() argument
1120 if (a[OVS_FLOW_ATTR_KEY]) { in ovs_nla_init_match_and_action()
1122 error = ovs_nla_get_match(net, match, a[OVS_FLOW_ATTR_KEY], in ovs_nla_init_match_and_action()
1123 a[OVS_FLOW_ATTR_MASK], log); in ovs_nla_init_match_and_action()
1128 if (a[OVS_FLOW_ATTR_ACTIONS]) { in ovs_nla_init_match_and_action()
1129 if (!a[OVS_FLOW_ATTR_KEY]) { in ovs_nla_init_match_and_action()
1136 *acts = get_flow_actions(net, a[OVS_FLOW_ATTR_ACTIONS], key, in ovs_nla_init_match_and_action()
1153 struct nlattr **a = info->attrs; in ovs_flow_cmd_set() local
1162 u32 ufid_flags = ovs_nla_get_ufid_flags(a[OVS_FLOW_ATTR_UFID_FLAGS]); in ovs_flow_cmd_set()
1164 bool log = !a[OVS_FLOW_ATTR_PROBE]; in ovs_flow_cmd_set()
1167 ufid_present = ovs_nla_get_ufid(&sfid, a[OVS_FLOW_ATTR_UFID], log); in ovs_flow_cmd_set()
1168 if (!a[OVS_FLOW_ATTR_KEY] && !ufid_present) { in ovs_flow_cmd_set()
1174 error = ovs_nla_init_match_and_action(net, &match, &key, a, in ovs_flow_cmd_set()
1232 if (a[OVS_FLOW_ATTR_CLEAR]) in ovs_flow_cmd_set()
1254 struct nlattr **a = info->attrs; in ovs_flow_cmd_get() local
1263 u32 ufid_flags = ovs_nla_get_ufid_flags(a[OVS_FLOW_ATTR_UFID_FLAGS]); in ovs_flow_cmd_get()
1265 bool log = !a[OVS_FLOW_ATTR_PROBE]; in ovs_flow_cmd_get()
1268 ufid_present = ovs_nla_get_ufid(&ufid, a[OVS_FLOW_ATTR_UFID], log); in ovs_flow_cmd_get()
1269 if (a[OVS_FLOW_ATTR_KEY]) { in ovs_flow_cmd_get()
1271 err = ovs_nla_get_match(net, &match, a[OVS_FLOW_ATTR_KEY], NULL, in ovs_flow_cmd_get()
1313 struct nlattr **a = info->attrs; in ovs_flow_cmd_del() local
1322 u32 ufid_flags = ovs_nla_get_ufid_flags(a[OVS_FLOW_ATTR_UFID_FLAGS]); in ovs_flow_cmd_del()
1324 bool log = !a[OVS_FLOW_ATTR_PROBE]; in ovs_flow_cmd_del()
1327 ufid_present = ovs_nla_get_ufid(&ufid, a[OVS_FLOW_ATTR_UFID], log); in ovs_flow_cmd_del()
1328 if (a[OVS_FLOW_ATTR_KEY]) { in ovs_flow_cmd_del()
1330 err = ovs_nla_get_match(net, &match, a[OVS_FLOW_ATTR_KEY], in ovs_flow_cmd_del()
1343 if (unlikely(!a[OVS_FLOW_ATTR_KEY] && !ufid_present)) { in ovs_flow_cmd_del()
1392 struct nlattr *a[__OVS_FLOW_ATTR_MAX]; in ovs_flow_cmd_dump() local
1399 err = genlmsg_parse_deprecated(cb->nlh, &dp_flow_genl_family, a, in ovs_flow_cmd_dump()
1403 ufid_flags = ovs_nla_get_ufid_flags(a[OVS_FLOW_ATTR_UFID_FLAGS]); in ovs_flow_cmd_dump()
1547 struct nlattr *a[OVS_DP_ATTR_MAX + 1]) in lookup_datapath()
1551 if (!a[OVS_DP_ATTR_NAME]) in lookup_datapath()
1556 vport = ovs_vport_locate(net, nla_data(a[OVS_DP_ATTR_NAME])); in lookup_datapath()
1577 static int ovs_dp_change(struct datapath *dp, struct nlattr *a[]) in ovs_dp_change() argument
1581 if (a[OVS_DP_ATTR_USER_FEATURES]) { in ovs_dp_change()
1582 user_features = nla_get_u32(a[OVS_DP_ATTR_USER_FEATURES]); in ovs_dp_change()
1607 struct nlattr **a = info->attrs; in ovs_dp_cmd_new() local
1616 if (!a[OVS_DP_ATTR_NAME] || !a[OVS_DP_ATTR_UPCALL_PID]) in ovs_dp_cmd_new()
1657 parms.name = nla_data(a[OVS_DP_ATTR_NAME]); in ovs_dp_cmd_new()
1662 parms.upcall_portids = a[OVS_DP_ATTR_UPCALL_PID]; in ovs_dp_cmd_new()
1664 err = ovs_dp_change(dp, a); in ovs_dp_cmd_new()
1987 struct nlattr *a[OVS_VPORT_ATTR_MAX + 1]) in lookup_vport()
1992 if (a[OVS_VPORT_ATTR_IFINDEX]) in lookup_vport()
1994 if (a[OVS_VPORT_ATTR_NAME]) { in lookup_vport()
1995 vport = ovs_vport_locate(net, nla_data(a[OVS_VPORT_ATTR_NAME])); in lookup_vport()
2002 } else if (a[OVS_VPORT_ATTR_PORT_NO]) { in lookup_vport()
2003 u32 port_no = nla_get_u32(a[OVS_VPORT_ATTR_PORT_NO]); in lookup_vport()
2054 struct nlattr **a = info->attrs; in ovs_vport_cmd_new() local
2064 if (!a[OVS_VPORT_ATTR_NAME] || !a[OVS_VPORT_ATTR_TYPE] || in ovs_vport_cmd_new()
2065 !a[OVS_VPORT_ATTR_UPCALL_PID]) in ovs_vport_cmd_new()
2067 if (a[OVS_VPORT_ATTR_IFINDEX]) in ovs_vport_cmd_new()
2070 port_no = a[OVS_VPORT_ATTR_PORT_NO] in ovs_vport_cmd_new()
2071 ? nla_get_u32(a[OVS_VPORT_ATTR_PORT_NO]) : 0; in ovs_vport_cmd_new()
2103 parms.name = nla_data(a[OVS_VPORT_ATTR_NAME]); in ovs_vport_cmd_new()
2104 parms.type = nla_get_u32(a[OVS_VPORT_ATTR_TYPE]); in ovs_vport_cmd_new()
2105 parms.options = a[OVS_VPORT_ATTR_OPTIONS]; in ovs_vport_cmd_new()
2108 parms.upcall_portids = a[OVS_VPORT_ATTR_UPCALL_PID]; in ovs_vport_cmd_new()
2143 struct nlattr **a = info->attrs; in ovs_vport_cmd_set() local
2153 vport = lookup_vport(sock_net(skb->sk), info->userhdr, a); in ovs_vport_cmd_set()
2158 if (a[OVS_VPORT_ATTR_TYPE] && in ovs_vport_cmd_set()
2159 nla_get_u32(a[OVS_VPORT_ATTR_TYPE]) != vport->ops->type) { in ovs_vport_cmd_set()
2164 if (a[OVS_VPORT_ATTR_OPTIONS]) { in ovs_vport_cmd_set()
2165 err = ovs_vport_set_options(vport, a[OVS_VPORT_ATTR_OPTIONS]); in ovs_vport_cmd_set()
2171 if (a[OVS_VPORT_ATTR_UPCALL_PID]) { in ovs_vport_cmd_set()
2172 struct nlattr *ids = a[OVS_VPORT_ATTR_UPCALL_PID]; in ovs_vport_cmd_set()
2197 struct nlattr **a = info->attrs; in ovs_vport_cmd_del() local
2209 vport = lookup_vport(sock_net(skb->sk), info->userhdr, a); in ovs_vport_cmd_del()
2251 struct nlattr **a = info->attrs; in ovs_vport_cmd_get() local
2262 vport = lookup_vport(sock_net(skb->sk), ovs_header, a); in ovs_vport_cmd_get()