From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gavin Shan Subject: Re: [PATCH RFC 0/6] NCSI Support Date: Wed, 24 Feb 2016 13:59:50 +1100 Message-ID: <20160224025950.GA27525@gwshan> References: <1447027806-4744-1-git-send-email-gwshan@linux.vnet.ibm.com> Reply-To: Gavin Shan Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, benh@kernel.crashing.org, davem@davemloft.net, sergei.shtylyov@cogentembedded.com To: Gavin Shan Return-path: Received: from e23smtp07.au.ibm.com ([202.81.31.140]:41171 "EHLO e23smtp07.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbcBXDB0 (ORCPT ); Tue, 23 Feb 2016 22:01:26 -0500 Received: from localhost by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 24 Feb 2016 13:01:23 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id E24FF3578052 for ; Wed, 24 Feb 2016 14:01:20 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u1O31BVl459132 for ; Wed, 24 Feb 2016 14:01:20 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u1O30lkf017929 for ; Wed, 24 Feb 2016 14:00:47 +1100 Content-Disposition: inline In-Reply-To: <1447027806-4744-1-git-send-email-gwshan@linux.vnet.ibm.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Nov 09, 2015 at 11:10:00AM +1100, Gavin Shan wrote: Hello David, did you get time to go through this series? It has been there for a while. Looking forward to your comments and feedback :-) Thanks, Gavin >This series of patches are prototype requesting for comments. Please focus on >the big picture at current stage, but any comments to improve the implementaion >are welcomed. > >The following figure gives an example about how NCSI is deployed: The NCSI is >specified by DSP0222, which can be downloaded from the following link here >(http://www.dmtf.org/sites/default/files/standards/documents/DSP0222_1.0.0.pdf). > > * The NC-SI (aka NCSI) is defined as the interface between a (Base) Management > Controller (BMC) and one or multiple Network Controlers (NC) on host side. > The interface is responsible for providing external network connectivity > for BMC. > * Each BMC can connect to multiple packages, up to 8. Each package can have > multiple channels, up to 32. Every package and channel are identified by > 3-bits and 5-bits in NCSI packet. At one moment, one channel is active to > provide service. > * NCSI packet, encapsulated in ethernet frame, has 0x88F8 in the protocol > field. The destination MAC address should be 0xFF's while the source MAC > address can be arbitrary one. > * NCSI packets are classified to command, response, AEN (Asynchronous Event > Notification). Commands are sent from BMC to host for configuration and > information retrival. Responses, corresponding to commands, are sent from > host to BMC for confirmation and requested information. One command should > have one and only one response. AEN is sent from host to BMC for notification > (e.g. link down on active channel) so that BMC can take appropriate action. > > +------------------+ +----------------------------------------------+ > | | | Host | > | BMC | | | > | | | +-------------------+ +-------------------+ | > | +---------+ | | | Package-A | | Package-B | | > | | | | | +---------+---------+ +-------------------+ | > | | NIC | | | | Channel | Channel | | Channel | Channel | | > +----+----+----+---+ +-+---------+---------+--+---------+---------+-+ > | | | > | | | > +-----------------------------+----------------------+ > >The design for the patchset is highlighted as below: > > * All the code included in this patchset runs on BMC side. The major target > of this patchset is to hide the NCSI details to BMC's NIC driver. The patchset > abstracts a NCSI device (struct ncsi_dev), which is created when the driver > is loaded and the BMC NIC (struct net_device) instance is created. When the > NIC is opened (ndo_open()), all available packages and channels are probed > through NCSI packets. At the same time, one active channel is selected to > provide service. It means the NIC driver can receive/transmit packets before > ndo_open(). > * When NCSI device (struct ncsi_dev) is created when NIC driver is loaded, > NCSI protocl handler is added by dev_add_pack() so that the ingress NCSI > packets can be routed to the stack for further processing. On the other > hand, dev_queue_xmit_sk() is called to transmit skb that has been bound > with the BMC's NIC. > * The NCSI device is closed when the BMC's NIC is closed. > * NCSI stack should be configurable through netlink, but it's not implemented > in this patchset. It's something TBD. > * The first NIC driver that is aware of NCSI: drivers/net/ethernet/faraday/ftgmac100.c > >Gavin Shan (6): > net/ncsi: Resource management > net/ncsi: Packet handler > net/ncsi: Manage NCSI device > net/faraday: Replace use_nc_si with use_ncsi > net/faraday: Enable NCSI interface > net/faraday: Enable offload checksum according to device-tree > > drivers/net/ethernet/faraday/ftgmac100.c | 108 ++- > include/net/ncsi.h | 57 ++ > include/uapi/linux/if_ether.h | 1 + > net/Kconfig | 1 + > net/Makefile | 1 + > net/ncsi/Kconfig | 10 + > net/ncsi/Makefile | 5 + > net/ncsi/internal.h | 313 ++++++++ > net/ncsi/ncsi-aen.c | 197 +++++ > net/ncsi/ncsi-cmd.c | 372 ++++++++++ > net/ncsi/ncsi-manage.c | 899 +++++++++++++++++++++++ > net/ncsi/ncsi-pkt.h | 391 ++++++++++ > net/ncsi/ncsi-rsp.c | 1166 ++++++++++++++++++++++++++++++ > 13 files changed, 3490 insertions(+), 31 deletions(-) > create mode 100644 include/net/ncsi.h > create mode 100644 net/ncsi/Kconfig > create mode 100644 net/ncsi/Makefile > create mode 100644 net/ncsi/internal.h > create mode 100644 net/ncsi/ncsi-aen.c > create mode 100644 net/ncsi/ncsi-cmd.c > create mode 100644 net/ncsi/ncsi-manage.c > create mode 100644 net/ncsi/ncsi-pkt.h > create mode 100644 net/ncsi/ncsi-rsp.c > >-- >2.1.0 >