From: Stephen Hemminger <stephen@networkplumber.org>
To: Weijun Pan <wpan3636@gmail.com>
Cc: Chas Williams <3chas3@gmail.com>,
"Min Hu (Connor)" <humin29@huawei.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
dev@dpdk.org
Subject: Re: [RFC PATCH] net/bonding: reject control operations in secondary
Date: Wed, 22 Jul 2026 16:10:30 -0700 [thread overview]
Message-ID: <20260722161030.54962462@phoenix.local> (raw)
In-Reply-To: <20260708174204.72574-1-wpan3636@gmail.com>
On Wed, 8 Jul 2026 12:42:04 -0500
Weijun Pan <wpan3636@gmail.com> wrote:
> +static int
> +bond_ethdev_primary_only(const char *op)
> +{
> + if (rte_eal_process_type() != RTE_PROC_SECONDARY)
> + return 0;
> +
> + RTE_BOND_LOG(ERR, "%s not supported in secondary process", op);
> + return -ENOTSUP;
> +}
> +
Minor nit, the function returns 0 or -ENOTSUP but then caller
always ends up just checking for 0. It might look cleaner as boolean
function or wrap the whole thing as a macro like ethdev does.
prev parent reply other threads:[~2026-07-22 23:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 17:42 [RFC PATCH] net/bonding: reject control operations in secondary Weijun Pan
2026-07-22 23:10 ` Stephen Hemminger [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=20260722161030.54962462@phoenix.local \
--to=stephen@networkplumber.org \
--cc=3chas3@gmail.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=humin29@huawei.com \
--cc=wpan3636@gmail.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