linux/drivers/target/iscsi/cxgbit/cxgbit.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2016 Chelsio Communications, Inc.
 */

#ifndef __CXGBIT_H__
#define __CXGBIT_H__

#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/idr.h>
#include <linux/completion.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/inet.h>
#include <linux/wait.h>
#include <linux/kref.h>
#include <linux/timer.h>
#include <linux/io.h>

#include <asm/byteorder.h>

#include <net/net_namespace.h>

#include <target/iscsi/iscsi_transport.h>
#include <iscsi_target_parameters.h>
#include <iscsi_target_login.h>

#include "t4_regs.h"
#include "t4_msg.h"
#include "cxgb4.h"
#include "cxgb4_uld.h"
#include "l2t.h"
#include "libcxgb_ppm.h"
#include "cxgbit_lro.h"

extern struct mutex cdev_list_lock;
extern struct list_head cdev_list_head;
struct cxgbit_np;

struct cxgbit_sock;

struct cxgbit_cmd {};

#define CXGBIT_MAX_ISO_PAYLOAD

struct cxgbit_iso_info {};

enum cxgbit_skcb_flags {};

struct cxgbit_skb_rx_cb {};

struct cxgbit_skb_tx_cb {};

cxgbit_skb_cb;

#define CXGBIT_SKB_CB(skb)
#define cxgbit_skcb_flags(skb)
#define cxgbit_skcb_submode(skb)
#define cxgbit_skcb_tx_wr_next(skb)
#define cxgbit_skcb_tx_extralen(skb)
#define cxgbit_skcb_rx_opcode(skb)
#define cxgbit_skcb_rx_backlog_fn(skb)
#define cxgbit_rx_pdu_cb(skb)

static inline void *cplhdr(struct sk_buff *skb)
{}

enum cxgbit_cdev_flags {};

#define NP_INFO_HASH_SIZE

struct np_info {};

struct cxgbit_list_head {};

struct cxgbit_device {};

struct cxgbit_wr_wait {};

enum cxgbit_csk_state {};

enum cxgbit_csk_flags {};

struct cxgbit_sock_common {};

struct cxgbit_np {};

struct cxgbit_sock {};

void _cxgbit_free_cdev(struct kref *kref);
void _cxgbit_free_csk(struct kref *kref);
void _cxgbit_free_cnp(struct kref *kref);

static inline void cxgbit_get_cdev(struct cxgbit_device *cdev)
{}

static inline void cxgbit_put_cdev(struct cxgbit_device *cdev)
{}

static inline void cxgbit_get_csk(struct cxgbit_sock *csk)
{}

static inline void cxgbit_put_csk(struct cxgbit_sock *csk)
{}

static inline void cxgbit_get_cnp(struct cxgbit_np *cnp)
{}

static inline void cxgbit_put_cnp(struct cxgbit_np *cnp)
{}

static inline void cxgbit_sock_reset_wr_list(struct cxgbit_sock *csk)
{}

static inline struct sk_buff *cxgbit_sock_peek_wr(const struct cxgbit_sock *csk)
{}

static inline void
cxgbit_sock_enqueue_wr(struct cxgbit_sock *csk, struct sk_buff *skb)
{}

static inline struct sk_buff *cxgbit_sock_dequeue_wr(struct cxgbit_sock *csk)
{}

cxgbit_cplhandler_func;

int cxgbit_setup_np(struct iscsi_np *, struct sockaddr_storage *);
int cxgbit_setup_conn_digest(struct cxgbit_sock *);
int cxgbit_accept_np(struct iscsi_np *, struct iscsit_conn *);
void cxgbit_free_np(struct iscsi_np *);
void cxgbit_abort_conn(struct cxgbit_sock *csk);
void cxgbit_free_conn(struct iscsit_conn *);
extern cxgbit_cplhandler_func cxgbit_cplhandlers[NUM_CPL_CMDS];
int cxgbit_get_login_rx(struct iscsit_conn *, struct iscsi_login *);
int cxgbit_rx_data_ack(struct cxgbit_sock *);
int cxgbit_l2t_send(struct cxgbit_device *, struct sk_buff *,
		    struct l2t_entry *);
void cxgbit_push_tx_frames(struct cxgbit_sock *);
int cxgbit_put_login_tx(struct iscsit_conn *, struct iscsi_login *, u32);
int cxgbit_xmit_pdu(struct iscsit_conn *, struct iscsit_cmd *,
		    struct iscsi_datain_req *, const void *, u32);
void cxgbit_get_r2t_ttt(struct iscsit_conn *, struct iscsit_cmd *,
			struct iscsi_r2t *);
u32 cxgbit_send_tx_flowc_wr(struct cxgbit_sock *);
int cxgbit_ofld_send(struct cxgbit_device *, struct sk_buff *);
void cxgbit_get_rx_pdu(struct iscsit_conn *);
int cxgbit_validate_params(struct iscsit_conn *);
struct cxgbit_device *cxgbit_find_device(struct net_device *, u8 *);

/* DDP */
int cxgbit_ddp_init(struct cxgbit_device *);
int cxgbit_setup_conn_pgidx(struct cxgbit_sock *, u32);
int cxgbit_reserve_ttt(struct cxgbit_sock *, struct iscsit_cmd *);
void cxgbit_unmap_cmd(struct iscsit_conn *, struct iscsit_cmd *);

static inline
struct cxgbi_ppm *cdev2ppm(struct cxgbit_device *cdev)
{}
#endif /* __CXGBIT_H__ */