TAS
TCP Acceleration as an OS Service
tas
include
tas.h
1
/*
2
* Copyright 2019 University of Washington, Max Planck Institute for
3
* Software Systems, and The University of Texas at Austin
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining
6
* a copy of this software and associated documentation files (the
7
* "Software"), to deal in the Software without restriction, including
8
* without limitation the rights to use, copy, modify, merge, publish,
9
* distribute, sublicense, and/or sell copies of the Software, and to
10
* permit persons to whom the Software is furnished to do so, subject to
11
* the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be
14
* included in all copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
*/
24
25
#ifndef TAS_H_
26
#define TAS_H_
27
28
#include <tas_memif.h>
29
#include <config.h>
30
#include <packet_defs.h>
31
36
extern
struct
configuration
config;
37
38
extern
void
*tas_shm;
39
extern
struct
flextcp_pl_mem
*fp_state;
40
extern
struct
flexnic_info
*tas_info;
41
#if RTE_VER_YEAR < 19
42
extern
struct
ether_addr
eth_addr
;
43
#else
44
extern
struct
rte_ether_addr
eth_addr
;
45
#endif
46
extern
unsigned
fp_cores_max;
47
48
49
int
slowpath_main(
void
);
50
51
int
shm_preinit(
void
);
52
int
shm_init(
unsigned
num);
53
void
shm_cleanup(
void
);
54
void
shm_set_ready(
void
);
55
56
int
network_init(
unsigned
num_threads);
57
void
network_cleanup(
void
);
58
59
/* used by trace and shm */
60
void
*util_create_shmsiszed(
const
char
*name,
size_t
size,
void
*addr);
61
62
struct
notify_blockstate
{
63
uint64_t last_active_ts;
64
int
can_block;
65
int
second_bar;
66
};
67
68
void
notify_fastpath_core(
unsigned
core);
69
void
notify_appctx(
struct
flextcp_pl_appctx
*ctx, uint64_t tsc);
70
void
notify_app_core(
int
appfd, uint64_t *last_tsc);
71
void
notify_slowpath_core(
void
);
72
int
notify_canblock(
struct
notify_blockstate
*nbs,
int
had_data, uint64_t tsc);
73
void
notify_canblock_reset(
struct
notify_blockstate
*nbs);
74
75
/* should become config options */
76
#define FLEXNIC_INTERNAL_MEM_SIZE (1024 * 1024 * 32)
77
#define FLEXNIC_NUM_QMQUEUES (128 * 1024)
78
79
#endif
/* ndef TAS_H_ */
flexnic_info
Definition:
tas_memif.h:56
flextcp_pl_appctx
Definition:
tas_memif.h:203
flextcp_pl_mem
Definition:
tas_memif.h:333
notify_blockstate
Definition:
tas.h:62
configuration
Definition:
config.h:43
eth_addr
Definition:
packet_defs.h:40
Generated by
1.8.13