Changeset View
Standalone View
sys/dev/iscsi/icl.h
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | #endif | ||||
void (*ic_error)(struct icl_conn *); | void (*ic_error)(struct icl_conn *); | ||||
/* | /* | ||||
* User (initiator or provider) private fields. | * User (initiator or provider) private fields. | ||||
*/ | */ | ||||
void *ic_prv0; | void *ic_prv0; | ||||
}; | }; | ||||
struct icl_drv_limits { | |||||
int max_recv_data_segment_length; | |||||
int max_send_data_segment_length; | |||||
int max_burst_length; | |||||
int first_burst_length; | |||||
trasz: The prefixes are missing. Also, the code generally uses size_t for those. And some spares… | |||||
npAuthorUnsubmitted Not Done Inline ActionsI'll add the prefix in the next update to this review. The existing code isn't very consistent about using size_t for these parameters. For example, struct iscsi_session_state uses int and not size_t. Also, I was hoping to get this into 11 and the spare fields available were all ints, so ... All these values are required by the RFC to be 0 or between 512 and 2^24 - 1. So it is guaranteed that they'll fit in an int. I'd actually like to change them to int all over to compact all the data structures. If that's ok I'd also like to rename foo_data_segment_length variables to foo_dsl during my sweep. np: I'll add the prefix in the next update to this review.
The existing code isn't very consistent… | |||||
traszUnsubmitted Not Done Inline ActionsAh, ok then - cleaning up the types is always welcome :-) Make sure you don't miss any checks. As for renaming - I'm not a huge fan of shortening stuff this way, to be honest. trasz: Ah, ok then - cleaning up the types is always welcome :-) Make sure you don't miss any checks. | |||||
}; | |||||
struct icl_conn *icl_new_conn(const char *offload, bool iser, const char *name, | struct icl_conn *icl_new_conn(const char *offload, bool iser, const char *name, | ||||
struct mtx *lock); | struct mtx *lock); | ||||
int icl_limits(const char *offload, bool iser, size_t *limitp); | int icl_limits(const char *offload, bool iser, | ||||
struct icl_drv_limits *idl); | |||||
int icl_register(const char *offload, bool iser, int priority, | int icl_register(const char *offload, bool iser, int priority, | ||||
int (*limits)(size_t *), | int (*limits)(struct icl_drv_limits *), | ||||
struct icl_conn *(*new_conn)(const char *, struct mtx *)); | struct icl_conn *(*new_conn)(const char *, struct mtx *)); | ||||
int icl_unregister(const char *offload, bool rdma); | int icl_unregister(const char *offload, bool rdma); | ||||
#ifdef ICL_KERNEL_PROXY | #ifdef ICL_KERNEL_PROXY | ||||
struct sockaddr; | struct sockaddr; | ||||
struct icl_listen; | struct icl_listen; | ||||
Show All 21 Lines |
The prefixes are missing. Also, the code generally uses size_t for those. And some spares perhaps?