Go to file
Ophir Munk a43fba2c1e net/mlx4: fix single port configuration
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, as follows:
uint32_t ports = rte_log2_u32(conf->ports.present + 1);
If 1 was not added, in the case of one port, the number of ports would
be falsely calculated as 0.

Fixes: 8264279967 ("net/mlx4: check max number of ports dynamically")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-01-29 10:44:44 +01:00
app app/crypto-perf: fix out-of-bounds array access 2018-01-29 20:22:33 +01:00
buildtools buildtools: add script to check experimental API exports 2018-01-29 22:44:00 +01:00
config bus/fslmc: register platform HW mempool on runtime 2018-01-29 19:02:05 +01:00
devtools bb/turbo_sw: add software turbo driver 2018-01-19 01:44:25 +01:00
doc net/failsafe: add Rx interrupts 2018-01-29 10:04:28 +01:00
drivers net/mlx4: fix single port configuration 2018-01-29 10:44:44 +01:00
examples examples/flow_filtering: fix port id size 2018-01-29 10:04:28 +01:00
lib vhost: claim to support any layout feature 2018-01-29 10:04:28 +01:00
license license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
mk mk: add experimental tag check 2018-01-29 23:35:29 +01:00
pkg version: 17.11.0 2017-11-15 19:00:28 +01:00
test test/crypto: improve NULL authentication validation 2018-01-29 20:22:33 +01:00
usertools tools: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore devtools: add tags and cscope index generation 2017-04-30 12:57:04 +02:00
GNUmakefile license: use SPDX tag in root makefile 2018-01-04 22:41:38 +01:00
MAINTAINERS maintainers: update for cryptodev 2018-01-30 00:20:31 +01:00
Makefile license: use SPDX tag in root makefile 2018-01-04 22:41:38 +01:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org