Lines Matching refs:opt_len
586 int err, rem, opt_len, opts_len = 0; in ip_tun_parse_opts() local
603 opt_len = ip_tun_parse_opts_geneve(nla, info, opts_len, in ip_tun_parse_opts()
605 if (opt_len < 0) in ip_tun_parse_opts()
606 return opt_len; in ip_tun_parse_opts()
607 opts_len += opt_len; in ip_tun_parse_opts()
615 opt_len = ip_tun_parse_opts_vxlan(nla, info, opts_len, in ip_tun_parse_opts()
617 if (opt_len < 0) in ip_tun_parse_opts()
618 return opt_len; in ip_tun_parse_opts()
619 opts_len += opt_len; in ip_tun_parse_opts()
625 opt_len = ip_tun_parse_opts_erspan(nla, info, opts_len, in ip_tun_parse_opts()
627 if (opt_len < 0) in ip_tun_parse_opts()
628 return opt_len; in ip_tun_parse_opts()
629 opts_len += opt_len; in ip_tun_parse_opts()
660 int err, opt_len; in ip_tun_build_state() local
667 opt_len = ip_tun_get_optlen(tb[LWTUNNEL_IP_OPTS], extack); in ip_tun_build_state()
668 if (opt_len < 0) in ip_tun_build_state()
669 return opt_len; in ip_tun_build_state()
671 new_state = lwtunnel_state_alloc(sizeof(*tun_info) + opt_len); in ip_tun_build_state()
714 tun_info->options_len = opt_len; in ip_tun_build_state()
858 int opt_len; in ip_tun_opts_nlsize() local
863 opt_len = nla_total_size(0); /* LWTUNNEL_IP_OPTS */ in ip_tun_opts_nlsize()
868 opt_len += nla_total_size(0); /* LWTUNNEL_IP_OPTS_GENEVE */ in ip_tun_opts_nlsize()
871 opt_len += nla_total_size(2) /* OPT_GENEVE_CLASS */ in ip_tun_opts_nlsize()
878 opt_len += nla_total_size(0) /* LWTUNNEL_IP_OPTS_VXLAN */ in ip_tun_opts_nlsize()
883 opt_len += nla_total_size(0) /* LWTUNNEL_IP_OPTS_ERSPAN */ in ip_tun_opts_nlsize()
892 return opt_len; in ip_tun_opts_nlsize()
947 int err, opt_len; in ip6_tun_build_state() local
954 opt_len = ip_tun_get_optlen(tb[LWTUNNEL_IP6_OPTS], extack); in ip6_tun_build_state()
955 if (opt_len < 0) in ip6_tun_build_state()
956 return opt_len; in ip6_tun_build_state()
958 new_state = lwtunnel_state_alloc(sizeof(*tun_info) + opt_len); in ip6_tun_build_state()
993 tun_info->options_len = opt_len; in ip6_tun_build_state()