Lines Matching refs:opts
445 static void mptcp_options_write(__be32 *ptr, struct tcp_out_options *opts) in mptcp_options_write() argument
448 if (unlikely(OPTION_MPTCP & opts->options)) in mptcp_options_write()
449 mptcp_write_options(ptr, &opts->mptcp); in mptcp_options_write()
471 struct tcp_out_options *opts, in bpf_skops_hdr_opt_len() argument
523 opts->bpf_opt_len = *remaining - sock_ops.remaining_opt_len; in bpf_skops_hdr_opt_len()
525 opts->bpf_opt_len = (opts->bpf_opt_len + 3) & ~3; in bpf_skops_hdr_opt_len()
527 *remaining -= opts->bpf_opt_len; in bpf_skops_hdr_opt_len()
534 struct tcp_out_options *opts) in bpf_skops_write_hdr_opt() argument
536 u8 first_opt_off, nr_written, max_opt_len = opts->bpf_opt_len; in bpf_skops_write_hdr_opt()
578 struct tcp_out_options *opts, in bpf_skops_hdr_opt_len() argument
587 struct tcp_out_options *opts) in bpf_skops_write_hdr_opt() argument
606 struct tcp_out_options *opts) in tcp_options_write() argument
608 u16 options = opts->options; /* mungable copy */ in tcp_options_write()
614 opts->hash_location = (__u8 *)ptr; in tcp_options_write()
618 if (unlikely(opts->mss)) { in tcp_options_write()
621 opts->mss); in tcp_options_write()
637 *ptr++ = htonl(opts->tsval); in tcp_options_write()
638 *ptr++ = htonl(opts->tsecr); in tcp_options_write()
652 opts->ws); in tcp_options_write()
655 if (unlikely(opts->num_sack_blocks)) { in tcp_options_write()
663 (TCPOLEN_SACK_BASE + (opts->num_sack_blocks * in tcp_options_write()
666 for (this_sack = 0; this_sack < opts->num_sack_blocks; in tcp_options_write()
676 struct tcp_fastopen_cookie *foc = opts->fastopen_cookie; in tcp_options_write()
701 mptcp_options_write(ptr, opts); in tcp_options_write()
705 struct tcp_out_options *opts, in smc_set_option() argument
712 opts->options |= OPTION_SMC; in smc_set_option()
722 struct tcp_out_options *opts, in smc_set_option_cond() argument
729 opts->options |= OPTION_SMC; in smc_set_option_cond()
738 struct tcp_out_options *opts, in mptcp_set_option_cond() argument
744 if (mptcp_synack_options(req, &size, &opts->mptcp)) { in mptcp_set_option_cond()
746 opts->options |= OPTION_MPTCP; in mptcp_set_option_cond()
757 struct tcp_out_options *opts, in tcp_syn_options() argument
770 opts->options |= OPTION_MD5; in tcp_syn_options()
785 opts->mss = tcp_advertise_mss(sk); in tcp_syn_options()
789 opts->options |= OPTION_TS; in tcp_syn_options()
790 opts->tsval = tcp_skb_timestamp(skb) + tp->tsoffset; in tcp_syn_options()
791 opts->tsecr = tp->rx_opt.ts_recent; in tcp_syn_options()
795 opts->ws = tp->rx_opt.rcv_wscale; in tcp_syn_options()
796 opts->options |= OPTION_WSCALE; in tcp_syn_options()
800 opts->options |= OPTION_SACK_ADVERTISE; in tcp_syn_options()
801 if (unlikely(!(OPTION_TS & opts->options))) in tcp_syn_options()
812 opts->options |= OPTION_FAST_OPEN_COOKIE; in tcp_syn_options()
813 opts->fastopen_cookie = &fastopen->cookie; in tcp_syn_options()
820 smc_set_option(tp, opts, &remaining); in tcp_syn_options()
825 if (mptcp_syn_options(sk, skb, &size, &opts->mptcp)) { in tcp_syn_options()
826 opts->options |= OPTION_MPTCP; in tcp_syn_options()
831 bpf_skops_hdr_opt_len(sk, skb, NULL, NULL, 0, opts, &remaining); in tcp_syn_options()
840 struct tcp_out_options *opts, in tcp_synack_options() argument
851 opts->options |= OPTION_MD5; in tcp_synack_options()
865 opts->mss = mss; in tcp_synack_options()
869 opts->ws = ireq->rcv_wscale; in tcp_synack_options()
870 opts->options |= OPTION_WSCALE; in tcp_synack_options()
874 opts->options |= OPTION_TS; in tcp_synack_options()
875 opts->tsval = tcp_skb_timestamp(skb) + tcp_rsk(req)->ts_off; in tcp_synack_options()
876 opts->tsecr = READ_ONCE(req->ts_recent); in tcp_synack_options()
880 opts->options |= OPTION_SACK_ADVERTISE; in tcp_synack_options()
891 opts->options |= OPTION_FAST_OPEN_COOKIE; in tcp_synack_options()
892 opts->fastopen_cookie = foc; in tcp_synack_options()
897 mptcp_set_option_cond(req, opts, &remaining); in tcp_synack_options()
899 smc_set_option_cond(tcp_sk(sk), ireq, opts, &remaining); in tcp_synack_options()
902 synack_type, opts, &remaining); in tcp_synack_options()
911 struct tcp_out_options *opts, in tcp_established_options() argument
918 opts->options = 0; in tcp_established_options()
926 opts->options |= OPTION_MD5; in tcp_established_options()
933 opts->options |= OPTION_TS; in tcp_established_options()
934 opts->tsval = skb ? tcp_skb_timestamp(skb) + tp->tsoffset : 0; in tcp_established_options()
935 opts->tsecr = tp->rx_opt.ts_recent; in tcp_established_options()
950 &opts->mptcp)) { in tcp_established_options()
951 opts->options |= OPTION_MPTCP; in tcp_established_options()
963 opts->num_sack_blocks = in tcp_established_options()
969 opts->num_sack_blocks * TCPOLEN_SACK_PERBLOCK; in tcp_established_options()
976 bpf_skops_hdr_opt_len(sk, skb, NULL, NULL, 0, opts, &remaining); in tcp_established_options()
1243 struct tcp_out_options opts; in __tcp_transmit_skb() local
1278 memset(&opts, 0, sizeof(opts)); in __tcp_transmit_skb()
1281 tcp_options_size = tcp_syn_options(sk, skb, &opts, &md5); in __tcp_transmit_skb()
1283 tcp_options_size = tcp_established_options(sk, skb, &opts, in __tcp_transmit_skb()
1348 tcp_options_write((__be32 *)(th + 1), tp, &opts); in __tcp_transmit_skb()
1363 tp->af_specific->calc_md5_hash(opts.hash_location, in __tcp_transmit_skb()
1369 bpf_skops_write_hdr_opt(sk, skb, NULL, NULL, 0, &opts); in __tcp_transmit_skb()
1826 struct tcp_out_options opts; in tcp_current_mss() local
1837 header_len = tcp_established_options(sk, NULL, &opts, &md5) + in tcp_current_mss()
3550 struct tcp_out_options opts; in tcp_make_synack() local
3586 memset(&opts, 0, sizeof(opts)); in tcp_make_synack()
3606 tcp_header_size = tcp_synack_options(sk, req, mss, skb, &opts, md5, in tcp_make_synack()
3628 tcp_options_write((__be32 *)(th + 1), NULL, &opts); in tcp_make_synack()
3635 tcp_rsk(req)->af_specific->calc_md5_hash(opts.hash_location, in tcp_make_synack()
3641 synack_type, &opts); in tcp_make_synack()