FreeBSD kernel CXGBE device code
|
#include <sys/cdefs.h>
#include "osdep.h"
#include "cudbg.h"
#include "cudbg_lib_common.h"
#include "fastlz.h"
Go to the source code of this file.
Macros | |
#define | CUDBG_BLOCK_SIZE (63*1024) |
#define | CUDBG_CHUNK_BUF_LEN 16 |
#define | CUDBG_MIN_COMPR_LEN 32 /*min data length for applying compression*/ |
#define | ADLER32_BASE 65521 |
Functions | |
__FBSDID ("$FreeBSD$") | |
static unsigned long | update_adler32 (unsigned long checksum, const void *buf, int len) |
int | write_magic (struct cudbg_buffer *_out_buff) |
int | write_to_buf (void *out_buf, u32 out_buf_size, u32 *offset, void *in_buf, u32 in_buf_size) |
int | read_from_buf (void *in_buf, u32 in_buf_size, u32 *offset, void *out_buf, u32 out_buf_size) |
int | write_chunk_header (struct cudbg_buffer *_outbuf, int id, int options, unsigned long size, unsigned long checksum, unsigned long extra) |
int | write_compression_hdr (struct cudbg_buffer *pin_buff, struct cudbg_buffer *pout_buff) |
int | compress_buff (struct cudbg_buffer *pin_buff, struct cudbg_buffer *pout_buff) |
int | detect_magic (struct cudbg_buffer *_c_buff) |
static unsigned long | readU16 (const unsigned char *ptr) |
static unsigned long | readU32 (const unsigned char *ptr) |
int | read_chunk_header (struct cudbg_buffer *pc_buff, int *pid, int *poptions, unsigned long *psize, unsigned long *pchecksum, unsigned long *pextra) |
int | validate_buffer (struct cudbg_buffer *compressed_buffer) |
int | decompress_buffer (struct cudbg_buffer *pc_buff, struct cudbg_buffer *pd_buff) |
Variables | |
static unsigned char | sixpack_magic [8] = {137, '6', 'P', 'K', 13, 10, 26, 10} |
#define ADLER32_BASE 65521 |
Definition at line 42 of file fastlz_api.c.
#define CUDBG_BLOCK_SIZE (63*1024) |
Definition at line 36 of file fastlz_api.c.
#define CUDBG_CHUNK_BUF_LEN 16 |
Definition at line 37 of file fastlz_api.c.
#define CUDBG_MIN_COMPR_LEN 32 /*min data length for applying compression*/ |
Definition at line 38 of file fastlz_api.c.
__FBSDID | ( | "$FreeBSD$" | ) |
int compress_buff | ( | struct cudbg_buffer * | pin_buff, |
struct cudbg_buffer * | pout_buff | ||
) |
Definition at line 209 of file fastlz_api.c.
References CUDBG_BLOCK_SIZE, cudbg_buffer::data, fastlz_compress_level(), get_scratch_buff(), cudbg_buffer::offset, release_scratch_buff(), cudbg_hdr::reserved, cudbg_buffer::size, update_adler32(), write_chunk_header(), and write_to_buf().
Referenced by collect_cctrl(), collect_cim_la(), collect_cim_ma_la(), collect_cim_pif_la(), collect_cim_qcfg(), collect_clk_info(), collect_cpl_stats(), collect_ddp_stats(), collect_dump_context(), collect_fcoe_stats(), collect_full(), collect_fw_devlog(), collect_hma_indirect(), collect_hw_sched(), collect_lb_stats(), collect_ma_indirect(), collect_macstats(), collect_mbox_log(), collect_meminfo(), collect_mps_tcam(), collect_path_mtu(), collect_pbt_tables(), collect_pcie_config(), collect_pcie_indirect(), collect_pm_indirect(), collect_pm_stats(), collect_rdma_stats(), collect_reg_dump(), collect_rss(), collect_rss_config(), collect_rss_key(), collect_rss_pf_config(), collect_rss_vf_config(), collect_sge_indirect(), collect_sw_state(), collect_tcp_stats(), collect_tid(), collect_tp_err_stats(), collect_tp_indirect(), collect_tp_la(), collect_tx_rate(), collect_ulprx_la(), collect_ulptx_la(), collect_up_cim_indirect(), collect_vpd_data(), collect_wc_stats(), read_cim_ibq(), read_cim_obq(), read_fw_mem(), t5_wtp_data(), and t6_wtp_data().
int decompress_buffer | ( | struct cudbg_buffer * | pc_buff, |
struct cudbg_buffer * | pd_buff | ||
) |
Definition at line 340 of file fastlz_api.c.
References CUDBG_BLOCK_SIZE, CUDBG_MIN_COMPR_LEN, CUDBG_STATUS_CHKSUM_MISSMATCH, CUDBG_STATUS_DECOMPRESS_FAIL, CUDBG_STATUS_SMALL_BUFF, cudbg_buffer::data, fastlz_decompress(), get_scratch_buff(), cudbg_buffer::offset, r, read_chunk_header(), read_from_buf(), readU32(), release_scratch_buff(), cudbg_buffer::size, update_adler32(), and write_to_buf().
int detect_magic | ( | struct cudbg_buffer * | _c_buff | ) |
Definition at line 285 of file fastlz_api.c.
References cudbg_buffer::data, cudbg_buffer::offset, read_from_buf(), sixpack_magic, and cudbg_buffer::size.
Referenced by validate_buffer().
int read_chunk_header | ( | struct cudbg_buffer * | pc_buff, |
int * | pid, | ||
int * | poptions, | ||
unsigned long * | psize, | ||
unsigned long * | pchecksum, | ||
unsigned long * | pextra | ||
) |
Definition at line 314 of file fastlz_api.c.
References CUDBG_CHUNK_BUF_LEN, cudbg_buffer::data, cudbg_buffer::offset, read_from_buf(), readU16(), readU32(), and cudbg_buffer::size.
Referenced by decompress_buffer().
int read_from_buf | ( | void * | in_buf, |
u32 | in_buf_size, | ||
u32 * | offset, | ||
void * | out_buf, | ||
u32 | out_buf_size | ||
) |
Definition at line 103 of file fastlz_api.c.
Referenced by decompress_buffer(), detect_magic(), and read_chunk_header().
|
inlinestatic |
Definition at line 304 of file fastlz_api.c.
Referenced by read_chunk_header().
|
inlinestatic |
Definition at line 309 of file fastlz_api.c.
Referenced by decompress_buffer(), and read_chunk_header().
|
inlinestatic |
Definition at line 44 of file fastlz_api.c.
References ADLER32_BASE.
Referenced by compress_buff(), decompress_buffer(), and write_compression_hdr().
int validate_buffer | ( | struct cudbg_buffer * | compressed_buffer | ) |
Definition at line 332 of file fastlz_api.c.
References CUDBG_STATUS_INVALID_BUFF, and detect_magic().
int write_chunk_header | ( | struct cudbg_buffer * | _outbuf, |
int | id, | ||
int | options, | ||
unsigned long | size, | ||
unsigned long | checksum, | ||
unsigned long | extra | ||
) |
Definition at line 114 of file fastlz_api.c.
References CUDBG_CHUNK_BUF_LEN, cudbg_buffer::data, cudbg_buffer::offset, cudbg_buffer::size, and write_to_buf().
Referenced by compress_buff(), and write_compression_hdr().
int write_compression_hdr | ( | struct cudbg_buffer * | pin_buff, |
struct cudbg_buffer * | pout_buff | ||
) |
Definition at line 144 of file fastlz_api.c.
References cudbg_buffer::data, get_scratch_buff(), cudbg_buffer::offset, release_scratch_buff(), cudbg_buffer::size, update_adler32(), write_chunk_header(), write_magic(), and write_to_buf().
Referenced by collect_cctrl(), collect_cim_la(), collect_cim_ma_la(), collect_cim_pif_la(), collect_cim_qcfg(), collect_clk_info(), collect_cpl_stats(), collect_ddp_stats(), collect_dump_context(), collect_fcoe_stats(), collect_full(), collect_fw_devlog(), collect_hma_indirect(), collect_hw_sched(), collect_lb_stats(), collect_ma_indirect(), collect_macstats(), collect_mbox_log(), collect_meminfo(), collect_mps_tcam(), collect_path_mtu(), collect_pbt_tables(), collect_pcie_config(), collect_pcie_indirect(), collect_pm_indirect(), collect_pm_stats(), collect_rdma_stats(), collect_reg_dump(), collect_rss(), collect_rss_config(), collect_rss_key(), collect_rss_pf_config(), collect_rss_vf_config(), collect_sge_indirect(), collect_sw_state(), collect_tcp_stats(), collect_tid(), collect_tp_err_stats(), collect_tp_indirect(), collect_tp_la(), collect_tx_rate(), collect_ulprx_la(), collect_ulptx_la(), collect_up_cim_indirect(), collect_vpd_data(), collect_wc_stats(), read_cim_ibq(), read_cim_obq(), read_fw_mem(), t5_wtp_data(), and t6_wtp_data().
int write_magic | ( | struct cudbg_buffer * | _out_buff | ) |
Definition at line 76 of file fastlz_api.c.
References cudbg_buffer::data, cudbg_buffer::offset, sixpack_magic, cudbg_buffer::size, and write_to_buf().
Referenced by write_compression_hdr().
Definition at line 86 of file fastlz_api.c.
References CUDBG_STATUS_OUTBUFF_OVERFLOW.
Referenced by compress_buff(), decompress_buffer(), write_chunk_header(), write_compression_hdr(), and write_magic().
|
static |
Definition at line 34 of file fastlz_api.c.
Referenced by detect_magic(), and write_magic().