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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 D80AAC433E9 for ; Thu, 3 Sep 2020 19:14:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9DBA20C56 for ; Thu, 3 Sep 2020 19:14:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599160472; bh=fVAV7ORHpgAuQL8kldxZIJsiq8sgyq7yp5XvA5SqRb0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=wvy+6vWNGazwZ6w+uJgNzBnk3IWzqAF6Ckef4GIveq9qR47Unm5lJE50rnR4d1dq4 taXd7z9yuIFXUX0NpuNf2b5ROi3RDlCsLeNTYAy8Sx9mq2BqCtBiSmvbE4yhdHICGN Gcnk0XlWcT+u2wC1HARaI8TXmNqeOeRHIqwhjZeQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728852AbgICTOb (ORCPT ); Thu, 3 Sep 2020 15:14:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:35558 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728419AbgICTOa (ORCPT ); Thu, 3 Sep 2020 15:14:30 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4B9FA208CA; Thu, 3 Sep 2020 19:14:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599160470; bh=fVAV7ORHpgAuQL8kldxZIJsiq8sgyq7yp5XvA5SqRb0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GCLtyavT3HAMXjAV5TFlSh1Mmf7DsGfvz+77sEfODmZAj0ikGSQx1tB8SwNBmtHSO c8SlZJONjqq9TDs2m+bHqTrGyBz13+bzrDVSXylu+lhHcQGm3cvH50kWYpzUwU0XfA S4oEj6pCRaTdnp6hDTv5TmJJ81nKzw+ml8hjnSss= Date: Thu, 3 Sep 2020 12:14:28 -0700 From: Jakub Kicinski To: Vasundhara Volam Cc: Jiri Pirko , Michael Chan , jtoppins@redhat.com, Netdev , Ido Schimmel , Andrew Lunn Subject: Re: Failing to attach bond(created with two interfaces from different NICs) to a bridge Message-ID: <20200903121428.4f86ef1f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 3 Sep 2020 12:52:25 +0530 Vasundhara Volam wrote: > Hello Jiri, > > After the following set of upstream commits, the user fails to attach > a bond to the bridge, if the user creates the bond with two interfaces > from different bnxt_en NICs. Previously bnxt_en driver does not > advertise the switch_id for legacy mode as part of > ndo_get_port_parent_id cb but with the following patches, switch_id is > returned even in legacy mode which is causing the failure. > > --------------- > 7e1146e8c10c00f859843817da8ecc5d902ea409 net: devlink: introduce > devlink_compat_switch_id_get() helper > 6605a226781eb1224c2dcf974a39eea11862b864 bnxt: pass switch ID through > devlink_port_attrs_set() > 56d9f4e8f70e6f47ad4da7640753cf95ae51a356 bnxt: remove > ndo_get_port_parent_id implementation for physical ports > ---------------- > > As there is a plan to get rid of ndo_get_port_parent_id in future, I > think there is a need to fix devlink_compat_switch_id_get() to return > the switch_id only when device is in SWITCHDEV mode and this effects > all the NICs. > > Please let me know your thoughts. Thank you. I'm not Jiri, but I'd think that hiding switch_id from devices should not be the solution here. Especially that no NICs offload bridging today. Could you describe the team/bridge failure in detail, I'm not that familiar with this code.