1. 26 Jan, 2021 2 commits
  2. 25 Jan, 2021 7 commits
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging · 31ee8950
      Peter Maydell authored
      
      
      # gpg: Signature made Mon 25 Jan 2021 09:05:51 GMT
      # gpg:                using RSA key EF04965B398D6211
      # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal]
      # 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:
        net: checksum: Introduce fine control over checksum type
        net: checksum: Add IP header checksum calculation
        net: checksum: Skip fragmented IP packets
        net: Fix handling of id in netdev_add and netdev_del
      Signed-off-by: Peter Maydell's avatarPeter Maydell <peter.maydell@linaro.org>
      31ee8950
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/gkurz-gitlab/tags/9p-next-pull-request' into staging · 3dcfd4e3
      Peter Maydell authored
      
      
      This fixes a Coverity report and improves the fid reclaim logic.
      
      # gpg: Signature made Mon 25 Jan 2021 09:37:28 GMT
      # gpg:                using RSA key B4828BAF943140CEF2A3491071D4D5E5822F73D6
      # gpg: Good signature from "Greg Kurz <groug@kaod.org>" [full]
      # gpg:                 aka "Gregory Kurz <gregory.kurz@free.fr>" [full]
      # gpg:                 aka "[jpeg image of size 3330]" [full]
      # Primary key fingerprint: B482 8BAF 9431 40CE F2A3  4910 71D4 D5E5 822F 73D6
      
      * remotes/gkurz-gitlab/tags/9p-next-pull-request:
        9pfs: Convert reclaim list to QSLIST
        9pfs: Improve unreclaim loop
        9pfs: Convert V9fsFidState::fid_list to QSIMPLEQ
        9pfs: Convert V9fsFidState::clunked to bool
        9pfs/proxy: Check return value of proxy_marshal()
      Signed-off-by: Peter Maydell's avatarPeter Maydell <peter.maydell@linaro.org>
      3dcfd4e3
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/philmd-gitlab/tags/sdmmc-20210124' into staging · 55d98950
      Peter Maydell authored
      
      
      SD/MMC patches
      
      - Various improvements for SD cards in SPI mode (Bin Meng)
      
      # gpg: Signature made Sun 24 Jan 2021 19:16:55 GMT
      # gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
      # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
      # Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE
      
      * remotes/philmd-gitlab/tags/sdmmc-20210124:
        hw/sd: sd.h: Cosmetic change of using spaces
        hw/sd: ssi-sd: Use macros for the dummy value and tokens in the transfer
        hw/sd: ssi-sd: Fix the wrong command index for STOP_TRANSMISSION
        hw/sd: ssi-sd: Add a state representing Nac
        hw/sd: ssi-sd: Suffix a data block with CRC16
        util: Add CRC16 (CCITT) calculation routines
        hw/sd: sd: Drop sd_crc16()
        hw/sd: sd: Support CMD59 for SPI mode
        hw/sd: ssi-sd: Fix incorrect card response sequence
      Signed-off-by: Peter Maydell's avatarPeter Maydell <peter.maydell@linaro.org>
      55d98950
    • Bin Meng's avatar
      net: checksum: Introduce fine control over checksum type · f5746335
      Bin Meng authored and Jason Wang's avatar Jason Wang committed
      
      
      At present net_checksum_calculate() blindly calculates all types of
      checksums (IP, TCP, UDP). Some NICs may have a per type setting in
      their BDs to control what checksum should be offloaded. To support
      such hardware behavior, introduce a 'csum_flag' parameter to the
      net_checksum_calculate() API to allow fine control over what type
      checksum is calculated.
      
      Existing users of this API are updated accordingly.
      Signed-off-by: default avatarBin Meng <bin.meng@windriver.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      f5746335
    • Guishan Qin's avatar
      net: checksum: Add IP header checksum calculation · d97f1159
      Guishan Qin authored and Jason Wang's avatar Jason Wang committed
      
      
      At present net_checksum_calculate() only calculates TCP/UDP checksum
      in an IP packet, but assumes the IP header checksum to be provided
      by the software, e.g.: Linux kernel always calculates the IP header
      checksum. However this might not always be the case, e.g.: for an IP
      checksum offload enabled stack like VxWorks, the IP header checksum
      can be zero.
      
      This adds the checksum calculation of the IP header.
      Signed-off-by: default avatarGuishan Qin <guishan.qin@windriver.com>
      Signed-off-by: default avatarYabing Liu <yabing.liu@windriver.com>
      Signed-off-by: default avatarBin Meng <bin.meng@windriver.com>
      Reviewed-by: Cédric Le Goater's avatarCédric Le Goater <clg@kaod.org>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      d97f1159
    • Markus Carlstedt's avatar
      net: checksum: Skip fragmented IP packets · 0dcf0c0a
      Markus Carlstedt authored and Jason Wang's avatar Jason Wang committed
      
      
      To calculate the TCP/UDP checksum we need the whole datagram. Unless
      the hardware has some logic to collect all fragments before sending
      the whole datagram first, it can only be done by the network stack,
      which is normally the case for the NICs we have seen so far.
      
      Skip these fragmented IP packets to avoid checksum corruption.
      Signed-off-by: default avatarMarkus Carlstedt <markus.carlstedt@windriver.com>
      Signed-off-by: default avatarBin Meng <bin.meng@windriver.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      0dcf0c0a
    • Markus Armbruster's avatar
      net: Fix handling of id in netdev_add and netdev_del · 831734cc
      Markus Armbruster authored and Jason Wang's avatar Jason Wang committed
      CLI -netdev accumulates in option group "netdev".
      
      Before commit 08712fcb "net: Track netdevs in NetClientState rather
      than QemuOpt", netdev_add added to the option group, and netdev_del
      removed from it, both HMP and QMP.  Thus, every netdev had a
      corresponding QemuOpts in this option group.
      
      Commit 08712fcb
      
       dropped this for QMP netdev_add and both netdev_del.
      Now a netdev has a corresponding QemuOpts only when it was created
      with CLI or HMP.  Two issues:
      
      * QMP and HMP netdev_del can leave QemuOpts behind, breaking HMP
        netdev_add.  Reproducer:
      
          $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio
          QEMU 5.1.92 monitor - type 'help' for more information
          (qemu) netdev_add user,id=net0
          (qemu) info network
          net0: index=0,type=user,net=10.0.2.0,restrict=off
          (qemu) netdev_del net0
          (qemu) info network
          (qemu) netdev_add user,id=net0
          upstream-qemu: Duplicate ID 'net0' for netdev
          Try "help netdev_add" for more information
      
        Fix by restoring the QemuOpts deletion in qmp_netdev_del(), but with
        a guard, because the QemuOpts need not exist.
      
      * QMP netdev_add loses its "no duplicate ID" check.  Reproducer:
      
          $ qemu-system-x86_64 -S -display none -qmp stdio
          {"QMP": {"version": {"qemu": {"micro": 92, "minor": 1, "major": 5}, "package": "v5.2.0-rc2-1-g02c1f0142c"}, "capabilities": ["oob"]}}
          {"execute": "qmp_capabilities"}
          {"return": {}}
          {"execute": "netdev_add", "arguments": {"type": "user", "id":"net0"}}
          {"return": {}}
          {"execute": "netdev_add", "arguments": {"type": "user", "id":"net0"}}
          {"return": {}}
      
        Fix by adding a duplicate ID check to net_client_init1() to replace
        the lost one.  The check is redundant for callers where QemuOpts
        still checks, i.e. for CLI and HMP.
      Reported-by: default avatarAndrew Melnichenko <andrew@daynix.com>
      Fixes: 08712fcb
      
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: Eric Blake's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      831734cc
  3. 24 Jan, 2021 11 commits
  4. 23 Jan, 2021 20 commits