[dpdk-dev] [PATCH v5 1/4] examples/multi_process/client_server_mp: check port validity
stephen at networkplumber.org
Wed Aug 7 01:09:13 CEST 2019
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.
The original code was broken with behavior introduced with port ownership
and these patches try to help fix that.
Still think Port ID is a lousy API for real applications. It is fine for the
DPDK literati but terrible user experience for the average user.
It requires too hands on an experience. For example, the port id values change in
non-obvious ways when using port ownership like failsafe does.
More information about the dev