From: "Xing, Beilei" <beilei.xing@intel.com>
To: "Yang, Qiming" <qiming.yang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Zhang, Qi Z" <qi.z.zhang@intel.com>,
"Yang, Qiming" <qiming.yang@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] net/ice: add dcf port representor infrastructure
Date: Tue, 8 Sep 2020 11:35:03 +0000 [thread overview]
Message-ID: <MN2PR11MB38073E2473C54A8212983986F7290@MN2PR11MB3807.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200902063802.102428-2-qiming.yang@intel.com>
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Qiming Yang
> Sent: Wednesday, September 2, 2020 2:38 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming
> <qiming.yang@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@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
>
<...>
> +
> +static int
> +ice_dcf_representor_tx_queue_setup(__rte_unused struct rte_eth_dev *dev,
> + __rte_unused uint16_t rx_queue_id,
Should be tx_queue_id which is more readable?
> + __rte_unused uint16_t nb_rx_desc,
Should be nb_tx_desc?
> + __rte_unused unsigned int socket_id,
> + __rte_unused const struct rte_eth_txconf *tx_conf) {
> + return 0;
> +}
> +
<...>
> +
> + /* No data-path, but need stub Rx/Tx functions to avoid crash
> + * when testing with the likes of testpmd.
> + */
> + ethdev->rx_pkt_burst = ice_dcf_representor_rx_burst;
> + ethdev->tx_pkt_burst = ice_dcf_representor_tx_burst;
> +
> + ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
> + ethdev->data->representor_id = representor->vf_id;
> +
> + struct rte_ether_addr mac_addr;
Why not move this to the beginning of the function?
> +
> + memset(&mac_addr, 0, sizeof(mac_addr));
> + ethdev->data->mac_addrs = &mac_addr;
> +
> + return 0;
> +}
> +
> +int
> +ice_dcf_vf_representor_uninit(struct rte_eth_dev *ethdev) {
> + ethdev->data->mac_addrs = NULL;
> +
> + return 0;
> +}
> +
> --
> 2.17.1
next prev parent reply other threads:[~2020-09-08 11:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 6:38 [dpdk-dev] [PATCH 0/2] enable VLAN offload in DCF Qiming Yang
2020-09-02 6:38 ` [dpdk-dev] [PATCH 1/2] net/ice: add dcf port representor infrastructure Qiming Yang
2020-09-08 11:35 ` Xing, Beilei [this message]
2020-09-09 7:18 ` Yang, Qiming
2020-10-20 8:18 ` Xing, Beilei
2020-09-02 6:38 ` [dpdk-dev] [PATCH 2/2] net/ice: add VLAN config for DCF Qiming Yang
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=MN2PR11MB38073E2473C54A8212983986F7290@MN2PR11MB3807.namprd11.prod.outlook.com \
--to=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@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).