From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Chengwen Feng <fengchengwen@huawei.com>,
thomas@monjalon.net, ferruh.yigit@amd.com,
Chenbo Xia <chenbo.xia@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH 2/2] net/vhost: support private dump
Date: Wed, 1 Feb 2023 11:29:17 +0100 [thread overview]
Message-ID: <90207259-2f89-f236-be96-19b30de1d27e@redhat.com> (raw)
In-Reply-To: <20230119123056.14338-3-fengchengwen@huawei.com>
On 1/19/23 13:30, Chengwen Feng wrote:
> This patch implements eth_dev_priv_dump callback which could use for
> debugging.
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
> drivers/net/vhost/rte_eth_vhost.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
> index b152279fac..9c609b45a3 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -1484,6 +1484,26 @@ vhost_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc)
> return 0;
> }
>
> +static int
> +vhost_dev_priv_dump(struct rte_eth_dev *dev, FILE *f)
> +{
> + struct pmd_internal *internal = dev->data->dev_private;
> +
> + fprintf(f, "iface_name: %s\n", internal->iface_name);
> + fprintf(f, "flags: 0x%" PRIx64 "\n", internal->flags);
> + fprintf(f, "disable_flags: 0x%" PRIx64 "\n", internal->disable_flags);
> + fprintf(f, "features: 0x%" PRIx64 "\n", internal->features);
> + fprintf(f, "max_queues: %u\n", internal->max_queues);
> + fprintf(f, "vid: %d\n", internal->vid);
> + fprintf(f, "started: %d\n", rte_atomic32_read(&internal->started));
> + fprintf(f, "dev_attached: %d\n", rte_atomic32_read(&internal->dev_attached));
> + fprintf(f, "vlan_strip: %d\n", internal->vlan_strip);
> + fprintf(f, "rx_sw_csum: %d\n", internal->rx_sw_csum);
> + fprintf(f, "tx_sw_csum: %d\n", internal->tx_sw_csum);
> +
> + return 0;
> +}
> +
> static const struct eth_dev_ops ops = {
> .dev_start = eth_dev_start,
> .dev_stop = eth_dev_stop,
> @@ -1504,6 +1524,7 @@ static const struct eth_dev_ops ops = {
> .rx_queue_intr_enable = eth_rxq_intr_enable,
> .rx_queue_intr_disable = eth_rxq_intr_disable,
> .get_monitor_addr = vhost_get_monitor_addr,
> + .eth_dev_priv_dump = vhost_dev_priv_dump,
> };
>
> static int
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
next prev parent reply other threads:[~2023-02-01 10:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 12:30 [PATCH 0/2] add private dump for vhost and virtio Chengwen Feng
2023-01-19 12:30 ` [PATCH 1/2] net/virtio: support private dump Chengwen Feng
2023-02-01 10:29 ` Maxime Coquelin
2023-01-19 12:30 ` [PATCH 2/2] net/vhost: " Chengwen Feng
2023-02-01 10:29 ` Maxime Coquelin [this message]
2023-02-03 14:59 ` [PATCH 0/2] add private dump for vhost and virtio Maxime Coquelin
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=90207259-2f89-f236-be96-19b30de1d27e@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=thomas@monjalon.net \
/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).