[dpdk-dev] [PATCH 1/2] net/ice: add dcf port representor infrastructure
Xing, Beilei
beilei.xing at intel.com
Tue Oct 20 10:18:09 CEST 2020
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Qiming Yang
> Sent: Wednesday, September 2, 2020 2:38 PM
> To: dev at dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang at intel.com>; Yang, Qiming
> <qiming.yang at intel.com>
> Subject: [dpdk-dev] [PATCH 1/2] net/ice: add dcf port representor
> infrastructure
>
> Defines data structures and code to init/uninit VF representors during
> pci_probe and pci_remove respectively.
> Most of the dev_ops for the VF representor are just stubs for now and will be
> will be filled out in next patch
>
> Signed-off-by: Qiming Yang <qiming.yang at intel.com>
> ---
> drivers/net/ice/Makefile | 1 +
> drivers/net/ice/ice_dcf_ethdev.c | 66 +++++-
> drivers/net/ice/ice_dcf_ethdev.h | 11 +
> drivers/net/ice/ice_dcf_vf_representor.c | 245 +++++++++++++++++++++++
> 4 files changed, 321 insertions(+), 2 deletions(-) create mode 100644
> drivers/net/ice/ice_dcf_vf_representor.c
>
> diff --git a/drivers/net/ice/Makefile b/drivers/net/ice/Makefile index
> 34cd4024b..f9eb34a87 100644
> --- a/drivers/net/ice/Makefile
> +++ b/drivers/net/ice/Makefile
> @@ -88,6 +88,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) +=
> ice_generic_flow.c
>
> SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf.c
> SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf_ethdev.c
> +SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf_vf_representor.c
> SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf_parent.c
Need to change in meson.build.
>
> # install this header file
> diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
> index 2faed3cc7..73af87785 100644
> --- a/drivers/net/ice/ice_dcf_ethdev.c
> +++ b/drivers/net/ice/ice_dcf_ethdev.c
> @@ -973,17 +973,79 @@ ice_dcf_cap_selected(struct rte_devargs *devargs)
> static int eth_ice_dcf_pci_probe(__rte_unused struct rte_pci_driver *pci_drv,
> struct rte_pci_device *pci_dev) {
<snip>
>
> static int eth_ice_dcf_pci_remove(struct rte_pci_device *pci_dev) {
> - return rte_eth_dev_pci_generic_remove(pci_dev, ice_dcf_dev_uninit);
> + struct rte_eth_dev *ethdev;
> +
> + ethdev = rte_eth_dev_allocated(pci_dev->device.name);
> + if (!ethdev)
> + return 0;
> +
> + if (ethdev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR)
> + return rte_eth_dev_pci_generic_remove(pci_dev,
> + ice_dcf_dev_uninit);
Should be ice_dcf_vf_representor_uninit here and
ice_dcf_dev_uninit below ?
> + else
> + return rte_eth_dev_pci_generic_remove(pci_dev,
> +
> ice_dcf_vf_representor_uninit);
> }
>
<snip>
More information about the dev
mailing list