net/mlx4: fix targetless internal rule creation
authorMatan Azrad <matan@mellanox.com>
Tue, 24 Oct 2017 10:05:59 +0000 (10:05 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 26 Oct 2017 00:33:01 +0000 (02:33 +0200)
commita76bec521a1634abfba5d3f954ae89e2d978ead0
tree6a5ef6a0cc4b830a695d21785bed495925b65ef8
parent412f60a0e14ce51694489957b8ea9fa98d4b138f
net/mlx4: fix targetless internal rule creation

The corrupted code allowed to create internal rule with no any target
queue in case the rule creation occurred before queues creation.

For example, when user calls rte_eth_dev_default_mac_addr_set after
probe and before dev_configure, mlx4 fails because the RSS queue number
was 0.

The fix prevents internal rules creation before queues creation based on
future creation before traffic start.

Fixes: 7d8675956f57 ("net/mlx4: add RSS support outside flow API")
Fixes: bdcad2f4843a ("net/mlx4: refactor internal flow rules")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx4/mlx4_flow.c