On 25/10/2023 15:50, David Woodhouse wrote:
From: David Woodhouse <d...@amazon.co.uk>

Most code which directly accesses nd_table[] and nb_nics uses them for
one of two things. Either "I have created a NIC device and I'd like a
configuration for it", or "I will create a NIC device *if* there is a
configuration for it".  With some variants on the theme around whether
they actually *check* if the model specified in the configuration is
the right one.

Provide functions which perform both of those, allowing platforms to
be a little more consistent and as a step towards making nd_table[]
and nb_nics private to the net code.

Also export the qemu_find_nic_info() helper, as some platforms have
special cases they need to handle.

Signed-off-by: David Woodhouse <d...@amazon.co.uk>
---
  include/net/net.h |  7 ++++++-
  net/net.c         | 51 +++++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 57 insertions(+), 1 deletion(-)


Reviewed-by: Paul Durrant <p...@xen.org>


Reply via email to