From: Mike Christie <michaelc@cs.wisc.edu>
To: vikas.chaudhary@qlogic.com
Cc: James.Bottomley@suse.de, linux-scsi@vger.kernel.org,
open-iscsi@googlegroups.com, lalit.chandivade@qlogic.com,
ravi.anand@qlogic.com,
Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Subject: Re: [RFC-V2 PATCH 2/5] qla4xxx: add support for set_net_config
Date: Tue, 12 Apr 2011 22:55:54 -0500 [thread overview]
Message-ID: <4DA51ECA.1020507@cs.wisc.edu> (raw)
In-Reply-To: <1301769261-29896-3-git-send-email-vikas.chaudhary@qlogic.com>
On 04/02/2011 01:34 PM, vikas.chaudhary@qlogic.com 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.
> + 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.
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?
.....
> +
> +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.
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?
It was orignally designed to be singled threaded non blocking, so you
are stopping everything here.
next prev parent reply other threads:[~2011-04-13 3:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-02 18:34 [RFC-V2 PATCH 0/5] Proposal for iSCSI Network Configuration vikas.chaudhary
2011-04-02 18:34 ` [RFC-V2 PATCH 1/5] iscsi_transport: add support for set_net_config vikas.chaudhary
2011-04-13 3:41 ` Mike Christie
2011-04-02 18:34 ` [RFC-V2 PATCH 2/5] qla4xxx: " vikas.chaudhary
2011-04-13 3:55 ` Mike Christie [this message]
[not found] ` <4DA51ECA.1020507-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2011-04-13 14:40 ` Vikas Chaudhary
2011-04-02 18:34 ` [RFC-V2 PATCH 3/5] qla4xxx: Added new "struct ipaddress_config" vikas.chaudhary
2011-04-02 18:34 ` [RFC-V2 PATCH 4/5] iscsi_transport: show network configuration in sysfs vikas.chaudhary
2011-04-13 4:23 ` Mike Christie
2011-04-13 4:40 ` Mike Christie
2011-04-13 14:48 ` Vikas Chaudhary
[not found] ` <5E4F49720D0BAD499EE1F01232234BA8728A8CB623-HolNjIBXvBOXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
2011-04-13 16:44 ` Mike Christie
2011-04-14 4:15 ` Vikas Chaudhary
2011-04-14 5:18 ` Mike Christie
2011-04-14 5:54 ` Vikas Chaudhary
2011-04-21 22:10 ` Jayamohan.Kallickal
2011-04-13 17:00 ` Mike Christie
2011-04-13 22:47 ` Shyam_Iyer
2011-04-14 3:07 ` Mike Christie
2011-04-13 22:53 ` Michael Chan
2011-04-14 3:24 ` Mike Christie
2011-04-19 2:41 ` Mike Christie
2011-04-19 13:47 ` Vikas Chaudhary
2011-04-02 18:34 ` [RFC-V2 PATCH 5/5] qla4xxx: added support to show multiple iface " vikas.chaudhary
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DA51ECA.1020507@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@suse.de \
--cc=harish.zunjarrao@qlogic.com \
--cc=lalit.chandivade@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=open-iscsi@googlegroups.com \
--cc=ravi.anand@qlogic.com \
--cc=vikas.chaudhary@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).