netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/6] NCSI Support
@ 2015-11-09  0:10 Gavin Shan
  2015-11-09  0:10 ` [PATCH RFC 1/6] net/ncsi: Resource management Gavin Shan
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Gavin Shan @ 2015-11-09  0:10 UTC (permalink / raw)
  To: netdev; +Cc: benh, davem, sergei.shtylyov, Gavin Shan

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-02-24 14:49 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09  0:10 [PATCH RFC 0/6] NCSI Support Gavin Shan
2015-11-09  0:10 ` [PATCH RFC 1/6] net/ncsi: Resource management Gavin Shan
2015-11-09  0:10 ` [PATCH RFC 2/6] net/ncsi: Packet handler Gavin Shan
2015-11-09  0:41   ` Benjamin Herrenschmidt
2015-11-09  0:10 ` [PATCH RFC 3/6] net/ncsi: Manage NCSI device Gavin Shan
2015-11-09  0:10 ` [PATCH RFC 4/6] net/faraday: Replace use_nc_si with use_ncsi Gavin Shan
2015-11-09  0:30   ` Benjamin Herrenschmidt
2015-11-09  0:45     ` Gavin Shan
2015-11-09  0:10 ` [PATCH RFC 5/6] net/faraday: Enable NCSI interface Gavin Shan
2015-11-09  0:32   ` Benjamin Herrenschmidt
2015-11-09  7:30     ` Gavin Shan
2015-11-09 20:28       ` Benjamin Herrenschmidt
2015-11-10  6:12         ` Gavin Shan
2015-11-10 10:34           ` Benjamin Herrenschmidt
2015-11-09  0:10 ` [PATCH RFC 6/6] net/faraday: Enable offload checksum according to device-tree Gavin Shan
2015-11-09  0:36   ` Benjamin Herrenschmidt
2015-11-09  0:45     ` Gavin Shan
2016-02-24  2:59 ` [PATCH RFC 0/6] NCSI Support Gavin Shan
2016-02-24 14:49   ` David Miller

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).