From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8F6DA927 for ; Tue, 30 May 2023 23:49:21 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1B8AAA for ; Tue, 30 May 2023 16:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685490559; x=1717026559; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=be7oY7VyACKg7gge+KgJymC6RzSG8qWmlq9KxgxxOmU=; b=I8Lmeiswk8LkN5i5uoKcUjq8dd178CmrgZJRbiLRQlQttdpBCQdL3d7V xxFl2uMi96qDMzHdn4/DDNJX+J4IpjqtMIrMuAoTTwUS6YQLm08dlkOTN JRnGtUgbl2me/7CA95wdS1bnrL6F8Sbspa/DjpTJtCMU0NAg8WHIWqKkn abqF9+WbA3L5PultaUSbWaFK6t1GetaV7iy3Ew6Rd2nhzKhjro5YX6j4r X2kET4S3M3H/RsV4mj+Gy2pZHgLYUr6TbHhb6evL2M0oON0TEJIiDnk94 St6ZD5h6Khv1cEu+O52estBkcc2j/eqdtmJhrBOpnIh5JouhECw2MwDzM A==; X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="334699889" X-IronPort-AV: E=Sophos;i="6.00,205,1681196400"; d="scan'208";a="334699889" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 16:49:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="709821984" X-IronPort-AV: E=Sophos;i="6.00,205,1681196400"; d="scan'208";a="709821984" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by fmsmga007.fm.intel.com with ESMTP; 30 May 2023 16:49:18 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: Tony Nguyen , pavan.kumar.linga@intel.com, emil.s.tantilov@intel.com, jesse.brandeburg@intel.com, sridhar.samudrala@intel.com, shiraz.saleem@intel.com, sindhu.devale@intel.com, willemb@google.com, decot@google.com, andrew@lunn.ch, leon@kernel.org, mst@redhat.com, simon.horman@corigine.com, shannon.nelson@amd.com, stephen@networkplumber.org Subject: [PATCH net-next 00/15][pull request] Introduce Intel IDPF driver Date: Tue, 30 May 2023 16:44:46 -0700 Message-Id: <20230530234501.2680230-1-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.38.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Pavan Kumar Linga says: This patch series introduces the Intel Infrastructure Data Path Function (IDPF) driver. It is used for both physical and virtual functions. Except for some of the device operations the rest of the functionality is the same for both PF and VF. IDPF uses virtchnl version2 opcodes and structures defined in the virtchnl2 header file which helps the driver to learn the capabilities and register offsets from the device Control Plane (CP) instead of assuming the default values. The format of the series follows the driver init flow to interface open. To start with, probe gets called and kicks off the driver initialization by spawning the 'vc_event_task' work queue which in turn calls the 'hard reset' function. As part of that, the mailbox is initialized which is used to send/receive the virtchnl messages to/from the CP. Once that is done, 'core init' kicks in which requests all the required global resources from the CP and spawns the 'init_task' work queue to create the vports. Based on the capability information received, the driver creates the said number of vports (one or many) where each vport is associated to a netdev. Also, each vport has its own resources such as queues, vectors etc. >From there, rest of the netdev_ops and data path are added. IDPF implements both single queue which is traditional queueing model as well as split queue model. In split queue model, it uses separate queue for both completion descriptors and buffers which helps to implement out-of-order completions. It also helps to implement asymmetric queues, for example multiple RX completion queues can be processed by a single RX buffer queue and multiple TX buffer queues can be processed by a single TX completion queue. In single queue model, same queue is used for both descriptor completions as well as buffer completions. It also supports features such as generic checksum offload, generic receive offload (hardware GRO) etc. --- iwl-next: v6 - https://lore.kernel.org/netdev/20230523002252.26124-1-pavan.kumar.linga@intel.com/ v5 - https://lore.kernel.org/netdev/20230513225710.3898-1-emil.s.tantilov@intel.com/ v4 - https://lore.kernel.org/netdev/20230508194326.482-1-emil.s.tantilov@intel.com/ v3 - https://lore.kernel.org/netdev/20230427020917.12029-1-emil.s.tantilov@intel.com/ v2 - https://lore.kernel.org/netdev/20230411011354.2619359-1-pavan.kumar.linga@intel.com/ v1 - https://lore.kernel.org/netdev/20230329140404.1647925-1-pavan.kumar.linga@intel.com/ The following are changes since commit 2e246bca986598bdc9d7cae64cf0995257328a5d: Merge branch 'devlink-move-port-ops-into-separate-structure' and are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 200GbE Alan Brady (4): idpf: configure resources for TX queues idpf: configure resources for RX queues idpf: add RX splitq napi poll support idpf: add ethtool callbacks Joshua Hay (5): idpf: add controlq init and reset checks idpf: add splitq start_xmit idpf: add TX splitq napi poll support idpf: add singleq start_xmit and napi poll idpf: configure SRIOV and add other ndo_ops Pavan Kumar Linga (5): virtchnl: add virtchnl version 2 ops idpf: add core init and interrupt request idpf: add create vport and netdev configuration idpf: continue expanding init task idpf: initialize interrupts and enable vport Phani Burra (1): idpf: add module register and probe functionality .../device_drivers/ethernet/index.rst | 1 + .../device_drivers/ethernet/intel/idpf.rst | 160 + drivers/net/ethernet/intel/Kconfig | 10 + drivers/net/ethernet/intel/Makefile | 1 + drivers/net/ethernet/intel/idpf/Makefile | 18 + drivers/net/ethernet/intel/idpf/idpf.h | 751 +++ .../net/ethernet/intel/idpf/idpf_controlq.c | 641 +++ .../net/ethernet/intel/idpf/idpf_controlq.h | 131 + .../ethernet/intel/idpf/idpf_controlq_api.h | 169 + .../ethernet/intel/idpf/idpf_controlq_setup.c | 175 + drivers/net/ethernet/intel/idpf/idpf_dev.c | 165 + drivers/net/ethernet/intel/idpf/idpf_devids.h | 10 + .../net/ethernet/intel/idpf/idpf_ethtool.c | 1331 +++++ .../ethernet/intel/idpf/idpf_lan_pf_regs.h | 124 + .../net/ethernet/intel/idpf/idpf_lan_txrx.h | 293 ++ .../ethernet/intel/idpf/idpf_lan_vf_regs.h | 128 + drivers/net/ethernet/intel/idpf/idpf_lib.c | 2354 +++++++++ drivers/net/ethernet/intel/idpf/idpf_main.c | 269 + drivers/net/ethernet/intel/idpf/idpf_mem.h | 20 + .../ethernet/intel/idpf/idpf_singleq_txrx.c | 1251 +++++ drivers/net/ethernet/intel/idpf/idpf_txrx.c | 4604 +++++++++++++++++ drivers/net/ethernet/intel/idpf/idpf_txrx.h | 844 +++ drivers/net/ethernet/intel/idpf/idpf_vf_dev.c | 164 + .../net/ethernet/intel/idpf/idpf_virtchnl.c | 3825 ++++++++++++++ drivers/net/ethernet/intel/idpf/virtchnl2.h | 1289 +++++ .../ethernet/intel/idpf/virtchnl2_lan_desc.h | 448 ++ 26 files changed, 19176 insertions(+) create mode 100644 Documentation/networking/device_drivers/ethernet/intel/idpf.rst create mode 100644 drivers/net/ethernet/intel/idpf/Makefile create mode 100644 drivers/net/ethernet/intel/idpf/idpf.h create mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq.c create mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq.h create mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq_api.h create mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq_setup.c create mode 100644 drivers/net/ethernet/intel/idpf/idpf_dev.c create mode 100644 drivers/net/ethernet/intel/idpf/idpf_devids.h create mode 100644 drivers/net/ethernet/intel/idpf/idpf_ethtool.c create mode 100644 drivers/net/ethernet/intel/idpf/idpf_lan_pf_regs.h create mode 100644 drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h create mode 100644 drivers/net/ethernet/intel/idpf/idpf_lan_vf_regs.h create mode 100644 drivers/net/ethernet/intel/idpf/idpf_lib.c create mode 100644 drivers/net/ethernet/intel/idpf/idpf_main.c create mode 100644 drivers/net/ethernet/intel/idpf/idpf_mem.h create mode 100644 drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c create mode 100644 drivers/net/ethernet/intel/idpf/idpf_txrx.c create mode 100644 drivers/net/ethernet/intel/idpf/idpf_txrx.h create mode 100644 drivers/net/ethernet/intel/idpf/idpf_vf_dev.c create mode 100644 drivers/net/ethernet/intel/idpf/idpf_virtchnl.c create mode 100644 drivers/net/ethernet/intel/idpf/virtchnl2.h create mode 100644 drivers/net/ethernet/intel/idpf/virtchnl2_lan_desc.h -- 2.38.1