[dpdk-dev] [PATCH v5 1/4] examples/multi_process/client_server_mp: check port validity

Matan Azrad matan at mellanox.com
Wed Aug 7 09:02:02 CEST 2019



From: Stephen Hemminger
> On Wed, 7 Aug 2019 05:38:42 +0000
> Matan Azrad <matan at mellanox.com> wrote:
> 
> > From: Stephen Hemminger
> > > Sent: Wednesday, August 7, 2019 2:09 AM
> > > To: Matan Azrad <matan at mellanox.com>
> > > Cc: dev at dpdk.org; Stephen Hemminger <sthemmin at microsoft.com>
> > > Subject: Re: [dpdk-dev] [PATCH v5 1/4]
> > > examples/multi_process/client_server_mp: check port validity
> > >
> > > On Tue, 6 Aug 2019 20:03:22 +0000
> > > Matan Azrad <matan at mellanox.com> wrote:
> > >
> > > > >
> > > > > The DPDK has lots of hard coded assumptions of all ports fitting in 64
> bits.
> > > > > Examples include testpmd/parameters.c etc.
> > > >
> > > > Yes, I understand, but the user should know not to change the
> > > > default value of RTE_MAX_ETHPORTS, at least it should be
> documented.
> > > >
> > > > > The original concept of a small set of assigned values for
> > > > > portid is not going to scale. It really should have been more
> > > > > like ifindex; something that is not used by common API's much
> > > > > larger range; and
> > > assigned purely sequentially.
> > > > >
> > > > > The API's should all be using names, but the DPDK port naming is
> > > > > also a mess...
> > > >
> > > > Port ID is OK, user can run port info, then to find the wanted
> > > > port ID and
> > > configure it by port id list\bitmap.
> > > >
> > >
> > >
> > > The examples are toy programs. If user changes RTE_MAX_ETHPORTS it
> > > will break lots of other places. Why put more checks in the
> > > examples. Sorry, it really would not help to pretend that fixing the
> example is going to help this.
> >
> >
> > Agree that it is not needed to fix all the places now.
> > It is better just to update the example documentation that
> RTE_MAX_ETHPORTS must not be changed when running this application.
> >
> > I will ack your series(v7) , Consider to update the doc if you want to be
> completely perfect here.
> 
> Perhaps the right place to tell the users is somewhere in the documentation?
> 
> One place would be here:
> 
> diff --git a/doc/guides/faq/faq.rst b/doc/guides/faq/faq.rst index
> f19c1389b6af..a847d9ceda22 100644
> --- a/doc/guides/faq/faq.rst
> +++ b/doc/guides/faq/faq.rst
> @@ -195,3 +195,8 @@ Why can't my application receive packets on my
> system with UEFI Secure Boot enab
> 
>  If UEFI secure boot is enabled, the Linux kernel may disallow the use of UIO
> on the system.
>  Therefore, devices for use by DPDK should be bound to the ``vfio-pci``
> kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
> +
> +What is the maximum number of ethernet devices?
> +-----------------------------------------------
> +
> +The limit on the number of Ethernet devices is controlled by the
> RTE_MAX_ETHPORTS configuration setting. Since many of the applications
> use a 64 bit value for port mask; the current upper limit is 64 ports.
> 
I think there are systems with a lot of virtual ports which may use more than 64.

So update all the docs when the mask is defined, would be option too.




More information about the dev mailing list