Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp71055rwb; Wed, 14 Dec 2022 14:09:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf5/4hu5g3EO0mFXWuSM7Y6+pdKnduAYBANUQfS1gyvyBbxJUPZjah6Q4bsVN6K+NY3JBbf1 X-Received: by 2002:a17:906:351b:b0:7c0:a6a9:64e9 with SMTP id r27-20020a170906351b00b007c0a6a964e9mr27652440eja.36.1671055758464; Wed, 14 Dec 2022 14:09:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671055758; cv=none; d=google.com; s=arc-20160816; b=gexq9kNZZzCLzuhEVUyGHZkUmO7Ll1mEaizxSmZa2a2D77jmeC7OhDxw2ARTokxDjM 1saRSW79FVn2eSqT7e/W5vewVxFlwK7fkrbyAIvxgzCiBrEt3MSv38a/dFmrkENNO74w peoRmHxyWnlD7+DTk0seYn3PzeZI3XxaOJUO3fWTcsYAF2D5/skdxX5QBnxnPF8PbJ2e 59EKHTq8ydumXPfjIkKwYq7czlwn6mNT4lcUP2wxgwNjthR7DL7z3ASw6rsH8PiqC9/D 70THNH8dQiT3wjYFKtQb81P3kjtlCtvoS/AqQsemfHqpGe7eONGmYUj/6U2yiCQyjpEz v97A== 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:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=WOM35NSkl7CfZFv6FY36aAQSu0chDpwBN61A5jdRrQk=; b=Qq6BBb/BvJvPBhYhuwxHyj29mU8BR7UzmkatWPv8m+/mnfiijotAtrayoEmsCtYdXO 1Z/TIzF33kqubb8nXheCfhsamkFlxVrnMNhjEQxmJSBosE3X7VJ8gk3C3YK6Rh9I0tuw vCEU5XWs3XCq5Hne4sc5lOg+KpHJDNsT0HL3Y81D8SQ0E3IBIv7JtpEprAptyMspdCUq msge51OrFXu9/deirbdEVlJxke9Yh74h59/sPOrhkITvOOvXXxx9EOIKO9PEaz/B7/Mh jCSPnQkNX0PVcPn9ooAXQtsiUS3NhpRecgB+kqaF63tTPA1QIF1eHHcErKsXDFM2dFl7 9ZqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="o6Ni/Grh"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fq36-20020a1709069da400b007c0baa5000csi8030118ejc.340.2022.12.14.14.09.01; Wed, 14 Dec 2022 14:09:18 -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=@gmail.com header.s=20210112 header.b="o6Ni/Grh"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229662AbiLNVnZ (ORCPT + 69 others); Wed, 14 Dec 2022 16:43:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiLNVnW (ORCPT ); Wed, 14 Dec 2022 16:43:22 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B06F31DE8; Wed, 14 Dec 2022 13:43:20 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id vv4so47801992ejc.2; Wed, 14 Dec 2022 13:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=WOM35NSkl7CfZFv6FY36aAQSu0chDpwBN61A5jdRrQk=; b=o6Ni/Grh71hN1L2644JxFDIGyixI7jmoLbjM2BK8eknrJKByklfVAsrVU2hrJ+mY8j rdoic1K7FNaQENWRS5irIs3SbPQoPvXi74hKzJ7KGMrIu2+DNPDOztgU0bAn57YqV83z yts+8IJERzBvSakh8twHdfC2L3mPVEgg7PYEQWd3Z+3wPIpmsTn1n2HV8x+JWS/yqxcg WtoIa+gmnM0HPO5K6X2ckTe3OIzcFDA+MS9V/oakWDz3+quecZ8gFWvLdDom6Eap++3y yMmebw2WiBJZnyl2mWBXSmxAxjb1ov4isSV1fsDFbBOIwkGMPgG3vfJCHp9DuXzShmr7 bZ4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WOM35NSkl7CfZFv6FY36aAQSu0chDpwBN61A5jdRrQk=; b=0ruy6g9P3us/W+Qp9aLCsioq0WPjQZEGOZ7SpeOT4LF1e6EubGpBuIUz5u8LSex1QF bv3vKLaqQj/JLTwRq6fhtPdijjMevVG8S+ak9Li3w95pFxLe5kGswMd283yrr3P4uM1F xteRkJgahbIAGj7hvzEMUys4SB9ozdg3MuetoK9ze21EPKiWk09iWghNY5TI1YA8mFY1 F2bwim2W6fdE9hzGYDBM1lHtGC9IiWoexomrUIAV3E3t2lVYRONbsVlO9kjjtlPDKSgH JKL3dTKcmxBLTSjl8vUd3dqrFfEdXfPyAhzcVRsZf0GApu84tk8Jv9isiKt7XZcCy2ee 5njw== X-Gm-Message-State: ANoB5plhrfctqj/+lElxueI3eSbydshRZK6BS58VtwswDIYzdnW/qdMa prNe9rxe9vho77os4lUxjhQ= X-Received: by 2002:a17:906:704d:b0:7b9:62ab:dc3f with SMTP id r13-20020a170906704d00b007b962abdc3fmr30321345ejj.1.1671054199060; Wed, 14 Dec 2022 13:43:19 -0800 (PST) Received: from ?IPV6:2a01:c23:b8b1:2700:80c5:d7b3:aee5:57bf? (dynamic-2a01-0c23-b8b1-2700-80c5-d7b3-aee5-57bf.c23.pool.telefonica.de. [2a01:c23:b8b1:2700:80c5:d7b3:aee5:57bf]) by smtp.googlemail.com with ESMTPSA id 4-20020a170906328400b007aed2057ea1sm6281652ejw.167.2022.12.14.13.43.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Dec 2022 13:43:18 -0800 (PST) Message-ID: <4576ee79-1040-1998-6d91-7ef836ae123b@gmail.com> Date: Wed, 14 Dec 2022 22:43:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Content-Language: en-US To: Jakub Kicinski , Leon Romanovsky Cc: 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, Alexander H Duyck References: <20221213074726.51756-1-lianglixuehao@126.com> <20221214085106.42a88df1@kernel.org> <20221214125016.5a23c32a@kernel.org> From: Heiner Kallweit Subject: Re: [PATCH v7] igb: Assign random MAC address instead of fail in case of invalid one In-Reply-To: <20221214125016.5a23c32a@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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 14.12.2022 21:50, 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. BTW the name of the param is not great, we're allowing > the use of random address, not an invalid address. > >> Also, as a user, I despise random module parameters which I need >> to set after every HW update/replacement. > > Agreed, IIUC the concern was alerting users to incorrect EEPROM values. > I thought falling back to a random address was relatively common, but > I haven't done the research. My 2ct, because I once added the fallback to a random MAC address to r8169: Question is whether there's any scenario where you would prefer bailing out in case of invalid MAC address over assigning a random MAC address (that the user may manually change later) plus a warning. I'm not aware of such a scenario. Therefore I decided to hardcode this fallback in the driver.