Hi Bruce, Thanks for the feedback. In my application, we map the NIC interfaces into port numbers, which are these indexes. For example, we have an config file saying we would like to use port 2, 3 and 5 for RX. Having the indexes printed together with the NIC interfaces via this script helps us to easily select the correct interfaces to use. Especially when we usually bind or unbind the interfaces to kernel driver or DPDK driver depending on the situation, which will cause a shift in the interface to port number mapping. On machines with more than 10 interfaces, it’s much slower if we need to count the indexes manually.
Thanks, Loc > On 4 Jun 2019, at 6:01 PM, Bruce Richardson <bruce.richard...@intel.com> > wrote: > > On Mon, Jun 03, 2019 at 08:57:36PM +0800, Loc Nguyen wrote: >> Add a device index in front of the PCI ID for easy counting >> >> Network devices using DPDK-compatible driver >> ============================================ >> 0: 0000:07:00.0 ... >> 1: 0000:07:00.1 ... >> >> Signed-off-by: Loc Nguyen <locngu...@niometrics.com> >> --- >> usertools/dpdk-devbind.py | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> > While I don't see anything wrong with this change, can you elaborate on why > you think this is of use? The rest of the script doesn't do anything with > these indexes so why is it worth using columns of screen space to display > them? > > Thanks, > /Bruce