DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "pro_nic_dpdk@realtek.com" <pro_nic_dpdk@realtek.com>,
	王颢 <howard_wang@realsil.com.cn>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Ferruh Yigit <ferruh.yigit@amd.com>
Subject: Re: 答复: [PATCH v8 12/17] net/r8169: implement Tx path
Date: Tue, 19 Nov 2024 08:15:49 +0100	[thread overview]
Message-ID: <1768763.QkHrqEjB74@thomas> (raw)
In-Reply-To: <6346d08bc2984c99bb0918397fec6962@realsil.com.cn>

The change below is replacing 1 rte_smp_rmb with 2 calls,
so no it is not what I am asking for.
Please could you check how to not calling this function at all?

This series is already merged in the main branch,
so any new change should be submitted as a new patch.

Thank you


19/11/2024 07:29, 王颢:
> Dear Thomas,
> 
> After our discussion, we concluded that we can make the following changes. What do you think? Additionally, I may not have been very clear in my last email. Should I submit the entire series of changes as PATCH v9, or should I respond with [PATCH v9 12/17] net/r8169: implement Tx path?
> 
> static u32
> rtl_get_opts1(struct rtl_tx_desc *txd)
> {
> -	rte_smp_rmb();
> 
> 	return rte_le_to_cpu_32(txd->opts1);
> }
> 
> static void
> rtl_tx_clean(struct rtl_hw *hw, struct rtl_tx_queue *txq)
> {
> 		...
> 		tx_left = (rte_atomic_load_explicit(&txq->tx_tail,
> 						    rte_memory_order_relaxed) % nb_tx_desc) - head;
> 	}
> 
> +	rte_smp_rmb();
> 
> 	while (tx_left > 0) {
> 		txd = &txq->hw_ring[head];
> 
> 		if (!enable_tx_no_close && (rtl_get_opts1(txd) & DescOwn))
> 			break;
> 		...
> }
> 
> 
> int
> rtl_tx_done_cleanup(void *tx_queue, uint32_t free_cnt)
> {
> 		...
> 		tx_left = (rte_atomic_load_explicit(&txq->tx_tail,
> 						    rte_memory_order_relaxed) % nb_tx_desc) - head;
> 	}
> 
> +	rte_smp_rmb();
> 
> 	while (tx_left > 0) {
> 		txd = &txq->hw_ring[head];
> 
> 		status = rtl_get_opts1(txd);
> 
> 		if (!enable_tx_no_close && (status & DescOwn))
> 			break;
> 
> 		...
> }
> 
> Best Regards,
> Howard Wang
> 
> -----邮件原件-----
> 发件人: Thomas Monjalon <thomas@monjalon.net> 
> 发送时间: 2024年11月18日 22:59
> 收件人: pro_nic_dpdk@realtek.com; 王颢 <howard_wang@realsil.com.cn>
> 抄送: dev@dpdk.org; Ferruh Yigit <ferruh.yigit@amd.com>
> 主题: Re: [PATCH v8 12/17] net/r8169: implement Tx path
> 
> 
> External mail.
> 
> 
> 
> Hello,
> 
> 13/11/2024 10:28, Howard Wang:
> > +static u32
> > +rtl_get_opts1(struct rtl_tx_desc *txd) {
> > +       rte_smp_rmb();
> > +
> > +       return rte_le_to_cpu_32(txd->opts1); }
> 
> We should avoid using such heavy memory barrier.
> Is it possible to use a lighter fence or atomic API?
> 
> 
> 






  reply	other threads:[~2024-11-19  7:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-13  9:28 [PATCH v8 00/17] modify something as suggested Howard Wang
2024-11-13  9:28 ` [PATCH v8 01/17] net/r8169: add PMD driver skeleton Howard Wang
2024-11-13  9:28 ` [PATCH v8 02/17] net/r8169: add logging structure Howard Wang
2024-11-13  9:28 ` [PATCH v8 03/17] net/r8169: add hardware registers access routines Howard Wang
2024-11-13  9:28 ` [PATCH v8 04/17] net/r8169: implement core logic for Tx/Rx Howard Wang
2024-11-13  9:28 ` [PATCH v8 05/17] net/r8169: add support for HW config Howard Wang
2024-11-13  9:28 ` [PATCH v8 06/17] net/r8169: add PHY registers access routines Howard Wang
2024-11-13  9:28 ` [PATCH v8 07/17] net/r8169: add support for hardware operations Howard Wang
2024-11-13  9:28 ` [PATCH v8 08/17] net/r8169: add support for PHY configuration Howard Wang
2024-11-13  9:28 ` [PATCH v8 09/17] net/r8169: add support for HW initialization Howard Wang
2024-11-13  9:28 ` [PATCH v8 10/17] net/r8169: add link status and interrupt management Howard Wang
2024-11-13  9:28 ` [PATCH v8 11/17] net/r8169: implement Rx path Howard Wang
2024-11-13  9:28 ` [PATCH v8 12/17] net/r8169: implement Tx path Howard Wang
2024-11-18 14:58   ` Thomas Monjalon
2024-11-19  2:43     ` 答复: " 王颢
2024-11-19  6:29     ` 王颢
2024-11-19  7:15       ` Thomas Monjalon [this message]
2024-11-19  8:52         ` 答复: " 王颢
2024-11-19  9:17           ` Thomas Monjalon
2024-11-13  9:28 ` [PATCH v8 13/17] net/r8169: implement device statistics Howard Wang
2024-11-13  9:28 ` [PATCH v8 14/17] net/r8169: implement promisc and allmulti modes Howard Wang
2024-11-13  9:28 ` [PATCH v8 15/17] net/r8169: implement MTU configuration Howard Wang
2024-11-13  9:28 ` [PATCH v8 16/17] net/r8169: add support for getting FW version Howard Wang
2024-11-13  9:28 ` [PATCH v8 17/17] net/r8169: add driver start and driver stop Howard Wang
2024-11-13 21:15 ` [PATCH v8 00/17] modify something as suggested Ferruh Yigit

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=1768763.QkHrqEjB74@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --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).