Re: [dpdk-dev] [PATCH v1] net/mlx4: fix single port configuration

2018-01-26 Thread Adrien Mazarguil
Hi Ophir, On Tue, Jan 23, 2018 at 11:32:47PM +, Ophir Munk wrote: > The number of mlx4 present ports is calculated as follows: > conf.ports.present |= (UINT64_C(1) << device_attr.phys_port_cnt) - 1; > > That is - all ones sequence (due to -1 subtraction) > When retrieving the number of ports,

[dpdk-dev] [PATCH v1] net/mlx4: fix single port configuration

2018-01-23 Thread Ophir Munk
The number of mlx4 present ports is calculated as follows: conf.ports.present |= (UINT64_C(1) << device_attr.phys_port_cnt) - 1; That is - all ones sequence (due to -1 subtraction) When retrieving the number of ports, 1 must be added in order to obtain the correct number of ports to the power of 2