From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBA45C433DB for ; Wed, 3 Feb 2021 16:27:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8178064F7C for ; Wed, 3 Feb 2021 16:27:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234271AbhBCQ1M (ORCPT ); Wed, 3 Feb 2021 11:27:12 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:46408 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233269AbhBCQ1H (ORCPT ); Wed, 3 Feb 2021 11:27:07 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1l7Kyz-0043ZV-4Z; Wed, 03 Feb 2021 17:26:21 +0100 Date: Wed, 3 Feb 2021 17:26:21 +0100 From: Andrew Lunn To: Jiri Pirko Cc: David Ahern , Vadim Pasternak , Jakub Kicinski , "netdev@vger.kernel.org" , "davem@davemloft.net" , "jacob.e.keller@intel.com" , Roopa Prabhu , mlxsw Subject: Re: [patch net-next RFC 00/10] introduce line card support for modular switch Message-ID: References: <20210129072015.GA4652@nanopsycho.orion> <20210130141952.GB4652@nanopsycho.orion> <251d1e12-1d61-0922-31f8-a8313f18f194@gmail.com> <20210201081641.GC4652@nanopsycho.orion> <20210203145751.GD4652@nanopsycho.orion> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210203145751.GD4652@nanopsycho.orion> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > >When the platform line card driver is on the BMC, you need a proxy in > >between. Isn't this what IPMI and Redfish is all about? The proxy > >driver can offer the same interface as the platform line card driver. > > Do you have any example of kernel driver which is doing some thing like > that? drivers/hwmon/ibmaem.c is a pretty normal looking HWMON driver, for temperature/power/energy sensors which are connected to the BMC and accessed over IPMI. char/ipmi/ipmi_watchdog.c as the name suggests is a watchdog. At first glance its API to user space follows the standard API, even if it does not make use of the watchdog subsystem core. These two should give you examples of how you talk to the BMC from a kernel driver. Andrew