DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Shetty, Praveen" <praveen.shetty@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "Singh, Aman Deep" <aman.deep.singh@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Patel, Atul" <atul.patel@intel.com>,
	"Shukla, Dhananjay" <dhananjay.shukla@intel.com>
Subject: RE: [PATCH v3 1/4] net/intel: add vCPF PMD support
Date: Mon, 29 Sep 2025 18:55:19 +0000	[thread overview]
Message-ID: <DM3PPF291EF9BF1A28BD7092DCA7EB71DBB9D1BA@DM3PPF291EF9BF1.namprd11.prod.outlook.com> (raw)
In-Reply-To: <aNp5HMy-CqXfr6fX@bricha3-mobl1.ger.corp.intel.com>


On Tue, Sep 23, 2025 at 02:54:52PM +0200, Shetty, Praveen wrote:
> From: Praveen Shetty <praveen.shetty@intel.com>
> 
> This patch adds the registration support for a new vCPF PMD.
> vCPF PMD is responsible for enabling control and data path 
> functionality for the CPF VF devices.
> 
> Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
> Tested-by: Atul Patel  <atul.patel@intel.com>
> Tested-by: Dhananjay Shukla <dhananjay.shukla@intel.com>
> ---

A few minor comments inline below.

/Bruce

>  drivers/net/intel/cpfl/cpfl_ethdev.c        | 17 +++++++++++++++++
>  drivers/net/intel/cpfl/cpfl_ethdev.h        |  1 +
>  drivers/net/intel/idpf/idpf_common_device.c |  4 ++--  
> drivers/net/intel/idpf/idpf_common_device.h |  1 +
>  4 files changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/intel/cpfl/cpfl_ethdev.c 
> b/drivers/net/intel/cpfl/cpfl_ethdev.c
> index 6d7b23ad7a..d6227c99b5 100644
> --- a/drivers/net/intel/cpfl/cpfl_ethdev.c
> +++ b/drivers/net/intel/cpfl/cpfl_ethdev.c
> @@ -1854,6 +1854,7 @@ cpfl_handle_virtchnl_msg(struct cpfl_adapter_ext 
> *adapter)
>  
>  		switch (mbx_op) {
>  		case idpf_mbq_opc_send_msg_to_peer_pf:
> +		case idpf_mbq_opc_send_msg_to_peer_drv:
>  			if (vc_op == VIRTCHNL2_OP_EVENT) {
>  				cpfl_handle_vchnl_event_msg(adapter, adapter->base.mbx_resp,
>  							    ctlq_msg.data_len);
> @@ -2610,6 +2611,11 @@ static const struct rte_pci_id pci_id_cpfl_map[] = {
>  	{ .vendor_id = 0, /* sentinel */ },
>  };
>  
> +static const struct rte_pci_id pci_id_vcpf_map[] = {
> +	{ RTE_PCI_DEVICE(IDPF_INTEL_VENDOR_ID, IXD_DEV_ID_VCPF) },
> +	{ .vendor_id = 0, /* sentinel */ },
> +};
> +
>  static struct cpfl_adapter_ext *
>  cpfl_find_adapter_ext(struct rte_pci_device *pci_dev)  { @@ -2866,6 
> +2872,14 @@ static struct rte_pci_driver rte_cpfl_pmd = {
>  	.remove		= cpfl_pci_remove,
>  };
>  
> +static struct rte_pci_driver rte_vcpf_pmd = {
> +	.id_table	= pci_id_vcpf_map,
> +	.drv_flags	= RTE_PCI_DRV_NEED_MAPPING |
> +			  RTE_PCI_DRV_PROBE_AGAIN,
> +	.probe		= cpfl_pci_probe,
> +	.remove		= cpfl_pci_remove,
> +};
> +
>  /**
>   * Driver initialization routine.
>   * Invoked once at EAL init time.
> @@ -2874,6 +2888,9 @@ static struct rte_pci_driver rte_cpfl_pmd = {  
> RTE_PMD_REGISTER_PCI(net_cpfl, rte_cpfl_pmd);  
> RTE_PMD_REGISTER_PCI_TABLE(net_cpfl, pci_id_cpfl_map);  
> RTE_PMD_REGISTER_KMOD_DEP(net_cpfl, "* igb_uio | vfio-pci");
> +RTE_PMD_REGISTER_PCI(net_vcpf, rte_vcpf_pmd); 
> +RTE_PMD_REGISTER_PCI_TABLE(net_vcpf, pci_id_vcpf_map); 
> +RTE_PMD_REGISTER_KMOD_DEP(net_vcpf, "* igb_uio | vfio-pci");

Minor question - do you know if this works with uio_pci_generic, or has it been tested? With igb_uio largely unmaintained right now, the in-tree uio would be good to be able to recommend if vfio is not an option.
>> No, it doesn't work with uio_pci_generic, I was getting DMA transaction failure when I try to use it. Will update the macro to have only vfio-pci as a KMOD_DEP. 

>  RTE_PMD_REGISTER_PARAM_STRING(net_cpfl,
>  	CPFL_TX_SINGLE_Q "=<0|1> "
>  	CPFL_RX_SINGLE_Q "=<0|1> "
> diff --git a/drivers/net/intel/cpfl/cpfl_ethdev.h 
> b/drivers/net/intel/cpfl/cpfl_ethdev.h
> index d4e1176ab1..2cfcdd6206 100644
> --- a/drivers/net/intel/cpfl/cpfl_ethdev.h
> +++ b/drivers/net/intel/cpfl/cpfl_ethdev.h
> @@ -60,6 +60,7 @@
>  
>  /* Device IDs */
>  #define IDPF_DEV_ID_CPF			0x1453
> +#define IXD_DEV_ID_VCPF			0x1203
>  #define VIRTCHNL2_QUEUE_GROUP_P2P	0x100
>  

I see the same device id added twice, once in cpfl and once in idpf drivers. Can the cpfl driver re-use the definition from idpf_common_device and save duplication?
> Sure, will address this in v4.

>  #define CPFL_HOST_ID_NUM	2
> diff --git a/drivers/net/intel/idpf/idpf_common_device.c 
> b/drivers/net/intel/idpf/idpf_common_device.c
> index ff1fbcd2b4..8c637a2fb6 100644
> --- a/drivers/net/intel/idpf/idpf_common_device.c
> +++ b/drivers/net/intel/idpf/idpf_common_device.c
> @@ -130,7 +130,7 @@ idpf_init_mbx(struct idpf_hw *hw)
>  	struct idpf_ctlq_info *ctlq;
>  	int ret = 0;
>  
> -	if (hw->device_id == IDPF_DEV_ID_SRIOV)
> +	if (hw->device_id == IDPF_DEV_ID_SRIOV || hw->device_id == 
> +IXD_DEV_ID_VCPF)
>  		ret = idpf_ctlq_init(hw, IDPF_CTLQ_NUM, vf_ctlq_info);
>  	else
>  		ret = idpf_ctlq_init(hw, IDPF_CTLQ_NUM, pf_ctlq_info); @@ -389,7 
> +389,7 @@ idpf_adapter_init(struct idpf_adapter *adapter)
>  	struct idpf_hw *hw = &adapter->hw;
>  	int ret;
>  
> -	if (hw->device_id == IDPF_DEV_ID_SRIOV) {
> +	if (hw->device_id == IDPF_DEV_ID_SRIOV || hw->device_id == 
> +IXD_DEV_ID_VCPF) {
>  		ret = idpf_check_vf_reset_done(hw);
>  	} else {
>  		idpf_reset_pf(hw);
> diff --git a/drivers/net/intel/idpf/idpf_common_device.h 
> b/drivers/net/intel/idpf/idpf_common_device.h
> index 5f3e4a4fcf..d536ce7e15 100644
> --- a/drivers/net/intel/idpf/idpf_common_device.h
> +++ b/drivers/net/intel/idpf/idpf_common_device.h
> @@ -11,6 +11,7 @@
>  #include "idpf_common_logs.h"
>  
>  #define IDPF_DEV_ID_SRIOV	0x145C
> +#define IXD_DEV_ID_VCPF         0x1203
>  
>  #define IDPF_RSS_KEY_LEN	52
>  
> --
> 2.37.3
> 

  reply	other threads:[~2025-09-29 18:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22  9:48 [PATCH 0/4] add vcpf pmd support Shetty, Praveen
2025-09-22  9:48 ` [PATCH 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-22 14:10   ` [PATCH v2 0/4] add vcpf pmd support Shetty, Praveen
2025-09-22 14:10     ` [PATCH v2 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-23 12:54       ` [PATCH v3 0/4] add vcpf pmd support Shetty, Praveen
2025-09-23 12:54         ` [PATCH v3 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-29 12:18           ` Bruce Richardson
2025-09-29 18:55             ` Shetty, Praveen [this message]
2025-09-23 12:54         ` [PATCH v3 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-29 12:32           ` Bruce Richardson
2025-09-29 14:39             ` Stephen Hemminger
2025-09-29 18:55             ` Shetty, Praveen
2025-09-23 12:54         ` [PATCH v3 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-29 13:40           ` Bruce Richardson
2025-09-29 19:53             ` Shetty, Praveen
2025-09-30  7:50               ` Bruce Richardson
2025-09-30  8:31                 ` Shetty, Praveen
2025-09-23 12:54         ` [PATCH v3 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen
2025-09-26  8:11           ` Shetty, Praveen
2025-09-22 14:10     ` [PATCH v2 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-22 14:10     ` [PATCH v2 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-22 14:10     ` [PATCH v2 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen
2025-09-30 13:55   ` [PATCH v4 0/4] add vcpf pmd support Shetty, Praveen
2025-09-30 13:55     ` [PATCH v4 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-30 13:55     ` [PATCH v4 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-30 13:55     ` [PATCH v4 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-30 13:55     ` [PATCH v4 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen
2025-09-30 18:27   ` [PATCH v5 0/4] add vcpf pmd support Shetty, Praveen
2025-09-30 18:27     ` [PATCH v5 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-30 18:27     ` [PATCH v5 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-30 18:27     ` [PATCH v5 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-30 18:27     ` [PATCH v5 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen
2025-09-22  9:48 ` [PATCH 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-22  9:48 ` [PATCH 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-22  9:48 ` [PATCH 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen

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=DM3PPF291EF9BF1A28BD7092DCA7EB71DBB9D1BA@DM3PPF291EF9BF1.namprd11.prod.outlook.com \
    --to=praveen.shetty@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=atul.patel@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dhananjay.shukla@intel.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).