[Qemu-devel] [PATCH slirp 0/5] Make it a standalone project

marcandre.lureau@redhat.com posted 5 patches 28 weeks ago
Failed in applying to current master (apply log)
.gitlab-ci.yml                   |  20 ++
Makefile.objs                    |  34 ---
meson.build                      | 127 ++++++++++
arp_table.c => src/arp_table.c   |   0
bootp.c => src/bootp.c           |   0
bootp.h => src/bootp.h           |   0
cksum.c => src/cksum.c           |   0
debug.h => src/debug.h           |   0
dhcpv6.c => src/dhcpv6.c         |   0
dhcpv6.h => src/dhcpv6.h         |   0
dnssearch.c => src/dnssearch.c   |   0
if.c => src/if.c                 |   0
if.h => src/if.h                 |   0
ip.h => src/ip.h                 |   0
ip6.h => src/ip6.h               |   0
ip6_icmp.c => src/ip6_icmp.c     |   0
ip6_icmp.h => src/ip6_icmp.h     |   0
ip6_input.c => src/ip6_input.c   |   0
ip6_output.c => src/ip6_output.c |   0
ip_icmp.c => src/ip_icmp.c       |   0
ip_icmp.h => src/ip_icmp.h       |   0
ip_input.c => src/ip_input.c     |   0
ip_output.c => src/ip_output.c   |   0
src/libslirp-version.h.in        |  22 ++
libslirp.h => src/libslirp.h     |  13 +
src/libslirp.map                 |  21 ++
main.h => src/main.h             |   0
mbuf.c => src/mbuf.c             |   0
mbuf.h => src/mbuf.h             |   0
misc.c => src/misc.c             |   0
misc.h => src/misc.h             |   0
ncsi-pkt.h => src/ncsi-pkt.h     |   0
ncsi.c => src/ncsi.c             |   0
ndp_table.c => src/ndp_table.c   |   0
qtailq.h => src/qtailq.h         |   0
sbuf.c => src/sbuf.c             |   0
sbuf.h => src/sbuf.h             |   0
slirp.c => src/slirp.c           |   9 -
slirp.h => src/slirp.h           |   0
socket.c => src/socket.c         |   0
socket.h => src/socket.h         |   0
state.c => src/state.c           |  50 ++--
src/state.h                      |   0
src/stream.c                     | 119 +++++++++
src/stream.h                     |  34 +++
tcp.h => src/tcp.h               |   0
tcp_input.c => src/tcp_input.c   |   0
tcp_output.c => src/tcp_output.c |   0
tcp_subr.c => src/tcp_subr.c     |   0
tcp_timer.c => src/tcp_timer.c   |   0
tcp_timer.h => src/tcp_timer.h   |   0
tcp_var.h => src/tcp_var.h       |   0
tcpip.h => src/tcpip.h           |   0
tftp.c => src/tftp.c             |   0
tftp.h => src/tftp.h             |   0
udp.c => src/udp.c               |   0
udp.h => src/udp.h               |   0
udp6.c => src/udp6.c             |   0
util.c => src/util.c             |   0
util.h => src/util.h             |   3 +
src/version.c                    |  33 +++
src/vmstate.c                    | 401 +++++++++++++++++++++++++++++++
src/vmstate.h                    | 396 ++++++++++++++++++++++++++++++
state.h                          |   9 -
64 files changed, 1211 insertions(+), 80 deletions(-)
create mode 100644 .gitlab-ci.yml
delete mode 100644 Makefile.objs
create mode 100644 meson.build
rename arp_table.c => src/arp_table.c (100%)
rename bootp.c => src/bootp.c (100%)
rename bootp.h => src/bootp.h (100%)
rename cksum.c => src/cksum.c (100%)
rename debug.h => src/debug.h (100%)
rename dhcpv6.c => src/dhcpv6.c (100%)
rename dhcpv6.h => src/dhcpv6.h (100%)
rename dnssearch.c => src/dnssearch.c (100%)
rename if.c => src/if.c (100%)
rename if.h => src/if.h (100%)
rename ip.h => src/ip.h (100%)
rename ip6.h => src/ip6.h (100%)
rename ip6_icmp.c => src/ip6_icmp.c (100%)
rename ip6_icmp.h => src/ip6_icmp.h (100%)
rename ip6_input.c => src/ip6_input.c (100%)
rename ip6_output.c => src/ip6_output.c (100%)
rename ip_icmp.c => src/ip_icmp.c (100%)
rename ip_icmp.h => src/ip_icmp.h (100%)
rename ip_input.c => src/ip_input.c (100%)
rename ip_output.c => src/ip_output.c (100%)
create mode 100644 src/libslirp-version.h.in
rename libslirp.h => src/libslirp.h (91%)
create mode 100644 src/libslirp.map
rename main.h => src/main.h (100%)
rename mbuf.c => src/mbuf.c (100%)
rename mbuf.h => src/mbuf.h (100%)
rename misc.c => src/misc.c (100%)
rename misc.h => src/misc.h (100%)
rename ncsi-pkt.h => src/ncsi-pkt.h (100%)
rename ncsi.c => src/ncsi.c (100%)
rename ndp_table.c => src/ndp_table.c (100%)
rename qtailq.h => src/qtailq.h (100%)
rename sbuf.c => src/sbuf.c (100%)
rename sbuf.h => src/sbuf.h (100%)
rename slirp.c => src/slirp.c (99%)
rename slirp.h => src/slirp.h (100%)
rename socket.c => src/socket.c (100%)
rename socket.h => src/socket.h (100%)
rename state.c => src/state.c (93%)
create mode 100644 src/state.h
create mode 100644 src/stream.c
create mode 100644 src/stream.h
rename tcp.h => src/tcp.h (100%)
rename tcp_input.c => src/tcp_input.c (100%)
rename tcp_output.c => src/tcp_output.c (100%)
rename tcp_subr.c => src/tcp_subr.c (100%)
rename tcp_timer.c => src/tcp_timer.c (100%)
rename tcp_timer.h => src/tcp_timer.h (100%)
rename tcp_var.h => src/tcp_var.h (100%)
rename tcpip.h => src/tcpip.h (100%)
rename tftp.c => src/tftp.c (100%)
rename tftp.h => src/tftp.h (100%)
rename udp.c => src/udp.c (100%)
rename udp.h => src/udp.h (100%)
rename udp6.c => src/udp6.c (100%)
rename util.c => src/util.c (100%)
rename util.h => src/util.h (98%)
create mode 100644 src/version.c
create mode 100644 src/vmstate.c
create mode 100644 src/vmstate.h
delete mode 100644 state.h

