Lines Matching refs:nla

87 tunnel_key_copy_geneve_opt(const struct nlattr *nla, void *dst, int dst_len,  in tunnel_key_copy_geneve_opt()  argument
96 nla, geneve_opt_policy, extack); in tunnel_key_copy_geneve_opt()
139 tunnel_key_copy_vxlan_opt(const struct nlattr *nla, void *dst, int dst_len, in tunnel_key_copy_vxlan_opt() argument
145 err = nla_parse_nested(tb, TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX, nla, in tunnel_key_copy_vxlan_opt()
166 tunnel_key_copy_erspan_opt(const struct nlattr *nla, void *dst, int dst_len, in tunnel_key_copy_erspan_opt() argument
173 err = nla_parse_nested(tb, TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX, nla, in tunnel_key_copy_erspan_opt()
205 nla = tb[TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_INDEX]; in tunnel_key_copy_erspan_opt()
206 md->u.index = nla_get_be32(nla); in tunnel_key_copy_erspan_opt()
208 nla = tb[TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_DIR]; in tunnel_key_copy_erspan_opt()
209 md->u.md2.dir = nla_get_u8(nla); in tunnel_key_copy_erspan_opt()
210 nla = tb[TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_HWID]; in tunnel_key_copy_erspan_opt()
211 set_hwid(&md->u.md2, nla_get_u8(nla)); in tunnel_key_copy_erspan_opt()
218 static int tunnel_key_copy_opts(const struct nlattr *nla, u8 *dst, in tunnel_key_copy_opts() argument
221 int err, rem, opt_len, len = nla_len(nla), opts_len = 0, type = 0; in tunnel_key_copy_opts()
222 const struct nlattr *attr, *head = nla_data(nla); in tunnel_key_copy_opts()
291 static int tunnel_key_get_opts_len(struct nlattr *nla, in tunnel_key_get_opts_len() argument
294 return tunnel_key_copy_opts(nla, NULL, 0, extack); in tunnel_key_get_opts_len()
297 static int tunnel_key_opts_set(struct nlattr *nla, struct ip_tunnel_info *info, in tunnel_key_opts_set() argument
301 switch (nla_type(nla_data(nla))) { in tunnel_key_opts_set()
305 return tunnel_key_copy_opts(nla, ip_tunnel_info_opts(info), in tunnel_key_opts_set()
313 return tunnel_key_copy_opts(nla, ip_tunnel_info_opts(info), in tunnel_key_opts_set()
321 return tunnel_key_copy_opts(nla, ip_tunnel_info_opts(info), in tunnel_key_opts_set()
356 static int tunnel_key_init(struct net *net, struct nlattr *nla, in tunnel_key_init() argument
379 if (!nla) { in tunnel_key_init()
384 err = nla_parse_nested_deprecated(tb, TCA_TUNNEL_KEY_MAX, nla, in tunnel_key_init()