patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"ferruh.yigit@amd.com" <ferruh.yigit@amd.com>,
	"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: 回复: [PATCH] ethdev: keep promiscuous/allmulti value before enabling
Date: Mon, 21 Jul 2025 14:28:57 +0200	[thread overview]
Message-ID: <17193600.geO5KgaWL5@thomas> (raw)
In-Reply-To: <KL1PR0601MB556788BFC98F8A212F2F6921905DA@KL1PR0601MB5567.apcprd06.prod.outlook.com>

21/07/2025 14:13, Sunyang Wu:
> Hi, Thomas:
> Thanks for your note. The main purpose of this modification is to align the handling logic with the "disable" functions,
> aiming to enhance the overall consistency and maintainability of the code.
> 
> Previously, the handling of failure scenarios in the "enable" related logic differed from that in the "disable" functions. 
> With this adjustment, both will behave more uniformly in exceptional cases, which should reduce potential confusion
> during future development or maintenance caused by inconsistent logic.

In this case, please send a v2 explaining the intent is to align with disable functions,
and saying there is no behavior change.


> 21/07/2025 13:51, Sunyang Wu:
> > The values of the promiscuous and allmulticast variables are set after 
> > calling the driver, according to the return value.
> >
> > Fixes: 400d75818266 ("ethdev: check device promiscuous state") 
> > de5ccf0775ae ("ethdev:do nothing if all-multicast mode is applied
> > again")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
> [...]
> >       diag = dev->dev_ops->promiscuous_enable(dev);
> > -     dev->data->promiscuous = (diag == 0) ? 1 : 0;
> > +     if (diag == 0)
> > +             dev->data->promiscuous = 1;
> 
> I remember seeing this strange behavior of resetting the value if failed.
> And it is done differently in the "disable" functions.
> 
> But it is not so wrong, because if it was enabled, the function returns early.
> So the value changes only if it is successful.
> 
> What is the issue you observe?
> Is it a rework to make the code easier to understand?




      reply	other threads:[~2025-07-21 12:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21 11:51 Sunyang Wu
2025-07-21 12:07 ` Thomas Monjalon
2025-07-21 12:13   ` 回复: " Sunyang Wu
2025-07-21 12:28     ` Thomas Monjalon [this message]

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=17193600.geO5KgaWL5@thomas \
    --to=thomas@monjalon.net \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=stable@dpdk.org \
    --cc=sunyang.wu@jaguarmicro.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).