[Qemu-devel] [PATCH slirp 0/5] Make it a standalone project

Posted by marcandre.lureau@redhat.com 28 weeks ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

As discussed earlier in "[PATCH for-3.2 00/41] RFC: slirp: make it
again a standalone project" and other threads, it would be useful to
make slirp a separate project (the submodule approach was discarded)
for various projects to share.

The first patch describes how to filter the qemu repository for the
slirp/ content, and initial layout.

The following patches add meson build system (if necessary for older
distros, autotools could be added - however I believe python & ninja
are generally available on the QEMU supported platforms)

Finally, to be able to provide migration handling (currently handled
by QEMU), I ported a subset of the QEMU state saving/loading code in
"slirp: add state saving/loading" and added some slirp API.

Where should this new project be hosted? (I suggest some gitlab
instance, because of the nice ui/CI/issues/milestone...)

thanks

Marc-André Lureau (5):
  Extract slirp/ from qemu repository
  build-sys: add a meson build
  build-sys: add version tooling
  slirp: add state saving/loading
  Add .gitlab-ci.yml

 .gitlab-ci.yml                   |  20 ++
 Makefile.objs                    |  34 ---
 meson.build                      | 127 ++++++++++
 arp_table.c => src/arp_table.c   |   0
 bootp.c => src/bootp.c           |   0
 bootp.h => src/bootp.h           |   0
 cksum.c => src/cksum.c           |   0
 debug.h => src/debug.h           |   0
 dhcpv6.c => src/dhcpv6.c         |   0
 dhcpv6.h => src/dhcpv6.h         |   0
 dnssearch.c => src/dnssearch.c   |   0
 if.c => src/if.c                 |   0
 if.h => src/if.h                 |   0
 ip.h => src/ip.h                 |   0
 ip6.h => src/ip6.h               |   0
 ip6_icmp.c => src/ip6_icmp.c     |   0
 ip6_icmp.h => src/ip6_icmp.h     |   0
 ip6_input.c => src/ip6_input.c   |   0
 ip6_output.c => src/ip6_output.c |   0
 ip_icmp.c => src/ip_icmp.c       |   0
 ip_icmp.h => src/ip_icmp.h       |   0
 ip_input.c => src/ip_input.c     |   0
 ip_output.c => src/ip_output.c   |   0
 src/libslirp-version.h.in        |  22 ++
 libslirp.h => src/libslirp.h     |  13 +
 src/libslirp.map                 |  21 ++
 main.h => src/main.h             |   0
 mbuf.c => src/mbuf.c             |   0
 mbuf.h => src/mbuf.h             |   0
 misc.c => src/misc.c             |   0
 misc.h => src/misc.h             |   0
 ncsi-pkt.h => src/ncsi-pkt.h     |   0
 ncsi.c => src/ncsi.c             |   0
 ndp_table.c => src/ndp_table.c   |   0
 qtailq.h => src/qtailq.h         |   0
 sbuf.c => src/sbuf.c             |   0
 sbuf.h => src/sbuf.h             |   0
 slirp.c => src/slirp.c           |   9 -
 slirp.h => src/slirp.h           |   0
 socket.c => src/socket.c         |   0
 socket.h => src/socket.h         |   0
 state.c => src/state.c           |  50 ++--
 src/state.h                      |   0
 src/stream.c                     | 119 +++++++++
 src/stream.h                     |  34 +++
 tcp.h => src/tcp.h               |   0
 tcp_input.c => src/tcp_input.c   |   0
 tcp_output.c => src/tcp_output.c |   0
 tcp_subr.c => src/tcp_subr.c     |   0
 tcp_timer.c => src/tcp_timer.c   |   0
 tcp_timer.h => src/tcp_timer.h   |   0
 tcp_var.h => src/tcp_var.h       |   0
 tcpip.h => src/tcpip.h           |   0
 tftp.c => src/tftp.c             |   0
 tftp.h => src/tftp.h             |   0
 udp.c => src/udp.c               |   0
 udp.h => src/udp.h               |   0
 udp6.c => src/udp6.c             |   0
 util.c => src/util.c             |   0
 util.h => src/util.h             |   3 +
 src/version.c                    |  33 +++
 src/vmstate.c                    | 401 +++++++++++++++++++++++++++++++
 src/vmstate.h                    | 396 ++++++++++++++++++++++++++++++
 state.h                          |   9 -
 64 files changed, 1211 insertions(+), 80 deletions(-)
 create mode 100644 .gitlab-ci.yml
 delete mode 100644 Makefile.objs
 create mode 100644 meson.build
 rename arp_table.c => src/arp_table.c (100%)
 rename bootp.c => src/bootp.c (100%)
 rename bootp.h => src/bootp.h (100%)
 rename cksum.c => src/cksum.c (100%)
 rename debug.h => src/debug.h (100%)
 rename dhcpv6.c => src/dhcpv6.c (100%)
 rename dhcpv6.h => src/dhcpv6.h (100%)
 rename dnssearch.c => src/dnssearch.c (100%)
 rename if.c => src/if.c (100%)
 rename if.h => src/if.h (100%)
 rename ip.h => src/ip.h (100%)
 rename ip6.h => src/ip6.h (100%)
 rename ip6_icmp.c => src/ip6_icmp.c (100%)
 rename ip6_icmp.h => src/ip6_icmp.h (100%)
 rename ip6_input.c => src/ip6_input.c (100%)
 rename ip6_output.c => src/ip6_output.c (100%)
 rename ip_icmp.c => src/ip_icmp.c (100%)
 rename ip_icmp.h => src/ip_icmp.h (100%)
 rename ip_input.c => src/ip_input.c (100%)
 rename ip_output.c => src/ip_output.c (100%)
 create mode 100644 src/libslirp-version.h.in
 rename libslirp.h => src/libslirp.h (91%)
 create mode 100644 src/libslirp.map
 rename main.h => src/main.h (100%)
 rename mbuf.c => src/mbuf.c (100%)
 rename mbuf.h => src/mbuf.h (100%)
 rename misc.c => src/misc.c (100%)
 rename misc.h => src/misc.h (100%)
 rename ncsi-pkt.h => src/ncsi-pkt.h (100%)
 rename ncsi.c => src/ncsi.c (100%)
 rename ndp_table.c => src/ndp_table.c (100%)
 rename qtailq.h => src/qtailq.h (100%)
 rename sbuf.c => src/sbuf.c (100%)
 rename sbuf.h => src/sbuf.h (100%)
 rename slirp.c => src/slirp.c (99%)
 rename slirp.h => src/slirp.h (100%)
 rename socket.c => src/socket.c (100%)
 rename socket.h => src/socket.h (100%)
 rename state.c => src/state.c (93%)
 create mode 100644 src/state.h
 create mode 100644 src/stream.c
 create mode 100644 src/stream.h
 rename tcp.h => src/tcp.h (100%)
 rename tcp_input.c => src/tcp_input.c (100%)
 rename tcp_output.c => src/tcp_output.c (100%)
 rename tcp_subr.c => src/tcp_subr.c (100%)
 rename tcp_timer.c => src/tcp_timer.c (100%)
 rename tcp_timer.h => src/tcp_timer.h (100%)
 rename tcp_var.h => src/tcp_var.h (100%)
 rename tcpip.h => src/tcpip.h (100%)
 rename tftp.c => src/tftp.c (100%)
 rename tftp.h => src/tftp.h (100%)
 rename udp.c => src/udp.c (100%)
 rename udp.h => src/udp.h (100%)
 rename udp6.c => src/udp6.c (100%)
 rename util.c => src/util.c (100%)
 rename util.h => src/util.h (98%)
 create mode 100644 src/version.c
 create mode 100644 src/vmstate.c
 create mode 100644 src/vmstate.h
 delete mode 100644 state.h

