net/ena: check memory BAR before initializing LLQ
authorDawid Gorecki <dgr@semihalf.com>
Wed, 23 Feb 2022 12:19:42 +0000 (13:19 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Feb 2022 18:01:03 +0000 (19:01 +0100)
commit9ae7a13f8247319f63402107c8304ba57c3f4308
tree30c6f9ce021dcc8d33d899dea4195ac11257217c
parent77e764c7ecd36de92c574731d05d1fb34c28e680
net/ena: check memory BAR before initializing LLQ

The ena_com_config_dev_mode() performs many calculations related to LLQ
and then performs an admin queue call to configure LLQ in the device.

All of the operations performed by ena_com_config_dev_mode() are
unnecessary if membar hasn't been found. Move the dev_mem_base check
before ena_com_config_dev_mode() call. This prevents the unnecessary
operations from being performed.

Fixes: 2fca2a98c0d1 ("net/ena: support LLQv2")
Cc: stable@dpdk.org
Signed-off-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
drivers/net/ena/ena_ethdev.c