aboutsummaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2023-02-21 11:28:31 +0000
committerPeter Maydell <peter.maydell@linaro.org>2023-02-21 11:28:31 +0000
commit79b677d658d3d35e1e776826ac4abb28cdce69b8 (patch)
treebedcdddc4b5342d5e898a2d9579d0a295ed45fc7 /hw/net
parent4919d0c44afd58e16a8a369ca359de7f0114e04c (diff)
parent525ae115222f0b0b6de7f9665976f640d18c200a (diff)
Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging
# -----BEGIN PGP SIGNATURE----- # Version: GnuPG v1 # # iQEcBAABAgAGBQJj7xKYAAoJEO8Ells5jWIRDZQH/Rao24sq3j97qE5RzekvANzq # GnHUyLnl3yeOSNumv2BJInZTvgUpYL2etGQr3DtGRwOrr7w1vKB3zhY3V3jQefkh # f4rsEGkamL/qM2N2cGUIUSqevo7OGnP8aQojpEi4MWWZ30B3L6jqd4NqyA1gyndV # 1eBkpR+BY2PjcLbgvFUZEXeAn/vapE5NKULXUGhg5mMvgwYH3CgZXpqqkxr876za # S4rZMtReXKNeid14Z35SUjJdV2WKYmo/lN9+GQxF2YNLmDC3RtuFQVm038erSqvs # uLVSg8tiIlCyOcSDpR/BARNrxVwzlJp5X6ocapHubS/i0Rp/Zo7ezSk/XWH1gfU= # =UbzF # -----END PGP SIGNATURE----- # gpg: Signature made Fri 17 Feb 2023 05:37:28 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 * tag 'net-pull-request' of https://github.com/jasowang/qemu: vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check net: stream: add a new option to automatically reconnect vmnet: stop recieving events when VM is stopped net: Increase L2TPv3 buffer to fit jumboframes hw/net/vmxnet3: allow VMXNET3_MAX_MTU itself as a value hw/net/lan9118: log [read|write]b when mode_16bit is enabled rather than abort net: Replace "Supported NIC models" with "Available NIC models" net: Restore printing of the help text with "-nic help" net: Move the code to collect available NIC models to a separate function Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/lan9118.c17
-rw-r--r--hw/net/vmxnet3.c2
2 files changed, 9 insertions, 10 deletions
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index f1cba55967..e5c4af182d 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -15,7 +15,6 @@
#include "migration/vmstate.h"
#include "net/net.h"
#include "net/eth.h"
-#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/net/lan9118.h"
#include "hw/ptimer.h"
@@ -32,12 +31,8 @@
#ifdef DEBUG_LAN9118
#define DPRINTF(fmt, ...) \
do { printf("lan9118: " fmt , ## __VA_ARGS__); } while (0)
-#define BADF(fmt, ...) \
-do { hw_error("lan9118: error: " fmt , ## __VA_ARGS__);} while (0)
#else
#define DPRINTF(fmt, ...) do {} while(0)
-#define BADF(fmt, ...) \
-do { fprintf(stderr, "lan9118: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
/* The tx and rx fifo ports are a range of aliased 32-bit registers */
@@ -848,7 +843,8 @@ static uint32_t do_phy_read(lan9118_state *s, int reg)
case 30: /* Interrupt mask */
return s->phy_int_mask;
default:
- BADF("PHY read reg %d\n", reg);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "do_phy_read: PHY read reg %d\n", reg);
return 0;
}
}
@@ -876,7 +872,8 @@ static void do_phy_write(lan9118_state *s, int reg, uint32_t val)
phy_update_irq(s);
break;
default:
- BADF("PHY write reg %d = 0x%04x\n", reg, val);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "do_phy_write: PHY write reg %d = 0x%04x\n", reg, val);
}
}
@@ -1209,7 +1206,8 @@ static void lan9118_16bit_mode_write(void *opaque, hwaddr offset,
return;
}
- hw_error("lan9118_write: Bad size 0x%x\n", size);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "lan9118_16bit_mode_write: Bad size 0x%x\n", size);
}
static uint64_t lan9118_readl(void *opaque, hwaddr offset,
@@ -1324,7 +1322,8 @@ static uint64_t lan9118_16bit_mode_read(void *opaque, hwaddr offset,
return lan9118_readl(opaque, offset, size);
}
- hw_error("lan9118_read: Bad size 0x%x\n", size);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "lan9118_16bit_mode_read: Bad size 0x%x\n", size);
return 0;
}
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index d2ab527ef4..56559cda24 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -1441,7 +1441,7 @@ static void vmxnet3_activate_device(VMXNET3State *s)
vmxnet3_setup_rx_filtering(s);
/* Cache fields from shared memory */
s->mtu = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.misc.mtu);
- assert(VMXNET3_MIN_MTU <= s->mtu && s->mtu < VMXNET3_MAX_MTU);
+ assert(VMXNET3_MIN_MTU <= s->mtu && s->mtu <= VMXNET3_MAX_MTU);
VMW_CFPRN("MTU is %u", s->mtu);
s->max_rx_frags =