In rte_eth_dev_configure(), device configuration was copied to the dev
struct after get_dev_info() was called to get the max queue information.
In some drivers, though, the max queues can vary depending on the device
configuration - but that information is not available to the driver until
the copy is made.
This patch moves the memcpy of the device configuration into the dev->data
structure before the call to get_dev_info(), thereby making it accessible
to drivers to use when reporting their max queues.
Fixes:
af75078fece3 ("first public release")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
return -EBUSY;
}
+ /* Copy the dev_conf parameter into the dev structure */
+ memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf));
+
/*
* Check that the numbers of RX and TX queues are not greater
* than the maximum number of RX and TX queues supported by the
return -EINVAL;
}
- /* Copy the dev_conf parameter into the dev structure */
- memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf));
-
/*
* If link state interrupt is enabled, check that the
* device supports it.