Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5407861rwl; Tue, 11 Apr 2023 05:10:49 -0700 (PDT) X-Google-Smtp-Source: AKy350abh7NLqtP0roVpf87PG7bvU3ia40aBjAvnxVQ+t8pcUGS4tn4DflbT8ZiMF7aPYWggbzxc X-Received: by 2002:a17:902:ea0b:b0:1a6:4c34:98bb with SMTP id s11-20020a170902ea0b00b001a64c3498bbmr6561486plg.57.1681215048745; Tue, 11 Apr 2023 05:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681215048; cv=none; d=google.com; s=arc-20160816; b=iEFxd3Wt9r97H9n/djH3VRLSDm35FliOaLJrFTd/wEu/x9MUE64LuX7Kzn7ts+ISEv D8++xF/SJT/GK7eb1V4qyHumTLezpmTUly8awhOyTw643LVYr9qP0uw9/fSIi+Ni10C8 BKz3rXum4rWG2M1r1ouf7rLUlC/6lrCUHJuxu4OCqmKEIJwEf10HtC9z4Lm7ims/0zVl /TSccsfLYkffH0PPZuKUBAukkIiHJzVo3Mnav2/063zKY78mqoCuweYNSHX7uOuZb15g aTV6UvszLs2icGCkevZrPLd7cdBDxfjjf5cXzLrkQfl9CFVBJHoM5Z5y2AA9K32QeY4F NSNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Zsl3EqzQpOYH+JVTc+1nS7wHRqvd0DNL4VH3/d/TtBM=; b=YPYMW6lBCo5TOssA6OuvpXtoI3quh6NHT+PCiog/lHCCThiSrItlPcX29fDYSEqdlt mPGUBvC/9UsxlzONI7yjY1K8/YRY+FHmqOhqE8jTsxENyQvU8DlsbSM5o5K3VuyilUZ4 w4GzT1PY4LWbZmjGocURqFbCw0AVAoymFycKsbGl5o9wzzilbR0myweqqjWDQisAXzSt TyEBWsvBHy3LAd5la1wYnyJ53ItcKmv+cA9ZjqssMPYQ7wKpZBC1uOmHE3gtBWZHM9VN S7V895migk+nTVFsA15zwNlL4FiL+QW67DXdx5sdZuokfmeexrGtOTVwqapJOJ6BJGND swhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ef7XC6KO; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a170902789100b001a5145cf5d5si10606317pll.167.2023.04.11.05.10.12; Tue, 11 Apr 2023 05:10:48 -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=@redhat.com header.s=mimecast20190719 header.b=Ef7XC6KO; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229664AbjDKMDU (ORCPT + 99 others); Tue, 11 Apr 2023 08:03:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjDKMDT (ORCPT ); Tue, 11 Apr 2023 08:03:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3DE54486 for ; Tue, 11 Apr 2023 05:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681214556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zsl3EqzQpOYH+JVTc+1nS7wHRqvd0DNL4VH3/d/TtBM=; b=Ef7XC6KOKaDpuRTJR6SDUoIvNqv6nrJuHCza5uX3j0OVNwtEfT8HyjFatWR3Qw9AxP+Ly+ AkK4Ebqxf7VtMlF9nQL8HpfylFNq7ZF4kcIvhHNDllar+uW8M1l8MCgOWnq4pWld5JpwYJ a0WVG+05CLfNztgoiysWnpOH27+dtfQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-350-qR3hLjzbPhO16mLcvtBGuQ-1; Tue, 11 Apr 2023 08:02:35 -0400 X-MC-Unique: qR3hLjzbPhO16mLcvtBGuQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E710B101A54F; Tue, 11 Apr 2023 12:02:34 +0000 (UTC) Received: from [10.43.2.89] (unknown [10.43.2.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9BC6492C13; Tue, 11 Apr 2023 12:02:33 +0000 (UTC) Message-ID: <9541a779-bca8-4843-23ff-aff47709c5af@redhat.com> Date: Tue, 11 Apr 2023 14:02:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH net-next] bnxt_en: Allow to set switchdev mode without existing VFs To: Paolo Abeni , netdev@vger.kernel.org Cc: mschmidt@redhat.com, Michael Chan , "David S. Miller" , Eric Dumazet , Jakub Kicinski , open list References: <20230406130455.1155362-1-ivecera@redhat.com> <258624e7ffa7bfc3960e727c451cdabe4e7f3efe.camel@redhat.com> Content-Language: en-US From: Ivan Vecera In-Reply-To: <258624e7ffa7bfc3960e727c451cdabe4e7f3efe.camel@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 11. 04. 23 12:22, Paolo Abeni wrote: > On Thu, 2023-04-06 at 15:04 +0200, Ivan Vecera wrote: >> Remove an inability of bnxt_en driver to set eswitch to switchdev >> mode without existing VFs by: >> >> 1. Allow to set switchdev mode in bnxt_dl_eswitch_mode_set() so >> representors are created only when num_vfs > 0 otherwise just >> set bp->eswitch_mode >> 2. Do not automatically change bp->eswitch_mode during >> bnxt_vf_reps_create() and bnxt_vf_reps_destroy() calls so >> the eswitch mode is managed only by an user by devlink. >> Just set temporarily bp->eswitch_mode to legacy to avoid >> re-opening of representors during destroy. >> 3. Create representors in bnxt_sriov_enable() if current eswitch >> mode is switchdev one >> >> Tested by this sequence: >> 1. Set PF interface up >> 2. Set PF's eswitch mode to switchdev >> 3. Created N VFs >> 4. Checked that N representors were created >> 5. Set eswitch mode to legacy >> 6. Checked that representors were deleted >> 7. Set eswitch mode back to switchdev >> 8. Checked that representros were re-created > > Could you please update the commit message and re-post? > > Thanks! of course.. I.