From: Pavan Kumar Linga <pavan.kumar.linga@intel.com> To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, emil.s.tantilov@intel.com, joshua.a.hay@intel.com, sridhar.samudrala@intel.com, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, willemb@google.com, decot@google.com, pabeni@redhat.com, kuba@kernel.org, edumazet@google.com, davem@davemloft.net, Pavan Kumar Linga <pavan.kumar.linga@intel.com> Subject: [PATCH net-next v2 00/15] Introduce Intel IDPF driver Date: Mon, 10 Apr 2023 18:13:39 -0700 [thread overview] Message-ID: <20230411011354.2619359-1-pavan.kumar.linga@intel.com> (raw) 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. v1 --> v2: link [1] * removed the OASIS reference in the commit message to make it clear that this is an Intel vendor specific driver * fixed misspells * used comment starter "/**" for struct and definition headers in virtchnl header files * removed AVF reference * renamed APF reference to IDPF * added a comment to explain the reason for 'no flex field' at the end of virtchnl2_get_ptype_info struct * removed 'key[1]' in virtchnl2_rss_key struct as it is not used * set VIRTCHNL2_RXDID_2_FLEX_SQ_NIC to VIRTCHNL2_RXDID_2_FLEX_SPLITQ instead of assigning the same value * cleanup unnecessary NULL assignment to the rx_buf skb pointer since it is not used in splitq model * added comments to clarify the generation bit usage in splitq model * introduced 'reuse_bias' in the page_info structure and make use of it in the hot path * fixed RCT format in idpf_rx_construct_skb * report SPEED_UNKNOWN and DUPLEX_UNKNOWN when the link is down * fixed -Wframe-larger-than warning reported by lkp bot in idpf_vport_queue_ids_init * updated the documentation in idpf.rst to fix LKP bot warning [1] https://lore.kernel.org/netdev/20230329140404.1647925-1-pavan.kumar.linga@intel.com/ Pavan Kumar Linga (15): virtchnl: add virtchnl version 2 ops idpf: add module register and probe functionality idpf: add controlq init and reset checks idpf: add core init and interrupt request idpf: add create vport and netdev configuration idpf: continue expanding init task idpf: configure resources for TX queues idpf: configure resources for RX queues idpf: initialize interrupts and enable vport idpf: add splitq start_xmit idpf: add TX splitq napi poll support idpf: add RX splitq napi poll support idpf: add singleq start_xmit and napi poll idpf: add ethtool callbacks idpf: configure SRIOV and add other ndo_ops .../device_drivers/ethernet/intel/idpf.rst | 162 + drivers/net/ethernet/intel/Kconfig | 11 + drivers/net/ethernet/intel/Makefile | 1 + drivers/net/ethernet/intel/idpf/Makefile | 18 + drivers/net/ethernet/intel/idpf/idpf.h | 734 +++ .../net/ethernet/intel/idpf/idpf_controlq.c | 644 +++ .../net/ethernet/intel/idpf/idpf_controlq.h | 131 + .../ethernet/intel/idpf/idpf_controlq_api.h | 188 + .../ethernet/intel/idpf/idpf_controlq_setup.c | 175 + drivers/net/ethernet/intel/idpf/idpf_dev.c | 179 + drivers/net/ethernet/intel/idpf/idpf_devids.h | 10 + .../net/ethernet/intel/idpf/idpf_ethtool.c | 1330 +++++ .../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 | 2551 +++++++++ drivers/net/ethernet/intel/idpf/idpf_main.c | 85 + drivers/net/ethernet/intel/idpf/idpf_mem.h | 20 + .../ethernet/intel/idpf/idpf_singleq_txrx.c | 1262 +++++ drivers/net/ethernet/intel/idpf/idpf_txrx.c | 4861 +++++++++++++++++ drivers/net/ethernet/intel/idpf/idpf_txrx.h | 854 +++ drivers/net/ethernet/intel/idpf/idpf_vf_dev.c | 180 + .../net/ethernet/intel/idpf/idpf_virtchnl.c | 3821 +++++++++++++ drivers/net/ethernet/intel/idpf/virtchnl2.h | 1201 ++++ .../ethernet/intel/idpf/virtchnl2_lan_desc.h | 666 +++ 25 files changed, 19629 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.37.3
WARNING: multiple messages have this Message-ID (diff)
From: Pavan Kumar Linga <pavan.kumar.linga@intel.com> To: intel-wired-lan@lists.osuosl.org Cc: willemb@google.com, pabeni@redhat.com, netdev@vger.kernel.org, jesse.brandeburg@intel.com, edumazet@google.com, anthony.l.nguyen@intel.com, kuba@kernel.org, decot@google.com, davem@davemloft.net Subject: [Intel-wired-lan] [PATCH net-next v2 00/15] Introduce Intel IDPF driver Date: Mon, 10 Apr 2023 18:13:39 -0700 [thread overview] Message-ID: <20230411011354.2619359-1-pavan.kumar.linga@intel.com> (raw) 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. v1 --> v2: link [1] * removed the OASIS reference in the commit message to make it clear that this is an Intel vendor specific driver * fixed misspells * used comment starter "/**" for struct and definition headers in virtchnl header files * removed AVF reference * renamed APF reference to IDPF * added a comment to explain the reason for 'no flex field' at the end of virtchnl2_get_ptype_info struct * removed 'key[1]' in virtchnl2_rss_key struct as it is not used * set VIRTCHNL2_RXDID_2_FLEX_SQ_NIC to VIRTCHNL2_RXDID_2_FLEX_SPLITQ instead of assigning the same value * cleanup unnecessary NULL assignment to the rx_buf skb pointer since it is not used in splitq model * added comments to clarify the generation bit usage in splitq model * introduced 'reuse_bias' in the page_info structure and make use of it in the hot path * fixed RCT format in idpf_rx_construct_skb * report SPEED_UNKNOWN and DUPLEX_UNKNOWN when the link is down * fixed -Wframe-larger-than warning reported by lkp bot in idpf_vport_queue_ids_init * updated the documentation in idpf.rst to fix LKP bot warning [1] https://lore.kernel.org/netdev/20230329140404.1647925-1-pavan.kumar.linga@intel.com/ Pavan Kumar Linga (15): virtchnl: add virtchnl version 2 ops idpf: add module register and probe functionality idpf: add controlq init and reset checks idpf: add core init and interrupt request idpf: add create vport and netdev configuration idpf: continue expanding init task idpf: configure resources for TX queues idpf: configure resources for RX queues idpf: initialize interrupts and enable vport idpf: add splitq start_xmit idpf: add TX splitq napi poll support idpf: add RX splitq napi poll support idpf: add singleq start_xmit and napi poll idpf: add ethtool callbacks idpf: configure SRIOV and add other ndo_ops .../device_drivers/ethernet/intel/idpf.rst | 162 + drivers/net/ethernet/intel/Kconfig | 11 + drivers/net/ethernet/intel/Makefile | 1 + drivers/net/ethernet/intel/idpf/Makefile | 18 + drivers/net/ethernet/intel/idpf/idpf.h | 734 +++ .../net/ethernet/intel/idpf/idpf_controlq.c | 644 +++ .../net/ethernet/intel/idpf/idpf_controlq.h | 131 + .../ethernet/intel/idpf/idpf_controlq_api.h | 188 + .../ethernet/intel/idpf/idpf_controlq_setup.c | 175 + drivers/net/ethernet/intel/idpf/idpf_dev.c | 179 + drivers/net/ethernet/intel/idpf/idpf_devids.h | 10 + .../net/ethernet/intel/idpf/idpf_ethtool.c | 1330 +++++ .../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 | 2551 +++++++++ drivers/net/ethernet/intel/idpf/idpf_main.c | 85 + drivers/net/ethernet/intel/idpf/idpf_mem.h | 20 + .../ethernet/intel/idpf/idpf_singleq_txrx.c | 1262 +++++ drivers/net/ethernet/intel/idpf/idpf_txrx.c | 4861 +++++++++++++++++ drivers/net/ethernet/intel/idpf/idpf_txrx.h | 854 +++ drivers/net/ethernet/intel/idpf/idpf_vf_dev.c | 180 + .../net/ethernet/intel/idpf/idpf_virtchnl.c | 3821 +++++++++++++ drivers/net/ethernet/intel/idpf/virtchnl2.h | 1201 ++++ .../ethernet/intel/idpf/virtchnl2_lan_desc.h | 666 +++ 25 files changed, 19629 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.37.3 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next reply other threads:[~2023-04-11 1:14 UTC|newest] Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-11 1:13 Pavan Kumar Linga [this message] 2023-04-11 1:13 ` [Intel-wired-lan] [PATCH net-next v2 00/15] Introduce Intel IDPF driver Pavan Kumar Linga 2023-04-11 1:13 ` [PATCH net-next v2 01/15] virtchnl: add virtchnl version 2 ops Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] " Pavan Kumar Linga 2023-04-11 8:51 ` Simon Horman 2023-04-11 8:51 ` [Intel-wired-lan] " Simon Horman 2023-04-12 21:38 ` Tantilov, Emil S 2023-04-12 21:38 ` [Intel-wired-lan] " Tantilov, Emil S 2023-04-11 1:13 ` [PATCH net-next v2 02/15] idpf: add module register and probe functionality Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] " Pavan Kumar Linga 2023-04-11 12:36 ` Leon Romanovsky 2023-04-11 12:36 ` [Intel-wired-lan] " Leon Romanovsky 2023-04-12 23:10 ` Tantilov, Emil S 2023-04-12 23:10 ` [Intel-wired-lan] " Tantilov, Emil S 2023-04-13 6:03 ` Leon Romanovsky 2023-04-13 6:03 ` [Intel-wired-lan] " Leon Romanovsky 2023-04-13 18:58 ` Tantilov, Emil S 2023-04-13 18:58 ` [Intel-wired-lan] " Tantilov, Emil S 2023-04-20 18:13 ` Tantilov, Emil S 2023-04-20 18:13 ` Tantilov, Emil S 2023-04-20 18:20 ` Leon Romanovsky 2023-04-20 18:20 ` Leon Romanovsky 2023-04-11 1:13 ` [PATCH net-next v2 03/15] idpf: add controlq init and reset checks Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] " Pavan Kumar Linga 2023-04-11 9:19 ` Simon Horman 2023-04-11 9:19 ` [Intel-wired-lan] " Simon Horman 2023-04-11 1:13 ` [PATCH net-next v2 04/15] idpf: add core init and interrupt request Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] " Pavan Kumar Linga 2023-04-11 9:52 ` Simon Horman 2023-04-11 9:52 ` [Intel-wired-lan] " Simon Horman 2023-04-13 19:10 ` Tantilov, Emil S 2023-04-13 19:10 ` [Intel-wired-lan] " Tantilov, Emil S 2023-04-11 1:13 ` [PATCH net-next v2 05/15] idpf: add create vport and netdev configuration Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] " Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] [PATCH net-next v2 06/15] idpf: continue expanding init task Pavan Kumar Linga 2023-04-11 1:13 ` Pavan Kumar Linga 2023-04-11 9:04 ` [Intel-wired-lan] " Simon Horman 2023-04-11 9:04 ` Simon Horman 2023-04-13 19:04 ` Tantilov, Emil S 2023-04-13 19:04 ` [Intel-wired-lan] " Tantilov, Emil S 2023-04-11 1:13 ` [PATCH net-next v2 07/15] idpf: configure resources for TX queues Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] " Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] [PATCH net-next v2 08/15] idpf: configure resources for RX queues Pavan Kumar Linga 2023-04-11 1:13 ` Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] [PATCH net-next v2 09/15] idpf: initialize interrupts and enable vport Pavan Kumar Linga 2023-04-11 1:13 ` Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] [PATCH net-next v2 10/15] idpf: add splitq start_xmit Pavan Kumar Linga 2023-04-11 1:13 ` Pavan Kumar Linga 2023-04-11 1:13 ` [PATCH net-next v2 11/15] idpf: add TX splitq napi poll support Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] " Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] [PATCH net-next v2 12/15] idpf: add RX " Pavan Kumar Linga 2023-04-11 1:13 ` Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] [PATCH net-next v2 13/15] idpf: add singleq start_xmit and napi poll Pavan Kumar Linga 2023-04-11 1:13 ` Pavan Kumar Linga 2023-04-11 1:13 ` [Intel-wired-lan] [PATCH net-next v2 14/15] idpf: add ethtool callbacks Pavan Kumar Linga 2023-04-11 1:13 ` Pavan Kumar Linga 2023-04-11 9:55 ` Simon Horman 2023-04-11 9:55 ` [Intel-wired-lan] " Simon Horman 2023-04-13 19:11 ` Tantilov, Emil S 2023-04-13 19:11 ` [Intel-wired-lan] " Tantilov, Emil S 2023-04-22 5:26 ` Tantilov, Emil S 2023-04-22 5:26 ` Tantilov, Emil S 2023-04-22 7:55 ` Simon Horman 2023-04-22 7:55 ` Simon Horman 2023-04-11 1:13 ` [Intel-wired-lan] [PATCH net-next v2 15/15] idpf: configure SRIOV and add other ndo_ops Pavan Kumar Linga 2023-04-11 1:13 ` Pavan Kumar Linga 2023-04-12 18:25 ` [Intel-wired-lan] [PATCH net-next v2 00/15] Introduce Intel IDPF driver Sasha Levin 2023-04-12 18:25 ` Sasha Levin 2023-04-12 19:16 ` Willem de Bruijn 2023-04-12 19:16 ` Willem de Bruijn 2023-04-13 0:03 ` Samudrala, Sridhar 2023-04-13 0:03 ` Samudrala, Sridhar 2023-04-13 2:24 ` Jakub Kicinski 2023-04-13 2:24 ` Jakub Kicinski 2023-04-13 7:15 ` Leon Romanovsky 2023-04-13 7:15 ` Leon Romanovsky 2023-04-14 22:01 ` Sasha Levin 2023-04-14 22:01 ` Sasha Levin 2023-04-14 22:27 ` Jakub Kicinski 2023-04-14 22:27 ` Jakub Kicinski 2023-04-15 17:16 ` Sasha Levin 2023-04-15 17:16 ` Sasha Levin 2023-04-17 16:38 ` Jakub Kicinski 2023-04-17 16:38 ` Jakub Kicinski
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230411011354.2619359-1-pavan.kumar.linga@intel.com \ --to=pavan.kumar.linga@intel.com \ --cc=anthony.l.nguyen@intel.com \ --cc=davem@davemloft.net \ --cc=decot@google.com \ --cc=edumazet@google.com \ --cc=emil.s.tantilov@intel.com \ --cc=intel-wired-lan@lists.osuosl.org \ --cc=jesse.brandeburg@intel.com \ --cc=joshua.a.hay@intel.com \ --cc=kuba@kernel.org \ --cc=netdev@vger.kernel.org \ --cc=pabeni@redhat.com \ --cc=sridhar.samudrala@intel.com \ --cc=willemb@google.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.