DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dongdong Liu <liudongdong3@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <ferruh.yigit@amd.com>, <thomas@monjalon.net>,
	<andrew.rybchenko@oktetlabs.ru>, <stable@dpdk.org>
Subject: Re: [PATCH 4/5] net/hns3: fix TM thread safety risk
Date: Mon, 7 Aug 2023 18:50:13 +0800	[thread overview]
Message-ID: <6e0e2ea2-10ef-51da-8759-c77c2cb9fcf3@huawei.com> (raw)
In-Reply-To: <20230805085825.0d6caf26@hermes.local>

Hi Stephen

On 2023/8/5 23:58, Stephen Hemminger wrote:
> On Sat, 5 Aug 2023 16:36:26 +0800
> Dongdong Liu <liudongdong3@huawei.com> wrote:
>
>> From: Chengwen Feng <fengchengwen@huawei.com>
>>
>> The driver-related TM (traffic management) info is implemented through
>> the linked list. The following threads are involved in the read and
>> write of the TM info:
>>
>> 1. main thread: invokes the rte_tm_xxx() API family to modify or read.
>> 2. interrupt thread: will read TM info in reset recover process.
>> 3. telemetry/proc-info thread: invoke rte_eth_dev_priv_dump() API to
>>    read TM info.
>>
>> Currently, thread safety protection of TM info is implemented only in
>> the following operations:
>> 1. some of the rte_tm_xxx() API's implementation.
>> 2. reset recover process.
>>
>> Thread safety risks may exist in other scenarios, so fix by:
>> 1. make sure all the rte_tm_xxx() API's implementations protected by
>>    hw.lock.
>> 2. make sure rte_eth_dev_priv_dump() API's implementation protected
>>    by hw.lock.
>>
>> Fixes: c09c7847d892 ("net/hns3: support traffic management")
>> Fixes: e4cfe6bb9114 ("net/hns3: dump TM configuration info")
>> Cc: stable@dpdk.org
>
> I hope no locking is necessary in the data path.
Yes, these are control plane APIs.

Thanks,
Dongdong
> .
>

  reply	other threads:[~2023-08-07 10:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-05  8:36 [PATCH 0/5] net/hns3: some bugfixes for hns3 Dongdong Liu
2023-08-05  8:36 ` [PATCH 1/5] net/hns3: fix VF default MAC modified when set failed Dongdong Liu
2023-08-05  8:36 ` [PATCH 2/5] net/hns3: return ENOSPC if not enough MCAST filter resource Dongdong Liu
2023-08-05  8:36 ` [PATCH 3/5] net/hns3: flush multicast MAC address if mc_addr_set is NULL Dongdong Liu
2023-08-05  8:36 ` [PATCH 4/5] net/hns3: fix TM thread safety risk Dongdong Liu
2023-08-05 15:58   ` Stephen Hemminger
2023-08-07 10:50     ` Dongdong Liu [this message]
2023-08-05  8:36 ` [PATCH 5/5] net/hns3: fix un-align format TM info Dongdong Liu
2023-09-21 13:31 ` [PATCH 0/5] net/hns3: some bugfixes for hns3 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=6e0e2ea2-10ef-51da-8759-c77c2cb9fcf3@huawei.com \
    --to=liudongdong3@huawei.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=stable@dpdk.org \
    --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).