[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/17] hw/net/rocker: Report unimplemented feature with qemu_log_m
From: |
Laurent Vivier |
Subject: |
[PULL 15/17] hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP) |
Date: |
Wed, 19 Feb 2020 11:16:10 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Fix warnings reported by Clang static code analyzer:
CC hw/net/rocker/rocker.o
hw/net/rocker/rocker.c:213:9: warning: Value stored to 'tx_tso_mss' is never
read
tx_tso_mss = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_MSS]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/net/rocker/rocker.c:217:9: warning: Value stored to 'tx_tso_hdr_len' is
never read
tx_tso_hdr_len = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_HDR_LEN]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/net/rocker/rocker.c:255:9: warning: Value stored to 'tx_l3_csum_off' is
never read
tx_l3_csum_off += tx_tso_mss = tx_tso_hdr_len = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: dc488f888
Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
hw/net/rocker/rocker.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c
index 81dd3b5f141d..15d66f6cbcf0 100644
--- a/hw/net/rocker/rocker.c
+++ b/hw/net/rocker/rocker.c
@@ -27,6 +27,7 @@
#include "qemu/iov.h"
#include "qemu/module.h"
#include "qemu/bitops.h"
+#include "qemu/log.h"
#include "rocker.h"
#include "rocker_hw.h"
@@ -207,14 +208,22 @@ static int tx_consume(Rocker *r, DescInfo *info)
if (tlvs[ROCKER_TLV_TX_L3_CSUM_OFF]) {
tx_l3_csum_off = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_L3_CSUM_OFF]);
+ qemu_log_mask(LOG_UNIMP, "rocker %s: L3 not implemented"
+ " (cksum off: %u)\n",
+ __func__, tx_l3_csum_off);
}
if (tlvs[ROCKER_TLV_TX_TSO_MSS]) {
tx_tso_mss = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_MSS]);
+ qemu_log_mask(LOG_UNIMP, "rocker %s: TSO not implemented (MSS: %u)\n",
+ __func__, tx_tso_mss);
}
if (tlvs[ROCKER_TLV_TX_TSO_HDR_LEN]) {
tx_tso_hdr_len = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_HDR_LEN]);
+ qemu_log_mask(LOG_UNIMP, "rocker %s: TSO not implemented"
+ " (hdr length: %u)\n",
+ __func__, tx_tso_hdr_len);
}
rocker_tlv_for_each_nested(tlv_frag, tlvs[ROCKER_TLV_TX_FRAGS], rem) {
@@ -249,12 +258,6 @@ static int tx_consume(Rocker *r, DescInfo *info)
iovcnt++;
}
- if (iovcnt) {
- /* XXX perform Tx offloads */
- /* XXX silence compiler for now */
- tx_l3_csum_off += tx_tso_mss = tx_tso_hdr_len = 0;
- }
-
err = fp_port_eg(r->fp_port[port], iov, iovcnt);
err_too_many_frags:
--
2.24.1
- [PULL 00/17] Trivial branch patches, Laurent Vivier, 2020/02/19
- [PULL 05/17] hw/arm/xlnx-versal: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 02/17] Report stringified errno in VFIO related errors, Laurent Vivier, 2020/02/19
- [PULL 07/17] hw/scsi/esp: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 03/17] scripts/checkpatch.pl: Detect superfluous semicolon in C code, Laurent Vivier, 2020/02/19
- [PULL 06/17] hw/m68k/next-cube: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 08/17] hw/vfio/display: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 16/17] hw/nios2:fix leak of fdevice tree blob, Laurent Vivier, 2020/02/19
- [PULL 01/17] mailmap: Add entry for Yu-Chen Lin, Laurent Vivier, 2020/02/19
- [PULL 15/17] hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP),
Laurent Vivier <=
- [PULL 10/17] target/i386/whpx: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 17/17] hw/xtensa/xtfpga:fix leak of fdevice tree blob, Laurent Vivier, 2020/02/19
- [PULL 04/17] audio/alsaaudio: Remove superfluous semicolons, Laurent Vivier, 2020/02/19
- [PULL 11/17] tests/qtest/libqos/qgraph: Remove superfluous semicolons, Laurent Vivier, 2020/02/19
- [PULL 13/17] hw/display/qxl: Remove unneeded variable assignment, Laurent Vivier, 2020/02/19
- [PULL 14/17] hw/block/pflash_cfi02: Remove unneeded variable assignment, Laurent Vivier, 2020/02/19
- [PULL 12/17] contrib/rdmacm-mux: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 09/17] ui/input-barrier: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- Re: [PULL 00/17] Trivial branch patches, Peter Maydell, 2020/02/20