29 #include "tcp_common.h" 34 struct network_buf_handle *nbh, uint32_t ts);
36 struct network_buf_handle *nbh);
43 struct network_buf_handle *nbh, uint32_t ts);
46 struct network_buf_handle *nbh, uint32_t ts);
57 struct network_buf_handle *nbh, uint32_t ts);
61 struct network_buf_handle *nbh,
void *fs,
struct tcp_opts *opts,
64 struct network_buf_handle **nbhs,
void **fss, uint16_t n);
66 struct network_buf_handle **nbhs,
void **fss,
struct tcp_opts *tos,
69 void **fss, uint16_t n);
70 void fast_flows_kernelxsums(
struct network_buf_handle *nbh,
74 uint16_t bump_seq, uint32_t rx_tail, uint32_t tx_head, uint8_t flags,
75 struct network_buf_handle *nbh, uint32_t ts);
82 struct network_buf_handle *nbh, uint16_t off, uint16_t len)
84 uint32_t i = ctx->tx_num;
86 if (i >= TXBUF_SIZE) {
87 fprintf(stderr,
"tx_send: transmit buffer full, unexpected\n");
91 network_buf_setoff(nbh, off);
92 network_buf_setlen(nbh, len);
93 ctx->tx_handles[i] = nbh;
97 static inline uint16_t tx_xsum_enable(
struct network_buf_handle *nbh,
100 return network_buf_tcpxsums(nbh,
sizeof(
struct eth_hdr),
sizeof(*iph), iph,
101 ip_s, ip_d, IP_PROTO_TCP, l3_paylen);
105 uint64_t opaque, uint32_t rx_bump, uint32_t rx_pos, uint32_t tx_bump,
108 uint16_t
id = ctx->arx_num++;
110 ctx->arx_ctx[id] = ctx_id;
111 ctx->arx_cache[id].type = type_flags & 0xff;
112 ctx->arx_cache[id].msg.connupdate.opaque = opaque;
113 ctx->arx_cache[id].msg.connupdate.rx_bump = rx_bump;
114 ctx->arx_cache[id].msg.connupdate.rx_pos = rx_pos;
115 ctx->arx_cache[id].msg.connupdate.tx_bump = tx_bump;
116 ctx->arx_cache[id].msg.connupdate.flags = type_flags >> 8;