Lines Matching refs:nla
88 tunnel_key_copy_geneve_opt(const struct nlattr *nla, void *dst, int dst_len, in tunnel_key_copy_geneve_opt() argument
97 nla, geneve_opt_policy, extack); in tunnel_key_copy_geneve_opt()
140 tunnel_key_copy_vxlan_opt(const struct nlattr *nla, void *dst, int dst_len, in tunnel_key_copy_vxlan_opt() argument
146 err = nla_parse_nested(tb, TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX, nla, in tunnel_key_copy_vxlan_opt()
167 tunnel_key_copy_erspan_opt(const struct nlattr *nla, void *dst, int dst_len, in tunnel_key_copy_erspan_opt() argument
174 err = nla_parse_nested(tb, TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX, nla, in tunnel_key_copy_erspan_opt()
206 nla = tb[TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_INDEX]; in tunnel_key_copy_erspan_opt()
207 md->u.index = nla_get_be32(nla); in tunnel_key_copy_erspan_opt()
209 nla = tb[TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_DIR]; in tunnel_key_copy_erspan_opt()
210 md->u.md2.dir = nla_get_u8(nla); in tunnel_key_copy_erspan_opt()
211 nla = tb[TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_HWID]; in tunnel_key_copy_erspan_opt()
212 set_hwid(&md->u.md2, nla_get_u8(nla)); in tunnel_key_copy_erspan_opt()
219 static int tunnel_key_copy_opts(const struct nlattr *nla, u8 *dst, in tunnel_key_copy_opts() argument
222 int err, rem, opt_len, len = nla_len(nla), opts_len = 0, type = 0; in tunnel_key_copy_opts()
223 const struct nlattr *attr, *head = nla_data(nla); in tunnel_key_copy_opts()
292 static int tunnel_key_get_opts_len(struct nlattr *nla, in tunnel_key_get_opts_len() argument
295 return tunnel_key_copy_opts(nla, NULL, 0, extack); in tunnel_key_get_opts_len()
298 static int tunnel_key_opts_set(struct nlattr *nla, struct ip_tunnel_info *info, in tunnel_key_opts_set() argument
302 switch (nla_type(nla_data(nla))) { in tunnel_key_opts_set()
306 return tunnel_key_copy_opts(nla, ip_tunnel_info_opts(info), in tunnel_key_opts_set()
314 return tunnel_key_copy_opts(nla, ip_tunnel_info_opts(info), in tunnel_key_opts_set()
322 return tunnel_key_copy_opts(nla, ip_tunnel_info_opts(info), in tunnel_key_opts_set()
357 static int tunnel_key_init(struct net *net, struct nlattr *nla, in tunnel_key_init() argument
380 if (!nla) { in tunnel_key_init()
385 err = nla_parse_nested_deprecated(tb, TCA_TUNNEL_KEY_MAX, nla, in tunnel_key_init()