Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2120810pxb; Fri, 25 Mar 2022 11:26:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwe3NoFTNYGeIgSixCgkTRq5a8CESB+y96/UEYvpXLYsh6b8Q7jFuwq3Ux3KXgR35tMJqC X-Received: by 2002:a63:185c:0:b0:381:10:2843 with SMTP id 28-20020a63185c000000b0038100102843mr660409pgy.433.1648232817633; Fri, 25 Mar 2022 11:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648232817; cv=none; d=google.com; s=arc-20160816; b=FmmXhCKHDUi3xAIGVDhb8Pj+7TA/2DHUujT1HC+4ZlxlzBagg9kDUDRHxTiBE9jq0s 9TvxvDgcLnKB4gnlCGJh3ONbXsttmuO97Al/1MU0i2WZGXKIZ/1jKx57JxlHERrPBaNB dv0D8qAWjdQZZzy5zpwdrfocS7gCK5D8LSJb6uNGMOu81sKFi4qpJRUN13CmA52yJjtM hkS3cJLqJOpmdshuAUimLuF1alLRgLbkdR+3kNNGG9KPR7RarrelL5Jj27DrcKh+hATO 1aTcK7BPQHo6bvF14DGkqro5+UBzNdiTy5dQD/tftpYrbvgqocD9q3EbSNLcha8W8+Mj 9hOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=tE/eAfmAjD6lTZj7wBC76uZYxkyvkom3vjRY4fsJkcM=; b=DUamxQKzFlLUe2mGx7On6l3Hc4MZhUEC84FRm5tlK4JQRq5ym5QNL+aUcgReJw4Zbs mNI87NPVrL918Tkg+zGRMmQOaBKjgjgGArScCAORw3T+7QCOO6wpo+fT0Sxw/tYkhTtj G5afm4QIk/EY79ID8CZqzWL284Cm18TAXnbHOJdz1dJdB3WlxwnFTRyv/5Qs/LxwOfEY V/9620UF+e5PrXyk9hYNKWMBpLnNZbmAUvUcKP87dKtE931cp5eafGueYmvq/Wewp9Ai FVQG9Ev4m36qIjpWRGUdOs1O2U018H5gw4e/wy7dPh/Zgs6IP/DyRdYUjct/dWyQVMF5 lkvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OAHK5EdD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e3-20020a17090a9a8300b001c6bb4c1febsi3290383pjp.126.2022.03.25.11.26.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:26:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OAHK5EdD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E97F717586D; Fri, 25 Mar 2022 10:49:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359217AbiCYNGL (ORCPT + 99 others); Fri, 25 Mar 2022 09:06:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356447AbiCYNGI (ORCPT ); Fri, 25 Mar 2022 09:06:08 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 02A089A9B7 for ; Fri, 25 Mar 2022 06:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648213474; 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=tE/eAfmAjD6lTZj7wBC76uZYxkyvkom3vjRY4fsJkcM=; b=OAHK5EdDnTMVyUZ6NUs6TDIDjcfFGOAEfeslpM1TkvCTjro5S1H+4KTtQBd4gcT/eTjhQG oadsnNbmMvglWj5MkVQ7hvgH7VaVdOo1rw4TZ7h8ZDgx9i1XI+zqD9afxmnWOU9N9SAuCz x6xUIx08qUKKgynLJhqNamb8rqb/S3s= 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-553-TomwG3uSNUuzrcPOhW2nZA-1; Fri, 25 Mar 2022 09:04:30 -0400 X-MC-Unique: TomwG3uSNUuzrcPOhW2nZA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3DCF9802809; Fri, 25 Mar 2022 13:04:29 +0000 (UTC) Received: from ceranb (unknown [10.40.192.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 374C42166B2D; Fri, 25 Mar 2022 13:04:25 +0000 (UTC) Date: Fri, 25 Mar 2022 14:04:24 +0100 From: Ivan Vecera To: Marcin Szycik Cc: netdev@vger.kernel.org, poros@redhat.com, mschmidt@redhat.com, Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Jeff Kirsher , Akeem G Abodunrin , Anirudh Venkataramanan , "moderated list:INTEL ETHERNET DRIVERS" , open list Subject: Re: [PATCH net] ice: Fix broken IFF_ALLMULTI handling Message-ID: <20220325140424.696e8abc@ceranb> In-Reply-To: References: <20220321191731.2596414-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 Wed, 23 Mar 2022 21:05:20 +0100 Marcin Szycik wrote: > > @@ -3482,18 +3503,44 @@ ice_vlan_rx_kill_vid(struct net_device *netdev, __always_unused __be16 proto, > > if (!vid) > > return 0; > > > > + while (test_and_set_bit(ICE_CFG_BUSY, vsi->state)) > > + usleep_range(1000, 2000); > > + > > /* Make sure ice_vsi_kill_vlan is successful before updating VLAN > > * information > > */ > > ret = ice_vsi_kill_vlan(vsi, vid); > > if (ret) > > - return ret; > > + goto finish; > > > > - /* Disable pruning when VLAN 0 is the only VLAN rule */ > > - if (vsi->num_vlan == 1 && ice_vsi_is_vlan_pruning_ena(vsi)) > > - ret = ice_cfg_vlan_pruning(vsi, false); > > + /* Remove multicast promisc rule for the removed VLAN ID if > > + * all-multicast is enabled. > > + */ > > + if (vsi->current_netdev_flags & IFF_ALLMULTI) > > + ice_fltr_clear_vsi_promisc(&vsi->back->hw, vsi->idx, > > + ICE_MCAST_VLAN_PROMISC_BITS, vid); > > + > > + if (vsi->num_vlan == 1) { > > + /* Disable pruning when VLAN 0 is the only VLAN rule */ > > + if (ice_vsi_is_vlan_pruning_ena(vsi)) > > + ice_cfg_vlan_pruning(vsi, false); > > Why was `ret = ...` removed here? Because we are in ice_vlan_rx_kill_vid() that is used to remove VLAN and at this the VLAN ID was removed from VLAN filter so we cannot return value other than 0. Network stack would think that the VLAN ID is still present in VLAN filter. Ivan