Message ID | 1538393791-26251-1-git-send-email-sunil.kovvuri@gmail.com |
---|---|
Headers | show
Return-Path: <netdev-owner@vger.kernel.org> X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eftwnj+c"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42P0cG27G2z9s3x for <patchwork-incoming-netdev@ozlabs.org>; Mon, 1 Oct 2018 21:36:46 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729238AbeJASOF (ORCPT <rfc822;patchwork-incoming-netdev@ozlabs.org>); Mon, 1 Oct 2018 14:14:05 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45877 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728791AbeJASOF (ORCPT <rfc822;netdev@vger.kernel.org>); Mon, 1 Oct 2018 14:14:05 -0400 Received: by mail-pf1-f194.google.com with SMTP id a23-v6so8989538pfi.12; Mon, 01 Oct 2018 04:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=j0NSWbISQlWr3I5tFXbk1bOw4xm0MC19VfZ6xVrIlsU=; b=eftwnj+ciFs2goxDHr5pNZ6PJKjkUATHS8ttOuIn7yMe51RDZTNe7bzTS0uMmpuuHC xnMkqsgc4MG5gmmfL5iio4DRvBp3uvd/u0foEIEVUb3cE8Fvl5nR1/ry8ViHJq/uDx12 3VJMeteSpzaGecVr4VwDRC/eD3OEbaC49jvWmXbAHqC6muXat0YKvOLJI4QcddRzwtmo 3XKtwTaily1efvhBEvLEONqmAwMoGTYbnaacBrkSDYsd+YqiUEVUStRMI4erUvsFpO/e yIauWkilffBf9JsZzSXzVQpVDCkBYVLXBMnYOPMIMt4llK/gRsVcTTwRNsUTYvS4X17w Nk2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=j0NSWbISQlWr3I5tFXbk1bOw4xm0MC19VfZ6xVrIlsU=; b=cu0dzICj6/fBn6CF2bMl/csb5l2+rLfvmSu9xYYABCt6gF1rmZ1MstdEBnmd9JOMlC zQGXscL4Qwic/OZsz4SYqIBIjvAwIkZyi5CuvyKV6SfLI38QtPOwcNQSuhBhlVZhC45g LpP8khVmAbwEBZ7ctOc0CPk0fQTRbRVEFwCmklPpotiHKXOwr9LvEY2+LrIXKxsB9hSP rkdAudU64E2jZFiUEL0i7ODBLjQz6zNeSYPkCni54abwZ3TkuH00wHv+0k+vv9/Zx5sw GddyA616YWWDQBMs12i0TrjEOSLrvrfK3/vhBLPN0aL9qd4Z6+YotXEFRJVEm7wkYvjX j/oA== X-Gm-Message-State: ABuFfoiAKlLf1oX4VrP2JJ4wCo+hG0gvMe7x+f9L2Yxx5XsVbB+bzsMj 7Zx1vn0MPDbXGRdGE/XjLWvD68d1 X-Google-Smtp-Source: ACcGV61Bx+IOIOkD0xSnLkW/li0/9Z/myKrDlkh94rurvydp0AvNmSRie6ejVqXsy+i6yIbHKqvdJw== X-Received: by 2002:a63:f848:: with SMTP id v8-v6mr9773090pgj.82.1538393802951; Mon, 01 Oct 2018 04:36:42 -0700 (PDT) Received: from machine421.caveonetworks.com ([115.113.156.2]) by smtp.googlemail.com with ESMTPSA id i2-v6sm18538300pgq.35.2018.10.01.04.36.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Oct 2018 04:36:41 -0700 (PDT) From: sunil.kovvuri@gmail.com To: netdev@vger.kernel.org, davem@davemloft.net Cc: arnd@arndb.de, linux-soc@vger.kernel.org, Sunil Goutham <sgoutham@marvell.com> Subject: [PATCH v5 00/15] octeontx2-af: Add RVU Admin Function driver Date: Mon, 1 Oct 2018 17:06:16 +0530 Message-Id: <1538393791-26251-1-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
octeontx2-af: Add RVU Admin Function driver
|
expand
|
From: Sunil Goutham <sgoutham@marvell.com> Resource virtualization unit (RVU) on Marvell's OcteonTX2 SOC maps HW resources from the network, crypto and other functional blocks into PCI-compatible physical and virtual functions. Each functional block again has multiple local functions (LFs) for provisioning to PCI devices. RVU supports multiple PCIe SRIOV physical functions (PFs) and virtual functions (VFs). PF0 is called the administrative / admin function (AF) and has privileges to provision RVU functional block's LFs to each of the PF/VF. RVU managed networking functional blocks - Network pool allocator (NPA) - Network interface controller (NIX) - Network parser CAM (NPC) - Schedule/Synchronize/Order unit (SSO) RVU managed non-networking functional blocks - Crypto accelerator (CPT) - Scheduled timers unit (TIM) - Schedule/Synchronize/Order unit (SSO) Used for both networking and non networking usecases - Compression (upcoming in future variants of the silicons) Resource provisioning examples - A PF/VF with NIX-LF & NPA-LF resources works as a pure network device - A PF/VF with CPT-LF resource works as a pure cyrpto offload device. This admin function driver neither receives any data nor processes it i.e no I/O, a configuration only driver. PF/VFs communicates with AF via a shared memory region (mailbox). Upon receiving requests from PF/VF, AF does resource provisioning and other HW configuration. AF is always attached to host, but PF/VFs may be used by host kernel itself, or attached to VMs or to userspace applications like DPDK etc. So AF has to handle provisioning/configuration requests sent by any device from any domain. This patch series adds logic for the following - RVU AF driver with functional blocks provisioning support. - Mailbox infrastructure for communication between AF and PFs. - CGX (MAC controller) driver which communicates with firmware for managing physical ethernet interfaces. AF collects info from this driver and forwards the same to the PF/VFs uaing these interfaces. This is the first set of patches out of 80+ patches. Changes from v4: 1 Removed module author/version/description from CGX driver as it's now merged with AF driver module. - Suggested by Arnd Bergmann 2 Added big-endian bitfields for CGX's kernel <=> firmware communication command structures. - Suggested by Arnd Bergmann Changes from v3: Moved driver from drivers/soc to drivers/net/ethernet - Suggested by Arnd Bergmann https://patchwork.kernel.org/cover/10587635/ Changes from v2: No changes, submitted again with netdev mailing list in loop. - Suggested by Arnd Bergmann and Andrew Lunn Changes from v1: 1 Merged RVU admin function and CGX drivers into a single module - Suggested by Arnd Bergmann 2 Pulled mbox communication APIs into a separate module to remove admin function driver dependency in a VM where AF is not attached. - Suggested by Arnd Bergmann Aleksey Makarov (1): octeontx2-af: Convert mbox msg id check to a macro Geetha sowjanya (1): octeontx2-af: Reconfig MSIX base with IOVA Linu Cherian (3): octeontx2-af: Set RVU PFs to CGX LMACs mapping octeontx2-af: Add support for CGX link management octeontx2-af: Register for CGX lmac events Sunil Goutham (10): octeontx2-af: Add Marvell OcteonTX2 RVU AF driver octeontx2-af: Reset all RVU blocks octeontx2-af: Gather RVU blocks HW info octeontx2-af: Add mailbox support infra octeontx2-af: Add mailbox IRQ and msg handlers octeontx2-af: Scan blocks for LFs provisioned to PF/VF octeontx2-af: Add RVU block LF provisioning support octeontx2-af: Configure block LF's MSIX vector offset octeontx2-af: Add Marvell OcteonTX2 CGX driver MAINTAINERS: Add entry for Marvell OcteonTX2 Admin Function driver MAINTAINERS | 9 + drivers/net/ethernet/marvell/Kconfig | 3 + drivers/net/ethernet/marvell/Makefile | 1 + drivers/net/ethernet/marvell/octeontx2/Kconfig | 16 + drivers/net/ethernet/marvell/octeontx2/Makefile | 6 + drivers/net/ethernet/marvell/octeontx2/af/Makefile | 10 + drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 512 ++++++ drivers/net/ethernet/marvell/octeontx2/af/cgx.h | 65 + .../net/ethernet/marvell/octeontx2/af/cgx_fw_if.h | 292 ++++ drivers/net/ethernet/marvell/octeontx2/af/mbox.c | 303 ++++ drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 211 +++ drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 1637 ++++++++++++++++++++ drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 158 ++ .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 194 +++ .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 441 ++++++ .../net/ethernet/marvell/octeontx2/af/rvu_struct.h | 74 + 16 files changed, 3932 insertions(+) create mode 100644 drivers/net/ethernet/marvell/octeontx2/Kconfig create mode 100644 drivers/net/ethernet/marvell/octeontx2/Makefile create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/Makefile create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/cgx.c create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/cgx.h create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/cgx_fw_if.h create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/mbox.c create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/mbox.h create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu.c create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu.h create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_struct.h