Re: [PATCH net-next] net/ncsi: allow to customize BMC MAC Address offset
On 8/13/19 1:54 PM, Terry Duncan wrote: On 8/13/19 11:28 AM, Tao Ren wrote: On 8/13/19 9:31 AM, Terry Duncan wrote: Tao, in your new patch will it be possible to disable the setting of the BMC MAC? I would like to be able to send NCSI_OEM_GET_MAC perhaps with netlink (TBD) to get the system address without it affecting the BMC address. I was about to send patches to add support for the Intel adapters when I saw this thread. Thanks, Terry Hi Terry, Sounds like you are planning to configure BMC MAC address from user space via netlink? Ben Wei started a thread "Out-of-band NIC management" in openbmc community for NCSI management using netlink, and you may follow up with him for details. I haven't decided what to do in my v2 patch: maybe using device tree, maybe moving the logic to uboot, and I'm also evaluating the netlink option. But it shouldn't impact your patch, because you can disable NCSI_OEM_GET_MAC option from your config file. Thanks Tao. I see now that disabling the NCSI_OEM_GET_MAC option will do what I want. Best, Terry Hi Tao, After a second look, it appears that the OEM handlers for Broadcom and Melanox in ncsi-rsp.c will set the MAC regardless of the origin of the request. Even with NCSI_OEM_GET_MAC disabled, sending an OEM command with netlink would result in setting the BMC MAC. Thanks, Terry
Re: [PATCH net-next] net/ncsi: allow to customize BMC MAC Address offset
On 8/13/19 12:52 PM, Ben Wei wrote: On 8/13/19 9:31 AM, Terry Duncan wrote: Tao, in your new patch will it be possible to disable the setting of the BMC MAC? I would like to be able to send NCSI_OEM_GET_MAC perhaps with netlink (TBD) to get the system address without it affecting the BMC address. I was about to send patches to add support for the Intel adapters when I saw this thread. Thanks, Terry Hi Terry, Do you plan to monitor and configure NIC through use space programs via netlink? I'm curious if you have additional use cases. I had planned to add some daemon in user space to monitor NIC through NC-SI, primarily to log AENs, check link status and retrieve NIC counters. We can collaborate on these if they align with your needs as well. Also about Intel NIC, do you not plan to derive system address from BMC MAC? Is the BMC MAC independent of system address? Thanks, -Ben Hi Ben, Intel has in the past programmed BMC MACs with an offset from the system MAC address of the first shared interface. We have found this approach causes problems and adds complexity when system interfaces / OCP cards are added or removed or disabled in BIOS. Our approach in OpenBMC is to keep this simple - provide means for the BMC MAC addresses to be set in manufacturing and persist them. We do also have some of the same use cases you mention. Thanks, Terry
Re: [PATCH net-next] net/ncsi: allow to customize BMC MAC Address offset
On 8/13/19 11:28 AM, Tao Ren wrote: On 8/13/19 9:31 AM, Terry Duncan wrote: Tao, in your new patch will it be possible to disable the setting of the BMC MAC? I would like to be able to send NCSI_OEM_GET_MAC perhaps with netlink (TBD) to get the system address without it affecting the BMC address. I was about to send patches to add support for the Intel adapters when I saw this thread. Thanks, Terry Hi Terry, Sounds like you are planning to configure BMC MAC address from user space via netlink? Ben Wei started a thread "Out-of-band NIC management" in openbmc community for NCSI management using netlink, and you may follow up with him for details. I haven't decided what to do in my v2 patch: maybe using device tree, maybe moving the logic to uboot, and I'm also evaluating the netlink option. But it shouldn't impact your patch, because you can disable NCSI_OEM_GET_MAC option from your config file. Thanks Tao. I see now that disabling the NCSI_OEM_GET_MAC option will do what I want. Best, Terry
Re: [PATCH net-next] net/ncsi: allow to customize BMC MAC Address offset
Tao, in your new patch will it be possible to disable the setting of the BMC MAC? I would like to be able to send NCSI_OEM_GET_MAC perhaps with netlink (TBD) to get the system address without it affecting the BMC address. I was about to send patches to add support for the Intel adapters when I saw this thread. Thanks, Terry After giving it more thought, I'm thinking about adding ncsi dt node with following structure (mac/ncsi similar to mac/mdio/phy): { /* MAC properties... */ use-ncsi; This property seems to be specific to Faraday FTGMAC100. Are you going to make it more generic? I'm also using ftgmac100 on my platform, and I don't have plan to change this property. ncsi { /* ncsi level properties if any */ package@0 { You should get Rob Herring involved. This is not really describing hardware, so it might get rejected by the device tree maintainer. Got it. Thank you for the sharing, and let me think it over :-) 1) mac driver doesn't need to parse "mac-offset" stuff: these ncsi-network-controller specific settings should be parsed in ncsi stack. 2) get_bmc_mac_address command is a channel specific command, and technically people can configure different offset/formula for different channels. Does that mean the NCSA code puts the interface into promiscuous mode? Or at least adds these unicast MAC addresses to the MAC receive filter? Humm, ftgmac100 only seems to support multicast address filtering, not unicast filters, so it must be using promisc mode, if you expect to receive frames using this MAC address. Uhh, I actually didn't think too much about this: basically it's how to configure frame filtering when there are multiple packages/channels active: single BMC MAC or multiple BMC MAC is also allowed? I don't have the answer yet, but will talk to NCSI expert and figure it out. Thanks, Tao