From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38DCAC43381 for ; Wed, 6 Mar 2019 00:21:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F286B20684 for ; Wed, 6 Mar 2019 00:21:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="WHe9gW12" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728569AbfCFAVL (ORCPT ); Tue, 5 Mar 2019 19:21:11 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:40872 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727318AbfCFAVL (ORCPT ); Tue, 5 Mar 2019 19:21:11 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x260JM34146552; Wed, 6 Mar 2019 00:20:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : references : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=PW+Nr85CEOgYE4Iacvaj0bAS61dwUTqLwvgKM4h3+/8=; b=WHe9gW12RMv/J9sCd+7DsCr4BDU4baqrkuc5celdoIiWqHKqG8Y4ajeRyw6Hj9HJRm7W p+75BL9y+QNAxPDizx16WJ0+TrHHhNm6WP3yaSc3WCl3+Er85n981p/hqac91jwUGCq/ Y7sjDBdmxIx71/RpKYviDiXlOToKMB1maZrgZgUf111oa0AzSjRUNTsAKvyFnlNKRTYu Bon9xpXkzAU3neDPQcTlEApHyYl0EPSSr7rftyDOTObuhRIKdvII3Q/XCr8xZ/G5vehe t7eD1fSg+XhHnEKqNVdL/JX5YkEOryyRiCbeVTiJCmuHEpDTuoNj8TwAOCZP6+FS/p64 OA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2qyfbe920r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 Mar 2019 00:20:55 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x260KthG006761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 6 Mar 2019 00:20:55 GMT Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x260Krlk012974; Wed, 6 Mar 2019 00:20:53 GMT Received: from [10.159.129.123] (/10.159.129.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 05 Mar 2019 16:20:53 -0800 Subject: Re: [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces To: "Michael S. Tsirkin" References: <1551747059-11831-1-git-send-email-si-wei.liu@oracle.com> <20190304213032-mutt-send-email-mst@kernel.org> <20190305112427.1a23822e@shemminger-XPS-13-9360> <9448ae8f-c4e0-58a4-ff46-2f2951113d1e@oracle.com> <20190305190325-mutt-send-email-mst@kernel.org> Cc: Stephen Hemminger , Sridhar Samudrala , Jakub Kicinski , Jiri Pirko , David Miller , Netdev , virtualization@lists.linux-foundation.org, liran.alon@oracle.com, boris.ostrovsky@oracle.com, vijay.balakrishna@oracle.com From: si-wei liu Organization: Oracle Corporation Message-ID: <8737e985-f418-7002-c8b5-0023d1c4a453@oracle.com> Date: Tue, 5 Mar 2019 16:20:50 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20190305190325-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9186 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903060000 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 3/5/2019 4:06 PM, Michael S. Tsirkin wrote: > On Tue, Mar 05, 2019 at 11:35:50AM -0800, si-wei liu wrote: >> >> On 3/5/2019 11:24 AM, Stephen Hemminger wrote: >>> On Tue, 5 Mar 2019 11:19:32 -0800 >>> si-wei liu wrote: >>> >>>>> I have a vague idea: would it work to *not* set >>>>> IFF_UP on slave devices at all? >>>> Hmm, I ever thought about this option, and it appears this solution is >>>> more invasive than required to convert existing scripts, despite the >>>> controversy of introducing internal netdev state to differentiate user >>>> visible state. Either we disallow slave to be brought up by user, or to >>>> not set IFF_UP flag but instead use the internal one, could end up with >>>> substantial behavioral change that breaks scripts. Consider any admin >>>> script that does `ip link set dev ... up' successfully just assumes the >>>> link is up and subsequent operation can be done as usual. > How would it work when carrier is off? > >> While it *may* >>>> work for dracut (yet to be verified), I'm a bit concerned that there are >>>> more scripts to be converted than those that don't follow volatile >>>> failover slave names. It's technically doable, but may not worth the >>>> effort (in terms of porting existing scripts/apps). >>>> >>>> Thanks >>>> -Siwei >>> Won't work for most devices. Many devices turn off PHY and link layer >>> if not IFF_UP >> True, that's what I said about introducing internal state for those driver >> and other kernel component. Very invasive change indeed. >> >> -Siwei > Well I did say it's vague. > How about hiding IFF_UP from dev_get_flags (and probably > __dev_change_flags)? > Any different? This has small footprint for the kernel change for sure, while the discrepancy is still there. Anyone who writes code for IFF_UP will not notice IFF_FAILOVER_SLAVE. Not to mention more userspace "fixup" work has to be done due to this change. -Siwei