Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2219610rwb; Mon, 19 Sep 2022 01:20:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM657jzzmcHLCzwaKK8w3akqddHV9dOnsu6Ymgv26qMraRt08pQi8uMuh3+ljyNq629rncm0 X-Received: by 2002:a17:903:18b:b0:176:afb8:b4ab with SMTP id z11-20020a170903018b00b00176afb8b4abmr11905928plg.80.1663575648462; Mon, 19 Sep 2022 01:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663575648; cv=none; d=google.com; s=arc-20160816; b=xdNiapS9DBpbUJvu2TB9R/YtFL9SH96TqZ2Z+Fc8C49ar7c80NRAfPo7yRDOEvgem0 eYgRm5Q6TyB2Z/136EvxV0p+8ws7/bHdya1sgoD8MKbpZhn7OF8JBCspiJeaasWOuZqq OeLQyYWshCuGTYhkcvkM5zxj0EKQS69aOhsUrHqhNY3xdoZegDh8oyH8zVQfSFmcfVDy tNyXPcnLpKouxudEB26ukD3Tv/f7g2gUnL8D9255Tco9Bq4C0ZcA64+5jqgmgYLXjQ+x idI6XxT5CmReAjXZbUgOowDgFjkrrbIWdd5zC6r2BNPcGMsKnEx4z/9LnU2E0aoN4mMn +SBg== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=99o3Yj1Nr/Dcc/56wZf/oV+t/8YzUiU3YEDDSzXBshM=; b=vaQK3iYT6sHGjXaJ0vRaRyCeSHpUJqJ8WkWyX/8sYycI4rSEiEO0xsfcbBMMZzkcgv T4aSakt0frQamry2Z9gaElC09WLAgOpBWpdcAAmhRAPvr9E8LIUAR7vTMao4/cURnSfg AkGlfjubTmEpQD/QtXgpVrMsJ3QMA+tGKQ5qdRh9bB0X7YiIsVwmGImF1+P5PwU2j52J b3ZS2qeYWMN1mPsNNmjOXU/lD9ztW499cBGAsHH1/5zhMvovEFdc6166p5rkLIZrq1BA pM1EoI9Gdzf9YpaSsAAOiLZ/LJjO9CtMyrj6TpWX4Ef6iNCBo50Mn9fOatWgsQit7PgA 3gkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=a7mfaJu8; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a170902c24200b0017336c464ecsi27778329plg.407.2022.09.19.01.20.37; Mon, 19 Sep 2022 01:20:48 -0700 (PDT) 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=@intel.com header.s=Intel header.b=a7mfaJu8; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbiISIGT (ORCPT + 99 others); Mon, 19 Sep 2022 04:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbiISIGQ (ORCPT ); Mon, 19 Sep 2022 04:06:16 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 846ADDEB6; Mon, 19 Sep 2022 01:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663574774; x=1695110774; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=xCWOlIVedeUSMrJDrVauyFgN/2kkkiDl5exTSJm4CdI=; b=a7mfaJu8b30R6wO/VLmqLphQl+FfRmFpixEcuCKfvSZrJOlOi0m107qA J6RGjHzdBc2zlhRsO46FI+M1Rci+z6rHlrb3iP/8BHl7jytH4v8/Zz6Zw nSaCA9kCZLRfwoYkUjbIBBGrhuZHOYBtti4F2Ex4t3Sux9DAW1/PuGa5R gY0xPnPo62Va7OCGOOP7QhmAGdzk9OIGR6iV4JuYjUmmEHRTbnM9gH4Y5 ubelKCsnJCaQ5ZlLtFXnXDCGe8h2SBCArwle6vHyirA9MwCfk9xZlnXzO 2pitxsfk64wsTv0Tl0BuLJs4OTFfKJ7vuOOnRBZd056kBe0wbso8lDcNN A==; X-IronPort-AV: E=McAfee;i="6500,9779,10474"; a="279066021" X-IronPort-AV: E=Sophos;i="5.93,327,1654585200"; d="scan'208";a="279066021" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2022 01:06:14 -0700 X-IronPort-AV: E=Sophos;i="5.93,327,1654585200"; d="scan'208";a="707473135" Received: from jiaqingz-mobl.ccr.corp.intel.com (HELO [10.255.30.38]) ([10.255.30.38]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2022 01:06:12 -0700 Message-ID: Date: Mon, 19 Sep 2022 16:06:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] net/ncsi: Add Intel OS2BMC OEM command Content-Language: en-US To: Paul Fertser Cc: Samuel Mendoza-Jonas , "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20220909025716.2610386-1-jiaqing.zhao@linux.intel.com> <8eabb29b-7302-d0a2-5949-d7aa6bc59809@linux.intel.com> <36c12486-57d4-c11d-474f-f26a7de8e59a@linux.intel.com> From: Jiaqing Zhao In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE 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 2022-09-15 23:43, Paul Fertser wrote: > Hello, > > On Tue, Sep 13, 2022 at 10:12:06AM +0800, Jiaqing Zhao wrote: >> On 2022-09-09 15:43, Paul Fertser wrote: >>> On Fri, Sep 09, 2022 at 03:34:53PM +0800, Jiaqing Zhao wrote: >>>>> Can you please outline some particular use cases for this feature? >>>>> >>>> It enables access between host and BMC when BMC shares the network connection >>>> with host using NCSI, like accessing BMC via HTTP or SSH from host. >>> >>> Why having a compile time kernel option here more appropriate than >>> just running something like "/usr/bin/ncsi-netlink --package 0 >>> --channel 0 --index 3 --oem-payload 00000157200001" (this example uses >>> another OEM command) on BMC userspace startup? >>> >> >> Using ncsi-netlink is one way, but the package and channel id is undetermined >> as it is selected at runtime. Calling the netlink command on a nonexistent >> package/channel may lead to kernel panic. > > That sounds like a bug all right. If you can reproduce, it's likely > the fix is reasonably easy, please consider doing it. It cannot be reproduced stably and varies on NICs, I'm still investigating it, it might be some NIC firmware issue. >> Why I prefer the kernel option is that it applies the config to all ncsi >> devices by default when setting up them. This reduces the effort and keeps >> compatibility. Lots of things in current ncsi kernel driver can be done via >> commands from userspace, but I think it is not a good idea to have a driver >> resides on both kernel and userspace. > > How should the developer decide whether to enable this compile-time > option for a platform or not? If it's always nice to have why not > add the code unconditionally? And if not, are you sure kernel compile > time is the right decision point? So far I get an impression a sysfs > runtime knob would be more useful. Disabling Host-BMC traffic ensures the isolation between Host network and BMC's management network, some developers/vendors may prefer disable it for security concerns. Though having a runtime knob in sysfs would be useful, setting the default behavior in kernel config is also useful from my point.