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 6A6C5C43381 for ; Tue, 19 Mar 2019 23:26:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 340DB2085A for ; Tue, 19 Mar 2019 23:26:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="bG3e93/Z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727241AbfCSX0V (ORCPT ); Tue, 19 Mar 2019 19:26:21 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:50148 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfCSX0V (ORCPT ); Tue, 19 Mar 2019 19:26:21 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2JNJKeT120809; Tue, 19 Mar 2019 23:26:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2018-07-02; bh=i7IC6zmtFQ0wt6L9gcoYjgp9oUWsefGp4S0lNewIQBU=; b=bG3e93/ZNVYeiqgcgTuQCOPPprFdjwNdWEewue5JFE/kkM1bLifNNyqODH66kESV5Mm+ /1jdOIPb2agSdxXXCqXDpHD3ss59kcqrCfiVIsEmS5WDFrkK/oAvSvi6Q7jdmEN6U0Of DxDZFtoFG7bLn4a2FtaDZHEXjmXqd7DwlWnQl5KJx8/fPx290WYwG4fQjTzgKU9/0d/b UU7WEZTtULOAHFY8lWcRiGBVggt+WXR46itXzscGO/gZeRtYou/KJjfajTXd8NPXyg+H iX8QJf3z/oQNJNXbr5aXs6bENdMWpPHi+KfELZ2PuGub03fcmQgewlRFhSf2n9oY3v5C Nw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2r8ssrfkk7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Mar 2019 23:26:08 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x2JNQ79k028090 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Mar 2019 23:26:07 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2JNQ6WT004165; Tue, 19 Mar 2019 23:26:06 GMT Received: from [192.168.14.112] (/109.67.245.189) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Mar 2019 16:26:05 -0700 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: [summary] virtio network device failover writeup From: Liran Alon In-Reply-To: <20190319171638-mutt-send-email-mst@kernel.org> Date: Wed, 20 Mar 2019 01:25:58 +0200 Cc: Stephen Hemminger , Si-Wei Liu , Sridhar Samudrala , Alexander Duyck , Jakub Kicinski , Jiri Pirko , David Miller , Netdev , virtualization@lists.linux-foundation.org, boris.ostrovsky@oracle.com, vijay.balakrishna@oracle.com, jfreimann@redhat.com, ogerlitz@mellanox.com, vuhuong@mellanox.com Content-Transfer-Encoding: quoted-printable Message-Id: <79F5D7C0-BBAA-4F78-9039-27A444970002@oracle.com> References: <20190317095052-mutt-send-email-mst@kernel.org> <54E7C3AF-C3C5-4AF2-86C9-AA50389F855F@oracle.com> <20190319084647.727f8dcf@shemminger-XPS-13-9360> <20190319171638-mutt-send-email-mst@kernel.org> To: "Michael S. Tsirkin" X-Mailer: Apple Mail (2.3445.4.7) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9200 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-1903190160 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > On 19 Mar 2019, at 23:19, Michael S. Tsirkin wrote: >=20 > On Tue, Mar 19, 2019 at 08:46:47AM -0700, Stephen Hemminger wrote: >> On Tue, 19 Mar 2019 14:38:06 +0200 >> Liran Alon wrote: >>=20 >>> b.3) cloud-init: If configured to perform network-configuration, it = attempts to configure all available netdevs. It should avoid however = doing so on net-failover slaves. >>> (Microsoft has handled this by adding a mechanism in cloud-init to = blacklist a netdev from being configured in case it is owned by a = specific PCI driver. Specifically, they blacklist Mellanox VF driver. = However, this technique doesn=E2=80=99t work for the net-failover = mechanism because both the net-failover netdev and the virtio-net netdev = are owned by the virtio-net PCI driver). >>=20 >> Cloud-init should really just ignore all devices that have a master = device. >> That would have been more general, and safer for other use cases. >=20 > Given lots of userspace doesn't do this, I wonder whether it would be > safer to just somehow pretend to userspace that the slave links are > down? And add a special attribute for the actual link state. I think this may be problematic as it would also break legit use case of = userspace attempt to set various config on VF slave. In general, lying to userspace usually leads to problems. If we reach to = a scenario where we try to avoid userspace issues generically and not on a userspace component basis, I believe the right path should be to = hide the net-failover slaves such that explicit action is required to actually manipulate them (As described in blog-post). E.g. = Automatically move net-failover slaves by kernel to a different netns. -Liran >=20 > --=20 > MST