|
TAS
TCP Acceleration as an OS Service
|
NIC Interface. More...
|
Data Structures | |
| struct | nicif_connection_stats |
Enumerations | |
| enum | nicif_connection_flags { NICIF_CONN_ECN = (1 << 2) } |
Functions | |
| int | nicif_init (void) |
| unsigned | nicif_poll (void) |
| int | nicif_appctx_add (uint16_t appid, uint32_t db, uint64_t *rxq_base, uint32_t rxq_len, uint64_t *txq_base, uint32_t txq_len, int evfd) |
| int | nicif_connection_add (uint32_t db, uint64_t mac_remote, uint32_t ip_local, uint16_t port_local, uint32_t ip_remote, uint16_t port_remote, uint64_t rx_base, uint32_t rx_len, uint64_t tx_base, uint32_t tx_len, uint32_t remote_seq, uint32_t local_seq, uint64_t app_opaque, uint32_t flags, uint32_t rate, uint32_t fn_core, uint16_t flow_group, uint32_t *pf_id) |
| int | nicif_connection_disable (uint32_t f_id, uint32_t *tx_seq, uint32_t *rx_seq, int *tx_closed, int *rx_closed) |
| void | nicif_connection_free (uint32_t f_id) |
| int | nicif_connection_move (uint32_t dst_db, uint32_t f_id) |
| int | nicif_connection_stats (uint32_t f_id, struct nicif_connection_stats *p_stats) |
| int | nicif_connection_setrate (uint32_t f_id, uint32_t rate) |
| int | nicif_connection_retransmit (uint32_t f_id, uint16_t core) |
| int | nicif_tx_alloc (uint16_t len, void **buf, uint32_t *opaque) |
| void | nicif_tx_send (uint32_t opaque, int no_ts) |
NIC Interface.
Flags for connections (used in nicif_connection_add())
| Enumerator | |
|---|---|
| NICIF_CONN_ECN | Enable ECN for connection. |
Definition at line 112 of file internal.h.
| int nicif_appctx_add | ( | uint16_t | appid, |
| uint32_t | db, | ||
| uint64_t * | rxq_base, | ||
| uint32_t | rxq_len, | ||
| uint64_t * | txq_base, | ||
| uint32_t | txq_len, | ||
| int | evfd | ||
| ) |
Register application context (must be called from poll thread).
| appid | Application ID |
| db | Doorbell ID |
| rxq_base | Base addresses of context receive queue |
| rxq_len | Length of context receive queue |
| txq_base | Base addresses of context transmit queue |
| txq_len | Length of context transmit queue |
| evfd | Event FD used to ping app |
Register application context
Definition at line 130 of file nicif.c.
Referenced by appif_poll().
| int nicif_connection_add | ( | uint32_t | db, |
| uint64_t | mac_remote, | ||
| uint32_t | ip_local, | ||
| uint16_t | port_local, | ||
| uint32_t | ip_remote, | ||
| uint16_t | port_remote, | ||
| uint64_t | rx_base, | ||
| uint32_t | rx_len, | ||
| uint64_t | tx_base, | ||
| uint32_t | tx_len, | ||
| uint32_t | remote_seq, | ||
| uint32_t | local_seq, | ||
| uint64_t | app_opaque, | ||
| uint32_t | flags, | ||
| uint32_t | rate, | ||
| uint32_t | fn_core, | ||
| uint16_t | flow_group, | ||
| uint32_t * | pf_id | ||
| ) |
Register flow (must be called from poll thread).
| db | Doorbell ID |
| mac_remote | MAC address of the remote host |
| ip_local | Local IP address |
| port_local | Local port number |
| ip_remote | Remote IP address |
| port_remote | Remote port number |
| rx_base | Base address of circular receive buffer |
| rx_len | Length of circular receive buffer |
| tx_base | Base address of circular transmit buffer |
| tx_len | Length of circular transmit buffer |
| remote_seq | Next sequence number expected from remote host |
| local_seq | Next sequence number for transmission |
| app_opaque | Opaque value to pass in notificaitions |
| flags | See nicif_connection_flags. |
| rate | Congestion rate to set [Kbps] |
| fn_core | FlexNIC emulator core for the connection |
| flow_group | Flow group |
| pf_id | Pointer to location where flow id should be stored |
Register flow
Definition at line 175 of file nicif.c.
Referenced by tcp_timeout().
| int nicif_connection_disable | ( | uint32_t | f_id, |
| uint32_t * | tx_seq, | ||
| uint32_t * | rx_seq, | ||
| int * | tx_closed, | ||
| int * | rx_closed | ||
| ) |
Disable connection fast path (mark as sp'd and remove from hash table).
| f_id | Flow state ID |
| tx_seq | Pointer to return last transmit sequence number |
| rx_seq | Pointer to return last receive sequence number |
| tx_closed | Pointer to return flag that tx stream is closed |
| rx_closed | Pointer to return flag that rx stream is closed |
Definition at line 250 of file nicif.c.
References flextcp_pl_flowst::lock, flextcp_pl_flowst::rx_base_sp, flextcp_pl_flowst::rx_next_seq, and flextcp_pl_flowst::tx_next_seq.
Referenced by tcp_close().
| void nicif_connection_free | ( | uint32_t | f_id | ) |
Free flow state.
| f_id | Flow state ID |
Definition at line 272 of file nicif.c.
Referenced by tcp_timeout().
| int nicif_connection_move | ( | uint32_t | dst_db, |
| uint32_t | f_id | ||
| ) |
Move flow to new db.
| dst_db | New doorbell ID |
| f_id | ID of flow to be moved |
Move flow to new db
Definition at line 278 of file nicif.c.
References flextcp_pl_flowst::db_id.
| int nicif_connection_retransmit | ( | uint32_t | f_id, |
| uint16_t | flow_group | ||
| ) |
Mark flow for retransmit after timeout.
| f_id | ID of flow |
| flow_group | FlexNIC flow group |
Mark flow for retransmit after timeout.
Definition at line 330 of file nicif.c.
Referenced by cc_conn_remove().
| int nicif_connection_setrate | ( | uint32_t | f_id, |
| uint32_t | rate | ||
| ) |
Set rate for flow.
| f_id | ID of flow |
| rate | Rate to set [Kbps] |
Definition at line 314 of file nicif.c.
References flextcp_pl_flowst::tx_rate.
Referenced by cc_poll().
| int nicif_connection_stats | ( | uint32_t | f_id, |
| struct nicif_connection_stats * | p_stats | ||
| ) |
Read connection stats from NIC.
| f_id | ID of flow |
| p_stats | Pointer to statistics structs. |
Read connection stats from NIC.
Definition at line 285 of file nicif.c.
References nicif_connection_stats::c_ackb, nicif_connection_stats::c_acks, nicif_connection_stats::c_drops, nicif_connection_stats::c_ecnb, flextcp_pl_flowst::cnt_rx_ack_bytes, flextcp_pl_flowst::cnt_rx_acks, flextcp_pl_flowst::cnt_rx_ecn_bytes, flextcp_pl_flowst::cnt_tx_drops, nicif_connection_stats::rtt, flextcp_pl_flowst::rtt_est, flextcp_pl_flowst::tx_sent, and nicif_connection_stats::txp.
Referenced by cc_poll().
| int nicif_init | ( | void | ) |
Initialize NIC interface
Definition at line 85 of file nicif.c.
References flexnic_info::cores_num, flexnic_info::flags, FLEXNIC_FLAG_READY, and packetmem_init().
| int nicif_tx_alloc | ( | uint16_t | len, |
| void ** | pbuf, | ||
| uint32_t * | opaque | ||
| ) |
Allocate transmit buffer for raw packet.
TODO: we probably want an asynchronous version of this.
| len | Length of packet to be sent |
| buf | Pointer to location where base address will be stored |
| opaque | Pointer to location to store opaque value that needs to be passed to nicif_tx_send(). |
Allocate transmit buffer
Definition at line 352 of file nicif.c.
Referenced by arp_timeout(), kni_poll(), and tcp_timeout().
| void nicif_tx_send | ( | uint32_t | opaque, |
| int | no_ts | ||
| ) |
Actually send out transmit buffer (lens need to match).
| opaque | Opaque value returned from nicif_tx_alloc(). |
| no_ts | If != 0, skip inserting tcp timestamp |
Actually send out transmit buffer (lens need to match)
Definition at line 368 of file nicif.c.
Referenced by arp_timeout(), kni_poll(), and tcp_timeout().
1.8.13