Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2169052pxb; Fri, 25 Mar 2022 12:19:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1y5Dr3gl+zh8qvXPKstjV8Jg2VNtQgo8MW5eYxIbrLtqv4uqeEP6ua7rZPkJRhpkX7cwY X-Received: by 2002:a17:902:d512:b0:154:7580:6e78 with SMTP id b18-20020a170902d51200b0015475806e78mr13536295plg.35.1648235968644; Fri, 25 Mar 2022 12:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648235968; cv=none; d=google.com; s=arc-20160816; b=imbSWnIfpsrXHVYFHT7AHwwGXb1or56izUOlgwqbZoc++lqTtK/xChMZ3Y2YMDYxn5 ZjwnRqIbTgqjwZzq9rFBvvR4WYS1DwTVON9ZDFvEf6THCITE61D2mUULog0+GE/98Nt9 7qrq9OzlDnu8lt7bPB6lcFPAkxmjahRpIQcYpOskeqKAA+cgNGki4MK1iXksFtWTwDem 5MlIBWZMKnffSopRqJKmslnZ0Qv/lI8F3shUoRUf73kL/WREE8eHoKz7p/AXkkyAqoC0 3G0N/a8zpyQ/zId2i04OOVOIWsfgQFgmL0ZIwKkRm9qQnBalAd+ScLx3gqT3VnOGOlIY Na1A== 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=HTnro8ElzWYGwUnQ1xEh5rX341tm8XUNF8be7oHjNGA=; b=hlr3J5cCB9IsvFpjRBTiE/Sju0rCZxMiH+LcC6Wt2QueyDSvixQeqn/qFOkxLo1YzY +hMaN0oqt3KRufgeJ3LbDLQPqkySC+N6YaI36QSwCIVSUHdhAwKtiyi1BnwCH+ynEpKA PI6ivCHPaeJH6AjXaYl8O1ggdO+4PSZRkYuM2aS8Y+7gYcvJcWNzHPqcQDbmKpk1+hwK 0RxiSnWO3WUtaaOIYYIvCaVITLkLV13jBq6M+eHSfYCrfCpVY8prl6Er93bgatK6xPC3 1YYSJhq9vNN5Yxxydk6D+YfZGxqjdtCEMW8IuCyPXlNGBsqeldiY3PaCVVAEpVidJUOc 1ITw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fMmpYofP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id rm10-20020a17090b3eca00b001bd14e030c7si3506260pjb.159.2022.03.25.12.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:19:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fMmpYofP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 24DBC24A8BA; Fri, 25 Mar 2022 11:24:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349426AbiCXKJ7 (ORCPT + 99 others); Thu, 24 Mar 2022 06:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349367AbiCXKJ5 (ORCPT ); Thu, 24 Mar 2022 06:09:57 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 451DC9F6DD; Thu, 24 Mar 2022 03:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648116503; x=1679652503; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=D4tQL9ezIGp1V+zUe7L+IBKQ/EYL74mA6PBzw54L6KI=; b=fMmpYofPELHd3fnINdisYuhoohCcA3nxScnKAdoJT3GpK5ZA6swnptF9 qOI6FTUuL1yXqQ9gdhPyoPTM4akr2xiISnTh4eCePCPoA7wFhAornkipd 9JrRSEN5ZKWShwN5vpNjECypH9kdRJAB2Ov7yza/t3jOy4mzzxS2pFVxl ck2jhI08XujgoiV6LYWm9BX7WbISboFWSSKCwC4XXupiRIy1JuuLpzGA4 1qyjacvNnBxqEwGqd5xch1DQEGLswXrNQko5E93+4X6eHns49nwK1rUrS 9KhIZb7xiZcSyWuuzYLqNbRKtsDuccZjLu2KY4rP99wWaqN4DVNfHlOjg w==; X-IronPort-AV: E=McAfee;i="6200,9189,10295"; a="344769399" X-IronPort-AV: E=Sophos;i="5.90,207,1643702400"; d="scan'208";a="344769399" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2022 03:07:55 -0700 X-IronPort-AV: E=Sophos;i="5.90,207,1643702400"; d="scan'208";a="561309848" Received: from unknown (HELO localhost.localdomain) ([10.237.112.144]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2022 03:07:52 -0700 Date: Thu, 24 Mar 2022 03:09:25 -0400 From: Michal Swiatkowski To: Ivan Vecera Cc: netdev@vger.kernel.org, "moderated list:INTEL ETHERNET DRIVERS" , mschmidt@redhat.com, Brett Creeley , open list , poros@redhat.com, Jeff Kirsher , Jakub Kicinski , Paolo Abeni , "David S. Miller" Subject: Re: [Intel-wired-lan] [PATCH net] ice: Clear default forwarding VSI during VSI release Message-ID: References: <20220322142554.3253428-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220322142554.3253428-1-ivecera@redhat.com> X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Tue, Mar 22, 2022 at 03:25:54PM +0100, Ivan Vecera wrote: > VSI is set as default forwarding one when promisc mode is set for > PF interface, when PF is switched to switchdev mode or when VF > driver asks to enable allmulticast or promisc mode for the VF > interface (when vf-true-promisc-support priv flag is off). > The third case is buggy because in that case VSI associated with > VF remains as default one after VF removal. > > Reproducer: > 1. Create VF > echo 1 > sys/class/net/ens7f0/device/sriov_numvfs > 2. Enable allmulticast or promisc mode on VF > ip link set ens7f0v0 allmulticast on > ip link set ens7f0v0 promisc on > 3. Delete VF > echo 0 > sys/class/net/ens7f0/device/sriov_numvfs > 4. Try to enable promisc mode on PF > ip link set ens7f0 promisc on > > Although it looks that promisc mode on PF is enabled the opposite > is true because ice_vsi_sync_fltr() responsible for IFF_PROMISC > handling first checks if any other VSI is set as default forwarding > one and if so the function does not do anything. At this point > it is not possible to enable promisc mode on PF without re-probe > device. > > To resolve the issue this patch clear default forwarding VSI > during ice_vsi_release() when the VSI to be released is the default > one. > > Fixes: 01b5e89aab49 ("ice: Add VF promiscuous support") > Signed-off-by: Ivan Vecera > --- > drivers/net/ethernet/intel/ice/ice_lib.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c > index 53256aca27c7..20d755822d43 100644 > --- a/drivers/net/ethernet/intel/ice/ice_lib.c > +++ b/drivers/net/ethernet/intel/ice/ice_lib.c > @@ -3147,6 +3147,8 @@ int ice_vsi_release(struct ice_vsi *vsi) > } > } > > + if (ice_is_vsi_dflt_vsi(pf->first_sw, vsi)) > + ice_clear_dflt_vsi(pf->first_sw); > ice_fltr_remove_all(vsi); > ice_rm_vsi_lan_cfg(vsi->port_info, vsi->idx); > err = ice_rm_vsi_rdma_cfg(vsi->port_info, vsi->idx); Thanks for fixing it. Reviewed-by: Michal Swiatkowski > -- > 2.34.1 > > _______________________________________________ > Intel-wired-lan mailing list > Intel-wired-lan@osuosl.org > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan