FreeBSD kernel IPv4 code
|
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/mbuf.h>
#include <sys/sockopt.h>
#include <netinet/tcp.h>
#include <netinet/tcp_var.h>
#include <netinet/tcp_seq.h>
#include "sack_filter.h"
Go to the source code of this file.
Macros | |
#define | sack_blk_used(sf, i) ((1 << i) & sf->sf_bits) |
#define | sack_blk_set(sf, i) ((1 << i) | sf->sf_bits) |
#define | sack_blk_clr(sf, i) (~(1 << i) & sf->sf_bits) |
Functions | |
__FBSDID ("$FreeBSD$") | |
void | sack_filter_clear (struct sack_filter *sf, tcp_seq seq) |
static void | sack_filter_prune (struct sack_filter *sf, tcp_seq th_ack) |
static int32_t | is_sack_on_board (struct sack_filter *sf, struct sackblk *b) |
static int32_t | sack_filter_old (struct sack_filter *sf, struct sackblk *in, int numblks) |
static void | sack_move_to_empty (struct sack_filter *sf, uint32_t idx) |
static int32_t | sack_filter_new (struct sack_filter *sf, struct sackblk *in, int numblks, tcp_seq th_ack) |
static int32_t | sack_blocks_overlap_or_meet (struct sack_filter *sf, struct sackblk *sb, uint32_t skip) |
static void | sack_collapse (struct sack_filter *sf, int32_t src, int32_t into) |
static void | sack_board_collapse (struct sack_filter *sf) |
int | sack_filter_blks (struct sack_filter *sf, struct sackblk *in, int numblks, tcp_seq th_ack) |
void | sack_filter_reject (struct sack_filter *sf, struct sackblk *in) |
#define sack_blk_clr | ( | sf, | |
i | |||
) | (~(1 << i) & sf->sf_bits) |
Definition at line 95 of file sack_filter.c.
#define sack_blk_set | ( | sf, | |
i | |||
) | ((1 << i) | sf->sf_bits) |
Definition at line 94 of file sack_filter.c.
#define sack_blk_used | ( | sf, | |
i | |||
) | ((1 << i) & sf->sf_bits) |
Definition at line 93 of file sack_filter.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Our board has this entirely in whole or in part:
board |----------—| sack |----------—| <or> board |----------—| sack |-—|
Not near each other:
board |—| sack |—|
Not near each other:
board |—| sack |—|
The board block partial meets:
board |-----—| sack |-------—| <or> board |-----—| sack |-----------—|
up with this one (we have part of it). 1) Update the board block to the new end and 2) Update the start of this block to my end.
The board block partial meets:
board |-----—| sack |-------—| <or> board |-—| sack |-------—| 1) Update the board block to the new start and 2) Update the start of this block to my end.
Definition at line 145 of file sack_filter.c.
References sackblk::end, sack_blk_used, SACK_FILTER_BLOCKS, SEQ_GEQ, SEQ_GT, SEQ_LEQ, SEQ_LT, sack_filter::sf_ack, sack_filter::sf_blks, sack_filter::sf_cur, and sackblk::start.
Referenced by sack_filter_new(), and sack_filter_old().
|
static |
The two board blocks meet:
board1 |-----—| board2 |-------—| <or> board1 |-----—| board2 |-----------—| <or> board1 |-----—| board2 |-----—|
The board block partial meets:
board |-----—| sack |-------—| <or> board |-—| sack |-------—| 1) Update the board block to the new start and 2) Update the start of this block to my end.
Definition at line 370 of file sack_filter.c.
References sackblk::end, sack_blk_used, SACK_FILTER_BLOCKS, SEQ_GEQ, SEQ_LEQ, sack_filter::sf_blks, and sackblk::start.
Referenced by sack_board_collapse().
|
static |
Definition at line 437 of file sack_filter.c.
References sack_blk_used, sack_blocks_overlap_or_meet(), sack_collapse(), SACK_FILTER_BLOCKS, sack_filter::sf_blks, and sack_filter::sf_cur.
Referenced by sack_filter_blks().
|
static |
Definition at line 422 of file sack_filter.c.
References sackblk::end, sack_blk_clr, SEQ_GT, SEQ_LT, sack_filter::sf_bits, sack_filter::sf_blks, sack_filter::sf_used, and sackblk::start.
Referenced by sack_board_collapse().
int sack_filter_blks | ( | struct sack_filter * | sf, |
struct sackblk * | in, | ||
int | numblks, | ||
tcp_seq | th_ack | ||
) |
Definition at line 499 of file sack_filter.c.
References sack_blk_set, sack_board_collapse(), SACK_FILTER_BLOCKS, sack_filter_new(), sack_filter_old(), sack_filter_prune(), SEQ_GEQ, SEQ_GT, sack_filter::sf_ack, sack_filter::sf_bits, sack_filter::sf_blks, sack_filter::sf_cur, and sack_filter::sf_used.
Referenced by bbr_log_ack(), and rack_log_ack().
void sack_filter_clear | ( | struct sack_filter * | sf, |
tcp_seq | seq | ||
) |
Definition at line 101 of file sack_filter.c.
References sack_filter::sf_ack, sack_filter::sf_bits, sack_filter::sf_cur, and sack_filter::sf_used.
Referenced by bbr_do_segment_nounlock(), bbr_fastack(), bbr_mtu_chg(), bbr_peer_reneges(), bbr_process_ack(), bbr_timeout_rxt(), rack_do_compressed_ack_processing(), rack_do_fastnewdata(), rack_do_segment_nounlock(), rack_mtu_change(), rack_peer_reneges(), rack_process_ack(), and rack_timeout_rxt().
|
static |
Definition at line 305 of file sack_filter.c.
References is_sack_on_board(), sack_blk_set, sack_blk_used, SACK_FILTER_BLOCKS, sack_move_to_empty(), sack_filter::sf_bits, sack_filter::sf_blks, sack_filter::sf_cur, and sack_filter::sf_used.
Referenced by sack_filter_blks().
|
static |
Definition at line 247 of file sack_filter.c.
References is_sack_on_board().
Referenced by sack_filter_blks().
|
static |
Definition at line 114 of file sack_filter.c.
References sackblk::end, sack_blk_clr, sack_blk_used, SACK_FILTER_BLOCKS, SEQ_GT, sack_filter::sf_ack, sack_filter::sf_bits, sack_filter::sf_blks, sack_filter::sf_used, and sackblk::start.
Referenced by sack_filter_blks().
void sack_filter_reject | ( | struct sack_filter * | sf, |
struct sackblk * | in | ||
) |
Definition at line 561 of file sack_filter.c.
References sackblk::end, sack_blk_clr, sack_blk_used, SACK_FILTER_BLOCKS, SEQ_GT, SEQ_LT, sack_filter::sf_bits, sack_filter::sf_blks, sack_filter::sf_used, and sackblk::start.
Referenced by bbr_proc_sack_blk().
|
static |
Definition at line 287 of file sack_filter.c.
References sack_blk_clr, sack_blk_set, sack_blk_used, SACK_FILTER_BLOCKS, sack_filter::sf_bits, and sack_filter::sf_blks.
Referenced by sack_filter_new().