On Tue, 6 Aug 2019 20:03:22 +0000 Matan Azrad <ma...@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.