2012-06-19 07:34:13 +00:00
|
|
|
/*-
|
2015-12-26 00:26:02 +00:00
|
|
|
* Copyright (c) 2012, 2015 Chelsio Communications, Inc.
|
2012-06-19 07:34:13 +00:00
|
|
|
* All rights reserved.
|
|
|
|
* Written by: Navdeep Parhar <np@FreeBSD.org>
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
* $FreeBSD$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __T4_TOM_H__
|
|
|
|
#define __T4_TOM_H__
|
2015-01-06 01:30:32 +00:00
|
|
|
#include <sys/vmem.h>
|
2012-06-19 07:34:13 +00:00
|
|
|
|
|
|
|
#define LISTEN_HASH_SIZE 32
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Min receive window. We want it to be large enough to accommodate receive
|
|
|
|
* coalescing, handle jumbo frames, and not trigger sender SWS avoidance.
|
|
|
|
*/
|
|
|
|
#define MIN_RCV_WND (24 * 1024U)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Max receive window supported by HW in bytes. Only a small part of it can
|
|
|
|
* be set through option0, the rest needs to be set through RX_DATA_ACK.
|
|
|
|
*/
|
|
|
|
#define MAX_RCV_WND ((1U << 27) - 1)
|
|
|
|
|
2012-08-17 00:49:29 +00:00
|
|
|
#define DDP_RSVD_WIN (16 * 1024U)
|
|
|
|
#define SB_DDP_INDICATE SB_IN_TOE /* soreceive must respond to indicate */
|
|
|
|
|
|
|
|
#define USE_DDP_RX_FLOW_CONTROL
|
|
|
|
|
2016-08-31 23:23:46 +00:00
|
|
|
#define PPOD_SZ(n) ((n) * sizeof(struct pagepod))
|
|
|
|
#define PPOD_SIZE (PPOD_SZ(1))
|
|
|
|
|
2012-06-19 07:34:13 +00:00
|
|
|
/* TOE PCB flags */
|
|
|
|
enum {
|
2012-08-21 18:30:16 +00:00
|
|
|
TPF_ATTACHED = (1 << 0), /* a tcpcb refers to this toepcb */
|
|
|
|
TPF_FLOWC_WR_SENT = (1 << 1), /* firmware flow context WR sent */
|
|
|
|
TPF_TX_DATA_SENT = (1 << 2), /* some data sent */
|
|
|
|
TPF_TX_SUSPENDED = (1 << 3), /* tx suspended for lack of resources */
|
|
|
|
TPF_SEND_FIN = (1 << 4), /* send FIN after all pending data */
|
|
|
|
TPF_FIN_SENT = (1 << 5), /* FIN has been sent */
|
|
|
|
TPF_ABORT_SHUTDOWN = (1 << 6), /* connection abort is in progress */
|
|
|
|
TPF_CPL_PENDING = (1 << 7), /* haven't received the last CPL */
|
|
|
|
TPF_SYNQE = (1 << 8), /* synq_entry, not really a toepcb */
|
|
|
|
TPF_SYNQE_NEEDFREE = (1 << 9), /* synq_entry was malloc'd separately */
|
|
|
|
TPF_SYNQE_TCPDDP = (1 << 10), /* ulp_mode TCPDDP in toepcb */
|
2012-08-21 22:23:17 +00:00
|
|
|
TPF_SYNQE_EXPANDED = (1 << 11), /* toepcb ready, tid context updated */
|
2012-11-29 19:10:04 +00:00
|
|
|
TPF_SYNQE_HAS_L2TE = (1 << 12), /* we've replied to PASS_ACCEPT_REQ */
|
2012-08-17 00:49:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
DDP_OK = (1 << 0), /* OK to turn on DDP */
|
|
|
|
DDP_SC_REQ = (1 << 1), /* state change (on/off) requested */
|
|
|
|
DDP_ON = (1 << 2), /* DDP is turned on */
|
|
|
|
DDP_BUF0_ACTIVE = (1 << 3), /* buffer 0 in use (not invalidated) */
|
|
|
|
DDP_BUF1_ACTIVE = (1 << 4), /* buffer 1 in use (not invalidated) */
|
2016-05-07 00:33:35 +00:00
|
|
|
DDP_TASK_ACTIVE = (1 << 5), /* requeue task is queued / running */
|
|
|
|
DDP_DEAD = (1 << 6), /* toepcb is shutting down */
|
2012-06-19 07:34:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ofld_tx_sdesc {
|
|
|
|
uint32_t plen; /* payload length */
|
|
|
|
uint8_t tx_credits; /* firmware tx credits (unit is 16B) */
|
|
|
|
};
|
|
|
|
|
2016-08-31 23:23:46 +00:00
|
|
|
struct ppod_region {
|
|
|
|
u_int pr_start;
|
|
|
|
u_int pr_len;
|
|
|
|
u_int pr_page_shift[4];
|
|
|
|
uint32_t pr_tag_mask; /* hardware tagmask for this region. */
|
|
|
|
uint32_t pr_invalid_bit; /* OR with this to invalidate tag. */
|
|
|
|
uint32_t pr_alias_mask; /* AND with tag to get alias bits. */
|
|
|
|
u_int pr_alias_shift; /* shift this much for first alias bit. */
|
|
|
|
vmem_t *pr_arena;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ppod_reservation {
|
|
|
|
struct ppod_region *prsv_pr;
|
|
|
|
uint32_t prsv_tag; /* Full tag: pgsz, alias, tag, color */
|
|
|
|
u_int prsv_nppods;
|
|
|
|
};
|
|
|
|
|
2016-05-07 00:33:35 +00:00
|
|
|
struct pageset {
|
|
|
|
TAILQ_ENTRY(pageset) link;
|
|
|
|
vm_page_t *pages;
|
|
|
|
int npages;
|
|
|
|
int flags;
|
|
|
|
int offset; /* offset in first page */
|
2012-08-17 00:49:29 +00:00
|
|
|
int len;
|
2016-08-31 23:23:46 +00:00
|
|
|
struct ppod_reservation prsv;
|
2016-05-07 00:33:35 +00:00
|
|
|
struct vmspace *vm;
|
|
|
|
u_int vm_timestamp;
|
|
|
|
};
|
|
|
|
|
|
|
|
TAILQ_HEAD(pagesetq, pageset);
|
|
|
|
|
|
|
|
#define PS_WIRED 0x0001 /* Pages wired rather than held. */
|
|
|
|
#define PS_PPODS_WRITTEN 0x0002 /* Page pods written to the card. */
|
|
|
|
|
2016-07-27 18:29:35 +00:00
|
|
|
#define EXT_FLAG_AIOTX EXT_FLAG_VENDOR1
|
|
|
|
|
2016-05-07 00:33:35 +00:00
|
|
|
struct ddp_buffer {
|
|
|
|
struct pageset *ps;
|
|
|
|
|
|
|
|
struct kaiocb *job;
|
|
|
|
int cancel_pending;
|
2012-08-17 00:49:29 +00:00
|
|
|
};
|
|
|
|
|
2016-07-27 18:29:35 +00:00
|
|
|
struct aiotx_buffer {
|
|
|
|
struct pageset ps;
|
|
|
|
struct kaiocb *job;
|
|
|
|
int refcount;
|
|
|
|
};
|
|
|
|
|
2012-06-19 07:34:13 +00:00
|
|
|
struct toepcb {
|
|
|
|
TAILQ_ENTRY(toepcb) link; /* toep_list */
|
2013-09-09 04:38:57 +00:00
|
|
|
u_int flags; /* miscellaneous flags */
|
2016-05-07 00:33:35 +00:00
|
|
|
int refcount;
|
2012-06-19 07:34:13 +00:00
|
|
|
struct tom_data *td;
|
|
|
|
struct inpcb *inp; /* backpointer to host stack's PCB */
|
2017-01-11 23:48:17 +00:00
|
|
|
struct vnet *vnet;
|
2015-12-03 00:02:01 +00:00
|
|
|
struct vi_info *vi; /* virtual interface */
|
2012-06-19 07:34:13 +00:00
|
|
|
struct sge_wrq *ofld_txq;
|
|
|
|
struct sge_ofld_rxq *ofld_rxq;
|
|
|
|
struct sge_wrq *ctrlq;
|
|
|
|
struct l2t_entry *l2te; /* L2 table entry used by this connection */
|
2013-01-15 07:07:29 +00:00
|
|
|
struct clip_entry *ce; /* CLIP table entry used by this tid */
|
2012-06-19 07:34:13 +00:00
|
|
|
int tid; /* Connection identifier */
|
2013-09-09 04:38:57 +00:00
|
|
|
|
|
|
|
/* tx credit handling */
|
|
|
|
u_int tx_total; /* total tx WR credits (in 16B units) */
|
|
|
|
u_int tx_credits; /* tx WR credits (in 16B units) available */
|
|
|
|
u_int tx_nocompl; /* tx WR credits since last compl request */
|
|
|
|
u_int plen_nocompl; /* payload since last compl request */
|
|
|
|
|
|
|
|
/* rx credit handling */
|
|
|
|
u_int sb_cc; /* last noted value of so_rcv->sb_cc */
|
2012-06-19 07:34:13 +00:00
|
|
|
int rx_credits; /* rx credits (in bytes) to be returned to hw */
|
|
|
|
|
2013-09-09 04:38:57 +00:00
|
|
|
u_int ulp_mode; /* ULP mode */
|
2015-12-26 00:26:02 +00:00
|
|
|
void *ulpcb;
|
|
|
|
void *ulpcb2;
|
|
|
|
struct mbufq ulp_pduq; /* PDUs waiting to be sent out. */
|
|
|
|
struct mbufq ulp_pdu_reclaimq;
|
2012-06-19 07:34:13 +00:00
|
|
|
|
2013-09-09 04:38:57 +00:00
|
|
|
u_int ddp_flags;
|
2016-05-07 00:33:35 +00:00
|
|
|
struct ddp_buffer db[2];
|
|
|
|
TAILQ_HEAD(, pageset) ddp_cached_pagesets;
|
|
|
|
TAILQ_HEAD(, kaiocb) ddp_aiojobq;
|
|
|
|
u_int ddp_waiting_count;
|
|
|
|
u_int ddp_active_count;
|
|
|
|
u_int ddp_cached_count;
|
|
|
|
int ddp_active_id; /* the currently active DDP buffer */
|
|
|
|
struct task ddp_requeue_task;
|
|
|
|
struct kaiocb *ddp_queueing;
|
|
|
|
struct mtx ddp_lock;
|
2012-08-17 00:49:29 +00:00
|
|
|
|
2016-07-27 18:29:35 +00:00
|
|
|
TAILQ_HEAD(, kaiocb) aiotx_jobq;
|
|
|
|
struct task aiotx_task;
|
|
|
|
bool aiotx_task_active;
|
|
|
|
|
2012-06-19 07:34:13 +00:00
|
|
|
/* Tx software descriptor */
|
|
|
|
uint8_t txsd_total;
|
|
|
|
uint8_t txsd_pidx;
|
|
|
|
uint8_t txsd_cidx;
|
|
|
|
uint8_t txsd_avail;
|
|
|
|
struct ofld_tx_sdesc txsd[];
|
|
|
|
};
|
|
|
|
|
2016-05-07 00:33:35 +00:00
|
|
|
#define DDP_LOCK(toep) mtx_lock(&(toep)->ddp_lock)
|
|
|
|
#define DDP_UNLOCK(toep) mtx_unlock(&(toep)->ddp_lock)
|
|
|
|
#define DDP_ASSERT_LOCKED(toep) mtx_assert(&(toep)->ddp_lock, MA_OWNED)
|
|
|
|
|
2012-06-19 07:34:13 +00:00
|
|
|
struct flowc_tx_params {
|
|
|
|
uint32_t snd_nxt;
|
|
|
|
uint32_t rcv_nxt;
|
|
|
|
unsigned int snd_space;
|
|
|
|
unsigned int mss;
|
|
|
|
};
|
|
|
|
|
2012-08-17 00:49:29 +00:00
|
|
|
#define DDP_RETRY_WAIT 5 /* seconds to wait before re-enabling DDP */
|
|
|
|
#define DDP_LOW_SCORE 1
|
|
|
|
#define DDP_HIGH_SCORE 3
|
|
|
|
|
2012-06-19 07:34:13 +00:00
|
|
|
/*
|
|
|
|
* Compressed state for embryonic connections for a listener. Barely fits in
|
|
|
|
* 64B, try not to grow it further.
|
|
|
|
*/
|
|
|
|
struct synq_entry {
|
|
|
|
TAILQ_ENTRY(synq_entry) link; /* listen_ctx's synq link */
|
|
|
|
int flags; /* same as toepcb's tp_flags */
|
|
|
|
int tid;
|
|
|
|
struct listen_ctx *lctx; /* backpointer to listen ctx */
|
|
|
|
struct mbuf *syn;
|
|
|
|
uint32_t iss;
|
|
|
|
uint32_t ts;
|
|
|
|
volatile uintptr_t wr;
|
|
|
|
volatile u_int refcnt;
|
|
|
|
uint16_t l2e_idx;
|
|
|
|
uint16_t rcv_bufsize;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* listen_ctx flags */
|
|
|
|
#define LCTX_RPL_PENDING 1 /* waiting for a CPL_PASS_OPEN_RPL */
|
|
|
|
|
|
|
|
struct listen_ctx {
|
|
|
|
LIST_ENTRY(listen_ctx) link; /* listen hash linkage */
|
|
|
|
volatile int refcount;
|
|
|
|
int stid;
|
2013-01-11 00:07:01 +00:00
|
|
|
struct stid_region stid_region;
|
2012-06-19 07:34:13 +00:00
|
|
|
int flags;
|
|
|
|
struct inpcb *inp; /* listening socket's inp */
|
2017-01-11 23:48:17 +00:00
|
|
|
struct vnet *vnet;
|
2012-06-19 07:34:13 +00:00
|
|
|
struct sge_wrq *ctrlq;
|
|
|
|
struct sge_ofld_rxq *ofld_rxq;
|
2013-12-17 21:41:23 +00:00
|
|
|
struct clip_entry *ce;
|
2012-06-19 07:34:13 +00:00
|
|
|
TAILQ_HEAD(, synq_entry) synq;
|
|
|
|
};
|
|
|
|
|
2013-01-15 07:07:29 +00:00
|
|
|
struct clip_entry {
|
|
|
|
TAILQ_ENTRY(clip_entry) link;
|
|
|
|
struct in6_addr lip; /* local IPv6 address */
|
|
|
|
u_int refcount;
|
|
|
|
};
|
|
|
|
|
2013-04-18 19:52:11 +00:00
|
|
|
TAILQ_HEAD(clip_head, clip_entry);
|
2012-06-19 07:34:13 +00:00
|
|
|
struct tom_data {
|
|
|
|
struct toedev tod;
|
|
|
|
|
|
|
|
/* toepcb's associated with this TOE device */
|
|
|
|
struct mtx toep_list_lock;
|
|
|
|
TAILQ_HEAD(, toepcb) toep_list;
|
|
|
|
|
2012-08-17 00:49:29 +00:00
|
|
|
struct mtx lctx_hash_lock;
|
2012-06-19 07:34:13 +00:00
|
|
|
LIST_HEAD(, listen_ctx) *listen_hash;
|
|
|
|
u_long listen_mask;
|
|
|
|
int lctx_count; /* # of lctx in the hash table */
|
2012-08-17 00:49:29 +00:00
|
|
|
|
2016-08-31 23:23:46 +00:00
|
|
|
struct ppod_region pr;
|
2013-01-15 07:07:29 +00:00
|
|
|
|
|
|
|
struct mtx clip_table_lock;
|
2013-04-18 19:52:11 +00:00
|
|
|
struct clip_head clip_table;
|
|
|
|
int clip_gen;
|
2014-10-07 21:26:22 +00:00
|
|
|
|
|
|
|
/* WRs that will not be sent to the chip because L2 resolution failed */
|
|
|
|
struct mtx unsent_wr_lock;
|
|
|
|
STAILQ_HEAD(, wrqe) unsent_wr_list;
|
|
|
|
struct task reclaim_wr_resources;
|
2012-06-19 07:34:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static inline struct tom_data *
|
|
|
|
tod_td(struct toedev *tod)
|
|
|
|
{
|
|
|
|
|
2012-10-19 13:26:40 +00:00
|
|
|
return (__containerof(tod, struct tom_data, tod));
|
2012-06-19 07:34:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct adapter *
|
|
|
|
td_adapter(struct tom_data *td)
|
|
|
|
{
|
|
|
|
|
|
|
|
return (td->tod.tod_softc);
|
|
|
|
}
|
|
|
|
|
2015-12-26 00:26:02 +00:00
|
|
|
static inline void
|
|
|
|
set_mbuf_ulp_submode(struct mbuf *m, uint8_t ulp_submode)
|
|
|
|
{
|
|
|
|
|
|
|
|
M_ASSERTPKTHDR(m);
|
|
|
|
m->m_pkthdr.PH_per.eight[0] = ulp_submode;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline uint8_t
|
|
|
|
mbuf_ulp_submode(struct mbuf *m)
|
|
|
|
{
|
|
|
|
|
|
|
|
M_ASSERTPKTHDR(m);
|
|
|
|
return (m->m_pkthdr.PH_per.eight[0]);
|
|
|
|
}
|
|
|
|
|
2012-06-19 07:34:13 +00:00
|
|
|
/* t4_tom.c */
|
2015-12-03 00:02:01 +00:00
|
|
|
struct toepcb *alloc_toepcb(struct vi_info *, int, int, int);
|
2016-05-07 00:33:35 +00:00
|
|
|
struct toepcb *hold_toepcb(struct toepcb *);
|
2012-06-19 07:34:13 +00:00
|
|
|
void free_toepcb(struct toepcb *);
|
|
|
|
void offload_socket(struct socket *, struct toepcb *);
|
|
|
|
void undo_offload_socket(struct socket *);
|
|
|
|
void final_cpl_received(struct toepcb *);
|
2017-01-07 20:26:19 +00:00
|
|
|
void insert_tid(struct adapter *, int, void *, int);
|
2012-06-19 07:34:13 +00:00
|
|
|
void *lookup_tid(struct adapter *, int);
|
|
|
|
void update_tid(struct adapter *, int, void *);
|
2017-01-07 20:26:19 +00:00
|
|
|
void remove_tid(struct adapter *, int, int);
|
2012-06-19 07:34:13 +00:00
|
|
|
void release_tid(struct adapter *, int, struct sge_wrq *);
|
|
|
|
int find_best_mtu_idx(struct adapter *, struct in_conninfo *, int);
|
|
|
|
u_long select_rcv_wnd(struct socket *);
|
|
|
|
int select_rcv_wscale(void);
|
2015-12-03 00:02:01 +00:00
|
|
|
uint64_t calc_opt0(struct socket *, struct vi_info *, struct l2t_entry *,
|
2012-06-19 07:34:13 +00:00
|
|
|
int, int, int, int);
|
2015-12-03 00:02:01 +00:00
|
|
|
uint64_t select_ntuple(struct vi_info *, struct l2t_entry *);
|
2013-01-15 00:24:01 +00:00
|
|
|
void set_tcpddp_ulp_mode(struct toepcb *);
|
2013-01-26 03:01:51 +00:00
|
|
|
int negative_advice(int);
|
2013-01-15 07:07:29 +00:00
|
|
|
struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *);
|
|
|
|
void release_lip(struct tom_data *, struct clip_entry *);
|
2012-06-19 07:34:13 +00:00
|
|
|
|
|
|
|
/* t4_connect.c */
|
2016-07-05 01:29:24 +00:00
|
|
|
void t4_init_connect_cpl_handlers(void);
|
2012-06-19 07:34:13 +00:00
|
|
|
int t4_connect(struct toedev *, struct socket *, struct rtentry *,
|
|
|
|
struct sockaddr *);
|
2014-10-07 21:26:22 +00:00
|
|
|
void act_open_failure_cleanup(struct adapter *, u_int, u_int);
|
2012-06-19 07:34:13 +00:00
|
|
|
|
|
|
|
/* t4_listen.c */
|
2016-07-05 01:29:24 +00:00
|
|
|
void t4_init_listen_cpl_handlers(void);
|
2012-06-19 07:34:13 +00:00
|
|
|
int t4_listen_start(struct toedev *, struct tcpcb *);
|
|
|
|
int t4_listen_stop(struct toedev *, struct tcpcb *);
|
|
|
|
void t4_syncache_added(struct toedev *, void *);
|
|
|
|
void t4_syncache_removed(struct toedev *, void *);
|
|
|
|
int t4_syncache_respond(struct toedev *, void *, struct mbuf *);
|
|
|
|
int do_abort_req_synqe(struct sge_iq *, const struct rss_header *,
|
|
|
|
struct mbuf *);
|
|
|
|
int do_abort_rpl_synqe(struct sge_iq *, const struct rss_header *,
|
|
|
|
struct mbuf *);
|
|
|
|
void t4_offload_socket(struct toedev *, void *, struct socket *);
|
|
|
|
|
|
|
|
/* t4_cpl_io.c */
|
2016-07-27 18:29:35 +00:00
|
|
|
void aiotx_init_toep(struct toepcb *);
|
|
|
|
int t4_aio_queue_aiotx(struct socket *, struct kaiocb *);
|
2016-07-05 01:29:24 +00:00
|
|
|
void t4_init_cpl_io_handlers(void);
|
|
|
|
void t4_uninit_cpl_io_handlers(void);
|
2012-06-19 07:34:13 +00:00
|
|
|
void send_abort_rpl(struct adapter *, struct sge_wrq *, int , int);
|
|
|
|
void send_flowc_wr(struct toepcb *, struct flowc_tx_params *);
|
|
|
|
void send_reset(struct adapter *, struct toepcb *, uint32_t);
|
|
|
|
void make_established(struct toepcb *, uint32_t, uint32_t, uint16_t);
|
|
|
|
void t4_rcvd(struct toedev *, struct tcpcb *);
|
2016-05-07 00:33:35 +00:00
|
|
|
void t4_rcvd_locked(struct toedev *, struct tcpcb *);
|
2012-06-19 07:34:13 +00:00
|
|
|
int t4_tod_output(struct toedev *, struct tcpcb *);
|
|
|
|
int t4_send_fin(struct toedev *, struct tcpcb *);
|
|
|
|
int t4_send_rst(struct toedev *, struct tcpcb *);
|
2016-07-05 01:29:24 +00:00
|
|
|
void t4_set_tcb_field(struct adapter *, struct sge_wrq *, int, uint16_t,
|
|
|
|
uint64_t, uint64_t, int, int, int);
|
2014-07-24 18:39:08 +00:00
|
|
|
void t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop);
|
2015-12-26 00:26:02 +00:00
|
|
|
void t4_push_pdus(struct adapter *sc, struct toepcb *toep, int drop);
|
2016-07-05 01:29:24 +00:00
|
|
|
int do_set_tcb_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *);
|
2012-06-19 07:34:13 +00:00
|
|
|
|
2012-08-17 00:49:29 +00:00
|
|
|
/* t4_ddp.c */
|
2016-08-31 23:23:46 +00:00
|
|
|
int t4_init_ppod_region(struct ppod_region *, struct t4_range *, u_int,
|
|
|
|
const char *);
|
|
|
|
void t4_free_ppod_region(struct ppod_region *);
|
|
|
|
int t4_alloc_page_pods_for_ps(struct ppod_region *, struct pageset *);
|
2016-09-01 00:51:59 +00:00
|
|
|
int t4_alloc_page_pods_for_buf(struct ppod_region *, vm_offset_t, int,
|
|
|
|
struct ppod_reservation *);
|
2016-08-31 23:23:46 +00:00
|
|
|
int t4_write_page_pods_for_ps(struct adapter *, struct sge_wrq *, int,
|
|
|
|
struct pageset *);
|
2016-09-01 00:51:59 +00:00
|
|
|
int t4_write_page_pods_for_buf(struct adapter *, struct sge_wrq *, int tid,
|
|
|
|
struct ppod_reservation *, vm_offset_t, int);
|
2016-08-31 23:23:46 +00:00
|
|
|
void t4_free_page_pods(struct ppod_reservation *);
|
2012-08-17 00:49:29 +00:00
|
|
|
int t4_soreceive_ddp(struct socket *, struct sockaddr **, struct uio *,
|
|
|
|
struct mbuf **, struct mbuf **, int *);
|
2016-05-07 00:33:35 +00:00
|
|
|
int t4_aio_queue_ddp(struct socket *, struct kaiocb *);
|
|
|
|
int t4_ddp_mod_load(void);
|
|
|
|
void t4_ddp_mod_unload(void);
|
|
|
|
void ddp_assert_empty(struct toepcb *);
|
|
|
|
void ddp_init_toep(struct toepcb *);
|
|
|
|
void ddp_uninit_toep(struct toepcb *);
|
|
|
|
void ddp_queue_toep(struct toepcb *);
|
2012-08-17 00:49:29 +00:00
|
|
|
void release_ddp_resources(struct toepcb *toep);
|
2016-05-07 00:33:35 +00:00
|
|
|
void handle_ddp_close(struct toepcb *, struct tcpcb *, uint32_t);
|
|
|
|
void handle_ddp_indicate(struct toepcb *);
|
|
|
|
void handle_ddp_tcb_rpl(struct toepcb *, const struct cpl_set_tcb_rpl *);
|
2012-11-29 19:39:27 +00:00
|
|
|
void insert_ddp_data(struct toepcb *, uint32_t);
|
2014-07-24 18:39:08 +00:00
|
|
|
|
2012-06-19 07:34:13 +00:00
|
|
|
#endif
|