From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57668 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932256AbeCLUMX (ORCPT ); Mon, 12 Mar 2018 16:12:23 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2CKBBjD138265 for ; Mon, 12 Mar 2018 16:12:23 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gnuh0cnup-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 12 Mar 2018 16:12:22 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Mar 2018 14:12:22 -0600 Subject: Re: [PATCH net-next v2] ibmvnic: Bail from ibmvnic_open if driver is already open To: Andrew Lunn Cc: netdev@vger.kernel.org, Thomas Falcon , Nathan Fontenot References: <36666f4d-6207-ab97-e7f6-4d7d0c6a1155@linux.vnet.ibm.com> <20180312193351.GA31588@lunn.ch> <20180312201002.GC31588@lunn.ch> From: John Allen Date: Mon, 12 Mar 2018 15:12:18 -0500 MIME-Version: 1.0 In-Reply-To: <20180312201002.GC31588@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Message-Id: <503418ff-323d-8eda-16c4-73c9918b38e7@linux.vnet.ibm.com> Sender: netdev-owner@vger.kernel.org List-ID: On 03/12/2018 03:10 PM, Andrew Lunn wrote: >> The problem here is that our routine to change the mtu does a full reset on >> the driver meaning that in the process we go from effectively "open" to >> "closed" to "open" again. >> >> Consider the scenario where we change the mtu by running "ifdown ", >> editing the ifcfg file with the new mtu, and finally running "ifup > In this case, we call ibmvnic_close from the ifdown and as a result of the ifup, >> we do the reset for the mtu change (which puts us back in the "open" state) and >> call ibmvnic_open. After the reset, we are already in the "open" state and the >> following call to open is redundant. > > Hi John > > So you are saying "ip link set mtu 4242 eth1" on a down interface will > put it up. That i would say is broken. You should be fixing this, > rather than papering over the cracks. That's a good point. I'll work on a fix to address that. -John > > Andrew > >