Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
p9_client Struct Reference

#include <client.h>

Data Fields

spinlock_t lock
 
unsigned int msize
 
unsigned char proto_version
 
struct p9_trans_moduletrans_mod
 
enum p9_trans_status status
 
voidtrans
 
struct p9_connconn
 
struct p9_idpoolfidpool
 
struct list_head fidlist
 
struct p9_idpooltagpool
 
struct p9_req_treqs [P9_ROW_MAXTAG]
 
int max_tag
 

Detailed Description

struct p9_client - per client instance state : protect : maximum data size negotiated by protocol : extension flags negotiated by protocol : 9P protocol version to use : module API instantiated with this client : tranport instance state and API : connection state information used by trans_fd : fid handle accounting for session : List of active fid handles - transaction id accounting for session - 2D array of requests - current maximum tag id allocated

The client structure is used to keep track of various per-client state that has been instantiated. In order to minimize per-transaction overhead we use a simple array to lookup requests instead of a hash table or linked list. In order to support larger number of transactions, we make this a 2D array, allocating new rows when we need to grow the total number of the transactions.

Each row is 256 requests and we'll support up to 256 rows for a total of 64k concurrent requests per session.

Bugs: duplicated data and potentially unnecessary elements.

Definition at line 152 of file client.h.

Field Documentation

struct p9_conn* conn

Definition at line 159 of file client.h.

struct list_head fidlist

Definition at line 162 of file client.h.

struct p9_idpool* fidpool

Definition at line 161 of file client.h.

spinlock_t lock

Definition at line 153 of file client.h.

int max_tag

Definition at line 166 of file client.h.

unsigned int msize

Definition at line 154 of file client.h.

unsigned char proto_version

Definition at line 155 of file client.h.

Definition at line 165 of file client.h.

Definition at line 157 of file client.h.

struct p9_idpool* tagpool

Definition at line 164 of file client.h.

void* trans

Definition at line 158 of file client.h.

struct p9_trans_module* trans_mod

Definition at line 156 of file client.h.


The documentation for this struct was generated from the following file: