qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 4cee3c: net/rocker: Cleanup the useless retur


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 4cee3c: net/rocker: Cleanup the useless return value check
Date: Wed, 07 Jun 2017 03:51:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4cee3cf35c05c863f5acf87af915298c752eefd9
      
https://github.com/qemu/qemu/commit/4cee3cf35c05c863f5acf87af915298c752eefd9
  Author: Mao Zhongyi <address@hidden>
  Date:   2017-06-07 (Wed, 07 Jun 2017)

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

  Log Message:
  -----------
  net/rocker: Cleanup the useless return value check

None of pci_dma_read()'s callers check the return value except
rocker. There is no need to check it because it always return
0. So the check work is useless. Remove it entirely.

Suggested-by: Markus Armbruster <address@hidden>
Signed-off-by: Mao Zhongyi <address@hidden>
Signed-off-by: Jason Wang <address@hidden>


  Commit: 6701e5514beab7b781a10424a94e9850c707287c
      
https://github.com/qemu/qemu/commit/6701e5514beab7b781a10424a94e9850c707287c
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-06-07 (Wed, 07 Jun 2017)

  Changed paths:
    M net/socket.c

  Log Message:
  -----------
  Revert "Change net/socket.c to use socket_*() functions" again

This reverts commit 883e4f7624e10b98d16d9adaffb8b1795664d899.

This code changed net/socket.c from using socket()+connect(),
to using socket_connect(). In theory this is great, but in
practice this has completely broken the ability to connect
the frontend and backend:

  $ ./x86_64-softmmu/qemu-system-x86_64 \
       -device e1000,id=e0,netdev=hn0,mac=DE:AD:BE:EF:AF:05 \
       -netdev socket,id=hn0,connect=localhost:1234
  qemu-system-x86_64: -device e1000,id=e0,netdev=hn0,mac=DE:AD:BE:EF:AF:05: 
Property 'e1000.netdev' can't find value 'hn0'

The old code would call net_socket_fd_init() synchronously,
while letting the connect() complete in the backgorund. The
new code moved net_socket_fd_init() so that it is only called
after connect() completes in the background.

Thus at the time we initialize the NIC frontend, the backend
does not exist.

The socket_connect() conversion as done is a bad fit for the
current code, since it did not try to change the way it deals
with async connection completion. Rather than try to fix this,
just revert the socket_connect() conversion entirely.

The code is about to be converted to use QIOChannel which
will let the problem be solved in a cleaner manner. This
revert is more suitable for stable branches in the meantime.

Signed-off-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Jason Wang <address@hidden>


  Commit: b187e2b53055007fa08ccb9fb120578bae0d02f3
      
https://github.com/qemu/qemu/commit/b187e2b53055007fa08ccb9fb120578bae0d02f3
  Author: Peter Maydell <address@hidden>
  Date:   2017-06-07 (Wed, 07 Jun 2017)

  Changed paths:
    M hw/net/rocker/rocker.c
    M hw/net/rocker/rocker_desc.c
    M net/socket.c

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

# gpg: Signature made Wed 07 Jun 2017 04:29:20 BST
# gpg:                using RSA key 0xEF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  Revert "Change net/socket.c to use socket_*() functions" again
  net/rocker: Cleanup the useless return value check

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


Compare: https://github.com/qemu/qemu/compare/8b3e9ca74c98...b187e2b53055

reply via email to

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