Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/list.h>
#include <linux/inet.h>
#include <linux/slab.h>
#include <linux/file.h>
#include <linux/blkdev.h>
#include <linux/crypto.h>
#include <linux/delay.h>
#include <linux/kfifo.h>
#include <linux/scatterlist.h>
#include <linux/module.h>
#include <net/tcp.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi.h>
#include <scsi/scsi_transport_iscsi.h>
#include "iscsi_tcp.h"
Go to the source code of this file.
Macros | |
#define | ISCSI_DBG_TCP(_conn, dbg_fmt, arg...) |
#define ISCSI_DBG_TCP | ( | _conn, | |
dbg_fmt, | |||
arg... | |||
) |
Definition at line 62 of file libiscsi_tcp.c.
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_segment_unmap | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_segment_done | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_dgst_header | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_segment_init_linear | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_segment_seek_sg | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_hdr_recv_prep | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_cleanup_task | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_recv_segment_is_hdr | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_recv_skb | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_task_init | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_task_xmit | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_conn_setup | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_conn_teardown | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_r2tpool_alloc | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_r2tpool_free | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_set_max_r2t | ) |
EXPORT_SYMBOL_GPL | ( | iscsi_tcp_conn_get_stats | ) |
|
inline |
Definition at line 357 of file libiscsi_tcp.c.
|
inline |
Definition at line 368 of file libiscsi_tcp.c.
void iscsi_tcp_cleanup_task | ( | struct iscsi_task * | task | ) |
iscsi_tcp_cleanup_task - free tcp_task resources : iscsi task
must be called with session lock
Definition at line 451 of file libiscsi_tcp.c.
void iscsi_tcp_conn_get_stats | ( | struct iscsi_cls_conn * | cls_conn, |
struct iscsi_stats * | stats | ||
) |
Definition at line 1191 of file libiscsi_tcp.c.
|
read |
Definition at line 1080 of file libiscsi_tcp.c.
void iscsi_tcp_conn_teardown | ( | struct iscsi_cls_conn * | cls_conn | ) |
Definition at line 1106 of file libiscsi_tcp.c.
|
inline |
Definition at line 313 of file libiscsi_tcp.c.
void iscsi_tcp_hdr_recv_prep | ( | struct iscsi_tcp_conn * | tcp_conn | ) |
iscsi_tcp_hdr_recv_prep - prep segment for hdr reception : iscsi connection to prep for
This function always passes NULL for the hash argument, because when this function is called we do not yet know the final size of the header and want to delay the digest processing until we know that.
Definition at line 397 of file libiscsi_tcp.c.
int iscsi_tcp_r2tpool_alloc | ( | struct iscsi_session * | session | ) |
Definition at line 1112 of file libiscsi_tcp.c.
void iscsi_tcp_r2tpool_free | ( | struct iscsi_session * | session | ) |
Definition at line 1159 of file libiscsi_tcp.c.
|
inline |
iscsi_tcp_recv_segment_is_hdr - tests if we are reading in a header : iscsi tcp conn
returns non zero if we are currently processing or setup to process a header.
Definition at line 855 of file libiscsi_tcp.c.
int iscsi_tcp_recv_skb | ( | struct iscsi_conn * | conn, |
struct sk_buff * | skb, | ||
unsigned int | offset, | ||
bool | offloaded, | ||
int * | status | ||
) |
iscsi_tcp_recv_skb - Process skb : iscsi connection : network buffer with header and/or data segment : offset in skb : bool indicating if transfer was offloaded
Will return status of transfer in status. And will return number of bytes copied.
Definition at line 871 of file libiscsi_tcp.c.
int iscsi_tcp_segment_done | ( | struct iscsi_tcp_conn * | tcp_conn, |
struct iscsi_segment * | segment, | ||
int | recv, | ||
unsigned | copied | ||
) |
iscsi_tcp_segment_done - check whether the segment is complete : iscsi tcp connection : iscsi segment to check : set to one of this is called from the recv path : number of bytes copied
Check if we're done receiving this segment. If the receive buffer is full but we expect more data, move on to the next entry in the scatterlist.
If the amount of data we received isn't a multiple of 4, we will transparently receive the pad bytes, too.
This function must be re-entrant.
Definition at line 192 of file libiscsi_tcp.c.
void iscsi_tcp_segment_unmap | ( | struct iscsi_segment * | segment | ) |
Definition at line 148 of file libiscsi_tcp.c.
int iscsi_tcp_set_max_r2t | ( | struct iscsi_conn * | conn, |
char * | buf | ||
) |
Definition at line 1173 of file libiscsi_tcp.c.
int iscsi_tcp_task_init | ( | struct iscsi_task * | task | ) |
iscsi_tcp_task_init - Initialize iSCSI SCSI_READ or SCSI_WRITE commands : iscsi connection : scsi command task : scsi command
Definition at line 950 of file libiscsi_tcp.c.
int iscsi_tcp_task_xmit | ( | struct iscsi_task * | task | ) |
iscsi_tcp_task_xmit - xmit normal PDU task : iscsi command task
We're expected to return 0 when everything was transmitted successfully, -EAGAIN if there's still data in the queue, or != 0 for any other kind of error.
Definition at line 1027 of file libiscsi_tcp.c.
MODULE_AUTHOR | ( | "Mike Christie <[email protected]> | , |
""Dmitry Yusupov< dmitry_yus @yahoo.com > | , | ||
""Alex Aizman< itn780 @yahoo.com >" | |||
) |
MODULE_LICENSE | ( | "GPL" | ) |