[PATCH] net/ixgbe: avoid private driver include in testpmd
David Marchand
david.marchand at redhat.com
Thu Oct 15 13:18:52 CEST 2026
On Thu, 15 Oct 2026 at 12:41, Burakov, Anatoly
<anatoly.burakov at intel.com> wrote:
>
> On 10/15/2026 11:13 AM, Thomas Monjalon wrote:
> > 15/10/2026 10:53, Burakov, Anatoly:
> >> On 10/14/2026 10:34 PM, Thomas Monjalon wrote:
> >>> Testpmd commands should use the driver's public API
> >>> rather than access its private structures directly.
> >>> Note: ixgbe_testpmd.c should be considered as part of testpmd.
> >>>
> >>> ixgbe_testpmd.c includes ixgbe_ethdev.h only to check whether bypass
> >>> operations are available through the private adapter structure.
> >>>
> >>> Rely on the public bypass API to check availability
> >>> and handle -ENOTSUP in the commands.
> >>> Remove ixgbe_ethdev.h, ethdev_driver.h
> >>> and the now unnecessary RTE_LIBRTE_IXGBE_BYPASS definition.
> >>>
> >>> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> >>> ---
> >>
> >> Reviewed-by: Anatoly Burakov <anatoly.burakov at intel.com>
> >
> > I forgot to say it is mostly written by AI.
> > I didn't review it myself.
> > Please double check.
>
> It doesn't look wrong to me, testpmd code should not be using
> driver-internal things anyway except through pmd-specific API, which is
> what this patch does.
On the principle, this looks good indeed.
My fault for just moving the code around, without considering the used APIs.
And there are probably similar issues in some other drivers _testpmd.c
files (at least net/ice seems to include ice_ethdev.h).
--
David Marchand
More information about the dev
mailing list