I think overall this is ok. Thank you for working on this.
Some comments below.
On 02/25/2011 04:56 AM, Vikas Chaudhary wrote:
struct iscsi_net_param {
uint32_t param_type; /* enum iscsi_net_param */
uint32_t iface_type; /* IPv4 or IPv6 */
uint32_t iface_num; /* iface number, 0 - n */
uint32_t length; /* Actual length of the param */
uint32_t offset; /* For param with length> 256 */
I did not understand the offset value.
uint8_t value[256]; /* max is 223 iscsi name */ }
__attribute__((packed));
I think you can just dynamically allocate the value.
We did not do this for other events/params, because they are needed for
the reconnection. For the case where we could not allocate memory and
are trying to reconnect a sessions that the vm is trying to write pages
out to, then having the set value size made it simple to preallocate
param/event structs.
For setup there is not need to preallocate.
} __attribute__((packed));
2.1.3 New parameters in iface
Added following params:-
typedef struct iface_rec {
struct list_head list;
/* iscsi iface record name */
char name[ISCSI_MAX_IFACE_LEN];
+ char iface_num[ISCSI_MAX_STR_LEN];
What is the iface_num? Is that a unique id? If so what is
allocating/managing that iface number id space or what is it based on
then? Is the id/num also global or does each host have its own id space?
If it is just a integer then why the string definition?
/* network layer iface name (eth0) */
char netdev[IFNAMSIZ];
char ipaddress[NI_MAXHOST];
+ char subnet_mask[NI_MAXHOST];
+ char gateway[NI_MAXHOST];
+ char bootproto[ISCSI_MAX_STR_LEN];
+ char ipv6_linklocal[NI_MAXHOST];
+ char ipv6_router[NI_MAXHOST];
+ char autocfg[NI_MAXHOST];
+ char vlan[ISCSI_MAX_STR_LEN];
+ char state[ISCSI_MAX_STR_LEN]; /* 0 = disable,
+ * 1 = enable */
Is this really just meant to be 0 or 1 or was it going to be a string
and have more values?
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.