qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 0bc12c: stubs: Add qemu_set_fd_handler


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 0bc12c: stubs: Add qemu_set_fd_handler
Date: Fri, 12 Jun 2015 10:30:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0bc12c4f7e8b5ff0f83908bdef0c247f1ca1a9d8
      
https://github.com/qemu/qemu/commit/0bc12c4f7e8b5ff0f83908bdef0c247f1ca1a9d8
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M stubs/set-fd-handler.c

  Log Message:
  -----------
  stubs: Add qemu_set_fd_handler

Some qemu_set_fd_handler2 stub callers will be converted to
call qemu_set_fd_handler, add this stub for them before making the
change.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 95b1416ae93106923f733941e52dfe55c4318643
      
https://github.com/qemu/qemu/commit/95b1416ae93106923f733941e52dfe55c4318643
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M net/l2tpv3.c

  Log Message:
  -----------
  l2tpv3: Drop l2tpv3_can_send

This callback is called by main loop before polling s->fd, if it returns
false, the fd will not be polled in this iteration.

This is redundant with checks inside read callback. After this patch,
the data will be copied from s->fd to s->msgvec when it arrives. If the
device can't receive, it will be queued to incoming_queue, and when the
device status changes, this queue will be flushed.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: e8dd1d9c396104f0fac4b39a701143df49df2a74
      
https://github.com/qemu/qemu/commit/e8dd1d9c396104f0fac4b39a701143df49df2a74
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M net/netmap.c

  Log Message:
  -----------
  netmap: Drop netmap_can_send

This callback is called by main loop before polling s->fd, if it returns
false, the fd will not be polled in this iteration.

This is redundant with checks inside read callback. After this patch,
the data will be copied from s->fd to s->iov when it arrives. If the
device can't receive, it will be queued to incoming_queue, and when the
device status changes, this queue will be flushed.

Also remove the qemu_can_send_packet() check in netmap_send. If it's
true, we are good; if it's false, the qemu_sendv_packet_async would
return 0 and read poll will be disabled until netmap_send_completed is
called.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 6e99c631f116221d169ea53953d91b8aa74d297a
      
https://github.com/qemu/qemu/commit/6e99c631f116221d169ea53953d91b8aa74d297a
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M net/socket.c

  Log Message:
  -----------
  net/socket: Drop net_socket_can_send

This callback is called by main loop before polling s->fd, if it returns
false, the fd will not be polled in this iteration.

This is redundant with checks inside read callback. After this patch,
the data will be sent to peer when it arrives. If the device can't
receive, it will be queued to incoming_queue, and when the device status
changes, this queue will be flushed.

If the peer is not ready, disable the read poll until send completes.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: a90a7425cf592a3afeff3eaf32f543b83050ee5c
      
https://github.com/qemu/qemu/commit/a90a7425cf592a3afeff3eaf32f543b83050ee5c
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M net/tap.c

  Log Message:
  -----------
  tap: Drop tap_can_send

This callback is called by main loop before polling s->fd, if it returns
false, the fd will not be polled in this iteration.

This is redundant with checks inside read callback. After this patch,
the data will be sent to peer when it arrives. If the device can't
receive, it will be queued to incoming_queue, and when the device status
changes, this queue will be flushed.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 82e1cc4bf91a2e1c3b62297b10b0ab1d93adfc45
      
https://github.com/qemu/qemu/commit/82e1cc4bf91a2e1c3b62297b10b0ab1d93adfc45
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M blockdev-nbd.c
    M main-loop.c
    M migration/exec.c
    M migration/fd.c
    M migration/rdma.c
    M migration/tcp.c
    M migration/unix.c
    M net/l2tpv3.c
    M net/netmap.c
    M net/socket.c
    M net/tap.c
    M ui/vnc-auth-sasl.c
    M ui/vnc-auth-vencrypt.c
    M ui/vnc-ws.c
    M ui/vnc.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler

