[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 22/28] net: add qemu_{configure,create}_nic_device(), qemu_find_nic_info()



On 25/10/2023 15:50, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>

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 <dwmw@xxxxxxxxxxxx>
---
  include/net/net.h |  7 ++++++-
  net/net.c         | 51 +++++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 57 insertions(+), 1 deletion(-)


Reviewed-by: Paul Durrant <paul@xxxxxxx>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.