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

Re: [libvirt] [PATCH 13/33] Split src/util/network.{c, h} into 5 pieces



(Of course fixing the two problems I noted in earlier patches 1) caused a conflict when applying this patch and 2) caused a new build failure with make check )

ACK on this, aside from some files wrongly attributed to me :-)

On 11/03/2011 01:30 PM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange redhat com>

The src/util/network.c file is a dumping ground for many different
APIs. Split it up into 5 pieces, along functional lines

  - src/util/virnetdevbandwidth.c: virNetDevBandwidth type&  helper APIs
  - src/util/virnetdevvportprofile.c: virNetDevVPortProfile type&  helper APIs
  - src/util/virsocketaddr.c: virSocketAddr and APIs
  - src/conf/netdev_bandwidth_conf.c: XML parsing / formatting
    for virNetDevBandwidth
  - src/conf/netdev_vport_profile_conf.c: XML parsing / formatting
    for virNetDevVPortProfile

* src/util/network.c, src/util/network.h: Split into 5 pieces
* src/conf/netdev_bandwidth_conf.c, src/conf/netdev_bandwidth_conf.h,
   src/conf/netdev_vport_profile_conf.c, src/conf/netdev_vport_profile_conf.h,
   src/util/virnetdevbandwidth.c, src/util/virnetdevbandwidth.h,
   src/util/virnetdevvportprofile.c, src/util/virnetdevvportprofile.h,
   src/util/virsocketaddr.c, src/util/virsocketaddr.h: New pieces
* daemon/libvirtd.h, daemon/remote.c, src/conf/domain_conf.c,
   src/conf/domain_conf.h, src/conf/network_conf.c,
   src/conf/network_conf.h, src/conf/nwfilter_conf.h,
   src/esx/esx_util.h, src/network/bridge_driver.c,
   src/qemu/qemu_conf.c, src/rpc/virnetsocket.c,
   src/rpc/virnetsocket.h, src/util/dnsmasq.h, src/util/interface.h,
   src/util/iptables.h, src/util/macvtap.c, src/util/macvtap.h,
   src/util/virnetdev.h, src/util/virnetdevtap.c,
   tools/virsh.c: Update include files
---
  daemon/libvirtd.h                    |    1 -
  daemon/remote.c                      |    1 -
  po/POTFILES.in                       |    4 +-
  src/Makefile.am                      |   12 +-
  src/conf/domain_conf.c               |    3 +-
  src/conf/domain_conf.h               |    4 +-
  src/conf/netdev_bandwidth_conf.c     |  230 ++++++
  src/conf/netdev_bandwidth_conf.h     |   37 +
  src/conf/netdev_vport_profile_conf.c |  236 ++++++
  src/conf/netdev_vport_profile_conf.h |   39 +
  src/conf/network_conf.c              |    3 +-
  src/conf/network_conf.h              |    4 +-
  src/conf/nwfilter_conf.h             |    2 +-
  src/esx/esx_util.h                   |    2 +-
  src/network/bridge_driver.c          |    1 -
  src/qemu/qemu_conf.c                 |    1 -
  src/rpc/virnetsocket.c               |    1 +
  src/rpc/virnetsocket.h               |    2 +-
  src/util/dnsmasq.h                   |    2 +-
  src/util/interface.h                 |    2 +-
  src/util/iptables.h                  |    2 +-
  src/util/macvtap.c                   |    1 -
  src/util/macvtap.h                   |    8 +-
  src/util/network.c                   | 1349 ----------------------------------
  src/util/network.h                   |  173 -----
  src/util/virnetdev.h                 |    2 +-
  src/util/virnetdevbandwidth.c        |  265 +++++++
  src/util/virnetdevbandwidth.h        |   53 ++
  src/util/virnetdevtap.c              |    1 +
  src/util/virnetdevvportprofile.c     |   62 ++
  src/util/virnetdevvportprofile.h     |   64 ++
  src/util/virsocketaddr.c             |  687 +++++++++++++++++
  src/util/virsocketaddr.h             |  103 +++
  tools/virsh.c                        |    2 +-
  34 files changed, 1813 insertions(+), 1546 deletions(-)
  create mode 100644 src/conf/netdev_bandwidth_conf.c
  create mode 100644 src/conf/netdev_bandwidth_conf.h
  create mode 100644 src/conf/netdev_vport_profile_conf.c
  create mode 100644 src/conf/netdev_vport_profile_conf.h
  delete mode 100644 src/util/network.c
  delete mode 100644 src/util/network.h
  create mode 100644 src/util/virnetdevbandwidth.c
  create mode 100644 src/util/virnetdevbandwidth.h
  create mode 100644 src/util/virnetdevvportprofile.c
  create mode 100644 src/util/virnetdevvportprofile.h
  create mode 100644 src/util/virsocketaddr.c
  create mode 100644 src/util/virsocketaddr.h


diff --git a/src/conf/netdev_vport_profile_conf.c b/src/conf/netdev_vport_profile_conf.c
new file mode 100644
index 0000000..63c6668
--- /dev/null
+++ b/src/conf/netdev_vport_profile_conf.c
@@ -0,0 +1,236 @@
+/*
+ * Copyright (C) 2009-2011 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Authors:
+ *     Laine Stump<laine laine org>


Actually, although my name is probably on the most recent git blame for much of this code, that's only because I moved it from domain_conf.c into network.c so that it could be used by multiple other files. The original author is Stefan Berger.


+ *     Daniel P. Berrange<berrange redhat com>
+ */

diff --git a/src/conf/netdev_vport_profile_conf.h b/src/conf/netdev_vport_profile_conf.h
new file mode 100644
index 0000000..3ab6975
--- /dev/null
+++ b/src/conf/netdev_vport_profile_conf.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2009-2011 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Authors:
+ *     Laine Stump<laine laine org>


Same comment - Stefan was the original author.


+ *     Daniel P. Berrange<berrange redhat com>
+ */

diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c
new file mode 100644
index 0000000..29abce6
--- /dev/null
+++ b/src/util/virnetdevvportprofile.c
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009-2011 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Authors:
+ *     Laine Stump<laine laine org>

Stefan was the original author.

+ *     Daniel P. Berrange<berrange redhat com>
+ */
diff --git a/src/util/virnetdevvportprofile.h b/src/util/virnetdevvportprofile.h
new file mode 100644
index 0000000..3e6887e
--- /dev/null
+++ b/src/util/virnetdevvportprofile.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2009-2011 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Authors:
+ *     Laine Stump<laine laine org>


Again, Stefan.


+ *     Daniel P. Berrange<berrange redhat com>
+ */
+


diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c
new file mode 100644
index 0000000..c2c2060
--- /dev/null
+++ b/src/util/virsocketaddr.c
@@ -0,0 +1,687 @@
+/*
+ * Copyright (C) 2009-2011 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Authors:
+ *     Daniel Veillard<veillard redhat com>
+ *     Daniel P. Berrange<berrange redhat com>


Actually if my name were to be added to any of these files, I'd say this one - DV was the original author, and about 1/3 of the lines here are attributed to him, about 1/3 to me, the rest between you, Matt Booth, and Stefan mostly.


+ */


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