X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Frx%2Frx_call.h;h=66ed5d197e9cb966f3de2ba139098698ace37ab3;hp=e873eb4e1a51661ec87150abfad056748af77674;hb=c00c0effd18dd508051ebc4c7c8983b800f8a973;hpb=8e62ddaa3706319b425327b9516c91290274590a diff --git a/src/rx/rx_call.h b/src/rx/rx_call.h index e873eb4..66ed5d1 100644 --- a/src/rx/rx_call.h +++ b/src/rx/rx_call.h @@ -10,6 +10,30 @@ #ifndef OPENAFS_RX_CALL_H #define OPENAFS_RX_CALL_H 1 +/* + * The following fields are accessed while the call is unlocked. + * These fields are used by the application thread to marshall + * and unmarshall RPC data. The only time they may be changed by + * other threads is when the RX_CALL_IOVEC_WAIT flag is set + * + * NOTE: Ensure that this structure is padded to a double word boundary + * to avoid problems with other threads accessing items stored beside it + * in the call structure + */ +struct rx_call_appl { + struct opr_queue iovq; /* readv/writev packet queue */ + u_short nLeft; /* Number bytes left in first receive packet */ + u_short curvec; /* current iovec in currentPacket */ + u_short curlen; /* bytes remaining in curvec */ + u_short nFree; /* Number bytes free in last send packet */ + struct rx_packet *currentPacket; /* Current packet being assembled or being read */ + char *curpos; /* current position in curvec */ + int mode; /* Mode of call */ + int padding; /* Pad to double word */ + afs_uint64 bytesSent; /* Number bytes sent */ + afs_uint64 bytesRcvd; /* Number bytes received */ +}; + /* Call structure: only instantiated for active calls and dallying * server calls. The permanent call state (i.e. the call number as * well as state shared with other calls associated with this @@ -20,32 +44,12 @@ struct rx_call_rx_lock { #else struct rx_call { #endif - struct rx_queue queue_item_header; /* Call can be on various queues (one-at-a-time) */ - struct rx_queue tq; /* Transmit packet queue */ - struct rx_queue rq; /* Receive packet queue */ - /* - * The following fields are accessed while the call is unlocked. - * These fields are used by the caller/server thread to marshall - * and unmarshall RPC data. The only time they may be changed by - * other threads is when the RX_CALL_IOVEC_WAIT flag is set. - * - * NOTE: Be sure that these fields start and end on a double - * word boundary. Otherwise threads that are changing - * adjacent fields will cause problems. - */ - struct rx_queue iovq; /* readv/writev packet queue */ - u_short nLeft; /* Number bytes left in first receive packet */ - u_short curvec; /* current iovec in currentPacket */ - u_short curlen; /* bytes remaining in curvec */ - u_short nFree; /* Number bytes free in last send packet */ - struct rx_packet *currentPacket; /* Current packet being assembled or being read */ - char *curpos; /* current position in curvec */ - /* - * End of fields accessed with call unlocked - */ + struct opr_queue entry; /* Call can be on various queues (one-at-a-time) */ + struct opr_queue tq; /* Transmit packet queue */ + struct opr_queue rq; /* Receive packet queue */ + struct rx_call_appl app; /* Data private to the application thread */ u_char channel; /* Index of call, within connection */ u_char state; /* Current call state as defined below */ - u_char mode; /* Current mode of a call in ACTIVE state */ #ifdef RX_ENABLE_LOCKS afs_kmutex_t lock; /* lock covers data as well as mutexes. */ afs_kmutex_t *call_queue_lock; /* points to lock for queue we're on, @@ -139,8 +143,7 @@ struct rx_call { struct clock queueTime; /* time call was queued */ struct clock startTime; /* time call was started */ - afs_uint64 bytesSent; /* Number bytes sent */ - afs_uint64 bytesRcvd; /* Number bytes received */ + u_short tqWaiters; struct rx_packet *xmitList[RX_MAXACKS]; /* Can't xmit more than we ack */ @@ -157,6 +160,9 @@ struct rx_call { #endif afs_uint32 call_id; #endif +#ifdef AFS_RXERRQ_ENV + int neterr_gen; +#endif }; /* Only include this once, even when re-loading for kdump. */