Dear Stephen,

Thank you for your suggestions, I will take them into consideration.
Regarding the queue quantity issue, I apologize that we only support one queue 
at the moment.
If there are any updates in the future, I will provide patches.

Thanks!
Howard Wang

-----邮件原件-----
发件人: Stephen Hemminger <step...@networkplumber.org> 
发送时间: 2024年6月18日 7:57
收件人: 王颢 <howard_w...@realsil.com.cn>
抄送: dev@dpdk.org; pro_nic_d...@realtek.com
主题: Re: [PATCH v2] r8126: add r8126 ethernet poll mode driver


External mail.



On Thu, 13 Jun 2024 11:39:29 +0800
Howard Wang <howard_w...@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 via email to