Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4254354rwl; Wed, 28 Dec 2022 01:20:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXt70Ml41qepAmDngBlAoyfv7OPzRFWEpnN/Si/do5Iz72hL3Uc0EIWZL2r8WWjb0wGqZ37W X-Received: by 2002:a05:6a20:1384:b0:af:864d:e7bc with SMTP id w4-20020a056a20138400b000af864de7bcmr38402064pzh.25.1672219208178; Wed, 28 Dec 2022 01:20:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672219208; cv=none; d=google.com; s=arc-20160816; b=vyzshpv+oWj7zH5xMxCJQjy6JV05TBwRAVjXMa7jqkHqOkmX3UnbfZpcUOhmxE0XxS ta/C1KaHuofFkCijTqBb0FxPEcwJcQgypAVaFqcrzVWtqWoB/i+7Vc++8KNgWV8c4X59 hgmv22b3eTHlmwaYn99mvLUOEpS8uRa38tqgKFiAqHRcgWcSF2D3b68vUgd2hygQ28VL /1BHJWpHuxVrC02bC84stxLIVoadNFExbY3/WtaA2IKFJkzOFAoR9AeJVWgZ1LmxDUAL hEgBGVUZUBSVFRVSnLIWqdUqxLrodlrJcPtLg9fSLEp+IuvsjqEXEnejU/DYrAU8c0T6 rPLw== 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=WyPkTqmeY/vRuIqSF3bHasbtofhqfNGXGyBEzGab12A=; b=xDbSgSGCSdPnHRi33dE7VxIX56QvB/eZz6T9nhPDXZwmk85SL4UYgHhp5iGkVS7seO /fYMYWBBLHhB9BdQeDO5k+yZlUUlGXpBVkXBmOsdtsjiAaerlvv8RpBnzPhqBjZuB+ks l+OO3VBsydfcASpgpEY2KDtrVZQcD4KQDqtHO/Pc3Jfz5TdxncbcUdUxivkSJ14lT5zQ Q047GJQ9jWAb04csyPmvdH6sdy/vzeu2F24WCXe7Xeqki7BgGHZZPMne31Y4Etuv/HXK yNLTCJiB4jprRGdmGCOaTvdDlI/6owEDj/9YrKULW3Lsn+x0MAPjanXlOntzhXkDUy+x 67jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nu2xgrCo; 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 k3-20020a6555c3000000b00478a1814885si16113287pgs.319.2022.12.28.01.19.58; Wed, 28 Dec 2022 01:20:08 -0800 (PST) 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=nu2xgrCo; 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 S231716AbiL1JPK (ORCPT + 65 others); Wed, 28 Dec 2022 04:15:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiL1JPI (ORCPT ); Wed, 28 Dec 2022 04:15:08 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDAE6DEF5; Wed, 28 Dec 2022 01:15:06 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 476BD61356; Wed, 28 Dec 2022 09:15:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBD92C433EF; Wed, 28 Dec 2022 09:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672218905; bh=xYhr5uhlKdptK0DYghqZVkuxC4UV7CC/gyvUEUOnE2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nu2xgrCop9EMDeNqUC5PECTIAKfcuC1AF/UlHyrc0n0xJ0EWVvFei003SPk5aZr44 Z1lRpEvP3Ap7D6lzRwlgQIbXNVEI91DuCs4jGj/nzXkhVjkk6egSdMkoQizpGqKbTD BUJX5nPkpfSWFmxVKB5pTqRIE3z5u/ukpG/kVtxB8WtmDZjoxoSYJUjVQTbtqF5lWd WzBhpY/eM37lGGicYo/Ecy1gFT8MOmxmEpqYtLEBovphRmwaqkVRcX3oGkqYlryUrE MTHAwHD5Xea5fmxqtf+1blK5JFYQYoy83TJLWUPx/KWxD2j4yXkKXPNX557elYoAyo 2AtTt8IL0qecw== Date: Wed, 28 Dec 2022 11:15:01 +0200 From: Leon Romanovsky To: Alexander Duyck Cc: Jakub Kicinski , Lixue Liang , anthony.l.nguyen@intel.com, linux-kernel@vger.kernel.org, jesse.brandeburg@intel.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, lianglixue@greatwall.com.cn Subject: Re: [PATCH v7] igb: Assign random MAC address instead of fail in case of invalid one Message-ID: References: <20221213074726.51756-1-lianglixuehao@126.com> <20221214085106.42a88df1@kernel.org> <20221214125016.5a23c32a@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Mon, Dec 19, 2022 at 07:30:45AM -0800, Alexander Duyck wrote: > On Sun, Dec 18, 2022 at 12:41 AM Leon Romanovsky wrote: > > > > On Wed, Dec 14, 2022 at 12:50:16PM -0800, Jakub Kicinski wrote: > > > On Wed, 14 Dec 2022 20:53:30 +0200 Leon Romanovsky wrote: > > > > On Wed, Dec 14, 2022 at 08:51:06AM -0800, Jakub Kicinski wrote: > > > > > On Wed, 14 Dec 2022 09:22:13 +0200 Leon Romanovsky wrote: > > > > > > NAK to any module driver parameter. If it is applicable to all drivers, > > > > > > please find a way to configure it to more user-friendly. If it is not, > > > > > > try to do the same as other drivers do. > > > > > > > > > > I think this one may be fine. Configuration which has to be set before > > > > > device probing can't really be per-device. > > > > > > > > This configuration can be different between multiple devices > > > > which use same igb module. Module parameters doesn't allow such > > > > separation. > > > > > > Configuration of the device, sure, but this module param is more of > > > a system policy. > > > > And system policy should be controlled by userspace and applicable to as > > much as possible NICs, without custom module parameters. > > > > I would imagine global (at the beginning, till someone comes forward and > > requests this parameter be per-device) to whole stack parameter with policies: > > * Be strict - fail if mac is not valid > > * Fallback to random > > * Random only ??? > > > > Thanks > > So are you suggesting you would rather see something like this as a > sysctl then? Maybe something like net.core.netdev_mac_behavior where > we have some enum with a predetermined set of behaviors available? I > would be fine with us making this a global policy if that is the route > we want to go. It would just be a matter of adding the sysctl and an > accessor so that drivers can determine if it is set or not. Something like that and maybe convert drivers and/or to honor this policy. Thanks