linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tao Ren <taoren@fb.com>
To: Andrew Lunn <andrew@lunn.ch>,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Samuel Mendoza-Jonas <sam@mendozajonas.com>,
	"David S . Miller" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>,
	William Kennington <wak@google.com>,
	Joel Stanley <joel@jms.id.au>
Subject: Re: [PATCH net-next] net/ncsi: allow to customize BMC MAC Address offset
Date: Thu, 8 Aug 2019 04:48:25 +0000	[thread overview]
Message-ID: <806a76a8-229a-7f24-33c7-2cf2094f3436@fb.com> (raw)
In-Reply-To: <20190807184143.GE26047@lunn.ch>

On 8/7/19 11:41 AM, Andrew Lunn wrote:
> On Wed, Aug 07, 2019 at 11:25:18AM -0700, Jakub Kicinski wrote:
>> On Tue, 6 Aug 2019 17:21:18 -0700, Tao Ren wrote:
>>> Currently BMC's MAC address is calculated by adding 1 to NCSI NIC's base
>>> MAC address when CONFIG_NCSI_OEM_CMD_GET_MAC option is enabled. The logic
>>> doesn't work for platforms with different BMC MAC offset: for example,
>>> Facebook Yamp BMC's MAC address is calculated by adding 2 to NIC's base
>>> MAC address ("BaseMAC + 1" is reserved for Host use).
>>>
>>> This patch adds NET_NCSI_MC_MAC_OFFSET config option to customize offset
>>> between NIC's Base MAC address and BMC's MAC address. Its default value is
>>> set to 1 to avoid breaking existing users.
>>>
>>> Signed-off-by: Tao Ren <taoren@fb.com>
>>
>> Maybe someone more knowledgeable like Andrew has an opinion here, 
>> but to me it seems a bit strange to encode what seems to be platfrom
>> information in the kernel config :(
> 
> Yes, this is not a good idea. It makes it impossible to have a 'BMC
> distro' kernel which you install on a number of different BMCs.
> 
> A device tree property would be better. Ideally it would be the
> standard local-mac-address, or mac-address.

Thank you Andrew and Jakub for the feedback. I picked up kconfig approach mainly because it's an OEM-only extention which is used only when NCSI_OEM_CMD_GET_MAC is enabled.

Let me prepare patch v2 using device tree. I'm not sure if standard "mac-address" fits this situation because all we need is an offset (integer) and BMC MAC is calculated by adding the offset to NIC's MAC address. Anyways, let me work out v2 patch we can discuss more then.


Thanks,

Tao

  reply	other threads:[~2019-08-08  4:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07  0:21 [PATCH net-next] net/ncsi: allow to customize BMC MAC Address offset Tao Ren
2019-08-07 18:25 ` Jakub Kicinski
2019-08-07 18:41   ` Andrew Lunn
2019-08-08  4:48     ` Tao Ren [this message]
2019-08-08 13:32       ` Andrew Lunn
2019-08-08 19:02         ` Tao Ren
2019-08-08 21:16           ` Andrew Lunn
2019-08-08 22:26             ` Tao Ren
2019-08-08 23:03               ` Andrew Lunn
2019-08-09  5:29                 ` Tao Ren
     [not found]                   ` <10079A1AC4244A41BC7939A794B72C238FCE0E03@fmsmsx104.amr.corp.intel.com>
     [not found]                     ` <bc9da695-3fd3-6643-8e06-562cc08fbc62@linux.intel.com>
2019-08-13 16:31                       ` Terry Duncan
     [not found]                         ` <faa1b3c9-9ba3-0fff-e1d4-f6dddb60c52c@fb.com>
2019-08-13 20:54                           ` Terry Duncan
2019-08-14  0:22                             ` Terry Duncan
     [not found]                           ` <CH2PR15MB3686B3A20A231FC111C42F40A3D20@CH2PR15MB3686.namprd15.prod.outlook.com>
2019-08-13 21:15                             ` Terry Duncan
2019-08-07 17:36 Vijay Khemka
2019-08-08  4:51 ` [PATCH " Tao Ren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=806a76a8-229a-7f24-33c7-2cf2094f3436@fb.com \
    --to=taoren@fb.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=joel@jms.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=sam@mendozajonas.com \
    --cc=wak@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).