Re: [RFC PATCH] net/bonding: reject control operations in secondary
Stephen Hemminger <[email protected]>
| Newsgroups | org.dpdk.dev |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 8 Jul 2026 12:42:04 -0500 Weijun Pan <[email protected]> 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.