Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1090573pxu; Wed, 2 Dec 2020 10:45:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2f4d8TOeXnfms/qNLrrHGVcObnb2MjWZM8Lflk7871MiY0P8Q0EO9b+R3sVVNbdzOsXDz X-Received: by 2002:a05:6402:31b6:: with SMTP id dj22mr1312451edb.348.1606934740332; Wed, 02 Dec 2020 10:45:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606934740; cv=none; d=google.com; s=arc-20160816; b=lZfONjLStObSS9fBIGNaVem7rU7ZbyHKKHvreB7vK/zzm7A+j89U2OIPiYyYK6tfZQ +9+Bfe4uDCxTc8U/JXvSRvkafUN84yd6XUV5ZstjwttAI0M+up9t7VwNkQaun8DQWSAN FyRvvgyUPHIKC8FGMwnQXxhEfuM5YqIeDn58dUGW2VEzpo3Yq+DM+TVUKt6I0Y/C3eUZ 0Uhj1Mk1d1PpaEih5ZW/oRGUPnSA/Ps9oSGeWYLlCSaZTCjopQqkjjrQkztBtUKxMl9C xUfMSGk0jlYZgNUnU561Z9Ztyi1JX7ktAItjiEt1MHu0o0yQgZzBGEUo5RbqfRAKIT+8 iF1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=L69NYuLhU3uOuWNgUvbNXLJASVglg/Pd6mCXYVJf3RI=; b=LIGDjn5CySs+nVepfgwcKuoYpDJo1aXeZ8SBT210xZfPMOJ5DrOaH2MM9ahngGKBa5 Bd6Olc8aqG0tRsWZQDvxB0Ss9Cr/zF5dQfyRXlPVy08cUJqaeomlaGk6B6JsuzcMfefV VLmpaegHfCMgLFw2HnnU3/6Uf1McYzQFr+gphESxPF56hvqYXshAHlXvDVAEHSBzM0A3 GpFX6ozTEQB0g6yFVMuFsWy3kfMZqKHSkFDfVglhpTVWpPXGjmX9rY+avHqNEsm7rAf/ mBzQfyRrcYx+nLJ9/sxvk0nvG3Whw4XKmmyWpSxmkm5A4O56aby8T2O8wEOKfbH1lxLQ Go/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=n9c4Mh9I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e8si481948edc.196.2020.12.02.10.45.16; Wed, 02 Dec 2020 10:45:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=n9c4Mh9I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728105AbgLBSle (ORCPT + 99 others); Wed, 2 Dec 2020 13:41:34 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57688 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbgLBSld (ORCPT ); Wed, 2 Dec 2020 13:41:33 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B2IXv0o135382; Wed, 2 Dec 2020 13:40:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=L69NYuLhU3uOuWNgUvbNXLJASVglg/Pd6mCXYVJf3RI=; b=n9c4Mh9IuKKx/pYdlxPCERQ3SGQmBr8rnSq8jDCHYfKyLrjCixS9aUUJ2Hx+Osg3C5gs sdEjhEFvkfFHJP8Ev93YBWczcV0PRfixy09Lkrl1ueRImhX8rkbbmHlotQBXDuivAdMJ eSZh70vAELXN9wS+/6aqboUX9ZwLZD8dt4FnACjhkL2NR9i7817Uu9AmaBcghqd99sgQ K4cQSYRt1HVf2AckGg3TH/4rkYtQYrjTsjD5dr/W3PpvPHRc6Jtd/8PhjiTjhBXrBz7H 7+NzI+KYf5tdvaWphc+3mFiaizLCpm8CR4ZP3j7fTwpOVSmU3EnU/Bc5farB09jBzUoP pQ== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 355sr60ydw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 13:40:47 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B2IRU7W031477; Wed, 2 Dec 2020 18:40:46 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma04wdc.us.ibm.com with ESMTP id 354ysukkp8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 18:40:46 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B2IekZ231916538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Dec 2020 18:40:46 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 54ED6124054; Wed, 2 Dec 2020 18:40:46 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 81E39124052; Wed, 2 Dec 2020 18:40:45 +0000 (GMT) Received: from oc6034535106.ibm.com (unknown [9.211.78.151]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 2 Dec 2020 18:40:45 +0000 (GMT) Subject: Re: [PATCH v2 17/17] ibmvfc: provide modules parameters for MQ settings To: Tyrel Datwyler , james.bottomley@hansenpartnership.com Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, brking@linux.ibm.com References: <20201202005329.4538-1-tyreld@linux.ibm.com> <20201202005329.4538-18-tyreld@linux.ibm.com> From: Brian King Message-ID: Date: Wed, 2 Dec 2020 12:40:44 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201202005329.4538-18-tyreld@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-02_10:2020-11-30,2020-12-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 suspectscore=0 spamscore=0 adultscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 phishscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012020109 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/1/20 6:53 PM, Tyrel Datwyler wrote: > +module_param_named(mig_channels_only, mig_channels_only, uint, S_IRUGO | S_IWUSR); > +MODULE_PARM_DESC(mig_channels_only, "Prevent migration to non-channelized system. " > + "[Default=" __stringify(IBMVFC_MIG_NO_SUB_TO_CRQ) "]"); > +module_param_named(mig_no_less_channels, mig_no_less_channels, uint, S_IRUGO | S_IWUSR); > +MODULE_PARM_DESC(mig_no_less_channels, "Prevent migration to system with less channels. " > + "[Default=" __stringify(IBMVFC_MIG_NO_N_TO_M) "]"); Both of these are writeable, but it doesn't look like you do any re-negotiation with the VIOS for these changed settings to take effect if someone changes them at runtime. > + > module_param_named(init_timeout, init_timeout, uint, S_IRUGO | S_IWUSR); > MODULE_PARM_DESC(init_timeout, "Initialization timeout in seconds. " > "[Default=" __stringify(IBMVFC_INIT_TIMEOUT) "]"); > @@ -3228,6 +3250,36 @@ static ssize_t ibmvfc_store_log_level(struct device *dev, > return strlen(buf); > } > > +static ssize_t ibmvfc_show_scsi_channels(struct device *dev, > + struct device_attribute *attr, char *buf) > +{ > + struct Scsi_Host *shost = class_to_shost(dev); > + struct ibmvfc_host *vhost = shost_priv(shost); > + unsigned long flags = 0; > + int len; > + > + spin_lock_irqsave(shost->host_lock, flags); > + len = snprintf(buf, PAGE_SIZE, "%d\n", vhost->client_scsi_channels); > + spin_unlock_irqrestore(shost->host_lock, flags); > + return len; > +} > + > +static ssize_t ibmvfc_store_scsi_channels(struct device *dev, > + struct device_attribute *attr, > + const char *buf, size_t count) > +{ > + struct Scsi_Host *shost = class_to_shost(dev); > + struct ibmvfc_host *vhost = shost_priv(shost); > + unsigned long flags = 0; > + unsigned int channels; > + > + spin_lock_irqsave(shost->host_lock, flags); > + channels = simple_strtoul(buf, NULL, 10); > + vhost->client_scsi_channels = min(channels, nr_scsi_hw_queues); Don't we need to do a LIP here for this new setting to go into effect? > + spin_unlock_irqrestore(shost->host_lock, flags); > + return strlen(buf); > +} > + > static DEVICE_ATTR(partition_name, S_IRUGO, ibmvfc_show_host_partition_name, NULL); > static DEVICE_ATTR(device_name, S_IRUGO, ibmvfc_show_host_device_name, NULL); > static DEVICE_ATTR(port_loc_code, S_IRUGO, ibmvfc_show_host_loc_code, NULL); -- Brian King Power Linux I/O IBM Linux Technology Center