DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Howard Wang <howard_wang@realsil.com.cn>
Cc: <dev@dpdk.org>, <pro_nic_dpdk@realtek.com>
Subject: Re: [PATCH v2] r8126: add r8126 ethernet poll mode driver
Date: Mon, 17 Jun 2024 16:56:58 -0700	[thread overview]
Message-ID: <20240617165658.2fdaf742@hermes.local> (raw)
In-Reply-To: <20240613033929.5643-1-howard_wang@realsil.com.cn>

On Thu, 13 Jun 2024 11:39:29 +0800
Howard Wang <howard_wang@realsil.com.cn> wrote:
> +static void
> +rtl8126_sw_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
> +{
> +	struct rtl8126_adapter *adapter = RTL8126_DEV_PRIVATE(dev);
> +	struct rtl8126_sw_stats *sw_stats = &adapter->sw_stats;
> +
> +	rte_stats->ibytes = sw_stats->rx_bytes;
> +	rte_stats->obytes = sw_stats->tx_bytes;
> +}
> +

There is ongoing discussion about how to handle thread safety for sw stats
in other drivers.  Without using atomic or volatile there is no guarantee that
on weakly ordered platforms that the stats will get reset properly.

> +static int
> +rtl8126_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
> +{
> +	struct rtl8126_adapter *adapter = RTL8126_DEV_PRIVATE(dev);
> +	struct rtl8126_hw *hw = &adapter->hw;
> +
> +	if (rte_stats == NULL)
> +		return -EINVAL;

This is already checked and logged in rte_ethdev.c


Quite limiting that the device only support single rx and tx queue.

Does the device support primary/secondary process.

  reply	other threads:[~2024-06-17 23:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27  6:13 [PATCH] " Howard Wang
2024-05-28 21:34 ` Stephen Hemminger
2024-05-29  2:14   ` 答复: " 王颢
2024-06-13  3:39 ` [PATCH v2] " Howard Wang
2024-06-17 23:56   ` Stephen Hemminger [this message]
2024-06-18  6:50     ` 答复: " 王颢
2024-06-12  9:40 Howard Wang

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=20240617165658.2fdaf742@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=howard_wang@realsil.com.cn \
    --cc=pro_nic_dpdk@realtek.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).