Done with following Coccinelle semantic patch, plus manual cosmetic changes in
net/*.c.

    @@
    expression E1, E2, E3, E4;
    @@
    -   qemu_set_fd_handler2(E1, NULL, E2, E3, E4);
    +   qemu_set_fd_handler(E1, E2, E3, E4);

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 6484e422479c93f28e3f8a68258b0eacd3b31e6d
      
https://github.com/qemu/qemu/commit/6484e422479c93f28e3f8a68258b0eacd3b31e6d
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M include/block/aio.h
    M include/qemu/main-loop.h
    M iohandler.c
    M stubs/set-fd-handler.c

  Log Message:
  -----------
  main-loop: Drop qemu_set_fd_handler2

All users are converted to qemu_set_fd_handler now, drop
qemu_set_fd_handler2 and IOHandlerRecord.fd_read_poll.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: be93f216278d84d283187c95cef16c0b60b711b8
      
https://github.com/qemu/qemu/commit/be93f216278d84d283187c95cef16c0b60b711b8
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M audio/alsaaudio.c

  Log Message:
  -----------
  alsaaudio: Remove unused error handling of qemu_set_fd_handler

The function cannot fail, so the check is superfluous.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: b027a538c6790bcfc93ef7f4819fe3e581445959
      
https://github.com/qemu/qemu/commit/b027a538c6790bcfc93ef7f4819fe3e581445959
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M audio/ossaudio.c

  Log Message:
  -----------
  oss: Remove unused error handling of qemu_set_fd_handler

The function cannot fail, so the check is superfluous.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 6b5166f8a82888638bb9aba9dc49aa7fa25f292f
      
https://github.com/qemu/qemu/commit/6b5166f8a82888638bb9aba9dc49aa7fa25f292f
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M hw/xen/xen_backend.c

  Log Message:
  -----------
  xen_backend: Remove unused error handling of qemu_set_fd_handler

The function cannot fail, so the check is superfluous.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 1e354528bdaf9671ffc94e531e6967233abe7b8f
      
https://github.com/qemu/qemu/commit/1e354528bdaf9671ffc94e531e6967233abe7b8f
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M util/event_notifier-posix.c

  Log Message:
  -----------
  event-notifier: Always return 0 for posix implementation

qemu_set_fd_handler cannot fail, let's always return 0.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: f4d248bdc33167ab9e91b1470ef47a61dffd0b38
      
https://github.com/qemu/qemu/commit/f4d248bdc33167ab9e91b1470ef47a61dffd0b38
  Author: Fam Zheng <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M include/qemu/main-loop.h
    M iohandler.c
    M stubs/set-fd-handler.c

  Log Message:
  -----------
  iohandler: Change return type of qemu_set_fd_handler to "void"

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 773495364ffbfc6a4d1e13e24e932f96409ba1d3
      
https://github.com/qemu/qemu/commit/773495364ffbfc6a4d1e13e24e932f96409ba1d3
  Author: David Ahern <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M docs/specs/rocker.txt
    M hw/net/rocker/rocker.c
    M hw/net/rocker/rocker_fp.c
    M hw/net/rocker/rocker_fp.h
    M hw/net/rocker/rocker_hw.h

  Log Message:
  -----------
  rocker: Add support for phys name

Add ROCKER_TLV_CMD_PORT_SETTINGS_PHYS_NAME to port settings. This attribute
exports the port name to the guest OS allowing it to name interfaces with
sensible defaults.

Mostly done by Scott for phys_id support; adapted to phys_name by David.

Signed-off-by: Scott Feldman <address@hidden>
Signed-off-by: David Ahern <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 73da0232098a69d06ce0d49ad8751b7c5e8b9448
      
https://github.com/qemu/qemu/commit/73da0232098a69d06ce0d49ad8751b7c5e8b9448
  Author: Scott Feldman <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M tests/rocker/bridge
    M tests/rocker/bridge-stp
    M tests/rocker/bridge-vlan
    M tests/rocker/bridge-vlan-stp
    M tests/rocker/port

  Log Message:
  -----------
  rocker: update tests using hw-derived interface names

With previous patch to support phy name attribute for each port, the OS
can name port interfaces using the hw-derived name.  So update rocker
tests to use the new hw-derived interface names.

Signed-off-by: Scott Feldman <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 5ff1547b756a820bc7b695fe393b25d82467d1fe
      
https://github.com/qemu/qemu/commit/5ff1547b756a820bc7b695fe393b25d82467d1fe
  Author: Scott Feldman <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M hw/net/rocker/rocker_fp.c

  Log Message:
  -----------
  rocker: bring link up/down on PHY enable/disable

When the OS driver enables/disables the port, go ahead and set the port's
link status to up/down in response to the change.  This more closely
emulates real hardware when the PHY for the port is brought up/down
and the PHY negotiates carrier (link status) with link partner.  In
the case of qemu, the virtual rocker device can't really do link
negotiation with the link partner as that requires signally over a
physical medium (the wire), so just pretend the negotiation was
successful and bring the link up when the port is enabled.

Signed-off-by: Scott Feldman <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: fafa4d508b42a70a59a6bd647a2c0cfad86246c3
      
https://github.com/qemu/qemu/commit/fafa4d508b42a70a59a6bd647a2c0cfad86246c3
  Author: Scott Feldman <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M hmp-commands.hx
    M hmp.c
    M hmp.h
    M hw/net/Makefile.objs
    A hw/net/rocker/qmp-norocker.c
    M hw/net/rocker/rocker.c
    M hw/net/rocker/rocker_fp.c
    M hw/net/rocker/rocker_fp.h
    M hw/net/rocker/rocker_of_dpa.c
    M monitor.c
    M qapi-schema.json
    A qapi/rocker.json
    M qmp-commands.hx

  Log Message:
  -----------
  qmp/hmp: add rocker device support

Add QMP/HMP support for rocker devices.  This is mostly for debugging purposes
to see inside the device's tables and port configurations.  Some examples:

(qemu) info rocker sw1
name: sw1
id: 0x0000013512005452
ports: 4

(qemu) info rocker-ports sw1
      ena/    speed/ auto
      port  link    duplex neg?
     sw1.1  up     10G  FD  No
     sw1.2  up     10G  FD  No
     sw1.3  !ena   10G  FD  No
     sw1.4  !ena   10G  FD  No

(qemu) info rocker-of-dpa-flows sw1
prio tbl hits key(mask) --> actions
2    60       pport 1 vlan 1 LLDP src 00:02:00:00:02:00 dst 01:80:c2:00:00:0e
2    60       pport 1 vlan 1 ARP src 00:02:00:00:02:00 dst 00:02:00:00:03:00
2    60       pport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:00:02 
proto 58
3    50       vlan 2 dst 33:33:ff:00:00:02 --> write group 0x32000001 goto tbl 
60
2    60       pport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:03:00 
proto 58
3    50  1    vlan 2 dst 33:33:ff:00:03:00 --> write group 0x32000001 goto tbl 
60
2    60       pport 2 vlan 2 ARP src 00:02:00:00:03:00 dst 00:02:00:00:02:00
3    50  2    vlan 2 dst 00:02:00:00:02:00 --> write group 0x02000001 goto tbl 
60
2    60  1    pport 2 vlan 2 IP src 00:02:00:00:03:00 dst 00:02:00:00:02:00 
proto 1
3    50  2    vlan 1 dst 00:02:00:00:03:00 --> write group 0x01000002 goto tbl 
60
2    60  1    pport 1 vlan 1 IP src 00:02:00:00:02:00 dst 00:02:00:00:03:00 
proto 1
2    60       pport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:00:01 
proto 58
3    50       vlan 1 dst 33:33:ff:00:00:01 --> write group 0x31000000 goto tbl 
60
2    60       pport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:02:00 
proto 58
3    50  1    vlan 1 dst 33:33:ff:00:02:00 --> write group 0x31000000 goto tbl 
60
1    60  173  pport 2 vlan 2 LLDP src <any> dst 01:80:c2:00:00:0e --> write 
group 0x02000000
1    60  6    pport 2 vlan 2 IPv6 src <any> dst <any> --> write group 0x02000000
1    60  174  pport 1 vlan 1 LLDP src <any> dst 01:80:c2:00:00:0e --> write 
group 0x01000000
1    60  174  pport 2 vlan 2 IP src <any> dst <any> --> write group 0x02000000
1    60  6    pport 1 vlan 1 IPv6 src <any> dst <any> --> write group 0x01000000
1    60  181  pport 2 vlan 2 ARP src <any> dst <any> --> write group 0x02000000
1    10  715  pport 2 --> apply new vlan 2 goto tbl 20
1    60  177  pport 1 vlan 1 ARP src <any> dst <any> --> write group 0x01000000
1    60  174  pport 1 vlan 1 IP src <any> dst <any> --> write group 0x01000000
1    10  717  pport 1 --> apply new vlan 1 goto tbl 20
1    0   1432 pport 0(0xffff) --> goto tbl 10

(qemu) info rocker-of-dpa-groups sw1
id (decode) --> buckets
0x32000001 (type L2 multicast vlan 2 index 1) --> groups [0x02000001,0x02000000]
0x02000001 (type L2 interface vlan 2 pport 1) --> pop vlan out pport 1
0x01000002 (type L2 interface vlan 1 pport 2) --> pop vlan out pport 2
0x02000000 (type L2 interface vlan 2 pport 0) --> pop vlan out pport 0
0x01000000 (type L2 interface vlan 1 pport 0) --> pop vlan out pport 0
0x31000000 (type L2 multicast vlan 1 index 0) --> groups [0x01000002,0x01000000]

[Added "query-" prefixes to rocker.json commands as suggested by Eric
Blake <address@hidden>.
--Stefan]

Signed-off-by: Scott Feldman <address@hidden>
Signed-off-by: Jiri Pirko <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 0a2df857a7038c75379cc575de5d4be4c0ac629e
      
https://github.com/qemu/qemu/commit/0a2df857a7038c75379cc575de5d4be4c0ac629e
  Author: Peter Maydell <address@hidden>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M audio/alsaaudio.c
    M audio/ossaudio.c
    M blockdev-nbd.c
    M docs/specs/rocker.txt
    M hmp-commands.hx
    M hmp.c
    M hmp.h
    M hw/net/Makefile.objs
    A hw/net/rocker/qmp-norocker.c
    M hw/net/rocker/rocker.c
    M hw/net/rocker/rocker_fp.c
    M hw/net/rocker/rocker_fp.h
    M hw/net/rocker/rocker_hw.h
    M hw/net/rocker/rocker_of_dpa.c
    M hw/xen/xen_backend.c
    M include/block/aio.h
    M include/qemu/main-loop.h
    M iohandler.c
    M main-loop.c
    M migration/exec.c
    M migration/fd.c
    M migration/rdma.c
    M migration/tcp.c
    M migration/unix.c
    M monitor.c
    M net/l2tpv3.c
    M net/netmap.c
    M net/socket.c
    M net/tap.c
    M qapi-schema.json
    A qapi/rocker.json
    M qmp-commands.hx
    M stubs/set-fd-handler.c
    M tests/rocker/bridge
    M tests/rocker/bridge-stp
    M tests/rocker/bridge-vlan
    M tests/rocker/bridge-vlan-stp
    M tests/rocker/port
    M ui/vnc-auth-sasl.c
    M ui/vnc-auth-vencrypt.c
    M ui/vnc-ws.c
    M ui/vnc.c
    M util/event_notifier-posix.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into 
staging

# gpg: Signature made Fri Jun 12 13:57:20 2015 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg:                 aka "Stefan Hajnoczi <address@hidden>"

* remotes/stefanha/tags/net-pull-request:
  qmp/hmp: add rocker device support
  rocker: bring link up/down on PHY enable/disable
  rocker: update tests using hw-derived interface names
  rocker: Add support for phys name
  iohandler: Change return type of qemu_set_fd_handler to "void"
  event-notifier: Always return 0 for posix implementation
  xen_backend: Remove unused error handling of qemu_set_fd_handler
  oss: Remove unused error handling of qemu_set_fd_handler
  alsaaudio: Remove unused error handling of qemu_set_fd_handler
  main-loop: Drop qemu_set_fd_handler2
  Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler
  tap: Drop tap_can_send
  net/socket: Drop net_socket_can_send
  netmap: Drop netmap_can_send
  l2tpv3: Drop l2tpv3_can_send
  stubs: Add qemu_set_fd_handler

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/9faffeb7772f...0a2df857a703

reply via email to

[Prev in Thread] Current Thread [Next in Thread]