-- 
2.21.0.rc0.1.g036caf7885


Re: [Qemu-devel] [PATCH slirp 0/5] Make it a standalone project

Posted by Samuel Thibault 27 weeks ago
Hello,

marcandre.lureau@redhat.com, le ven. 08 févr. 2019 19:11:17 +0100, a ecrit:
> Where should this new project be hosted? (I suggest some gitlab
> instance, because of the nice ui/CI/issues/milestone...)

I'd say freedesktop's gitlab would make a lot of sense yes, I'd go for
it https://www.freedesktop.org/wiki/NewProject/

Samuel

Re: [Qemu-devel] [PATCH slirp 0/5] Make it a standalone project

Posted by Peter Maydell 27 weeks ago
On Fri, 8 Feb 2019 at 20:58, <marcandre.lureau@redhat.com> wrote:
> As discussed earlier in "[PATCH for-3.2 00/41] RFC: slirp: make it
> again a standalone project" and other threads, it would be useful to
> make slirp a separate project (the submodule approach was discarded)
> for various projects to share.

> The following patches add meson build system (if necessary for older
> distros, autotools could be added - however I believe python & ninja
> are generally available on the QEMU supported platforms)

Do you really need to make QEMU add an extra build dependency
just to use a different build system? From my end that seems like
just unnecessary pain for us (we're going to need to ship libslirp
as a submodule for a while until it's been around long enough to
be in stable distros, so its build dependencies will get added
to QEMU's build deps).

Is the standalone project going to provide a shared library
or just a .a static library? (ie are you confident enough in
the long-term stability of your API and ABI to do the shared
library yet? the prudent approach might be to start with just
the .a...)

thanks
-- PMM

Re: [Qemu-devel] [PATCH slirp 0/5] Make it a standalone project

Posted by Samuel Thibault 27 weeks ago
Hello,

Peter Maydell, le dim. 10 févr. 2019 21:35:37 +0000, a ecrit:
> On Fri, 8 Feb 2019 at 20:58, <marcandre.lureau@redhat.com> wrote:
> > As discussed earlier in "[PATCH for-3.2 00/41] RFC: slirp: make it
> > again a standalone project" and other threads, it would be useful to
> > make slirp a separate project (the submodule approach was discarded)
> > for various projects to share.
> 
> > The following patches add meson build system (if necessary for older
> > distros, autotools could be added - however I believe python & ninja
> > are generally available on the QEMU supported platforms)
> 
> Do you really need to make QEMU add an extra build dependency
> just to use a different build system?

AIUI, this patches series is meant for the slirp repository, not the
QEMU repository. I.e. just to show how it'll look like, until a project
it settled somewhere and the discussion can happen there.

Samuel

Re: [Qemu-devel] [PATCH slirp 0/5] Make it a standalone project

Posted by Peter Maydell 27 weeks ago
On Sun, 10 Feb 2019 at 21:38, Samuel Thibault <samuel.thibault@gnu.org> wrote:
>
> Hello,
>
> Peter Maydell, le dim. 10 févr. 2019 21:35:37 +0000, a ecrit:
> > On Fri, 8 Feb 2019 at 20:58, <marcandre.lureau@redhat.com> wrote:
> > > As discussed earlier in "[PATCH for-3.2 00/41] RFC: slirp: make it
> > > again a standalone project" and other threads, it would be useful to
> > > make slirp a separate project (the submodule approach was discarded)
> > > for various projects to share.
> >
> > > The following patches add meson build system (if necessary for older
> > > distros, autotools could be added - however I believe python & ninja
> > > are generally available on the QEMU supported platforms)
> >
> > Do you really need to make QEMU add an extra build dependency
> > just to use a different build system?
>
> AIUI, this patches series is meant for the slirp repository, not the
> QEMU repository. I.e. just to show how it'll look like, until a project
> it settled somewhere and the discussion can happen there.

Yes, but we're going to be pulling it in as a submodule,
so a split out libslirp in its own repository with extra
build dependencies is harder to work with than one without.

thanks
-- PMM

Re: [Qemu-devel] [PATCH slirp 0/5] Make it a standalone project

Posted by Marc-André Lureau 27 weeks ago
Hi

On Sun, Feb 10, 2019 at 10:42 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Sun, 10 Feb 2019 at 21:38, Samuel Thibault <samuel.thibault@gnu.org> wrote:
> >
> > Hello,
> >
> > Peter Maydell, le dim. 10 févr. 2019 21:35:37 +0000, a ecrit:
> > > On Fri, 8 Feb 2019 at 20:58, <marcandre.lureau@redhat.com> wrote:
> > > > As discussed earlier in "[PATCH for-3.2 00/41] RFC: slirp: make it
> > > > again a standalone project" and other threads, it would be useful to
> > > > make slirp a separate project (the submodule approach was discarded)
> > > > for various projects to share.
> > >
> > > > The following patches add meson build system (if necessary for older
> > > > distros, autotools could be added - however I believe python & ninja
> > > > are generally available on the QEMU supported platforms)
> > >
> > > Do you really need to make QEMU add an extra build dependency
> > > just to use a different build system?
> >
> > AIUI, this patches series is meant for the slirp repository, not the
> > QEMU repository. I.e. just to show how it'll look like, until a project
> > it settled somewhere and the discussion can happen there.
>
> Yes, but we're going to be pulling it in as a submodule,
> so a split out libslirp in its own repository with extra
> build dependencies is harder to work with than one without.
>

Why do you think it should be a submodule? That's the approach I
proposed first, but Daniel suggested to make it immediately a shared
library if possible.

Regarding the build system, if meson/ninja is problematic for some
distro, we can come up with autotools or plain Make for a while.



-- 
Marc-André Lureau

Re: [Qemu-devel] [PATCH slirp 0/5] Make it a standalone project

Posted by Peter Maydell 27 weeks ago
On Sun, 10 Feb 2019 at 22:03, Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
> Why do you think it should be a submodule? That's the approach I
> proposed first, but Daniel suggested to make it immediately a shared
> library if possible.

It needs to be a submodule because you don't have a time
machine to arrange for it to be an available package in
all the stable versions of the distros we support. As
and when it is packaged in the oldest stable versions we
care about, we can drop the submodule, but submodule is where
we need to start. (This is the same as we did with third
party bits of code like pixman.)

I think immediately going for the shared library (as opposed
to static) is a bit of a bold decision also because it is a
hard commitment to API and ABI compatibility, which previously
has been something the slirp code didn't need to care about at all.

> Regarding the build system, if meson/ninja is problematic for some
> distro, we can come up with autotools or plain Make for a while.

I think plain make would be more convenient. Otherwise
everybody building QEMU needs to install a random extra
build tool.

thanks
-- PMM