From: Gautam Dawar <gautam.dawar@amd.com>
To: <linux-net-drivers@amd.com>, <jasowang@redhat.com>,
Edward Cree <ecree.xilinx@gmail.com>,
Martin Habets <habetsm.xilinx@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: <eperezma@redhat.com>, <harpreet.anand@amd.com>,
<tanuj.kamde@amd.com>, <koushik.dutta@amd.com>,
Gautam Dawar <gautam.dawar@amd.com>
Subject: [PATCH net-next v3 13/13] sfc: register the vDPA device
Date: Thu, 6 Apr 2023 12:26:58 +0530 [thread overview]
Message-ID: <20230406065706.59664-14-gautam.dawar@amd.com> (raw)
In-Reply-To: <20230406065706.59664-1-gautam.dawar@amd.com>
Register the vDPA device which results in adding the device
to the vDPA bus which will be probed by either of the vDPA
bus drivers: virtio_vdpa or vhost_vdpa.
Signed-off-by: Gautam Dawar <gautam.dawar@amd.com>
---
drivers/net/ethernet/sfc/ef100_vdpa.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/sfc/ef100_vdpa.c b/drivers/net/ethernet/sfc/ef100_vdpa.c
index 50c062b417aa..a6bf43d98939 100644
--- a/drivers/net/ethernet/sfc/ef100_vdpa.c
+++ b/drivers/net/ethernet/sfc/ef100_vdpa.c
@@ -239,8 +239,7 @@ static void ef100_vdpa_delete(struct efx_nic *efx)
}
}
- /* replace with _vdpa_unregister_device later */
- put_device(&vdpa_dev->dev);
+ _vdpa_unregister_device(&efx->vdpa_nic->vdpa_dev);
}
efx_mcdi_free_vis(efx);
}
@@ -375,7 +374,14 @@ static struct ef100_vdpa_nic *ef100_vdpa_create(struct efx_nic *efx,
if (rc)
goto err_put_device;
- /* _vdpa_register_device when its ready */
+ rc = _vdpa_register_device(&vdpa_nic->vdpa_dev,
+ (allocated_vis - 1) * 2);
+ if (rc) {
+ pci_err(efx->pci_dev,
+ "vDPA device registration failed, vf: %u, rc: %d\n",
+ nic_data->vf_index, rc);
+ goto err_put_device;
+ }
return vdpa_nic;
--
2.30.1
next prev parent reply other threads:[~2023-04-06 7:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 6:56 [PATCH net-next v3 00/14] sfc: add vDPA support for EF100 devices Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 01/14] sfc: add function personality " Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 02/14] sfc: implement MCDI interface for vDPA operations Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 03/14] sfc: update MCDI headers for CLIENT_CMD_VF_PROXY capability bit Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 04/14] sfc: evaluate vdpa support based on FW capability CLIENT_CMD_VF_PROXY Gautam Dawar
2023-04-06 13:12 ` kernel test robot
2023-04-06 6:56 ` [PATCH net-next v3 05/14] sfc: implement init and fini functions for vDPA personality Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 06/14] sfc: implement vDPA management device operations Gautam Dawar
2023-04-06 14:25 ` kernel test robot
2023-04-06 15:06 ` kernel test robot
2023-04-06 6:56 ` [PATCH net-next v3 07/14] sfc: implement vdpa device config operations Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 08/14] sfc: implement vdpa vring " Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 09/14] sfc: implement device status related vdpa " Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 10/14] sfc: implement filters for receiving traffic Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 11/14] sfc: use PF's IOMMU domain for running VF's MCDI commands Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 12/14] sfc: unmap VF's MCDI buffer when switching to vDPA mode Gautam Dawar
2023-04-06 6:56 ` Gautam Dawar [this message]
2023-04-06 7:07 ` [PATCH net-next v3 13/13] sfc: register the vDPA device Gautam Dawar
2023-04-06 6:56 ` [PATCH net-next v3 13/14] sfc: update vdpa device MAC address Gautam Dawar
2023-04-06 6:57 ` [PATCH net-next v3 14/14] sfc: register the vDPA device Gautam Dawar
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=20230406065706.59664-14-gautam.dawar@amd.com \
--to=gautam.dawar@amd.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=habetsm.xilinx@gmail.com \
--cc=harpreet.anand@amd.com \
--cc=jasowang@redhat.com \
--cc=koushik.dutta@amd.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=tanuj.kamde@amd.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
all inboxes | Powered by JetHome®