Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4728824rwb; Tue, 8 Aug 2023 12:53:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFl5k9bXYBA2KZEjkiqkYSOBe/PIl3On5RNRnOKzDqnYreQm6nEMuj23xwewNfdx2ztZZ2m X-Received: by 2002:a17:906:8a5c:b0:99c:55a9:3925 with SMTP id gx28-20020a1709068a5c00b0099c55a93925mr478544ejc.24.1691524407819; Tue, 08 Aug 2023 12:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691524407; cv=none; d=google.com; s=arc-20160816; b=LtiblFEki/qq0oVYCsckNaqwg1FUErfth/FZbuDxwmGf01yJ3M/Js+ocD99ETnR9SW 2g9u1BL50PcAUiiW6zDzUt9Q3RUj9GRXuCuy59x2E3L4HbKuWS54u/7CsVBWJs7YBvzs 8Jd/vCENMW+YSDdV5X/MIFeXGphCfPZYcvz+tr2ggkJQzMXSxxl3+B83IjYMyncPYK6s SJbHld9iSrpu8CB0oMZiGAEZQxm6xOq2I0gCC0MDdoPNd0lrqQBTJfoOY70VpFJs7Dk/ NgK+vs+T2vvyzEJL60BwYsOjsBHUNLJ4A+ygyKF+um6M84iDMfKpjt61DxAi2fa7G8UD UCpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IPJNpPM2VgNZ/JOjDC/OtB2B2FWt3jLrYof3y9BKJXM=; fh=kDjNYbNqpTt++NYpKxrianM7w81rO4mq5+oH1ITmLwE=; b=Cg3ptoU8AMn3yvuPEhDyn4ceJkCuaBA9CSlDfRmW2iOpVoG5M8JBXsS46tgkwdile2 KaigMTB6tyuoAa/WGjLar0FXThW/n+GvtkfGC//LbESg2IINf8S93nolVxII6JEvJWuS kd0NqXTbpa2+rUM7A7n+ALUVa13W4G5PswPM1x6Kyk+x08rDzyvc09SMAtNFWTh7TMJI rBCyz+RmEkME3AJtmDCMOONNzpBETzt1Q7ANUDmTk0oFG95rogLGlpPMKK2TT62arGnI pFpHq66mx6te3lROK/T4cMCPYP7P/FBtt67qJxX4uZB0n/zfA05lj7eF4oLzoNf3wZQ/ COMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=riIVQ21W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx19-20020a170906ca5300b009929eee322dsi7500818ejb.180.2023.08.08.12.53.03; Tue, 08 Aug 2023 12:53:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=riIVQ21W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236231AbjHHTbF (ORCPT + 99 others); Tue, 8 Aug 2023 15:31:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236168AbjHHTak (ORCPT ); Tue, 8 Aug 2023 15:30:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB4C61CCDE; Tue, 8 Aug 2023 11:57:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 61C50629D0; Tue, 8 Aug 2023 18:57:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0356FC433C8; Tue, 8 Aug 2023 18:57:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691521027; bh=Yz8kmXDHelcgfNpUcTRyVue95xN8llNn+98L/IKGKR4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=riIVQ21Wdku5UYYuh5T/YtsWCZWhUtFORY3womBGnauYPurNSGCsz4MOfW2gMr0NV QU3Cw7k0RuoviH+eOjeBiSjVVqy6HbDY7o/z4q1RsL8TSVelOhTt5tfV7t7DUW3EA/ PjUXvQueEo1cIp6hqDxVeZCQEZeJIl3NgjQZB9LjJqyX3Bpm4aWme+CwjJWUrE5ddJ SLKoYuYopBuidifjlanuVFSsF96zuEd9VDOWedTftawsv/7oQCz/ZYUWWUOhnGE7Vx OH28kkaJR2LyhuYY9f0BEe10z7PyxhncQBdfkPFVp+0LLHLUEq0PV8Fv58xDupXdFT zlVyR9Tsxmipg== Date: Tue, 8 Aug 2023 21:57:00 +0300 From: Leon Romanovsky To: Petr Pavlu Cc: tariqt@nvidia.com, yishaih@nvidia.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, jgg@ziepe.ca, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 06/10] mlx4: Avoid resetting MLX4_INTFF_BONDING per driver Message-ID: <20230808185700.GK94631@unreal> References: <20230804150527.6117-1-petr.pavlu@suse.com> <20230804150527.6117-7-petr.pavlu@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230804150527.6117-7-petr.pavlu@suse.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 04, 2023 at 05:05:23PM +0200, Petr Pavlu wrote: > The mlx4_core driver has a logic that allows a sub-driver to set the > MLX4_INTFF_BONDING flag which then causes that function mlx4_do_bond() > asks the sub-driver to fully re-probe a device when its bonding > configuration changes. > > Performing this operation is disallowed in mlx4_register_interface() > when it is detected that any mlx4 device is multifunction (SRIOV). The > code then resets MLX4_INTFF_BONDING in the driver flags. > > Move this check directly into mlx4_do_bond(). It provides a better > separation as mlx4_core no longer directly modifies the sub-driver flags > and it will allow to get rid of explicitly keeping track of all mlx4 > devices by the intf.c code when it is switched to an auxiliary bus. > > Signed-off-by: Petr Pavlu > Tested-by: Leon Romanovsky > --- > drivers/net/ethernet/mellanox/mlx4/intf.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky