Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2183949pxb; Fri, 25 Mar 2022 12:35:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxIm14iD5yA3bxopTh/YVXNuVSV/i9pWKfnU2oYCpvTuAEjFzwemIRz5St+xa6FX1FxC5E X-Received: by 2002:a17:902:bd95:b0:14f:40ab:270e with SMTP id q21-20020a170902bd9500b0014f40ab270emr13136914pls.101.1648236917182; Fri, 25 Mar 2022 12:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648236917; cv=none; d=google.com; s=arc-20160816; b=xOy9wC18JTJ+a/z0v+V4NEyQj/LQwgLAWob0Ugmry97MUSMeX645x7KNzbz48CtN31 lyTywhrQ6JBNPMUXWPi3MHvNHu6zf+iNO/J21JSYH8jjv4sEkuVQPVEWugIgArPIxIQh 9ymzf1gFpnBAPtKOhbeCEEGpTpSJIbTm0iJwzG/1dfeoMZWtpG0kgdJyQlnYo0OWu6o2 SqIyx4JDHAHJ0jScPaNsRNRa5FzqkK8y+o713X3QspaNxkOT+P7nHJ3Od7Lt9M6+en7E p1qLnrGwLLkOlLYtVkAVZLz0x6EezkshadI/s5QGJeqSqxkpTRILJidn1fTMiUO3D9Bb QLNA== 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=WhhWwWg4FCTKQgANTQEkU3eik+mebp4qX/dh9cAxltc=; b=xxrgVnBwVJ9R6YA4nZvftuqdhQ2gx+YZNVdC/ZSbbjQX3GYk4tbvMR6QHAHByNrHIK 0uuJmEFLXrdyyMmtMIxdfBR+AJRjaffeL2qS75nWDJab+Ugpd5HNCDBBtJl1yknPhG6G vP4zz6fOLC7w/sXQB3aG7rl4qQxIBuNMLTLRutqtwOEs1Vbab3q0nOJnDnK6QpuHUF1H tM1dM/SGKPNglTUxYWQKkPD3i+V/Oz5+1dMjwnvNXq3AjmCtKfNqbHZCraufSyLkHovB nCVHz13HytSnLJ6PFM2qBCkqgZVyYR/iHD8n4qAFS5IrTzA3yBVCeqJfQwFoB5rYJZAh nyuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ivxOqLfL; 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=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y17-20020a634951000000b003816043f0b8si3320345pgk.685.2022.03.25.12.35.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:35:17 -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=@redhat.com header.s=mimecast20190719 header.b=ivxOqLfL; 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=redhat.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8B76B16E233; Fri, 25 Mar 2022 11:25:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359180AbiCYMzq (ORCPT + 99 others); Fri, 25 Mar 2022 08:55:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238986AbiCYMzm (ORCPT ); Fri, 25 Mar 2022 08:55:42 -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 290A9931B3 for ; Fri, 25 Mar 2022 05:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648212847; 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=WhhWwWg4FCTKQgANTQEkU3eik+mebp4qX/dh9cAxltc=; b=ivxOqLfL1fB7QrazicwN73nhprJoOxIYrsTW+EyTx5xo7ljOPHUrl75ZHUC2eEB9TgMZFr 0oaZZPSwQTKZU4ZY9+tQUk18/emazGhy0YbN8oJFFeR6dU32rWmLsHT7Vft5mDaaPPDW5g NuW5eLQEmAoPxEocWHK0j6xSszWq6Sg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-577-vrMoUzvJN5Kjtvk0lT1KnQ-1; Fri, 25 Mar 2022 08:54:02 -0400 X-MC-Unique: vrMoUzvJN5Kjtvk0lT1KnQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8D7DD381D8A9; Fri, 25 Mar 2022 12:53:55 +0000 (UTC) Received: from ceranb (unknown [10.40.192.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE3E42024CD2; Fri, 25 Mar 2022 12:53:39 +0000 (UTC) Date: Fri, 25 Mar 2022 13:53:37 +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: <20220325135337.2091ba08@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.4 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: > > @@ -352,29 +359,15 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) > > /* check for changes in promiscuous modes */ > > if (changed_flags & IFF_ALLMULTI) { > > if (vsi->current_netdev_flags & IFF_ALLMULTI) { > > - if (vsi->num_vlan > 1) > > - promisc_m = ICE_MCAST_VLAN_PROMISC_BITS; > > - else > > - promisc_m = ICE_MCAST_PROMISC_BITS; > > Because `ice_{set,clear}_promisc()` are now always called with the same second argument (ICE_MCAST_PROMISC_BITS), wouldn't it be better to remove the arg and instead call `ice_fltr_{clear,set}_{vlan,vsi}_vsi_promisc()` with either ICE_MCAST_VLAN_PROMISC_BITS or ICE_MCAST_PROMISC_BITS inside the function? Because ice_{set,clear}_promisc() then could be used only for set mcast prosmisc mode so I modified them only to automatically insert ICE_PROMISC_VLAN_RX & ICE_PROMISC_VLAN_TX based on vsi->num_vlan value. Anyway I will fix some objections from Jacob and send v2. Thanks, Ivan