DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "fengchengwen" <fengchengwen@huawei.com>, <thomas@monjalon.net>,
	<ferruh.yigit@amd.com>
Cc: <dev@dpdk.org>, <huangdengdui@huawei.com>,
	<stephen@networkplumber.org>, <roretzla@linux.microsoft.com>
Subject: RE: [PATCH] ethdev: fix strict aliasing lead to link cannot be up
Date: Thu, 11 Apr 2024 14:44:42 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F399@smartserver.smartshare.dk> (raw)
In-Reply-To: <2987eb7f-5439-9ecc-494c-b968f059da50@huawei.com>

> From: fengchengwen [mailto:fengchengwen@huawei.com]
> Sent: Thursday, 11 April 2024 13.58

[...]

> Plus: yes, this patch mixes atomic and non-atomic access, but the main
> reason is that we want to simplify the implementation.

Yes, your design in patch v3 follows the current standard design pattern for atomics in DPDK.
I agree with you on this.

Thank you for describing the alternative, though.

> If we want to separate it clearly,
> maybe we should defined as this:
>     struct rte_eth_link {
>         union {
>             RTE_ATOMIC(uint64_t) atomic64; /**< used for atomic64
> read/write */
>             struct {
>                 uint64_t val64;
>             };
>             struct {
>                 uint32_t link_speed;	    /**< RTE_ETH_SPEED_NUM_ */
>                 uint16_t link_duplex  : 1;  /**<
> RTE_ETH_LINK_[HALF/FULL]_DUPLEX */
>                 uint16_t link_autoneg : 1;  /**<
> RTE_ETH_LINK_[AUTONEG/FIXED] */
>                 uint16_t link_status  : 1;  /**< RTE_ETH_LINK_[DOWN/UP]
> */
>             };
>         };
>     };

PS: More review comments provided in reply to the v3 patch.


  reply	other threads:[~2024-04-11 12:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11  3:07 Chengwen Feng
2024-04-11  6:53 ` Morten Brørup
2024-04-11  6:58 ` Morten Brørup
2024-04-11 11:57   ` fengchengwen
2024-04-11 12:44     ` Morten Brørup [this message]
2024-04-11 12:04 ` [PATCH v3] " Chengwen Feng
2024-04-11 12:44   ` Morten Brørup
2024-04-12  3:27     ` fengchengwen
2024-04-12  7:24       ` Morten Brørup
2024-04-11 15:05 ` [PATCH] " Stephen Hemminger
2024-04-12  8:16   ` fengchengwen
2024-04-12  8:49 ` [PATCH v4] " Chengwen Feng
2024-04-13  8:04 ` [PATCH v5] " Chengwen Feng
2024-04-13  8:48 ` [PATCH v6] " Chengwen Feng
2024-04-15 13:15   ` Morten Brørup
2024-04-18  7:28 ` [PATCH v7] " Chengwen Feng
2024-04-19 15:15   ` Ferruh Yigit
2024-04-19 15:25   ` Ferruh Yigit
2024-04-22  6:42     ` fengchengwen
2024-04-22  6:38 ` [PATCH v8] " Chengwen Feng
2024-04-22 10:54   ` 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=98CBD80474FA8B44BF855DF32C47DC35E9F399@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=huangdengdui@huawei.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=stephen@networkplumber.org \
    --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).