>-----Original Message----- >From: open-iscsi@xxxxxxxxxxxxxxxx [mailto:open-iscsi@xxxxxxxxxxxxxxxx] On >Behalf Of Mike Christie >Sent: Wednesday, April 13, 2011 9:26 AM >To: Vikas Chaudhary >Cc: James.Bottomley@xxxxxxx; linux-scsi@xxxxxxxxxxxxxxx; open- >iscsi@xxxxxxxxxxxxxxxx; Lalit Chandivade; Ravi Anand; Harish Zunjarrao >Subject: Re: [RFC-V2 PATCH 2/5] qla4xxx: add support for set_net_config > >On 04/02/2011 01:34 PM, vikas.chaudhary@xxxxxxxxxx wrote: >> >> +/* Only for primary ACB, secondary ACB not supported >> + * iface_num = 0: valid -> linklocal, routable, router, autocfg options >> + * iface_num = 1: valid -> routable >> + */ >> +static inline void qla4xxx_set_ipv6(struct iscsi_net_param *net_param, >> + struct addr_ctrl_blk *init_fw_cb) >> +{ >> + switch (net_param->param_type) { >> + case ISCSI_NET_PARAM_IPV6_ADDR: >> + if (net_param->iface_num& 0x1) { > >Is this my mailer? > >I think you want to check for iface_num == 1. Above in the function >comments and in other places you set the iface_num as a int, but in this >function you check it more like a bitmask. > We want to check even interface here. I will update code to make iface_num data type to uint8_t. > >> + case ISCSI_NET_PARAM_IPV6_LINKLOCAL: >> + if (net_param->iface_num& 0x1) > >> + case ISCSI_NET_PARAM_IPV6_ROUTER: >> + if (net_param->iface_num& 0x1) > > >> + case ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG: >> + /* Autocfg applies to even interface */ >> + if (net_param->iface_num& 0x1) > >However, in other places you have that comment about even applying to >autocfg interfaces. QLogic adapter supports two IPv6 addresses per port and both address can be either autocfg or user specified. However autocfg setting is common for both the addresses, that's reason we update autocfg from even interface only. Also both IPv6 addresses will have same linklocal addr and same router address. Transport code is written in way that if someone wants to support individual configuration (autocfg, linklocal addr, etc) for each iface, they can do it. > >Why does it say even but you only support 2 ipv6 ifaces in the patches? >Can you support more? Are you coding it in preparation for more? > We are supporting only two IPv6 addresses in our driver for now. In future we may support more. Transport code is scalable to support up to 10 iface per port. > >..... > > > >> + >> +static int >> +qla4xxx_set_net_config(struct Scsi_Host *shost, char *data, int count) >> +{ >> + struct scsi_qla_host *ha = to_qla_host(shost); >> + int rval = 0; >> + struct iscsi_net_param *net_param = NULL; >> + struct addr_ctrl_blk *init_fw_cb = NULL; >> + dma_addr_t init_fw_cb_dma; >> + >> + struct addr_ctrl_blk *acb = NULL; >> + dma_addr_t acb_dma; >> + uint32_t ddb_state; >> + struct ddb_entry *ddb_entry, *ddbtemp; >> + unsigned long wait_time; >> + >> + uint32_t mbox_cmd[MBOX_REG_COUNT]; >> + uint32_t mbox_sts[MBOX_REG_COUNT]; >> + uint32_t total_param_count; >> + uint32_t length; >> + >> + init_fw_cb = dma_alloc_coherent(&ha->pdev->dev, >> + sizeof(struct addr_ctrl_blk),&init_fw_cb_dma, GFP_KERNEL); >> + if (!init_fw_cb) { >> + printk(KERN_ERR >> + "scsi(%ld): %s: Unable to alloc init_cb\n", >> + ha->host_no, __func__); > >ql4_printk instead of printk. Check in other parts of patches too. > >And remember to remove debugging printks or make what looking debug >printks more informative and use ql4_printk. > Ok. > >When we set the net settings we reset the port, right? What is the max >length of time that could take? Like if you set DHCP, do we wait for >that to timeout and what is longest we wait? We do not need to reset the adapter, we just disable and enable FW Settings (Address control block) which will apply new network configuration to the port. But before applying new network configuration we need to logout all active session so we are waiting up to 10sec for each session to logout. > >It was orignally designed to be singled threaded non blocking, so you >are stopping everything here. > We are waiting for session to logout as I mentioned above. This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html